Re: Terminating 'clj' REPL session

2017-12-09 Thread Alan Thompson
I just noticed that Python will give you hints (but only after guessing
wrong):

~ > python
Python 2.7.12 (default, Nov 20 2017, 18:23:56)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>>





On Sat, Dec 9, 2017 at 8:29 PM, Alan Thompson  wrote:

> Would a message such as "use CRTL-D to exit" be appropriate?  Right now it
> is very bare.  Maybe this?
>
> ~ > clj
> Clojure 1.9.0 (use ^D to exit)
> user=>
> ~ >
>
> Alan
>
> On Sat, Dec 9, 2017 at 5:15 PM, Sean Corfield  wrote:
>
>> I find the fact that "exit" and "quit" work in leiningen repls to be weird
>>
>>
>>
>> I agree. I’ve always used ctl-d to exit a Leiningen REPL or a Boot REPL –
>> or pretty much any console program I’ve ever used. I’m only surprised when
>> ctl-d _*doesn’t*_ work in such a program!
>>
>>
>>
>> And, after all, both Leiningen and Boot give ctl-d as the first option
>> for exiting a REPL:
>>
>>
>>
>> Exit: Control+D …
>>
>>
>>
>> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
>> An Architect's View -- http://corfield.org/
>>
>> "If you're not annoying somebody, you're not really alive."
>> -- Margaret Atwood
>>
>>
>> --
>> *From:* clojure@googlegroups.com  on behalf of
>> Justin Smith 
>> *Sent:* Saturday, December 9, 2017 2:55:17 PM
>> *To:* clojure@googlegroups.com
>> *Subject:* Re: Terminating 'clj' REPL session
>>
>> I find the fact that "exit" and "quit" work in leiningen repls to be
>> weird - this doesn't follow the otherwise consistent rules of the language.
>> What about an exit function, something like
>>
>> (defn exit
>>   ([] (exit 0))
>>   ([n] (System/exit n))
>>
>> so that it's not an out of band special case input?
>>
>> On Sat, Dec 9, 2017 at 2:38 PM Alan Thompson  wrote:
>>
>>> Hi - Just downloaded the new Clojure 1.9.0 package.  When I tried the
>>> repl I noticed that it doesn't respond to either `exit` or `quit` as one
>>> might expect from the lein repl:
>>>
>>> ~/cool/tools > clj
>>> Clojure 1.9.0
>>> user=> (+ 2 3)
>>> 5
>>> user=> exit
>>> CompilerException java.lang.RuntimeException: Unable to resolve symbol:
>>> exit in this context, compiling:(NO_SOURCE_PATH:0:0)
>>> user=>
>>> user=> quit
>>> CompilerException java.lang.RuntimeException: Unable to resolve symbol:
>>> quit in this context, compiling:(NO_SOURCE_PATH:0:0)
>>> user=> ^D
>>> ~/cool/tools >
>>>
>>>
>>> Lein repl for comparison:
>>>
>>> ~/tupelo > lein repl
>>> nREPL server started on port 37115 on host 127.0.0.1 - Clojure 1.9.0
>>> tupelo.core=> exit
>>> Bye for now!
>>>
>>> ~/tupelo >
>>>
>>> ~/tupelo > lein repl
>>> nREPL server started on port 40639 on host 127.0.0.1 - Clojure 1.9.0
>>> tupelo.core=> quit
>>> Bye for now!
>>> ~/tupelo >
>>>
>>>
>>> The new repl does terminate upon CRTL-D or CRTL-C, but many users will
>>> probably be confused that `quit` and `exit` are not accepted.
>>>
>>> Should I file a JIRA?
>>>
>>> Alan
>>>
>>> --
>>> 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 unsubscribe from this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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 unsubscribe from this group, send email to
>> 

Re: Terminating 'clj' REPL session

2017-12-09 Thread Alan Thompson
Would a message such as "use CRTL-D to exit" be appropriate?  Right now it
is very bare.  Maybe this?

~ > clj
Clojure 1.9.0 (use ^D to exit)
user=>
~ >

Alan

On Sat, Dec 9, 2017 at 5:15 PM, Sean Corfield  wrote:

> I find the fact that "exit" and "quit" work in leiningen repls to be weird
>
>
>
> I agree. I’ve always used ctl-d to exit a Leiningen REPL or a Boot REPL –
> or pretty much any console program I’ve ever used. I’m only surprised when
> ctl-d _*doesn’t*_ work in such a program!
>
>
>
> And, after all, both Leiningen and Boot give ctl-d as the first option for
> exiting a REPL:
>
>
>
> Exit: Control+D …
>
>
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>
> --
> *From:* clojure@googlegroups.com  on behalf of
> Justin Smith 
> *Sent:* Saturday, December 9, 2017 2:55:17 PM
> *To:* clojure@googlegroups.com
> *Subject:* Re: Terminating 'clj' REPL session
>
> I find the fact that "exit" and "quit" work in leiningen repls to be weird
> - this doesn't follow the otherwise consistent rules of the language. What
> about an exit function, something like
>
> (defn exit
>   ([] (exit 0))
>   ([n] (System/exit n))
>
> so that it's not an out of band special case input?
>
> On Sat, Dec 9, 2017 at 2:38 PM Alan Thompson  wrote:
>
>> Hi - Just downloaded the new Clojure 1.9.0 package.  When I tried the
>> repl I noticed that it doesn't respond to either `exit` or `quit` as one
>> might expect from the lein repl:
>>
>> ~/cool/tools > clj
>> Clojure 1.9.0
>> user=> (+ 2 3)
>> 5
>> user=> exit
>> CompilerException java.lang.RuntimeException: Unable to resolve symbol:
>> exit in this context, compiling:(NO_SOURCE_PATH:0:0)
>> user=>
>> user=> quit
>> CompilerException java.lang.RuntimeException: Unable to resolve symbol:
>> quit in this context, compiling:(NO_SOURCE_PATH:0:0)
>> user=> ^D
>> ~/cool/tools >
>>
>>
>> Lein repl for comparison:
>>
>> ~/tupelo > lein repl
>> nREPL server started on port 37115 on host 127.0.0.1 - Clojure 1.9.0
>> tupelo.core=> exit
>> Bye for now!
>>
>> ~/tupelo >
>>
>> ~/tupelo > lein repl
>> nREPL server started on port 40639 on host 127.0.0.1 - Clojure 1.9.0
>> tupelo.core=> quit
>> Bye for now!
>> ~/tupelo >
>>
>>
>> The new repl does terminate upon CRTL-D or CRTL-C, but many users will
>> probably be confused that `quit` and `exit` are not accepted.
>>
>> Should I file a JIRA?
>>
>> Alan
>>
>> --
>> 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 unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 

OutOfMemoryError when using Plumatic Schema and infinite lazy lists

2017-12-09 Thread Alan Thompson
I am a huge fan of Plumatic Schema, and it regularly helps me to find
mistakes in my code early in the development process.  However, I just
tracked down a very unexpected error when using a lazy infinite list such
as that produced by  `(range)`

Suppose you define two simple functions like `clojure.core/first`.  One
doesn't use Schema and the other does:

  (defn show-1
[arg]
(nth arg 0))

  (s/defn show-2 :- s/Any
[arg :- [s/Any] ]
(nth arg 0))

  (nl) (println "show-1")
  (spyx (mapv show-1 [ [:a :b :c] (range) ]))

  (nl) (println "show-2")
  (spyx (mapv show-2 [ [:a :b :c] (range) ]))


The results of running this code are:

show-1
(mapv show-1 [[:a :b :c] (range)]) => [:a 0]

show-2

ERROR in (dotest-line-472) (Iterate.java:54)
Uncaught exception, not in assertion.
expected: nil
  actual: *java.lang.OutOfMemoryError*: Java heap space
 at clojure.lang.Iterate.next (Iterate.java:54)
clojure.lang.RT.next (RT.java:706)
...


Apparently, turning on Schema validations causes the input collection to be
realized for `show-2` function call.

I am generally not a big fan of (infinite) lazy seq's and don't use them
much. However, this one came up during a simple unit test and really had me
scratching the old noggin for quite a while.

I'm not sure if there is an easy way of enhancing Schema to avoid this
problem, or if it is just something one needs to be wary of.

Alan

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Terminating 'clj' REPL session

2017-12-09 Thread Sean Corfield
I find the fact that "exit" and "quit" work in leiningen repls to be weird

I agree. I’ve always used ctl-d to exit a Leiningen REPL or a Boot REPL – or 
pretty much any console program I’ve ever used. I’m only surprised when ctl-d 
_doesn’t_ work in such a program!

And, after all, both Leiningen and Boot give ctl-d as the first option for 
exiting a REPL:

Exit: Control+D …

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


From: clojure@googlegroups.com  on behalf of Justin 
Smith 
Sent: Saturday, December 9, 2017 2:55:17 PM
To: clojure@googlegroups.com
Subject: Re: Terminating 'clj' REPL session

I find the fact that "exit" and "quit" work in leiningen repls to be weird - 
this doesn't follow the otherwise consistent rules of the language. What about 
an exit function, something like

(defn exit
  ([] (exit 0))
  ([n] (System/exit n))

so that it's not an out of band special case input?

On Sat, Dec 9, 2017 at 2:38 PM Alan Thompson 
> wrote:
Hi - Just downloaded the new Clojure 1.9.0 package.  When I tried the repl I 
noticed that it doesn't respond to either `exit` or `quit` as one might expect 
from the lein repl:

~/cool/tools > clj
Clojure 1.9.0
user=> (+ 2 3)
5
user=> exit
CompilerException java.lang.RuntimeException: Unable to resolve symbol: exit in 
this context, compiling:(NO_SOURCE_PATH:0:0)
user=>
user=> quit
CompilerException java.lang.RuntimeException: Unable to resolve symbol: quit in 
this context, compiling:(NO_SOURCE_PATH:0:0)
user=> ^D
~/cool/tools >

Lein repl for comparison:

~/tupelo > lein repl
nREPL server started on port 37115 on host 127.0.0.1 - Clojure 1.9.0
tupelo.core=> exit
Bye for now!
~/tupelo >
~/tupelo > lein repl
nREPL server started on port 40639 on host 127.0.0.1 - Clojure 1.9.0
tupelo.core=> quit
Bye for now!
~/tupelo >

The new repl does terminate upon CRTL-D or CRTL-C, but many users will probably 
be confused that `quit` and `exit` are not accepted.

Should I file a JIRA?

Alan


--
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Terminating 'clj' REPL session

2017-12-09 Thread Alex Miller
This really just the standard behavior of clojure.main, not a feature of the 
clj tool, so this would require a change in Clojure itself.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Terminating 'clj' REPL session

2017-12-09 Thread Justin Smith
I find the fact that "exit" and "quit" work in leiningen repls to be weird
- this doesn't follow the otherwise consistent rules of the language. What
about an exit function, something like

(defn exit
  ([] (exit 0))
  ([n] (System/exit n))

so that it's not an out of band special case input?

On Sat, Dec 9, 2017 at 2:38 PM Alan Thompson  wrote:

> Hi - Just downloaded the new Clojure 1.9.0 package.  When I tried the repl
> I noticed that it doesn't respond to either `exit` or `quit` as one might
> expect from the lein repl:
>
> ~/cool/tools > clj
> Clojure 1.9.0
> user=> (+ 2 3)
> 5
> user=> exit
> CompilerException java.lang.RuntimeException: Unable to resolve symbol:
> exit in this context, compiling:(NO_SOURCE_PATH:0:0)
> user=>
> user=> quit
> CompilerException java.lang.RuntimeException: Unable to resolve symbol:
> quit in this context, compiling:(NO_SOURCE_PATH:0:0)
> user=> ^D
> ~/cool/tools >
>
>
> Lein repl for comparison:
>
> ~/tupelo > lein repl
> nREPL server started on port 37115 on host 127.0.0.1 - Clojure 1.9.0
> tupelo.core=> exit
> Bye for now!
>
> ~/tupelo >
>
> ~/tupelo > lein repl
> nREPL server started on port 40639 on host 127.0.0.1 - Clojure 1.9.0
> tupelo.core=> quit
> Bye for now!
> ~/tupelo >
>
>
> The new repl does terminate upon CRTL-D or CRTL-C, but many users will
> probably be confused that `quit` and `exit` are not accepted.
>
> Should I file a JIRA?
>
> Alan
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Terminating 'clj' REPL session

2017-12-09 Thread Alan Thompson
Hi - Just downloaded the new Clojure 1.9.0 package.  When I tried the repl
I noticed that it doesn't respond to either `exit` or `quit` as one might
expect from the lein repl:

~/cool/tools > clj
Clojure 1.9.0
user=> (+ 2 3)
5
user=> exit
CompilerException java.lang.RuntimeException: Unable to resolve symbol:
exit in this context, compiling:(NO_SOURCE_PATH:0:0)
user=>
user=> quit
CompilerException java.lang.RuntimeException: Unable to resolve symbol:
quit in this context, compiling:(NO_SOURCE_PATH:0:0)
user=> ^D
~/cool/tools >


Lein repl for comparison:

~/tupelo > lein repl
nREPL server started on port 37115 on host 127.0.0.1 - Clojure 1.9.0
tupelo.core=> exit
Bye for now!

~/tupelo >

~/tupelo > lein repl
nREPL server started on port 40639 on host 127.0.0.1 - Clojure 1.9.0
tupelo.core=> quit
Bye for now!
~/tupelo >


The new repl does terminate upon CRTL-D or CRTL-C, but many users will
probably be confused that `quit` and `exit` are not accepted.

Should I file a JIRA?

Alan

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [ANN] Clojure 1.9.0 is now available!

2017-12-09 Thread Sean Corfield
also, if I use lein repl, is deps.edn taken into account? I love that feature

It shouldn’t be hard for someone to write a Leiningen plugin that uses 
tools.deps to read the cascade of deps.edn files and provide support for 
resolve/classpath aliases etc. I’ve already done this for Boot: 
https://github.com/seancorfield/boot-tools-deps

Also, since you’re interested specifically in REPL behavior and dependency 
handling, you might be interested to see that Boot lets you start a REPL with a 
set of dependencies loaded, without needing a project folder or build file:

boot -d some/thing repl

That loads the latest version of some/thing (as if you’d specified [some/thing 
“RELEASE”] as a dependency) and then starts a REPL.

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


From: clojure@googlegroups.com  on behalf of Georgi 
Danov 
Sent: Saturday, December 9, 2017 6:38:16 AM
To: Clojure
Subject: Re: [ANN] Clojure 1.9.0 is now available!

is the new clj CLI going to be alternative to Lein? For example can I run repl 
with middleware?

also, if I use lein repl, is deps.edn taken into account? I love that feature

--
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.9.0 is now available!

2017-12-09 Thread Alex Miller
> is the new clj CLI going to be alternative to Lein?

No, it’s not intended to replace lein. clj is about building classpath and 
launching programs, not building or deploying artifacts.

> For example can I run repl with middleware?

No.

> also, if I use lein repl, is deps.edn taken into account? I love that feature 

No, although that is presumably something that could be made.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.9.0 is now available!

2017-12-09 Thread Georgi Danov
is the new clj CLI going to be alternative to Lein? For example can I run 
repl with middleware?

also, if I use lein repl, is deps.edn taken into account? I love that 
feature 

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.9.0 is now available!

2017-12-09 Thread Rostislav Svoboda
To give you a bit of an explanation - I'd like to use
clojure/clojurescript for scripting... I was reading the:
http://blog.brunobonacci.com/2017/08/10/lumo-vs-planck-vs-clojure-vs-pixie/
and got curious how does the 1.9.0 behave when talking about startup times.
(Oh BTW notice that lumo and planck compute wrong results, how lovely :)

> If it is all extra startup time, that could be due to loading spec and 
> def'ing extra Clojure 1.9 Vars during initialization.

It really looks like it is the startup time. Unfortunately:

> start with "java -cp  ..." to get an apples to apples comparison

makes not much of a difference. Anyway, thank you for the (correctly
computing :-) 1.9.0!


Bost


time java -jar 
/home/bost/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar
-e '(defn Σ [n] (reduce + (range (inc n (println (Σ (* 1000 1000
10)))'
#'user/Σ
500500
1.47user 0.07system 0:00.79elapsed 194%CPU (0avgtext+0avgdata
197744maxresident)k
0inputs+64outputs (0major+45783minor)pagefaults 0swaps

time java -cp 
/home/bost/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/home/bost/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar:/home/bost/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar
clojure.main -e '(defn Σ [n] (reduce + (range (inc n (println (Σ
(* 1000 1000 10)))'
#'user/Σ
500500
2.30user 0.04system 0:00.95elapsed 246%CPU (0avgtext+0avgdata
213724maxresident)k
0inputs+64outputs (0major+49720minor)pagefaults 0swaps



time java -jar 
/home/bost/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar
-e '(defn Σ [n] (reduce + (range (inc n (println (Σ (* 1000 1000
100)))'
#'user/Σ
50005000
2.10user 0.13system 0:01.49elapsed 150%CPU (0avgtext+0avgdata
730068maxresident)k
0inputs+64outputs (0major+178898minor)pagefaults 0swaps

time java -cp 
/home/bost/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/home/bost/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar:/home/bost/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar
clojure.main -e '(defn Σ [n] (reduce + (range (inc n (println (Σ
(* 1000 1000 100)))'
#'user/Σ
50005000
3.10user 0.25system 0:01.90elapsed 176%CPU (0avgtext+0avgdata
740780maxresident)k
0inputs+64outputs (0major+182178minor)pagefaults 0swaps



time java -jar 
/home/bost/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar
-e '(defn Σ [n] (reduce + (range (inc n (println (Σ (* 1000 1000
1000)))'
#'user/Σ
55
9.31user 0.24system 0:08.64elapsed 110%CPU (0avgtext+0avgdata
743596maxresident)k
0inputs+64outputs (0major+183306minor)pagefaults 0swaps

time java -cp 
/home/bost/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/home/bost/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar:/home/bost/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar
clojure.main -e '(defn Σ [n] (reduce + (range (inc n (println (Σ
(* 1000 1000 1000)))'
#'user/Σ
55
9.72user 0.25system 0:08.51elapsed 117%CPU (0avgtext+0avgdata
749604maxresident)k
0inputs+64outputs (0major+185270minor)pagefaults 0swaps



2017-12-09 6:23 GMT+01:00 Alex Miller :
>
> On Friday, December 8, 2017 at 7:54:23 PM UTC-6, Bost wrote:
>>
>> Hi, first of all: thanks for the 1.9.0!
>> And now issue: it looks like the 1.9.0 is slower than 1.8.0. Is there
>> any --turbo switch to flip?
>
>
> I think to be a better comparison, I would do clj -Spath to grab your
> classpath and in both cases start with "java -cp  ..." to get an
> apples to apples comparison. The clj script is fast compared to Clojure
> startup but it is checking and comparing files time for multiple files to
> determine whether it can use the cached classpath.
>
> Second I don't think you're doing enough work or enough timings here to
> necessarily get past the JVM hotspot compilation overhead and see times that
> are worth comparing. If you want to benchmark the time for the reduce, I
> would add criterium and exclude the startup time. My expectation would be
> that the times are pretty similar as little has changed that should affect
> what you're doing here.
>
> Startup time through clojure.main (which you're doing in both cases) does
> currently have a side effect of loading spec and the core specs which adds
> about 0.1-0.2 s. Startup time on AOT'ed code NOT going through clojure.main
> can usually avoid these.
>
>
>>
>>
>> Bost
>>
>>
>> time java -jar
>> /home/bost/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar
>> -e '(defn Σ [n] (reduce + (range (inc n (println (Σ (* 1000
>> 1000)))'
>> #'user/Σ
>> 5050
>> 1.31user 0.04system 0:00.65elapsed 205%CPU (0avgtext+0avgdata
>> 101872maxresident)k
>> 0inputs+64outputs (0major+21822minor)pagefaults 0swaps
>>
>> time clj -e '(defn Σ [n] (reduce + (range (inc n (println (Σ (*
>> 1000 1000)))'
>> #'user/Σ
>> 5050