Re: How do threads work in command-line REPL?

2016-02-09 Thread Mimmo Cosenza
I just tried with boot real: > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=> (.getId (Thread/currentThread)) > 34 > boot.user=>

Re: How do threads work in command-line REPL?

2016-02-09 Thread Alex Miller
That seems pretty weird. I can't reproduce it. I'm using lein 2.5.2. On Tuesday, February 9, 2016 at 12:19:09 PM UTC-6, Nathan Marz wrote: > > I was doing some work that involved the use of thread locals, and I > noticed that within a REPL session (launched via 'lein repl') my thread > locals

Re: ClojureScript ord-of-char?

2016-02-09 Thread nick rothwell
Given that one can write (int \A) in ClojureScript, what should it do? (I would naively expect the same effect as .charCodeAt.) Anyway, Conditional Reader here we come. On Tuesday, 9 February 2016 18:05:00 UTC, David Nolen wrote: > > .charCodeAt is the correct thing - there is no real char type

Re: How do threads work in command-line REPL?

2016-02-09 Thread Mimmo Cosenza
yep..now I get the same weird result with boot too: boot.user=> (.getId (Thread/currentThread)) 34 boot.user=> (.getId (Thread/currentThread)) 34 boot.user=> (.getId (Thread/currentThread)) 34 boot.user=> (.getId (Thread/currentThread)) 34 boot.user=> (.getId (Thread/currentThread)) 34

Re: [ANN] clj-refactor.el and refactor-nrepl 2.0.0 is released

2016-02-09 Thread James Elliott
Yes, that is such an intractable problem. It would be wonderful if you could make things work even better, but I am happy to see them getting this far already. On Tuesday, February 9, 2016 at 3:31:24 AM UTC-6, benedek fazekas wrote: > > Thanks Colin, James. re. warning about evaluation, we are

[ANN] trapperkeeper 1.3.0 - with support for restarts via HUP

2016-02-09 Thread Chris Price
Today we released puppetlabs/trapperkeeper v1.3.0 to clojars. Trapperkeeper[1] is a Clojure framework for hosting long-running applications and services. You can think of it as a sort of "binder" for Ring applications and other modular bits of Clojure code. The major change in the release is

Re: How do threads work in command-line REPL?

2016-02-09 Thread Nathan Marz
I should clarify that the thread id doesn't change instantly, it seems to change when I've left it idle for a bit. Also on lein 2.5.2. On Tue, Feb 9, 2016 at 1:45 PM, Mimmo Cosenza wrote: > I just tried with boot real: > > boot.user=> (.getId (Thread/currentThread)) >

Re: Scripting with Clojure / "slow" boot time

2016-02-09 Thread James Elliott
I don’t have any examples to share, I just wanted to thank you for doing this. It is really wonderful to see how responsive Clojure is to community input and concerns, and the launch of an effort like this so quickly in response to the survey feedback. On Tuesday, February 9, 2016 at 12:36:43

Utterly lost dealing with ClojureScript / Closure dependencies

2016-02-09 Thread Michael Sperber
I'm trying to properly deal with dependencies on a cljsjs package (React, in this case). So I have this in project.clj: :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.228" :scope "provided"] [cljsjs/react-with-addons

Re: [ANN] clj-refactor.el and refactor-nrepl 2.0.0 is released

2016-02-09 Thread benedek fazekas
Thanks Colin, James. re. warning about evaluation, we are looking into further improving this area, watch https://github.com/clojure-emacs/refactor-nrepl/issues/134 (slightly misleading title) for discussion around it. On Monday, February 8, 2016 at 6:10:22 PM UTC, James Elliott wrote: > >

[ANN] port of Deeplearning4j RNN example to clojure

2016-02-09 Thread Joachim De Beule
see https://github.com/joachimdb/dl4clj, all comments welcome! Joachim -- 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

Re: Splitting Read into 2 steps?

2016-02-09 Thread Antonin Hildebrand
Hi Terje, I think I had a similar problem when implementing parsing for Plastic[1] (an experimental editor in ClojureScript). I wanted to use tools.reader (for robustness), but I needed more information about tokens from it (particularly comments, new-lines and whitespace). I ended up

Does Leiningen read Env Vars such as JAVA_OPTS?

2016-02-09 Thread Michael Drago
Hi guys. I'm trying to figure out where the JVM gets the java parameters (such as -Xms and -Xmx) when starting apps via "lein run" and when using the repl. The only successful way I have been able to set the memory is via the project.clj's :jvm-opts. Can we do this with an environment variable

[ANN] scheje v 0.2.6 - now supporting clojurescript, featuring a Node.JS REPL!

2016-02-09 Thread Rafik NACCACHE
Hi Guys, I am proud to have been able to port scheje, the little scheme on top of clojure, using Reader conditionals, to clojurescript. It also has two little REPLs, one for the JVM version, and one for Node.js. Scheje makes it possible to write Lisp on the browser, with macros support

Scripting with Clojure / "slow" boot time

2016-02-09 Thread Alex Miller
I'm doing some research on slow Clojure boot time and would be interested in collecting info about example use cases where it's been a problem for people. http://goo.gl/forms/eSpn8M5FNB I'm not expecting to release the results in any formal way, mostly looking to use it to pull out particular

Re: How do threads work in command-line REPL?

2016-02-09 Thread Alex Miller
These would be consistent with having a background thread pool where the ttl expired that were running your repl commands. I was able to repro in lein after waiting a bit. The default clojure.main/repl doesn't do anything like that, but maybe lein and boot do (perhaps via nrepl or something?)

Re: Does Leiningen read Env Vars such as JAVA_OPTS?

2016-02-09 Thread Sean Corfield
Michael Drago wrote on Tuesday, February 9, 2016 at 6:37 AM: Hi guys. I'm trying to figure out where the JVM gets the java parameters (such as -Xms and -Xmx) when starting apps via "lein run" and when using the repl. The only successful way I have been able to set the memory is via the

How do threads work in command-line REPL?

2016-02-09 Thread Nathan Marz
I was doing some work that involved the use of thread locals, and I noticed that within a REPL session (launched via 'lein repl') my thread locals would reset themselves to their initial value. I did some digging and found that the thread id keeps changing within a single REPL session, e.g.:

Re: How do threads work in command-line REPL?

2016-02-09 Thread Jony Hudson
I'm pretty fuzzy on how nREPL works, so I might be getting it wrong here ... but I think it processes each method through a `future`. See: https://github.com/clojure/tools.nrepl/blob/master/src/main/clojure/clojure/tools/nrepl/server.clj#L28 All of the nREPL operations are async, AFAIK, and I

Re: How do threads work in command-line REPL?

2016-02-09 Thread Jony Hudson
Ahem. "method" -> "message" Jony On Wednesday, 10 February 2016 00:35:16 UTC, Jony Hudson wrote: > > I'm pretty fuzzy on how nREPL works, so I might be getting it wrong here > ... but I think it processes each method through a `future`. See: > > >

Re: Can the data in a vector have data inside it that points to the same vector? vector1=[a b c d] a=[1 2 f s vector1]

2016-02-09 Thread James Reeves
No, vectors can't be recursive. However you can use a reference of some description, e.g. (let [p (promise), v [p]] (deliver p v) v)) You could also use a lazy seq. - James On 10 February 2016 at 04:29, Timothy Vinick wrote: > Here's an example: > >

Can the data in a vector have data inside it that points to the same vector? vector1=[a b c d] a=[1 2 f s vector1]

2016-02-09 Thread Timothy Vinick
Here's an example: vector1=[a b c d] a=[1 2 f s vector1] -- 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

Re: How do threads work in command-line REPL?

2016-02-09 Thread Nathan Marz
Yea, that code seems to explain the behavior we're seeing. I opened an issue for this: http://dev.clojure.org/jira/browse/NREPL-80 On Tue, Feb 9, 2016 at 7:38 PM, Jony Hudson wrote: > Ahem. > > "method" -> "message" > > > Jony > > > On Wednesday, 10 February 2016 00:35:16

ClojureScript ord-of-char?

2016-02-09 Thread nick rothwell
Dumb question: should I be able to get the ordinal value of a character in ClojureScript via something like (int \A) ? This does exactly what I'd expect in Clojure. In ClojureScript it seems to compile to "A" | 0 which evaluates to 0. (I'm now doing (.charCodeAt \A) which works fine.)

Re: ClojureScript ord-of-char?

2016-02-09 Thread David Nolen
.charCodeAt is the correct thing - there is no real char type in ClojureScript only strings. David On Tue, Feb 9, 2016 at 1:01 PM, nick rothwell wrote: > Dumb question: should I be able to get the ordinal value of a character in > ClojureScript via something like > > (int \A)