This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-11
Channels
- # admin-announcements (71)
- # beginners (8)
- # boot (109)
- # cbus (5)
- # cider (27)
- # cljsrn (77)
- # clojure (65)
- # clojure-austin (5)
- # clojure-berlin (1)
- # clojure-brasil (1)
- # clojure-dev (58)
- # clojure-japan (15)
- # clojure-russia (193)
- # clojure-seattle (3)
- # clojurescript (120)
- # cursive (19)
- # data-science (1)
- # datomic (10)
- # docs (1)
- # editors-rus (17)
- # emacs (2)
- # events (1)
- # funcool (7)
- # hoplon (2)
- # jobs (1)
- # jobs-rus (16)
- # ldnclj (7)
- # leiningen (3)
- # off-topic (12)
- # om (450)
- # onyx (122)
- # re-frame (69)
- # reagent (28)
- # yada (20)
As a data point from the other end of the spectrum, we tend to take each milestone release of Clojure to production as they are generally very stable. That lets us take advantage of new features as soon as they appear. We originally went to production on 1.3.0 Alpha 7 (or Alpha 8 ) back in 2011 and we’re on 1.8.0 Beta 1 in production right now, with Beta 2 on staging, ready to go to production in our next build.
Yeah, but you're crazy :)
The first time I read your feedback on putting 1.7.alpha something into production I was like...ok, who would do this. But after figuring your workflow out and the success you have it puts a very positive light on clojure itself. So I think it is a good advertisement for the language.
@alexmiller: the socket REPL design page mentions some special keywords to drive some REPL behavior. was that implemented yet? can't find any references in the code?
It was implemented and then we decided we did not need it and it was removed
java -cp
lein classpath` -Dclojure.server.myrepl="{:address \"127.0.0.1\" :port 5555 :accept clojure.repl/repl :args [] :server-daemon false}" clojure.main -r`
java -cp clojure-1.8.0-RC1.jar -Dclojure.server.myrepl="{:address \"127.0.0.1\" :port 5555 :accept clojure.epl :args [] :server-daemon false}" clojure.main -r
The default repl lacks support for some useful stream redirection
Gimme a second, otp
there are some docs on this at http://clojure.org/repl_and_main btw farther down the page
I would recommend that you use clojure.core.server/repl as the repl accept function - this sets up the streams for the socket appropriately which the default repl will not
you are also passing a number of values you don't need to that have the same default values
thx the http://clojure.org example works
you had a typo in the accept function above - clojure.epl, not sure if that was the source of the NPE
but might be able to improve the error reporting on a bad accept function. happy for a ticket if so.
hi, we've stumbled upon a core.async behaviour I'm not sure is correct, would appreciate some feedback
(let [slow (a/chan 1 (map (fn [v] (Thread/sleep 10000) v)))
fast (a/chan 1 (map (fn [v] v)))]
(a/thread
(a/>!! slow 42))
(a/thread
(Thread/sleep 1000)
(a/>!! fast 4711))
(let [[v c] (a/alts!! [slow fast])]
v))
am I going crazy here or should the fast
chan have a value available after ~1s and that should be returned by alts!!
call?
doing Thread/sleep will I think put that sleep in the thread of the alt take
to ensure that only one of the ops succeeds there is locking that occurs over each channel involved - I suspect that coupled with the transducer may be causing what you see but I would have to look at the code and think through it
if you run something like this without the transducer (instead just a go block or thread that sleeps and emits a value for example)
the transducer runs under the channel lock - there is a warning somewhere that you should thus not do excessive work in your channel transformation
thanks for having a look. we're aware that you don't want to do excessive work in a channel transformation... this was slightly accidental in our case
seems like the definition of an operation being "ready" (in alts!) might be a little subtle when channel tranducers are involved
the behaviour is the same even if I give the channels bigger buffers (although in this case only 1 value is ever put)
i probably need to dig deep into the ReadPort/WritePort and alt impls. to understand this
https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async.clj#L200-L229
@ghadi: do you also agree that a slow channel transducer would result in the alt behaviour I'm seeing?
under some circumstances you might not always know the properties of the channels you're given though