Re: Group words by their first letter and sum their frequencies

2013-07-12 Thread James Trunk
Hi Andy, I'd missed the more recent versions with tool-tips, thank you for pointing me to them. Regards, James On Thursday, July 11, 2013 5:11:21 PM UTC+2, Andy Fingerhut wrote: There is a link Download other versions with tooltips near the top of the Clojure Cheat Sheet page

Re: ClassCastException in APersistentVector.doEquiv with custom implementation of IPersistentVector

2013-07-12 Thread Vincent
On Friday, July 12, 2013 12:01:08 AM UTC+2, Sean Corfield wrote: On Wed, Jul 10, 2013 at 11:00 AM, Vincent vhenn...@gmail.comjavascript: wrote: I guess I can proxy APersistentVector, but the Clojure docs [1] advise to use reify in favour to proxy whenever possible. My goal is to have

Re: Multiple REPLs in Emacs? (was: test run startup time

2013-07-12 Thread Islon Scherer
Here at doo we have a shortcut C-c X where X is a number to change between nrepls. The code is in https://github.com/maxweber/emacs.d/blob/master/my/nrepl.el Note that the nrepl ports are hardcoded but it's good enough for us. Hope this helps. -- Islon On Thursday, July 11, 2013 11:53:31 PM

Re: (newbie) replace certain values of a map based on a predicate

2013-07-12 Thread Colin Yates
Thanks Cedric, I am constantly writing code and then finding something in the core library whivh already does what I need :). http://clojuredocs.org/clojure_core/1.2.0/clojure.walk/keywordize-keys was the latest gem. On 5 Jul 2013 22:51, Cedric Greevey cgree...@gmail.com wrote: Even without

Re: Doc about auto-namespaced keywords (e.g. ::user)?

2013-07-12 Thread Bastien Guerry
Hi Chas, Chas Emerick c...@cemerick.com writes: We talked about namespaced keywords in 'Clojure Programming'. A brief introduction to them can be found on page 14, which you can get for free @ http://clojurebook.com (look for the first chapter link on the right). They're used for more than

Re: Stack overflow deep in repl printer

2013-07-12 Thread David Goldfarb
Yes, I agree with you: better to bind outside the whole repl loop. I misspoke when I said around the printing. That said, I think it might still be reasonable to put much tighter bounds on the cotents inside the printing of # ... . David On Thursday, July 11, 2013 3:09:07 PM UTC+3, Meikel

Re: core.async: communicating termination

2013-07-12 Thread vemv
If one used those preds to try putting values on the channels one is asking about, then yes, that would generate a classic nasty check-then-act scenario: (when-not (closed? c) (! c 42)) ;; Value could be never put, in face of interleavings Programmers experienced in concurrency should have

lazy-seq with meta

2013-07-12 Thread Karsten Schmidt
Hello, what is the correct way (assuming there is one) to create a lazy-seq with metadata attached? The below works for short seqs, but causes a stack overflow for large ones, which obviously means the lazy-seq mechanism is altered/broken if wrapped with `with-meta`. So I guess there must be

Re: core.async: communicating termination

2013-07-12 Thread Brandon Bloom
However, if what one is trying is to *stop* putting values on the channel, I see no possible race conditions. Querying the state of a channel at worst leads to race conditions and at best leads to bad design. You're only supposed to close a channel from the producer side. So if you're the

Re: core.async: communicating termination

2013-07-12 Thread Víctor M . Valenzuela
Querying the state of a channel at worst leads to race conditions and at best leads to bad design. The open/closed state of a channel is simple to reason about (it only changes, if ever, once), unlike the rest of state that is associated to a given channel... You're only supposed to close a

Re: core.async: communicating termination

2013-07-12 Thread Brandon Bloom
You're only supposed to close a channel from the producer side. Why? First, an appeal to authority: http://golang.org/pkg/builtin/#close Notice the type of the argument: chan- That's a write-only port. Go's type system allows automatic coercion from read/write ports to constrained read or write

ClojureScript concurrency?

2013-07-12 Thread Alexander Gunnarson
One of Clojure's main selling points is the ability to implement concurrency in a fairly straightforward way. I know that ClojureScript doesn't support concurrency because JavaScript's VM doesn't support it. I mean, of course you can try to get around that by doing crazy tricks with

Re: ClojureScript concurrency?

2013-07-12 Thread Michał Marczyk
At the risk of sounding pedantic, concurrency is not the same as parallelism. Multiple threads can be scheduled on a single core (and that's plenty useful). So, with the async stuff you mention, JavaScript already supports concurrency. ClojureScript has recently come to have particularly good

Re: ClojureScript concurrency?

2013-07-12 Thread Ben Mabey
On Fri Jul 12 16:56:17 2013, Michał Marczyk wrote: At the risk of sounding pedantic, concurrency is not the same as parallelism. Multiple threads can be scheduled on a single core (and that's plenty useful). So, with the async stuff you mention, JavaScript already supports concurrency.

[ANN] Ntable dependecy table generator

2013-07-12 Thread Kelker Ryan
Ntable is a Clojure namespace dependency table generator. https://github.com/runexec/ntable Example output of command: java -jar ntable-0.1.0-SNAPSHOT-standalone.jar /src/chp/chp/src/chp/routes/example.clj :use chp.core compojure.core [chp.html :only [escape]]chp/src/chp/routes/user.clj :use

run-jetty not working in a virtualbox vm?

2013-07-12 Thread Daniel Higginbotham
I'm trying to start a jetty server on a virtualbox vm (ubuntu 12.04 32 bit) by running the following: (run-jetty #'app {:port (Integer. (get (System/getenv) PORT 8080)) :join? false}) However, I can't connect to the server. If I run netstat -lp the java process doesn't show up and it looks as

Re: ClojureScript concurrency?

2013-07-12 Thread Alexander Gunnarson
To learn more Rob Pike gave a good presentation on 'Concurrency Is Not Parallelism': http://vimeo.com/49718712 Good video. Thanks for the link. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: run-jetty not working in a virtualbox vm?

2013-07-12 Thread gaz jones
Just to check - you have set :join? false so the thread will not block until the server ends - are you doing this intentionally and blocking the thread elsewhere? On Fri, Jul 12, 2013 at 8:45 PM, Daniel Higginbotham nonrecurs...@gmail.com wrote: I'm trying to start a jetty server on a