Re: [ANN] Clojure 1.9.0 is now available!

2017-12-10 Thread Isaac Tsang
I think is better to add AOT cache to speed up startup time.

eg. 
https://gist.github.com/sound2gd/dc4dd1e2345949182e258182689c2b2e#file-run-clj-L50

On Saturday, December 9, 2017 at 3:35:39 AM UTC+8, Alex Miller wrote:
>
> Clojure 1.9 is now available!
>
>
> Clojure 1.9 introduces two major new features: integration with spec and 
> command line tools.
>
>
> spec (rationale , guide 
> ) is a library for describing the 
> structure of data and functions with support for:
>
>- Validation
>- Error reporting
>- Destructuring
>- Instrumentation
>- Test-data generation
>- Generative test generation
>- Documentation
>
> Clojure integrates spec via two new libraries (still in alpha):
>
>- spec.alpha  - spec 
>implementation
>- core.specs.alpha  - 
>specifications for Clojure itself
>
> This modularization facilitates refinement of spec separate from the 
> Clojure release cycle.
>
> The command line tools (guide , 
> reference ) provide:
>
>- Quick and easy install
>- Clojure REPL and runner
>- Use of Maven and local dependencies
>- A functional API for classpath management (tools.deps.alpha 
>)
>
> The installer is available for Mac developers in brew, for Linux users in 
> a script, and for more platforms in the future.
>
> For more information, see the complete list 
>  of all 
> changes in Clojure 1.9 for more details.
>
>
> *Contributors*
>
>
> Thanks to all of the community members who contributed to Clojure 1.9 
> (first time contributors in bold):
>
>
>- *Adam Clements*
>- Andy Fingerhut
>- Brandon Bloom
>- *Cameron Desautels*
>- *Chad Taylor*
>- Chris Houser
>- *David Bürgin*
>- *Eli Lindsey*
>- *Gerrit Jansen Van Vuuren*
>- Ghadi Shayban
>- *Greg Leppert*
>- *Jason Whitlark*
>- *Johan Mena*
>- Jozef Wagner
>- *Lee Yen-Chin*
>- *Matthew Boston*
>- Michael Blume
>- Michał Marczyk
>- Nicola Mometto
>- *Ruslan Al-Fakikh*
>- *Steffen Dienst*
>- Steve Miner
>- *Yegor Timoshenko*
>- *Zhuang XiaoDan*
>
>

-- 
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: OutOfMemoryError when using Plumatic Schema and infinite lazy lists

2017-12-10 Thread Jason Wolfe
Hi Alan, 

With validation turned on, Schema eagerly validates your full inputs so 
this is the expected (if a bit unfortunate) behavior.  

There is a little context on the issue and some potential workarounds here 
: 

https://github.com/plumatic/schema/issues/340#issuecomment-185321295

Best, Jason

On Saturday, December 9, 2017 at 7:53:47 PM UTC-8, Alan Thompson wrote:
>
> 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: Cider - emacs lisp errors reported

2017-12-10 Thread Peter Hull
On Sunday, 10 December 2017 14:14:05 UTC, Bozhidar Batsov wrote:
>
> It might have been changed upstream. Not sure what's your Emacs version. A 
> while ago we backported this macro in whatever its current form was for 
> compatibility with older Emacsen.
>
> File a ticket on GitHub and we'll investigate. 
>

OK, now I can't reproduce it. My guess is that some other elisp code was 
interfering, not sure how.

Anyway, thanks for the advice.

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


Cider - emacs lisp errors reported

2017-12-10 Thread Philos Kim
I encountered the same problem some years ago. In my case the problem was 
solved by removing (require 'cl-lib) line in my init.el file. The cl-lib 
package defined when-let as well.
I hope that this will help you out!

-- 
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: Cider - emacs lisp errors reported

2017-12-10 Thread Bozhidar Batsov
It might have been changed upstream. Not sure what's your Emacs version. A
while ago we backported this macro in whatever its current form was for
compatibility with older Emacsen.

File a ticket on GitHub and we'll investigate.


On 10 December 2017 at 13:44, Peter Hull  wrote:

> I noticed this when updating cider via melpa, and I wasn't sure if it's
> already known about or whether it is even an problem. I thought I'd ask
> here before submitting an issue to github.
>
> Compiling file 
> /Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-browse-spec.el
> at Sun Dec 10 11:29:29 2017
> cider-browse-spec.el:277:1:Error: Wrong number of arguments: when-let, 1
>
> Compiling file 
> /Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-classpath.el
> at Sun Dec 10 11:29:29 2017
> cider-classpath.el:102:1:Error: Wrong number of arguments: when-let, 1
>
> Compiling file 
> /Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-client.el
> at Sun Dec 10 11:29:29 2017
> cider-client.el:143:1:Error: Wrong number of arguments: when-let, 1
>
> Compiling file 
> /Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-common.el
> at Sun Dec 10 11:29:29 2017
> cider-common.el:186:1:Error: Wrong number of arguments: when-let, 4
>
> Compiling file 
> /Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-compat.el
> at Sun Dec 10 11:29:29 2017
>
> Compiling file 
> /Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-debug.el
> at Sun Dec 10 11:29:29 2017
> cider-debug.el:226:1:Error: Wrong number of arguments: when-let, 1
>
> Compiling file /Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-doc.el
> at Sun Dec 10 11:29:29 2017
> cider-doc.el:263:1:Error: Wrong number of arguments: when-let, 1
>
> And for example, the first instance looks like this
>
> (defun cider-browse-spec--browse-at ( pos)
>   "View the definition of a spec.
>
> Optional argument POS is the position of a spec, defaulting to point.  POS
> may also be a button, so this function can be used a the button's `action'
> property."
>   (interactive)
>   (let ((pos (or pos (point
> (when-let ((spec (button-get pos 'spec-name)))
>   (cider-browse-spec--browse spec
>
> I am not an elisp expert but I think the syntax of when-let is (when-let
> (var value) body) rather than (when-let ((var value)) body)
>
> --
> 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: Terminating 'clj' REPL session

2017-12-10 Thread Alex Miller
Sure, file a ticket.

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


Cider - emacs lisp errors reported

2017-12-10 Thread Peter Hull
I noticed this when updating cider via melpa, and I wasn't sure if it's 
already known about or whether it is even an problem. I thought I'd ask 
here before submitting an issue to github.

Compiling file 
/Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-browse-spec.el at 
Sun Dec 10 11:29:29 2017
cider-browse-spec.el:277:1:Error: Wrong number of arguments: when-let, 1

Compiling file 
/Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-classpath.el at 
Sun Dec 10 11:29:29 2017
cider-classpath.el:102:1:Error: Wrong number of arguments: when-let, 1

Compiling file 
/Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-client.el at Sun 
Dec 10 11:29:29 2017
cider-client.el:143:1:Error: Wrong number of arguments: when-let, 1

Compiling file 
/Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-common.el at Sun 
Dec 10 11:29:29 2017
cider-common.el:186:1:Error: Wrong number of arguments: when-let, 4

Compiling file 
/Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-compat.el at Sun 
Dec 10 11:29:29 2017

Compiling file 
/Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-debug.el at Sun 
Dec 10 11:29:29 2017
cider-debug.el:226:1:Error: Wrong number of arguments: when-let, 1

Compiling file 
/Users/peterhull/.emacs.d/elpa/cider-20171209.1602/cider-doc.el at Sun Dec 
10 11:29:29 2017
cider-doc.el:263:1:Error: Wrong number of arguments: when-let, 1

And for example, the first instance looks like this

(defun cider-browse-spec--browse-at ( pos)
  "View the definition of a spec.

Optional argument POS is the position of a spec, defaulting to point.  POS
may also be a button, so this function can be used a the button's `action'
property."
  (interactive)
  (let ((pos (or pos (point
(when-let ((spec (button-get pos 'spec-name)))
  (cider-browse-spec--browse spec

I am not an elisp expert but I think the syntax of when-let is (when-let 
(var value) body) rather than (when-let ((var value)) body)

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