Re: Bug (in Clojure 1.5): (fn [& xs] (pop xs)) throws ClassCastException clojure.lang.ArraySeq cannot be cast to clojure.lang.IPersistentStack

2016-06-11 Thread Alex Miller
On Sunday, June 12, 2016 at 1:15:23 AM UTC-5, Fluid Dynamics wrote: > > > All of that is very interesting, but then, by your own arguments (pop (seq > '(1 2 3))) should *not* work. > >From you prior post, I think you might be confused about what "seq" does as it doesn't "wrap" anything - it j

Re: Bug (in Clojure 1.5): (fn [& xs] (pop xs)) throws ClassCastException clojure.lang.ArraySeq cannot be cast to clojure.lang.IPersistentStack

2016-06-11 Thread Fluid Dynamics
On Sunday, June 12, 2016 at 12:41:05 AM UTC-4, Alex Miller wrote: > > > > On Saturday, June 11, 2016 at 6:33:07 PM UTC-5, Fluid Dynamics wrote: >> >> On Saturday, June 11, 2016 at 6:55:03 PM UTC-4, Matching Socks wrote: >>> >>> pop isn't a sequence function. >>> >>> Check out the manual: >>> htt

Re: Bug (in Clojure 1.5): (fn [& xs] (pop xs)) throws ClassCastException clojure.lang.ArraySeq cannot be cast to clojure.lang.IPersistentStack

2016-06-11 Thread Alex Miller
On Saturday, June 11, 2016 at 6:33:07 PM UTC-5, Fluid Dynamics wrote: > > On Saturday, June 11, 2016 at 6:55:03 PM UTC-4, Matching Socks wrote: >> >> pop isn't a sequence function. >> >> Check out the manual: >> http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/pop >>

Re: more minimal clojurescript intro/app

2016-06-11 Thread 'Lee' via Clojure
Thanks Colin -- that does look very cool, and I think I will indeed find it very useful if this limitation is overcome: "Requiring custom clojure[script] libraries in a klipse snippet is not yet available." If I understand correctly, this means that you can't yet use it to provide interactions

Re: more minimal clojurescript intro/app

2016-06-11 Thread Colin Fleming
Hi Lee, Here's another recent interesting post: http://blog.klipse.tech/clojure/2016/06/07/klipse-plugin-tuto.html. This looks like it might be very useful for you. Cheers, Colin On 12 June 2016 at 11:03, 'Lee' via Clojure wrote: > > Just an update on this and thanks: > > Several people provid

Re: why is it so annoying to run clojure code

2016-06-11 Thread Antonin Hildebrand
> Why not just uberjar it? Good point. I didn't know that was an option at the time. My google-fu didn't reveal this option at the time. As someone originally coming from non-java lands, I wasn't asking the right questions. Just few weeks later I learned hard way that uberjars are not my good

Re: why is it so annoying to run clojure code

2016-06-11 Thread James Reeves
On 12 June 2016 at 01:36, Antonin Hildebrand wrote: > I wanted users of my library (which has dependencies) to run a helper tool > from command-line (ideally with a simple wrapper bash script). And I didn't > want to make them dependent on lein or boot. > > I came up with this (bash+maven+java):

Re: why is it so annoying to run clojure code

2016-06-11 Thread Antonin Hildebrand
> What's the difference? more than 1 lines of code[1] (not counting comments) [1] https://gist.github.com/darwin/ede8911f7b493f17c1307433484f1d80 On Sunday, June 12, 2016 at 3:05:02 AM UTC+2, Witold Szczerba wrote: > > You did not want to make then depend on Lein, which is… a script, so you

Re: why is it so annoying to run clojure code

2016-06-11 Thread Witold Szczerba
You did not want to make then depend on Lein, which is… a script, so you wrote your own script and made users of your library depend on it. What's the difference? On Sun, Jun 12, 2016 at 2:36 AM, Antonin Hildebrand < antonin.hildebr...@gmail.com> wrote: > I wanted users of my library (which has d

Re: why is it so annoying to run clojure code

2016-06-11 Thread Antonin Hildebrand
I wanted users of my library (which has dependencies) to run a helper tool from command-line (ideally with a simple wrapper bash script). And I didn't want to make them dependent on lein or boot. I came up with this (bash+maven+java): https://github.com/binaryage/dirac/blob/master/scripts/agent-

Re: Bug (in Clojure 1.5): (fn [& xs] (pop xs)) throws ClassCastException clojure.lang.ArraySeq cannot be cast to clojure.lang.IPersistentStack

2016-06-11 Thread Fluid Dynamics
On Saturday, June 11, 2016 at 6:55:03 PM UTC-4, Matching Socks wrote: > > pop isn't a sequence function. > > Check out the manual: > http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/pop > > You may use first/rest on any sequence, but pop does something more > special(ized). >

Re: more minimal clojurescript intro/app

2016-06-11 Thread 'Lee' via Clojure
Just an update on this and thanks: Several people provided helpful pointers, leading me on interesting paths and teaching me about cool things like hoplon. The thing that most easily and fully solved my problem was: https://github.com/fasiha/re-simple-term. Ahmed Fasih (fasiha) was super hel

Re: Bug (in Clojure 1.5): (fn [& xs] (pop xs)) throws ClassCastException clojure.lang.ArraySeq cannot be cast to clojure.lang.IPersistentStack

2016-06-11 Thread Matching Socks
pop isn't a sequence function. Check out the manual: http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/pop You may use first/rest on any sequence, but pop does something more special(ized). -- You received this message because you are subscribed to the Google Groups "Cloju

[ANN] specter-edn 0.1.0

2016-06-11 Thread Jason Felice
Hello, all! Here's a new library which works with specter, which will hopefully be useful for writing code transformations and queries. specter-edn Specter paths for working with formatted EDN and Cloure code. There is one specter path: SEXPR. This navigates to a sequence of s-expressions parse

Re: Bug (in Clojure 1.5): (fn [& xs] (pop xs)) throws ClassCastException clojure.lang.ArraySeq cannot be cast to clojure.lang.IPersistentStack

2016-06-11 Thread Fluid Dynamics
On Saturday, June 11, 2016 at 5:29:55 PM UTC-4, Alex Miller wrote: > > Currently only vectors and lists implement the stack interfaces, not seqs. > I do not think it makes sense for *all* seqs to implement the stack > interface. > Why not? They all support efficient first and next operations.

Re: Bug (in Clojure 1.5): (fn [& xs] (pop xs)) throws ClassCastException clojure.lang.ArraySeq cannot be cast to clojure.lang.IPersistentStack

2016-06-11 Thread Alex Miller
Currently only vectors and lists implement the stack interfaces, not seqs. I do not think it makes sense for *all* seqs to implement the stack interface. It may not even make sense for any seqs to implement it, but I'd have to think about think about that for a while. Feel free to file an enhan

Bug (in Clojure 1.5): (fn [& xs] (pop xs)) throws ClassCastException clojure.lang.ArraySeq cannot be cast to clojure.lang.IPersistentStack

2016-06-11 Thread Fluid Dynamics
=> (pop '(1 2 3)) (2 3) => (pop (seq '(1 2 3))) (2 3) => ((fn [& xs] (pop xs)) '(1 2 3)) ClassCastException clojure.lang.ArraySeq cannot be cast to clojure.lang.IPersistentStack => (pop (map inc (take 5 (iterate inc 0 ClassCastException clojure.lang.LazySeq cannot be cast to clojure.lang.IPer

Re: spec performance comparison

2016-06-11 Thread Atamert Ölçgen
Hi, I have updated the benchmark results. Thanks to Alex Miller's contributions the results should be a bit more accurate now. http://muhuk.github.io/validation-benchmark/ On Tue, Jun 7, 2016 at 3:16 AM, Daniel wrote: > Awesome! Would be interesting to see other metrics charted eg loc, memory

Re: Qualified keys, Clojure records, Spec

2016-06-11 Thread Alex Miller
This is a good question and one we've discussed a bit. You can use the existing s/keys with :req-un and :opt-un to spec the (unqualified) keys of a record - there's an example of this in the guide at http://clojure.org/guides/spec. So that's the short-term current answer. However, there are pot

Qualified keys, Clojure records, Spec

2016-06-11 Thread Mike Rodriguez
I know that Spec and the changes coming to Clojure 1.9 I see that namespace qualified keys have gained some focus. I understand the motivations for this and support it.  The one barrier that is coming up for me is in the use of Clojure records (and perhaps deftype types too). We use records fai

Re: why is it so annoying to run clojure code

2016-06-11 Thread Erlis Vidal
+1 Irrelevant for the current thread but I'm too really curious on how to start using Clojure for mobile development. Anything that can point us on the right direction? On Sat, Jun 11, 2016 at 6:19 AM, Cornelius Goh wrote: > Just for curiosity. What mobile phone (Android or iOS) did you port yo

[ANN] clj-conduit 0.1.0

2016-06-11 Thread Jean Niklas L'orange
Hello fellow Clojurians, I have just released the first version of clj-conduit – a small library that attempts to make transducers a bit more readable. To give you a taste, here's the take transducer implemented with clj-conduit: (ns my.namespace (:r

Re: why is it so annoying to run clojure code

2016-06-11 Thread Jiacai Liu
Thank all above suggestions, I have tried emacs + cider, which seems great for me 在 2016年6月10日星期五 UTC+8上午12:08:39,Jiacai Liu写道: > > I started learning clojur

Re: why is it so annoying to run clojure code

2016-06-11 Thread Cornelius Goh
Just for curiosity. What mobile phone (Android or iOS) did you port your CommonLisp libraries onto ? -- 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 mo

Re: Having trouble doing what I want using macros, is there a better way?

2016-06-11 Thread Francis Avila
These functions (as-transducer, transducing) are still completely agnostic about the type of the accumulator and result as long as the function you give them only touches result in the following ways: 1. Return result unchanged 2. Return (xf (xf result X) Y), I.e. Whatever you get from applying