Why is MVCC history managed manually?

2010-05-25 Thread Peter
performing transaction that blocks may end up using all available memory for history. Other than that, letting the GC do the work seems to be a more efficient and simpler approach. I was just curious about the reason you decided to go for the manual approach, that's all. Maybe there is some

Re: Why is MVCC history managed manually?

2010-05-25 Thread Peter
ou could consider keeping a smaller object with just has a collection in it; associated with the transaction. -Peter -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that p

Re: Why is MVCC history managed manually?

2010-05-26 Thread Peter
27;d. Which means all previous Transaction objects have been GC'd. You will need to keep a history list in Ref, but that history list used WeakReference instead of a strong reference. I hope this is a clearer explaination. -Peter -- You received this message because you are subscribed to t

Re: Why is MVCC history managed manually?

2010-05-26 Thread Peter
lazy I am in not wanting to write the code to manage the lists. I appreciate your response. Regards, Peter -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from ne

picking out a tag from a nested struct-map and xml-seq

2010-08-31 Thread Peter
Hi- I'm brand new to Clojure and FP, reading a bunch and working on my first programming task (reading in values from an xml file and a text file and then creating a new text file with some lines/sections of the original text file replaced based on the content of the xml). I found some helpful in

Re: Clojure Code Analysis Tools

2008-12-02 Thread Peter Wolf
Thanks, I strongly agree. I just emailed curious.attempt.bunny to join forces. Curious, are you out there? P [EMAIL PROTECTED] wrote: > On Dec 2, 12:54 pm, Peter Wolf <[EMAIL PROTECTED]> wrote: > >> Since the code doesn't exist yet, I'd have to say no.

Re: Clojure Code Analysis Tools

2008-12-02 Thread Peter Wolf
ent the API for references, refactoring, formatting etc. [EMAIL PROTECTED] wrote: > On Dec 1, 4:11 pm, Peter Wolf <[EMAIL PROTECTED]> wrote: > >> Since I plan to introduce Clojure into existing large Java projects, I want >> to use a decent IDE. So I am writing a Clojur

Re: Clojure Code Analysis Tools

2008-12-02 Thread Peter Wolf
I just pulled the code down. While it's true that there is no implementation, Curious Bunny (merlyn) did an excellent job of making a minimal custom language plugin. This is something that is lacking in IntelliJ's own documentation. By making a trivial change to Curious's code I was able to c

Re: Elegant but very slow

2008-12-07 Thread Peter Wolf
I'm a n00b, but isn't the point of this language to be *faster* than Java?... at least on a multiprocessor machine. Shouldn't the number of processors on the test machine make a big difference to how fast it runs? Whereas, the Java version is only dependent on the clock rate of the individual

Re: Elegant but very slow

2008-12-07 Thread Peter Wolf
d MAP instead of a LOOP do the trick? I would expect that to compile into parallel code. Otherwise, why go through all the pain of learning functional programming (and convincing management)? Randall R Schulz wrote: > On Sunday 07 December 2008 07:11, Peter Wolf wrote: > >> I'm

Re: Elegant but very slow

2008-12-07 Thread Peter Wolf
ereas Java will always be a slave to clock-rate. Stephen C. Gilardi wrote: > On Dec 7, 2008, at 10:11 AM, Peter Wolf wrote: > > >> Shouldn't the number of processors on the test machine make a big >> difference to how fast it runs? Whereas, the Java version is only &

Re: slime+clojure problem

2008-12-07 Thread Peter Eddy
ecify (clojure ("clojure")) instead of (clojure (clojure") :init > swank-clojure-init), I get the same error as you. The :init param was it, thank you very much! - Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Clojure Code Analysis Tools

2008-12-11 Thread Peter Wolf
d am debugging Brace Matching. BTW, Rich, I stole the Lexer from the Clojure source. I hope that's OK. Once I get Brace Matching going, I was going to check it in, and invite others to join in the hacking. Please email me at [EMAIL PROTECTED] if you want to help with the IntelliJ plug

Does ANTS.CLJ still work?

2008-12-15 Thread Peter Wolf
Hello I was just following the directions on Ubuntu setup directions on http://riddell.us/clojure/ I get the following error when I try ANTS.CLJ. Has something changed? Peter (defn setup "places initial food and ants, returns seq of ant agents" [] >>> (sync nil

Re: Does ANTS.CLJ still work?

2008-12-16 Thread Peter Wolf
Hmmm... I am also having problems with SLIME (see below) Perhaps the otherwise-very-nice Ubuntu instructions need to be updated http://riddell.us/clojure/ Can someone recommend the current best way to get a matching Clojure and Swank and Slime Thanks Peter ser=> java.lang.Except

IntelliJ Plugin now on Google Code

2008-12-19 Thread Peter Wolf
the REPL. Please email me if you want to join this project. Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubs

Re: IntelliJ Plugin now on Google Code

2008-12-19 Thread Peter Wolf
Of course, having done that, you could help me fix the bugs ;-) P Randall R Schulz wrote: > Peter, > > Great news! > > On Friday 19 December 2008 05:36, Peter Wolf wrote: > >> For those who are following or helping my efforts (thank you), the >> IntelliJ Clojure

Re: IntelliJ Plugin

2008-12-27 Thread Peter Wolf
. Peter On Wed, Dec 24, 2008 at 4:25 PM, Justin Johnson wrote: > Hi, > > Is this the appropriate mailing list to talk about the Clojure IntelliJ > plugin? The Google Code site didn't list any other mailing list. > > http://code.google.com/p/clojure-intellij-plugin/ > &g

Re: Dubious generated bytecode

2008-12-28 Thread Peter Collingbourne
s the stricter verifier, and rejects clojure generated code with a stack trace similar to that shown in [2]. I am attaching a patch which modifies clojure to emit a checkcast wherever it is required by a strict verifier. Thanks, -- Peter [1] http://citeseerx.ist.psu.edu/viewdoc/download

Debian/Ubuntu clojure package

2009-01-02 Thread Peter Collingbourne
Hello, I have recently put together a Debian package for clojure. The package may also work on Ubuntu however this is untested. It may be downloaded from: http://www.pcc.me.uk/~peter/debian/clojure_0.0.20081217-1_all.deb You may also be interested in the "source package"

Re: when performance matters

2009-01-13 Thread Peter Wolf
Java at the moment. Until we regularly have 10's of processors, it seems hard to justify that kind of hit for code that has to be fast. So, I use Clojure for scripting and high level code currently. Peter P.S. I also find that C++ and Java are now approximately the same speed. A

Re: IntelliJ Plugin

2009-01-14 Thread Peter Wolf
J. Is the IntelliJ one in a usable state, or is it > not ready for some alpha-level testers? > > Cheers, Aria > > On Dec 29 2008, 10:36 am, "Justin Johnson" > wrote: > >> On Sat, Dec 27, 2008 at 8:55 AM, Peter Wolf wrote: >> >>> Hi Justi

Re: when performance matters

2009-01-14 Thread Peter Wolf
reduce just hint at the possibilities of a high- > performance, macro-based math library, and I expect similar macros to > come from people actually doing number crunching with Clojure. > > Rich > > On Jan 13, 2:53 pm, Peter Wolf wrote: > >> Why is Clojure slower than Jav

Pre-Alpha of IntelliJ plugin for Clojure

2009-01-14 Thread Peter Wolf
code was marked as an error. Please report all cases, with an S-Expression to opus...@gmail.com. To install go to Settings/Updates and add the following to Plugin Hosts /http://clojure-intellij-plugin.googlecode.com/svn/trunk/plugin/updatePlugins.xml/ Then hit "Check Now" Enjoy!

How to implement "go to definition" and "find all references"

2009-01-16 Thread Peter Wolf
at a reference will always refer to the same location? Note that I need a 100% reliable solution, if I am going to implement automatic refactoring on top of it. No one wants refactoring that messes up the code 5% of the time. Thanks Peter --~--~-~--~~~---~--~---

Re: How to implement "go to definition" and "find all references"

2009-01-16 Thread Peter Wolf
ut? What does the API to the LISP process look like? Also what happens if you have the following in a file? How does the image figure out which (def...) maps to which reference? (def foo 1) foo (def foo 2) foo Thanks Peter lpetit wrote: > Hello, > > While I understand this solut

Re: How to implement "go to definition" and "find all references"

2009-01-17 Thread Peter Wolf
Actually, the observation below might be really good news. Does it means that all references are resolved at compile time? Do I ever have to run the code to figure out the context of a reference? Or, does the lexical context give me all the information I need? I have already reimplemented t

Re: How to implement "go to definition" and "find all references"

2009-01-17 Thread Peter Wolf
/source/browse/ lpetit wrote: > Hello Peter, > > As I understand, you've made what I also began to make for clojuredev > (clojure dev environment for eclipse me and other folks are working on > on our spare time) : a static source code parser. Mine is currently > not very tes

Re: How to implement "go to definition" and "find all references"

2009-01-17 Thread Peter Wolf
Excellent! How is the Clojure compiler tested? Is there a set Clojure code that serves as Unit tests? I need something with all the corner cases both for syntax and references. Thanks P Stephen C. Gilardi wrote: > > On Jan 17, 2009, at 8:40 AM, Peter Wolf wrote: > >>

Re: Common backend project?

2009-01-17 Thread Peter Wolf
used to test tools, and ensure common behavior. These would be useful for all tools written in all languages. My 2 cents P Meikel Brandmeyer wrote: > Hi, > > Am 17.01.2009 um 16:22 schrieb Peter Wolf: > >> I think much of the parser, such as the JFlex lexer is certainly >

File, Line Number and Usage Info

2009-01-22 Thread Peter Wolf
all the code that is referencing a symbol? I need that to implement "find-usages", "rename" and "move". Thanks Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. T

Calling Clojure from Java (again)

2009-01-22 Thread Peter Wolf
ode to clobber the IDE. I also want the defined symbols for a file to be a function just of the code in that file, not all the files that happen to be loaded by the IDE at the moment. How does Swank handle this? Thanks Peter --~--~-~--~~~---~--~~ You received

Re: File, Line Number and Usage Info

2009-01-22 Thread Peter Wolf
Ooops! How embarrassing <:-( Yes, that's exactly what I am doing. It did not occur to me that there is extra information embedded in the reply that marks it as being part of a thread. Sorry, won't happen again P lpetit wrote: > Peter, > > A weird thing seems to h

Re: Calling Clojure from Java (again)

2009-01-22 Thread Peter Wolf
Thanks for the lengthy reply Laurent, Replies in-line lpetit wrote: > Peter, > > We asked us the same question some weeks ago, on clojuredev. > > We took the path to follow how eclipse launches a java application > when the user requires it to test it. > So we created

Re: Calling Clojure from Java (again)

2009-01-22 Thread Peter Wolf
Hi Laurent, My questions and current beliefs are: 1) Does Eclipse use the server for resolving references? 2) Is the server visible to the user, or hidden inside Eclipse? 3) Does the server call load-file? 4) Can the user break the server with bogus code in a file? 5) What happens if a file has

Re: Calling Clojure from Java (again)

2009-01-22 Thread Peter Wolf
fine the symbol "foo", but not call it. (defn foo [message] (pop-up-window message)) (foo "Hi Mom!") If so, I could do references safely. P Stuart Sierra wrote: > On Jan 22, 6:51 pm, Peter Wolf wrote: > >> However, if there is only one Clo

Re: Basic about setting upp Clojure and editor enviroment

2009-01-23 Thread Peter Wolf
Or try the IntelliJ plugin, if you like that IDE http://code.google.com/p/clojure-intellij-plugin/ It works fine on Windows and Linux. We are currently fixing the Mac. P Matt Clark wrote: > If you're not already an emacs user, I found it can be quite the > learning curve getting into it. So

evalOnlyDefs

2009-01-23 Thread Peter Wolf
Looking for opinions from Clojure internals Wizards... I am thinking about "safe loading" for IDEs (see other thread). IDEs need a way to load and resolve code, without calling script code that might be in the file. I was looking the code called by load-file and load. Here is Compiler.eval(

IntelliJ Plugin Pre-Alpha 0.03 Available

2009-01-23 Thread Peter Wolf
For those who like IntelliJ, a new version of the plugin is available. This one has numerous fixes, but is mostly interesting because the Debugger and Profiler work (or at least JProfiler). The Debugger and Profiler currently treat Clojure as compiled Java, and don't know how to go from byte

Re: IntelliJ Plugin Pre-Alpha 0.03 Available

2009-01-23 Thread Peter Wolf
You are more than welcome. Enjoy! I am interested that it works on your Mac. Others have reported problems (but not with this particular JAR). What version of Mac and IntelliJ are you using? Peter Francesco Bellomi wrote: > I installed it and it works really well, > -- thanks

Re: IntelliJ Plugin Pre-Alpha 0.03 Available

2009-01-26 Thread Peter Wolf
By request... Here some screenshots showing the IntelliJ Plugin in action http://code.google.com/p/clojure-intellij-plugin/wiki/PageName?ts=1232979185&updated=PageName Enjoy Peter Laurent PETIT wrote: > Hello, > > Could you place some screenshots in a wiki page ? > > I&#x

Length of Sequence

2009-01-28 Thread Peter Wolf
Here's a dumb question, but I can't find it in the docs: How do I get the length of a sequence? Is there some generic way to find the number of elements in something that might be list, map, vector or lazy? There must be some sort of built in function, or an idiom Thanks P --~--~-~-

Re: Length of Sequence

2009-01-28 Thread Peter Wolf
Thanks guys! I knew I could 'count' on you ;-) Chouser wrote: > On Wed, Jan 28, 2009 at 2:15 PM, Peter Wolf wrote: > >> How do I get the length of a sequence? Is there some generic way to >> find the number of elements in something that might be

Re: Length of Sequence

2009-01-28 Thread Peter Wolf
and Maps. Rich Hickey wrote: > > On Jan 28, 2:19 pm, Chouser wrote: > >> On Wed, Jan 28, 2009 at 2:15 PM, Peter Wolf wrote: >> >> >>> How do I get the length of a sequence? Is there some generic way to >>> find the number of elements in som

Re: What profilers are you using?

2009-02-06 Thread Peter Wolf
Hi Sergio, I have been using JProfiler with the IntelliJ Clojure plugin. The combination seems to work fine, except that JProfiler does not know how to display Clojure source code associated with a function. However, there is enough information displayed that you can do it trivially. Peter

IntelliJ Plugin -- Wonderful News!

2009-02-06 Thread Peter Wolf
://svn.jetbrains.org/idea/Trunk/clojure-plugin Enjoy (Greatly) Peter Hello, Peter. I'm going to develop plugin for IntelliJ IDEA for Clojure language. Talking with Rich I knew about your plugin, which already has parser and several nice features, based on it withou Program Stru

Clojure Maps and Java Maps

2009-02-06 Thread Peter Wolf
p? I bet I could do it in one line if I knew the magic. Thanks Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsu

Re: IntelliJ Plugin -- Wonderful News!

2009-02-08 Thread Peter Wolf
I must have the wrong version of the dev kit; what's the correct > version to be using? > > Thanks, > > Howard > > > On Fri, Feb 6, 2009 at 7:53 AM, Tom Ayerst wrote: > >> That is excellent news. Now I just to learn enough Clojure to properly >> contri

Re: Clojure plugin for IntelliJ IDEA published

2009-02-24 Thread Peter Wolf
report. Thanks Ilya again, Peter Laurent PETIT wrote: > Congratulations! > > > 2009/2/24 Ilya Sergey mailto:ilyas...@gmail.com>> > > Hello, all! > > I'm happy to present alpha-version of official Clojure plugin for > IntelliJ IDEA "La Clo

"Adding" strings

2009-02-26 Thread Peter Wolf
Hey all, What is the idiomatic way to concatenate strings? Here are some things that I expected to work, but didn't (+ "foo" "bah") (conj "foo" "bah") (into "foo" "bah") For the moment I am doing (.concat "foo" "bah") But it seems wrong Thanks P --~--~-~--~~-

Re: "Adding" strings

2009-02-26 Thread Peter Wolf
he right thing as with other Java and scripting languages? I think this would be popular with non-LISPers. P Laurent PETIT wrote: > (str "foo" "bah") > > and if you have a collection you can (apply str coll) > > HTH, > > -- > Laurent > > 2009/

Re: Mathy operations on non-numerics (was "Adding" strings)

2009-02-26 Thread Peter Wolf
e last "else if" in ops() and will only happen when the args are not some sort of Number. Finally, if it doesn't already, I would expect type hints to make things faster. So, it should not be necessary to explicitly call a fast-math library. My 2 n00by cents... P Phil Hagelber

Re: doall, dorun, doseq, for - Debugging as a side effect?

2009-03-03 Thread Peter Wolf
RE: Side Effects What about logging? Without a debugger I use lots of print's to debug my code... and that often produces confusing results as things may not get evaluated in the order I expect. For that matter, now that we have integrated Java debuggers, what does setting a breakpoint real

Multimethods & derive

2009-06-07 Thread Peter Salvi
would be very useful to have something that is the ancestor of everything (like T in common lisp). Thanks, Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Re: Multimethods & derive

2009-06-08 Thread Peter Salvi
On Jun 8, 3:51 pm, Konrad Hinsen wrote: > See also my patch that creates such a universal root type [...] Nice! That's exactly what I was thinking about Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: Java STM

2009-08-27 Thread peter veentjer
Hi Christian, On Jul 13, 10:37 am, Christian Vest Hansen wrote: > I believe that DeuceSTM i primarily intended as a research platform > for Java STMs, hence the flexibility with pluggable algorithms. > > Another Java STM is multiverse:http://code.google.com/p/multiverse/- > the focus here is on

Re: Java STM

2009-08-28 Thread peter veentjer
> No. I don't want to use transactions for workflow. I don't want > blocking transactions. I don't want read tracking. With multiverse it depends on the engine being used and the settings on the transaction. And readonly transactions also don't track reads. > > And since Clojure is using MVCC, d

N00B Java Question

2009-11-24 Thread Peter Wolf
tter method. I can't find anything about accessing static fields in the docs. Thanks in advance Peter -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new

Re: Question about Responsiveness of Garbage Collection

2010-01-21 Thread Peter Schuller
ay to do it or anything. The -XX:+DisableExplicitGC is because some software authors try to be "smart" and insert System.gc() calls at "appropriate" points. They tend to fail, so if you select a GC that actually does handle your case with minimal pauses you also want to disable

Re: Exception handling functional style

2010-01-30 Thread Peter Schuller
nse for that particular API (such as read-line). -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please

Prepping clojure for packaging (was: Re: Clojure for system administration)

2010-02-05 Thread Peter Schuller
ser experience once package maintainers start picking this up, just like the case is with Python and Ruby. I'd be interested in looking into getting some kind of draft implementation of this, if people think it's a good idea (though I can't make time commitments - busy busy busy). --

Re: Prepping clojure for packaging (was: Re: Clojure for system administration)

2010-02-06 Thread Peter Schuller
erface with the infrastructure of the language. And any random blackbox doesn't cut it; certain demands are imposed on the blackbox in order for it to play nice with the packaging infrastructure. At this time I haven't thought this through enough in the case of Clojure to offer a prac

Re: Prepping clojure for packaging (was: Re: Clojure for system administration)

2010-02-06 Thread Peter Schuller
t then what about GPL libraries and similar license hassles? Actually, how is this dealt with in the Maven community? -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Re: Prepping clojure for packaging (was: Re: Clojure for system administration)

2010-02-09 Thread Peter Schuller
solved the problem of not downloading during build. One should probably look into doing something similar for other packaging systems then. Guess I need to bite the bullet and learn Maven ;) -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "

Why the implicit do in forms like let?

2010-02-22 Thread Peter T
plicit do. Kind regards, Peter -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubsc

Re: another concurrency question: could there be contention for allocation (consing etc.)?

2010-03-27 Thread Peter Schuller
http://research.sun.com/techrep/2000/smli_tr-2000-88.pdf Of course both CMS and G1 will have changed since the original publications of the papers, but they should offer good insight. -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure&

Re: "wrong number of args" with nested map

2010-04-19 Thread Peter Salvi
Also the function (defn foo [map1 map2] (map map2 (keys map1))) seems to be a bit more clear. Peter -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new m

Re: code review request: clojure.java.io

2010-05-11 Thread Peter Schuller
them)? An admittedly Unix biased expected behavior would be, I believe, to not do that by default, but maybe have an option to do so. (Did you want feedback here or on assembla?) -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: Cyclical refs fail on Clojure 1.2?

2010-05-11 Thread Peter Schuller
in the REPL in both 1.1 and 1.2 because of the after-eval printing of the result, but the alters do succeed. In other words, *printing* a, @a, b or @b may give you difficulties due to infinite recursion. But is one of the (dosync ...) blocks really failing? -- / Peter Schuller -- You received t

Re: code review request: clojure.java.io

2010-05-11 Thread Peter Schuller
e for inclusion I'd be interested in having a stab at it (it's a nicely bite-sized opportunity to write some clojure). -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clo

Re: code review request: clojure.java.io

2010-05-11 Thread Peter Schuller
. The simplest "fix" (assuming everyone agrees it's a problem) is to simply change it not to, but I suggested the option to allow for both - but the default should presumably be to *not* follow symlinks. -- / Peter Schuller -- You received this message because you are subscribed

Re: code review request: clojure.java.io

2010-05-12 Thread Peter Schuller
> i.e. I agree with you, but am also against allowing this behaviour as > an option, unless others feel it's a good option to have. I can definitely buy that. -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: code review request: clojure.java.io

2010-05-12 Thread Peter Schuller
s API, but I failed to confirm it. In that case, I suggest putting a huge warning in the documentation at least, as to the potential destructiveness of the operation. (Ant's trick with canonical names feels shaky in the context of something as general-purpose as delete-file) -- / Peter Sc

Re: How do I run a script? This has me stumped.

2010-05-15 Thread Peter Schuller
346) at clojure.lang.RestFn.invoke(RestFn.java:413) at clojure.lang.Var.invoke(Var.java:359) at clojure.lang.AFn.applyToHelper(AFn.java:173) at clojure.lang.Var.applyTo(Var.java:476) at clojure.main.main(main.java:37) -- / Peter Schuller -- You received this m

Re: How do I run a script? This has me stumped.

2010-05-15 Thread Peter Schuller
;(println "test")' > test.clj % java -cp /usr/local/share/java/classes/clojure.jar clojure.main test.clj test -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clo

Re: How do I run a script? This has me stumped.

2010-05-15 Thread Peter Schuller
said file contain actual data not valid clojure, or was it just an empty file? If the latter, no output is expected, as you point out. -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Why is JLine better than just command-line?

2010-05-16 Thread Peter Schuller
;ctrl-p" gives me the line I just wrote, etc. For me, being used to primarily sitting at the zsh command line,I would not be able to use the plain REPL without it or I'd go nuts ;) -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups

Re: Actors not good for concurrency model

2010-05-17 Thread Peter Schuller
ang, and that there is no other means to avoid deadlock, meaning that while you will not deadlock in the message passing system you can cause memory exhaustion. Disclaimer: While I've played with erlang I'm not really that into it, please correct me someone if I've misrepresented any

Re: Actors not good for concurrency model

2010-05-17 Thread Peter Schuller
s not mean that you cannot use them to build something on top that *is* susceptible to deadlock/races. -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that

Re: Actors not good for concurrency model

2010-05-17 Thread Peter Schuller
state in an erlang actor. The claim is rather that the intended fundamental model implemented by an actor is not one of shared mutable state. -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send emai

Re: Actors not good for concurrency model

2010-05-18 Thread Peter Schuller
eed, overall, with the originally posted article. -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be p

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Peter Schuller
ng makes it nice and tidy. While I recognize the perl (or whatever the original is) precedent from chomp/chop, there is precedent for trim/left trim/right trim too. What *would* one call trim/ltrim to make them consistent with chomp? -- / Peter Schuller -- You received this message because you

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Peter Schuller
> Personally, I like the lstrip/strip/rstrip, but that's just because > I'm used to them. strip is fine too IMO; I'm neutral between *strip and *trim. -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: question about agent implementation

2010-05-26 Thread Peter Schuller
d nothing queued. doRun() itself keeps itself running until it manages to empty the queue, at which point a future enqueue() will once again re-start execution. -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: question about agent implementation

2010-05-26 Thread Peter Schuller
> Unless I am misunderstanding the context in which the code runs, I Which I was. Please ignore my previous post (sorry, think before I post... think before I post...) and consider me joined in the OP's question. -- / Peter Schuller -- You received this message because you are subsc

Re: question about agent implementation

2010-05-26 Thread Peter Schuller
tion with simple CAS loops to great effect.) -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please

Re: question about agent implementation

2010-05-26 Thread Peter Schuller
t;non-empty" can be atomically detected by enqueue(), allowing it to determine whether or not it was responsible for such a state transition, in which case it schedules the action for execution. -- / Peter Schuller -- You received this message because you are subscribed to the Google Grou

How to: reduce boolean operations?

2013-05-21 Thread Peter Mancini
OK long time lurker here. I've been growing in my Clojure strength for a while now. For the most part I think I get it and I have no problem getting programs to do what I want. However, sometimes I get stumped. I have one function that produces a list of booleans like '(false false true). It se

Re: How to: reduce boolean operations?

2013-05-22 Thread Peter Mancini
false value. > > Same thing goes for reducing with #(or %1 %2) vs. using some. > > Cheers, > Michał > > > > > On Wed, May 22, 2013 at 5:36 AM, Peter Mancini > > > > wrote: > >> OK long time lurker here. I've been growing in my Clojure s

Re: How to: reduce boolean operations?

2013-05-22 Thread Peter Mancini
won't get a bad collection then the test and exception aren't needed. Its an interesting problem - especially when you are writing "mission critical" code. On Wednesday, May 22, 2013 9:55:38 AM UTC-5, Jim foo.bar wrote: > > On 22/05/13 15:54, Peter Mancini wrote: > &

Re: How to: reduce boolean operations?

2013-05-22 Thread Peter Mancini
So I did some coding and came up with this but it is broken; (= java.lang.Boolean (type false)) ;;evaluates to true (defn all-true? [coll] (every? (cond (= java.lang.Boolean (type identity)) identity :else false) coll)) ;;compiles (all-true? '(true true true)) ;; throws java.lang.ClassCas

Re: How to: reduce boolean operations?

2013-05-22 Thread Peter Mancini
Duh never mind - simplified it and it works like a charm now. (defn all-true? [coll] (every? (fn [x] (= x true)) coll)) (all-true? '(true true true)) (all-true? '(true true false)) (all-true? '(true true 3)) (all-true? '(3 \# !)) No exception on bad input data but if I really need to do that

Re: I18n

2013-05-26 Thread Peter Taoussanis
Since this thread seems to come up from time to time, just adding a quick pointer to Tower: https://github.com/ptaoussanis/tower This gives (among other things) a translation tool using standard Clojure maps for content, Markdown support, translation fallbacks, Ring localization middleware, and

regular expressions how-to: recognize lines?

2013-05-29 Thread Peter Mancini
(def testcase "Line 1\nLine 2\nTarget Line\nLine 4\nNot a target line") (println testcase) (re-seq #"(?i)^target" testcase) (re-seq #"(?i)target" testcase) Line 3 finds nothing. It should find the third line, first word. Ultimately I'd like #"(?i)^Target.*$" to work in finding the entire line. I

Re: regular expressions how-to: recognize lines?

2013-05-29 Thread Peter Mancini
There has to be some way to turn on line recognition. Its a basic function of regex. I know the string has lines, I can even use clojure.string/split-lines on it. I shouldn't have to do that and map against it. It should be built into the regular expression system. I'm certain my problem is ign

Re: regular expressions how-to: recognize lines?

2013-05-29 Thread Peter Mancini
Winner Winner Chicken Dinner! Thanks. Where do I find that? Much appreciated! On Wednesday, May 29, 2013 11:45:55 AM UTC-5, sw1nn wrote: > > You need to pass the multiline 'm' flag to the regex. some variant of: > > (def testcase "Line 1\nLine 2\nTarget Line\nLine 4\nNot a target line") > (printl

Core Logic Reference Documentation

2013-05-29 Thread Benjamin Peter
Hello, I am currently trying to find my way to using clojure core logic, watching some videos, reading tutorials and trying to read the dissertation about miniKanren. While this is quite nice to grasp the concepts I feel the need for a complete reference documentation listing all the functions

Re: [ANN] core.rrb-vector -- RRB-Tree-based confluently persistent vectors

2013-06-01 Thread Peter Taoussanis
That looks great Michał, thanks for your work! Have use cases for something like this popping up quite regularly - definitely looking forward to a production-ready implementation. Cheers! - Peter -- -- You received this message because you are subscribed to the Google Groups "Clojure&q

[ANN] Library updates (Redis & DynamoDB clients, logging+profiling, i18n+L10n, serialization, A/B testing)

2013-06-03 Thread Peter Taoussanis
ways, am very happy to take ideas/comments/PRs/whatever - a lot of the recent improvements above were a result of direct/indirect input from other folks (thank you!). Have an awesome Monday, cheers! - Peter Taoussanis (taoensso.com <https://www.taoensso.com>) -- -- You received this mess

Looking for Clojure freelancers

2013-06-03 Thread Peter Taoussanis
email so you can decide if/when something grabs your fancy. Cheers! - Peter (taoensso.com <https://www.taoensso.com>) -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com

  1   2   3   4   5   6   >