Re: Invalid-token when dereferencing namespaced keywords.

2019-01-29 Thread Philip Markgraf
My actual case is using the keyword across two files (namespaces), using the ns/:require/:as constructs in the file that did not define the keyword. (The REPL example was created to give a minimal replication of the leading digit issue.) So, now I am really wondering what the intent with spec

Re: Issue when moving to Clojure 1.10

2019-01-29 Thread Didier
For anyone interested, the approach I ended up taking was to AOT everything all the time. But, require the class namespaces to be explicitly defined in the build config file for any which needs to be included in the Jar. And when packaging the Jar, only the Clojure source and the AOT class

Inside Clojure Journal

2019-01-29 Thread Shaun Parker
I just wanted to say thanks to Alex for taking the time to journal all the Clojure things he's working on (and the non-Clojure things as well). They're enjoyable to read and eye-opening. It's a great window into the effort that he and others are putting into Clojure. It's been fun to follow

Re: Invalid-token when dereferencing namespaced keywords.

2019-01-29 Thread Alex Miller
On Tuesday, January 29, 2019 at 10:07:29 PM UTC-6, Philip Markgraf wrote: > > Thank you, Alex and Andy. This answers my question regarding leading digit > in keywords. > > > Alex, > You describe an error with autoresolved keywords in my example. Is this > also true of the second example I

Re: Invalid-token when dereferencing namespaced keywords.

2019-01-29 Thread Philip Markgraf
Thank you, Alex and Andy. This answers my question regarding leading digit in keywords. Alex, You describe an error with autoresolved keywords in my example. Is this also true of the second example I posted (in response to Justin), which does not use the user namespace? Am I correct to use

Re: Invalid-token when dereferencing namespaced keywords.

2019-01-29 Thread Alex Miller
There are two interrelated issues here. First, when you are using autoresolved keywords, the qualifier part must be an alias. Here it is a fully-qualified namespace (user). Instead, you should be using :user/015-00. Note that before Clojure 1.10, this would not produce an error - this was an

Re: Invalid-token when dereferencing namespaced keywords.

2019-01-29 Thread Andy Fingerhut
I believe the original intent was that keywords with a digit immediately after the colon would not be supported, but due to a bug in the Clojure reader they were permitted. There was a brief time in 2013 where this bug was fixed, but there were enough extant Clojure code bases that used such

Re: Invalid-token when dereferencing namespaced keywords.

2019-01-29 Thread Philip Markgraf
Thank you. I apologize that my condensed example was in error. (Is the error you are showing that you can't create a namespaced keyword in a namespace you are not in?) However, the condition I originally describe occurs when the original namespace is properly created with ns: user=> (ns

Re: transducer parallelism

2019-01-29 Thread reborgml
Hi Brian, On Friday, 25 January 2019 22:19:21 UTC, Brian Craft wrote: > > Are there any docs on transducer parallelism? > Not a lot, but you can find something here: https://labs.uswitch.com/transducers-from-the-ground-up-the-practice/#parallelism I had the impression, from various sources,

Re: Invalid-token when dereferencing namespaced keywords.

2019-01-29 Thread Justin Smith
you are misusing the :: alias resolution operator, user is not an alias Clojure 1.9.0 (ins)user=> (ns foo) nil (ins)foo=> ::user/a RuntimeException Invalid token: ::user/a clojure.lang.Util.runtimeException (Util.java:221) (ins)foo=> :user/a :user/a On Tue, Jan 29, 2019 at 2:52 PM Philip

Invalid-token when dereferencing namespaced keywords.

2019-01-29 Thread Philip Markgraf
I am moving some code to use spec and namespaced keywords under Clojure 1.10.0 (release). One group of keywords starts with a numeric character after the colon, which has worked fine in the non-namespaced context. Creating and using the namespaced keyword works correctly in the local namespace

Re: (gen/sample (s/gen #{'nil})): Couldn't satisfy such-that predicate

2019-01-29 Thread Alex Miller
You can see the special cases of nil, false, and true in the LispReader here if you're curious: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L393-L413 On Tue, Jan 29, 2019 at 4:45 PM Alex Miller wrote: > > > On Tue, Jan 29, 2019 at 4:23 PM Rostislav

Re: (gen/sample (s/gen #{'nil})): Couldn't satisfy such-that predicate

2019-01-29 Thread Alex Miller
On Tue, Jan 29, 2019 at 4:23 PM Rostislav Svoboda < rostislav.svob...@gmail.com> wrote: > Hi Alex, > > > Sets are treated as predicate functions which are valid when they > produce a logically true value. > > So then my question boils down to: > Why is then (boolean (quote nil)) => false and

Re: (gen/sample (s/gen #{'nil})): Couldn't satisfy such-that predicate

2019-01-29 Thread Rostislav Svoboda
Hi Alex, > Sets are treated as predicate functions which are valid when they produce a > logically true value. So then my question boils down to: Why is then (boolean (quote nil)) => false and (boolean (quote anything)) => true? And this boils down to: Why a type of quoted symbol (type

Re: (gen/sample (s/gen #{'nil})): Couldn't satisfy such-that predicate

2019-01-29 Thread Alex Miller
Sets are treated as predicate functions which are valid when they produce a logically true value. Sets with logically false values nil or false will fail this check. This is not a spec thing, but a general thing to be aware of in Clojure when using sets as functions. If you want nils, use

(gen/sample (s/gen #{'nil})): Couldn't satisfy such-that predicate

2019-01-29 Thread Rostislav Svoboda
Could anybody explain please why I can't get a sample of falses or quoted nils / falses here? foo.core> (clojure-version) "1.10.0" foo.core> (require '[clojure.spec.gen.alpha :as gen] '[clojure.spec.alpha :as s]) nil foo.core> (gen/sample (s/gen #{'nil})) Error printing return

Re: ClojureScreencasts.com domain

2019-01-29 Thread Jim Slattery
I don't have a set price, it doesn't have to cost much... Just looking for a good steward for the domain. -- 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

Re: partition & fold

2019-01-29 Thread Renzo Borgatti
Hi Brian, I think what you’re searching for is: (require ‘[clojure.core.reducers :as r]) (r/fold concat ((comp (partition-all 5) (map #(apply + %))) conj) (into [] (range 1000))) However, the result of the above is undetermined (results are different every time you call). This is because you

ClojureScreencasts.com domain

2019-01-29 Thread kanishk kumar
How much is it for? -- 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

ClojureScreencasts.com domain

2019-01-29 Thread Jim Slattery
Hi, would anyone in the Clojure community be interested in purchasing the ClojureScreencasts.com domain? I had created a lot of introductory videos a few years ago, but the site has been idle. Maybe someone else in the community would like to do something useful with that domain? Thanks, Jim