Re: [ANN] immutable-int-map
Bonus: rename the library immutable-long-map, then you can have a section in the readme titled why the long map? On Monday, 21 April 2014 13:12:05 UTC+1, Alex Miller wrote: This is great stuff. Why not longs? Are you going for space savings? -- 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.
Style - Keyword access or accessors?
(This has been discussed before but as this is fairly subjective I am interested in whether people's opinion has changed) What are people's experiences around using keywords or defined accessors for navigating data structures in Clojure (assuming the use of maps)? Do people prefer using raw keywords or do people define accessors. For example, given {:my-property 10} would people inline my-property or define a (defn my-property [m] (:my-property m))? If you use keywords then do you alias them (i.e. (def my-property :my-property)? My experience is that accessors become painful and restrictive really quickly (navigating nested maps for example) so keywords are the way to go. I tend to have a domain.clj which documents my domain and defines all the important abstractions (i.e. (def my-property :my-property). I find this very useful, combined with marginalia for documentation purposes. It also offers some aid in refactoring as multiple abstractions might resolve to the same keyword (i.e. value-group and bracket-group might resolve to :group). But, to be blunt, it can be a little cumbersome. I also refer :as the namespace, so instead of (get-in m [:a :b]) it is (get-in m [dom/a dom/b]). What are your thoughts (and any other hints/tips for maintaining large Clojure code bases?) -- 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: Style - Keyword access or accessors?
I've personally always used keywords. I don't see any value in aliasing :foo to foo. For navigating nested maps, get-in, update-in and assoc-in with keywords seem natural and practical to me. On 22 April 2014 10:43, Colin Yates colin.ya...@gmail.com wrote: (This has been discussed before but as this is fairly subjective I am interested in whether people's opinion has changed) What are people's experiences around using keywords or defined accessors for navigating data structures in Clojure (assuming the use of maps)? Do people prefer using raw keywords or do people define accessors. For example, given {:my-property 10} would people inline my-property or define a (defn my-property [m] (:my-property m))? If you use keywords then do you alias them (i.e. (def my-property :my-property)? My experience is that accessors become painful and restrictive really quickly (navigating nested maps for example) so keywords are the way to go. I tend to have a domain.clj which documents my domain and defines all the important abstractions (i.e. (def my-property :my-property). I find this very useful, combined with marginalia for documentation purposes. It also offers some aid in refactoring as multiple abstractions might resolve to the same keyword (i.e. value-group and bracket-group might resolve to :group). But, to be blunt, it can be a little cumbersome. I also refer :as the namespace, so instead of (get-in m [:a :b]) it is (get-in m [dom/a dom/b]). What are your thoughts (and any other hints/tips for maintaining large Clojure code bases?) -- 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: Style - Keyword access or accessors?
Thanks Dan, One benefit is compile time safety and the refactoring I mentioned. But yes, I am coming around to the notion of just using raw keywords... On Tuesday, April 22, 2014 10:49:33 AM UTC+1, Dan Kersten wrote: I've personally always used keywords. I don't see any value in aliasing :foo to foo. For navigating nested maps, get-in, update-in and assoc-in with keywords seem natural and practical to me. On 22 April 2014 10:43, Colin Yates colin...@gmail.com javascript:wrote: (This has been discussed before but as this is fairly subjective I am interested in whether people's opinion has changed) What are people's experiences around using keywords or defined accessors for navigating data structures in Clojure (assuming the use of maps)? Do people prefer using raw keywords or do people define accessors. For example, given {:my-property 10} would people inline my-property or define a (defn my-property [m] (:my-property m))? If you use keywords then do you alias them (i.e. (def my-property :my-property)? My experience is that accessors become painful and restrictive really quickly (navigating nested maps for example) so keywords are the way to go. I tend to have a domain.clj which documents my domain and defines all the important abstractions (i.e. (def my-property :my-property). I find this very useful, combined with marginalia for documentation purposes. It also offers some aid in refactoring as multiple abstractions might resolve to the same keyword (i.e. value-group and bracket-group might resolve to :group). But, to be blunt, it can be a little cumbersome. I also refer :as the namespace, so instead of (get-in m [:a :b]) it is (get-in m [dom/a dom/b]). What are your thoughts (and any other hints/tips for maintaining large Clojure code bases?) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: 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+u...@googlegroups.com javascript:. 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: Style - Keyword access or accessors?
there is really no reason to use `get-in` with keywords/symbols as they know how to look themselves up...in other words, you don't need to pay for any polymorphic calls : (get-in [:a :b :c :d] someMap) = (- someMap :a :b :c :d) Jim On 22/04/14 10:49, Daniel Kersten wrote: For navigating nested maps, get-in, update-in and assoc-in with keywords seem natural and practical to me. -- 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: Style - Keyword access or accessors?
Nice. On Tuesday, April 22, 2014 11:36:06 AM UTC+1, Jim foo.bar wrote: there is really no reason to use `get-in` with keywords/symbols as they know how to look themselves up...in other words, you don't need to pay for any polymorphic calls : (get-in [:a :b :c :d] someMap) = (- someMap :a :b :c :d) Jim On 22/04/14 10:49, Daniel Kersten wrote: For navigating nested maps, get-in, update-in and assoc-in with keywords seem natural and practical to me. -- 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: clojurescript sandboxed code execution
I would carefully question the desire for user stabilizability in this fashion, and then work through the quality attributes and design constraints for what you're trying to achieve. If what you end up needing is in fact an elisp-like system with closed/sandboxed functionality, one way to achieve this is with a multimethod that reads in edn lists (your elisp-like code), and dispatches the correct functionality, based on the first symbol in the list. Cheers, Paul On Monday, April 21, 2014 7:47:43 PM UTC-4, t x wrote: Hi, 1) I'm writing code in Clojurescript. 2) I want to have some level of user customizibility (i.e. think elisp) 3) I want this to be sandboxed. (i.e. not full javascript) 4) How do I do this in cljs, given I don't have eval? Thanks! -- 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.
lein uberjar much faster as lein run
When using lein run, I get the following measurements: 1 threads took 50292 milliseconds 2 threads took 28797 milliseconds 4 threads took 19531 milliseconds 6 threads took 16973 milliseconds 7 threads took 15761 milliseconds 8 threads took 15071 milliseconds While if I use lein uberjar java -jar ..., I get: 1 threads took 11983 milliseconds 2 threads took5778 milliseconds 4 threads took3102 milliseconds 6 threads took2500 milliseconds 7 threads took2288 milliseconds 8 threads took2319 milliseconds Why is lein run so much slower? By the way: Leiningen is really a good tool. Only for that you could switch to Clojure. ;-) And another question: how would I call the normal jar? Because when I do not distribute the jar, it pays not to make the standalone jar. 33K or 3.5M is quite a difference. -- Cecil Westerhof -- 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: browser lisp editor
Codemirror is good too for this. http://codemirror.net Jony On Tuesday, 22 April 2014 05:30:23 UTC+1, Brian Craft wrote: Slightly off topic. Anyone know of a simple browser-based lisp editor that can be embedded in a page? Indenting matching parens would be sufficient. I don't need evaluation. -- 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: lein uberjar much faster as lein run
I recall reading that `lein run` uses JVM options optimised for startup time, not performance - as it's intended for use in development, not production. I can't seem to find where I read that though ... Jony -- 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: where as clojure-fill-docstring gone?
Hi Colin, Bastien bastiengue...@gmail.com writes: That said, there are some quirks. I'm sick now and cannot fix those problems, but please report them as github issues if any. Bozhidar just merged a fix that I sent, you can check it here: https://github.com/clojure-emacs/clojure-mode/ Otherwise just wait till it lands in ELPA repositories. Let me know if it works as expected, -- Bastien -- 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.
Why can I not parse the command line arguments in this way
Obvious not very neat, but I tried as a first hack to do something with the command line parameters with: (doseq [type args] This does not work. Why not? -- Cecil Westerhof -- 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: lein uberjar much faster as lein run
On Apr 22, 2014, at 10:01 AM, Jony Hudson jonyepsi...@gmail.com wrote: I recall reading that `lein run` uses JVM options optimised for startup time, not performance - as it's intended for use in development, not production. I can't seem to find where I read that though ... Somebody with actual knowledge of what's under the hood will undoubtedly be able to say more (and maybe correct me :-), but I've been led to believe that if you want things to run fast (at the expense of possibly longer startup time) with lein run then you actually want to use lein with-profile production run. FWIW (not much) I'd prefer that that be the default, or that there be a somewhat more obvious/memorable syntax (lein fast run?). In our limited testing lein with-profile production run did indeed make a big difference, sometimes producing a ~2x speedup. This isn't as big as the difference that Cecil's getting with the uberjar though... and if we could get the ~5x speedup that he seems to be getting from uberjar then that would be fantastic. I guess we ought to just try that, but I'd appreciate any insights that knowledgable people here could provide on this. -Lee -- 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: Why can I not parse the command line arguments in this way
This snippet is wholly incomplete. Can you please provide a more complete, testable example as well as a detailed description of the error you're seeing? On Tue, Apr 22, 2014 at 4:48 PM, Cecil Westerhof cldwester...@gmail.com wrote: Obvious not very neat, but I tried as a first hack to do something with the command line parameters with: (doseq [type args] This does not work. Why not? -- Cecil Westerhof -- 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: Why can I not parse the command line arguments in this way
One hates to be rude but: I've read all your questions over the past couple of weeks and it seems it would behoove you to pick up a book. There are plenty of recommendations on Google and archived threads. Good day. On 22 Apr 2014 16:48, Cecil Westerhof cldwester...@gmail.com wrote: Obvious not very neat, but I tried as a first hack to do something with the command line parameters with: (doseq [type args] This does not work. Why not? -- Cecil Westerhof -- 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: where as clojure-fill-docstring gone?
Thanks Bastien - I will wait until it lands in ELPA and try it then. On Tuesday, April 22, 2014 3:11:15 PM UTC+1, Bastien Guerry wrote: Hi Colin, Bastien bastie...@gmail.com javascript: writes: That said, there are some quirks. I'm sick now and cannot fix those problems, but please report them as github issues if any. Bozhidar just merged a fix that I sent, you can check it here: https://github.com/clojure-emacs/clojure-mode/ Otherwise just wait till it lands in ELPA repositories. Let me know if it works as expected, -- Bastien -- 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] immutable-int-map
groan On Tuesday, April 22, 2014 4:14:58 AM UTC-5, tcrayford wrote: Bonus: rename the library immutable-long-map, then you can have a section in the readme titled why the long map? On Monday, 21 April 2014 13:12:05 UTC+1, Alex Miller wrote: This is great stuff. Why not longs? Are you going for space savings? -- 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: Style - Keyword access or accessors?
Clojure is designed to make your data accessible generically without getters/setters or other custom APIs so I would encourage direct access via keywords over accessor fns. One consequence of this is that fns using a data structure have a direct coupling to the structure of the data. I prefer to see this as (usually) a feature. Accessor functions allow you to create a point of indirection and I have used that occasionally in very narrow circumstances where I did not want to commit to a data structure. However, I think this is the exception rather than the rule. defrecord (or add-ons like Prismatic's schema library) can formalize the contents of your entities and provide documentation and validation where and how you need it. On Tuesday, April 22, 2014 4:43:53 AM UTC-5, Colin Yates wrote: (This has been discussed before but as this is fairly subjective I am interested in whether people's opinion has changed) What are people's experiences around using keywords or defined accessors for navigating data structures in Clojure (assuming the use of maps)? Do people prefer using raw keywords or do people define accessors. For example, given {:my-property 10} would people inline my-property or define a (defn my-property [m] (:my-property m))? If you use keywords then do you alias them (i.e. (def my-property :my-property)? My experience is that accessors become painful and restrictive really quickly (navigating nested maps for example) so keywords are the way to go. I tend to have a domain.clj which documents my domain and defines all the important abstractions (i.e. (def my-property :my-property). I find this very useful, combined with marginalia for documentation purposes. It also offers some aid in refactoring as multiple abstractions might resolve to the same keyword (i.e. value-group and bracket-group might resolve to :group). But, to be blunt, it can be a little cumbersome. I also refer :as the namespace, so instead of (get-in m [:a :b]) it is (get-in m [dom/a dom/b]). What are your thoughts (and any other hints/tips for maintaining large Clojure code bases?) -- 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: lein uberjar much faster as lein run
2014-04-22 16:50 GMT+02:00 Lee Spector lspec...@hampshire.edu: On Apr 22, 2014, at 10:01 AM, Jony Hudson jonyepsi...@gmail.com wrote: I recall reading that `lein run` uses JVM options optimised for startup time, not performance - as it's intended for use in development, not production. I can't seem to find where I read that though ... Somebody with actual knowledge of what's under the hood will undoubtedly be able to say more (and maybe correct me :-), but I've been led to believe that if you want things to run fast (at the expense of possibly longer startup time) with lein run then you actually want to use lein with-profile production run. FWIW (not much) I'd prefer that that be the default, or that there be a somewhat more obvious/memorable syntax (lein fast run?). In our limited testing lein with-profile production run did indeed make a big difference, sometimes producing a ~2x speedup. This isn't as big as the difference that Cecil's getting with the uberjar though... and if we could get the ~5x speedup that he seems to be getting from uberjar then that would be fantastic. I guess we ought to just try that, but I'd appreciate any insights that knowledgable people here could provide on this. That gives: 1 threads took 11811 milliseconds 2 threads took6015 milliseconds 4 threads took3155 milliseconds 6 threads took2567 milliseconds 7 threads took2356 milliseconds 8 threads took2218 milliseconds So that is comparable to uberjar. I will use this in the future. Thanks. -- Cecil Westerhof -- 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: lein uberjar much faster as lein run
https://github.com/technomancy/leiningen/blob/master/leiningen-core/src/leiningen/core/project.clj#L415 TieredCompilation is the relevant one. On Tue, Apr 22, 2014 at 10:01 AM, Jony Hudson jonyepsi...@gmail.com wrote: I recall reading that `lein run` uses JVM options optimised for startup time, not performance - as it's intended for use in development, not production. I can't seem to find where I read that though ... Jony -- 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: lein uberjar much faster as lein run
By default, lein run will use tiered compilation, which starts faster, but is not as fast. https://github.com/technomancy/leiningen/wiki/Faster On Tuesday, April 22, 2014 9:01:34 AM UTC-5, Jony Hudson wrote: I recall reading that `lein run` uses JVM options optimised for startup time, not performance - as it's intended for use in development, not production. I can't seem to find where I read that though ... Jony -- 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: Style - Keyword access or accessors?
Thanks Alex. Yep, I think Prismatic's schema is going to be invaluable for making the data structure less opaque and providing the comfort that I have lost from the lack of a rigorous and extensive strict type system (carefully avoiding the use of strong, lose, static and dynamic :)). On Tuesday, April 22, 2014 4:26:59 PM UTC+1, Alex Miller wrote: Clojure is designed to make your data accessible generically without getters/setters or other custom APIs so I would encourage direct access via keywords over accessor fns. One consequence of this is that fns using a data structure have a direct coupling to the structure of the data. I prefer to see this as (usually) a feature. Accessor functions allow you to create a point of indirection and I have used that occasionally in very narrow circumstances where I did not want to commit to a data structure. However, I think this is the exception rather than the rule. defrecord (or add-ons like Prismatic's schema library) can formalize the contents of your entities and provide documentation and validation where and how you need it. On Tuesday, April 22, 2014 4:43:53 AM UTC-5, Colin Yates wrote: (This has been discussed before but as this is fairly subjective I am interested in whether people's opinion has changed) What are people's experiences around using keywords or defined accessors for navigating data structures in Clojure (assuming the use of maps)? Do people prefer using raw keywords or do people define accessors. For example, given {:my-property 10} would people inline my-property or define a (defn my-property [m] (:my-property m))? If you use keywords then do you alias them (i.e. (def my-property :my-property)? My experience is that accessors become painful and restrictive really quickly (navigating nested maps for example) so keywords are the way to go. I tend to have a domain.clj which documents my domain and defines all the important abstractions (i.e. (def my-property :my-property). I find this very useful, combined with marginalia for documentation purposes. It also offers some aid in refactoring as multiple abstractions might resolve to the same keyword (i.e. value-group and bracket-group might resolve to :group). But, to be blunt, it can be a little cumbersome. I also refer :as the namespace, so instead of (get-in m [:a :b]) it is (get-in m [dom/a dom/b]). What are your thoughts (and any other hints/tips for maintaining large Clojure code bases?) -- 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: Why can I not parse the command line arguments in this way
2014-04-22 16:55 GMT+02:00 Moritz Ulrich mor...@tarn-vedra.de: This snippet is wholly incomplete. Can you please provide a more complete, testable example as well as a detailed description of the error you're seeing? It was a stupid mistake of me. When making the following example: (defn -main [ args] (if args (doseq [type args] (println (format Got here with: %s type) It behaved perfectly. When looking again at the code, I saw that my brackets where out of place. Sorry for the noise. -- Cecil Westerhof -- 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.
determining repl environment vs. uberjar environment?
I have an app I'm building. It calls System/exit. That doesn't works so well if I'm debugging in the REPL however. What's the preferred method of determining whether I'm in REPL mode interaction vs running as a standalone app? Also, long as I'm asking and being lazy, does the -main function return value translate to a System/exit value if it's numeric? Or is System/exit the way to go? -- 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.
Which linux distro has intelij ?
Hello, Does anyone know a Linux distro which I can use to learn clojure and which has inteljij aviable. I really like to test the cursive plugin Roelof -- 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: browser lisp editor
I wrote a thin Om wrapper around CodeMirror with Clojure syntax support and paren matching: https://github.com/pbostrom/om-codemirror It uses a slightly outdated version of CodeMirror from Nov 2013 but it should be good enough to get started if you want to go that route. It includes two hotkeys: Ctrl-Shift-Z and Ctrl-Shift-X. They currently just print to the console but you can wire them up to evaluation or something. Live demo here: http://cwo.io/om-codemirror/index.html On Tuesday, April 22, 2014 8:53:45 AM UTC-5, Jony Hudson wrote: Codemirror is good too for this. http://codemirror.net Jony On Tuesday, 22 April 2014 05:30:23 UTC+1, Brian Craft wrote: Slightly off topic. Anyone know of a simple browser-based lisp editor that can be embedded in a page? Indenting matching parens would be sufficient. I don't need evaluation. -- 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.
Books for learning Clojure
I have a ‘little’ to learn. ;-) I have worked with a lot of languages, including Lisp. I was thinking about the following books (in that order): - Practical Clojure - Clojure in Action - The Joy of Clojure - Clojure Programming - Programming Clojure Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? -- Cecil Westerhof -- 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: Books for learning Clojure
Some will say that Joy of Clojure is not the best choice for the newcomer. I read all the books more in your list more than once and had the better comprehension with JoC. The important thing is that I didn't get Clojure reading the first or second book. I just really understood after read the five books (that I call as The Five Books of Clojure) and tried to create my own Lisp. Anyway, once you get the click, all these books will become a lot easier to understand. Plinio Balduino 11 982 611 487 On 22/04/2014, at 15:18, Cecil Westerhof cldwester...@gmail.com wrote: I have a ‘little’ to learn. ;-) I have worked with a lot of languages, including Lisp. I was thinking about the following books (in that order): - Practical Clojure - Clojure in Action - The Joy of Clojure - Clojure Programming - Programming Clojure Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? -- Cecil Westerhof -- 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: Books for learning Clojure
2014-04-22 20:32 GMT+02:00 Plínio Balduino pbaldu...@gmail.com: Some will say that Joy of Clojure is not the best choice for the newcomer. I read all the books more in your list more than once and had the better comprehension with JoC. The important thing is that I didn't get Clojure reading the first or second book. I just really understood after read the five books (that I call as The Five Books of Clojure) and tried to create my own Lisp. Anyway, once you get the click, all these books will become a lot easier to understand. So the sequence in which I read the books is not very important? Formulated otherwise: no reason to switch from my original plan? On 22/04/2014, at 15:18, Cecil Westerhof cldwester...@gmail.com wrote: I have a ‘little’ to learn. ;-) I have worked with a lot of languages, including Lisp. I was thinking about the following books (in that order): - Practical Clojure - Clojure in Action - The Joy of Clojure - Clojure Programming - Programming Clojure Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? -- Cecil Westerhof -- 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: Books for learning Clojure
I think you should care about learning the concepts involved in clojure and functional programming in general. Getting clojure after you have done some haskell, lisp or erlang is supposed to be a breeze, so you need to get to the basics! I bet that most of the books will teach you almost the same thing with different words, so as long they cover the main concepts of clojure like: protocols, macros, concurrency... learning the in and outs of the language is really up to you and one of the best ways of doing it is writing clojure. So I advise you to just read whatever book cover looks best while practicing on every piece of code the book shows you. On Tue, Apr 22, 2014 at 3:45 PM, Cecil Westerhof cldwester...@gmail.comwrote: 2014-04-22 20:32 GMT+02:00 Plínio Balduino pbaldu...@gmail.com: Some will say that Joy of Clojure is not the best choice for the newcomer. I read all the books more in your list more than once and had the better comprehension with JoC. The important thing is that I didn't get Clojure reading the first or second book. I just really understood after read the five books (that I call as The Five Books of Clojure) and tried to create my own Lisp. Anyway, once you get the click, all these books will become a lot easier to understand. So the sequence in which I read the books is not very important? Formulated otherwise: no reason to switch from my original plan? On 22/04/2014, at 15:18, Cecil Westerhof cldwester...@gmail.com wrote: I have a ‘little’ to learn. ;-) I have worked with a lot of languages, including Lisp. I was thinking about the following books (in that order): - Practical Clojure - Clojure in Action - The Joy of Clojure - Clojure Programming - Programming Clojure Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? -- Cecil Westerhof -- 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: Books for learning Clojure
Hi I would recommend to take Programming Clojure or Clojure Programming first, and after that take the The Joy of Clojure (2ed)... On Tue, Apr 22, 2014 at 8:18 PM, Cecil Westerhof cldwester...@gmail.comwrote: I have a ‘little’ to learn. ;-) I have worked with a lot of languages, including Lisp. I was thinking about the following books (in that order): - Practical Clojure - Clojure in Action - The Joy of Clojure - Clojure Programming - Programming Clojure Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? -- Cecil Westerhof -- 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. -- With best wishes,Alex Ott http://alexott.net/ Twitter: alexott_en (English), alexott (Russian) Skype: alex.ott -- 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: Books for learning Clojure
I started with JoC and reading Programming Clojure now. Both give pretty good introduction to the language and its capabilities. JoC is full of not-so-simple examples, but they make one's brain work, show the clojure way, and are good for people how know they way around programming in general. Programming Clojure, on the other hand is pretty thorough, and is a decent manual. If you are a kind of person who likes to learn about something before trying to use it, I'd recommend to start with it. On Wednesday, April 23, 2014 12:03:09 AM UTC+5:45, Cecil Westerhof wrote: Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? -- Cecil Westerhof -- 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: Books for learning Clojure
Exactly, Thiago. I just understood Clojure after dive into Clojure. The books helped a lot, but alone they are almost useless. Plínio On Tue, Apr 22, 2014 at 3:53 PM, Thiago Massa thiag...@gmail.com wrote: I think you should care about learning the concepts involved in clojure and functional programming in general. Getting clojure after you have done some haskell, lisp or erlang is supposed to be a breeze, so you need to get to the basics! I bet that most of the books will teach you almost the same thing with different words, so as long they cover the main concepts of clojure like: protocols, macros, concurrency... learning the in and outs of the language is really up to you and one of the best ways of doing it is writing clojure. So I advise you to just read whatever book cover looks best while practicing on every piece of code the book shows you. On Tue, Apr 22, 2014 at 3:45 PM, Cecil Westerhof cldwester...@gmail.comwrote: 2014-04-22 20:32 GMT+02:00 Plínio Balduino pbaldu...@gmail.com: Some will say that Joy of Clojure is not the best choice for the newcomer. I read all the books more in your list more than once and had the better comprehension with JoC. The important thing is that I didn't get Clojure reading the first or second book. I just really understood after read the five books (that I call as The Five Books of Clojure) and tried to create my own Lisp. Anyway, once you get the click, all these books will become a lot easier to understand. So the sequence in which I read the books is not very important? Formulated otherwise: no reason to switch from my original plan? On 22/04/2014, at 15:18, Cecil Westerhof cldwester...@gmail.com wrote: I have a ‘little’ to learn. ;-) I have worked with a lot of languages, including Lisp. I was thinking about the following books (in that order): - Practical Clojure - Clojure in Action - The Joy of Clojure - Clojure Programming - Programming Clojure Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? -- Cecil Westerhof -- 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.
Re: Books for learning Clojure
JoC is like SICP, just really worth doing, not necessarily immediately practical. On Tue, Apr 22, 2014 at 3:16 PM, Plínio Balduino pbaldu...@gmail.comwrote: Exactly, Thiago. I just understood Clojure after dive into Clojure. The books helped a lot, but alone they are almost useless. Plínio On Tue, Apr 22, 2014 at 3:53 PM, Thiago Massa thiag...@gmail.com wrote: I think you should care about learning the concepts involved in clojure and functional programming in general. Getting clojure after you have done some haskell, lisp or erlang is supposed to be a breeze, so you need to get to the basics! I bet that most of the books will teach you almost the same thing with different words, so as long they cover the main concepts of clojure like: protocols, macros, concurrency... learning the in and outs of the language is really up to you and one of the best ways of doing it is writing clojure. So I advise you to just read whatever book cover looks best while practicing on every piece of code the book shows you. On Tue, Apr 22, 2014 at 3:45 PM, Cecil Westerhof cldwester...@gmail.comwrote: 2014-04-22 20:32 GMT+02:00 Plínio Balduino pbaldu...@gmail.com: Some will say that Joy of Clojure is not the best choice for the newcomer. I read all the books more in your list more than once and had the better comprehension with JoC. The important thing is that I didn't get Clojure reading the first or second book. I just really understood after read the five books (that I call as The Five Books of Clojure) and tried to create my own Lisp. Anyway, once you get the click, all these books will become a lot easier to understand. So the sequence in which I read the books is not very important? Formulated otherwise: no reason to switch from my original plan? On 22/04/2014, at 15:18, Cecil Westerhof cldwester...@gmail.com wrote: I have a ‘little’ to learn. ;-) I have worked with a lot of languages, including Lisp. I was thinking about the following books (in that order): - Practical Clojure - Clojure in Action - The Joy of Clojure - Clojure Programming - Programming Clojure Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? -- Cecil Westerhof -- 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 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
Which linux distro has intelij ?
I've used Intellij on Arch and Ubuntu, so I know it works on those (or at least it did - I switched to a Mac 18 months ago). Intellij runs on the JVM, so it should work on any distro in theory. JetBrains has a good knowledge base and forums on their site, so you can probably find details on configuring it for various distros there. As for Cursive, I can't help because I haven't tried it but I have heard good things about it. I did try the La Clojure plugin when I first started and was not impressed. The CCW plugin for eclipse is quite good, but I chose Lighttable and haven't looked back. Let us know how it works out, and welcome to Clojure! -- 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: Which linux distro has intelij ?
In general, there's always a mismatch between linux package managers and the realities of java stuff. So, I use apt-get (in ubuntu) to install java itself, and I throw everything else java-related (maven, ant, eclipse, whatever) in $HOME/opt, with symlinks to $HOME/bin (that's also where I put the lein shell script). Don't find out the hard way :-). On Tue, Apr 22, 2014 at 4:56 PM, Mike Haney txmikes...@gmail.com wrote: I've used Intellij on Arch and Ubuntu, so I know it works on those (or at least it did - I switched to a Mac 18 months ago). Intellij runs on the JVM, so it should work on any distro in theory. JetBrains has a good knowledge base and forums on their site, so you can probably find details on configuring it for various distros there. As for Cursive, I can't help because I haven't tried it but I have heard good things about it. I did try the La Clojure plugin when I first started and was not impressed. The CCW plugin for eclipse is quite good, but I chose Lighttable and haven't looked back. Let us know how it works out, and welcome to Clojure! -- 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: Books for learning Clojure
Yeah, JoC is my favorite clojure book, but I agree it's not the best to start with. Let me throw a couple others into the mix that haven't been mentioned yet. If you come from a solid OO background, I highly recommend Brian Marick's book Functional Programming For the Object Oriented programmer. He sells it on Leanpub, so it's not as well known as some of the others. But for someone with lots of OO experience trying to wrap their head around functional concepts, I think it's a great book. I've started recommending it to all my old Java friends who are interested in Clojure. Another book I found useful starting out was Web Development in Clojure (I think that's the name) from PragPub. It's main contribution is showing you how to put all the pieces together end to end into a finished app. One last one that I know seems completely out of place is Functional JavaScript by Fogus (one of the JoC authors). Even if you never use JavaScript, the book is worth reading for his explanations of functional concepts. -- 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.
core.async: closing a mix only when all inputs have emptied
Howdy -- Trying to use core.async's mix facility, one difficulty I've run into is the lack of a means to close the output channel only after al inputs have been exhausted. In the interim, I've ended up using the below instead -- which lacks some of the facilities provided by the mix interface (muting, pausing, soloing, etc), but has the advantage of cleanly closing its output channel if and only if all inputs (including the channel from which other channels are read) have been flushed. That said, looking at core.async's code, it certainly seems possible to extend the mix abstraction to handle this use case -- for instance, adding a (close-on-empty! [mix]) call which would set a flag causing the the output channel to close whenever all inputs are unmixed, whether by user interaction or end-of-input, would be another solution. Thoughts? Should I publish the below (and related tooling -- such as an N-way split helper used to create such channels of channels) as a separate library? Submit patches to core.async adding appropriate functionality to the mix implementation? Or is there already a better way of achieving the desired effect? Thanks! (defn merge-channels Given a channel which yields other channels, combine output from all of these into a single output channel. Close output channel and exit when both the input channel and all channels read from that channel have closed. [in-chan] (let [out-chan (chan)] (go (loop [open-channels #{}, in-chan-open? true] (let [all-chans (if in-chan-open? (conj open-channels in-chan) open-channels) [v c] (when-not (empty? all-chans) (alts! (vec all-chans)))] (cond (empty? all-chans) nil (= c in-chan) (if v (recur (conj open-channels v) true) (recur open-channels false)) (nil? v) (do (recur (disj open-channels c) in-chan-open?)) :else (do (! out-chan v) (recur open-channels in-chan-open?)) out-chan)) -- 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: puzzled by RuntimeException
I believe this is a problem in REPL-y, which is used when using 'lein repl'. I used Cider to start a nREPL server, then used 'leing repl :connect' to get the REPL-y interface. The problem was evident in the latter, but not the former. I opened an issue for REPL-y. Thanks again, Steve -- 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: Books for learning Clojure
Hi Cecil I had read almost all books of you list and without a doubt clojure programming (o'reilly) is the best book for me ;) Andrey 2014-04-22 20:18 GMT+02:00 Cecil Westerhof cldwester...@gmail.com: I have a ‘little’ to learn. ;-) I have worked with a lot of languages, including Lisp. I was thinking about the following books (in that order): - Practical Clojure - Clojure in Action - The Joy of Clojure - Clojure Programming - Programming Clojure Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? -- Cecil Westerhof -- 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. -- Andrey Antukh - Андрей Антух - andrei.anto...@kaleidos.net / n...@niwi.be http://www.niwi.be http://www.niwi.be/page/about/ https://github.com/niwibe -- 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: puzzled by RuntimeException
On Apr 22, 2014, at 5:37 PM, Greg D gregoire.da...@gmail.com wrote: I believe this is a problem in REPL-y, which is used when using 'lein repl'. I used Cider to start a nREPL server, then used 'leing repl :connect' to get the REPL-y interface. The problem was evident in the latter, but not the former. I opened an issue for REPL-y. Thanks again, Steve You're welcome! Following on your evidence, I tried running REPL-y from a checkout and found that the current head of master (0.3.1-SNAPSHOT) doesn't throw the exception, but the current release (0.3.0) does. I used git bisect to find the commit that changed the behavior and found this: https://github.com/trptcolin/reply/issues/132 (Reader error on number-like keywords in maps) The fix is here: https://github.com/cgrand/sjacket/pull/16 (Number-like keywords) So, to avoid the exception you saw when using number-like keywords with lein repl, REPL-y needs a release and leiningen needs to pick it up. ... and we got a view of a slice of the Clojure lib ecosystem... three layers deep. Neat. Cheers, --Steve -- 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: clojurescript sandboxed code execution
I definitely mean user customizibility - sorry for the insane typo. -- 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: Which linux distro has intelij ?
Don't install intellij from and package manager (it will probably be out of date/not there), just install java then download it from the intellij/cursive website. Its self updating anyway and should work on any distro and on windows that way. On Wednesday, April 23, 2014 5:11:54 AM UTC+12, Roelof Wobben wrote: Hello, Does anyone know a Linux distro which I can use to learn clojure and which has inteljij aviable. I really like to test the cursive plugin Roelof -- 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: browser lisp editor
Thanks everyone, this is very helpful. On Tuesday, April 22, 2014 6:53:45 AM UTC-7, Jony Hudson wrote: Codemirror is good too for this. http://codemirror.net Jony On Tuesday, 22 April 2014 05:30:23 UTC+1, Brian Craft wrote: Slightly off topic. Anyone know of a simple browser-based lisp editor that can be embedded in a page? Indenting matching parens would be sufficient. I don't need evaluation. -- 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: Which linux distro has intelij ?
The comments here are basically spot on - I'm actually not sure what JetBrains' distro coverage is like, but as far as I know IntelliJ should work on most major distros. I've personally used it on Ubuntu and Suse. It's been a while since I used Java on a linux desktop (I'm on a Mac now too) but when I did it was definitely a better idea to download dependencies manually than to use the package managers, and I would absolutely recommend this for IntelliJ itself. On 23 April 2014 11:37, Andrew Chambers andrewchambe...@gmail.com wrote: Don't install intellij from and package manager (it will probably be out of date/not there), just install java then download it from the intellij/cursive website. Its self updating anyway and should work on any distro and on windows that way. On Wednesday, April 23, 2014 5:11:54 AM UTC+12, Roelof Wobben wrote: Hello, Does anyone know a Linux distro which I can use to learn clojure and which has inteljij aviable. I really like to test the cursive plugin Roelof -- 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: Clojure Office Hours
Thanks, Leif, for offering these office hours. I just wrapped up my office hour with Leif. We chatted about Clojure community and open source project stuff, as that is what I needed help with, and he was very helpful in brainstorming ideas. If he offers office hours again, I'd recommend it highly. Thinking about offering my own office hours for Clojure beginners On Thursday, April 10, 2014 8:53:26 AM UTC-4, Leif wrote: Hi, everybody. Inspired by the SF Bay Area clojure group, ClojureBridge, and the great talks on community education from Clojure/West on youtube, I've decided to try holding my own personal Clojure office hours (online). I am personally of the opinion that face-to-face interaction is superior, so you may want to get your local user group to follow the Bay Area's lead. But if you don't agree, or you don't live near such a user group, then read on. Borrowed from the Bay Area's posting: This is a [2-person] meetup for anyone who is working on a Clojure project and wants to talk over their code or approach with an experienced Clojure developer. Projects of all levels and complexity are welcome, anyone just getting started in Clojure is encouraged to come in and talk through their first Euler or 4Clojure problems. Disclaimer: This community being what it is, there may be projects of too high a complexity for me, but I'll give it a shot. I'm going to try a test run of this for two weeks, and then I'll have to see what state I'm in (mentally and geographically). If interested, you can book at this link: https://leifpoorman.youcanbook.me/ Note: all the times are evening, US Eastern. That pretty much limits it to the western hemisphere and any east asian friends that want to do some morning hacking. Eastern hemisphere friends, make noise on this thread, and maybe some brave European/Asian clojure developer will try something similar. Cheers, Leif -- 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: core.async: closing a mix only when all inputs have emptied
Howdy Charles, For a static mix of sources there's async/merge [1], and it behaves the almost exactly way you describe, impl here [2]. Stepping back, the source chan-of-chans being closed represents value production being fully in flight, while the merged channel being closed represents consumption being finished, and are distinctly different events w.r.t. this particular process. Can you have the producer explicit for whoever is producing chans to signal explicitly, and for the consumer to consume the merge? If you want to terminate early upon the producer chan, listen to that explicit signal -- produced by some proc that has a more knowledge (! done) I'm not sure that async/mix is the right abstraction for your stated needs because a mix doesn't terminate except when something closes the merged channel. A mix is 'alive' even when there is nothing to read or nothing left to read (which is btw the initial state of all mixes), and contradicts the stated goal. For your goal, just alts! on the input channel + the already read channels. (defn merge-from-chan [input] (let [out (chan)] (go-loop [reads [input]] (when (pos? (count reads)) (let [[v sc] (alts! reads)] (if (= input sc) (if (some? v) (recur (conj reads v)) ;; new source (recur (filterv #(not= input %) reads))) ;; input done, take it out of action (if (some? v) ;; value from elsewhere (do (! output) (recur reads)) (recur (filterv #(not= sc %) reads)) out)) Hope this helps, [1] https://clojure.github.io/core.async/#clojure.core.async/merge [2] https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async.clj#L931-L947 On Tuesday, April 22, 2014 5:35:24 PM UTC-4, Charles Duffy wrote: Howdy -- Trying to use core.async's mix facility, one difficulty I've run into is the lack of a means to close the output channel only after al inputs have been exhausted. In the interim, I've ended up using the below instead -- which lacks some of the facilities provided by the mix interface (muting, pausing, soloing, etc), but has the advantage of cleanly closing its output channel if and only if all inputs (including the channel from which other channels are read) have been flushed. That said, looking at core.async's code, it certainly seems possible to extend the mix abstraction to handle this use case -- for instance, adding a (close-on-empty! [mix]) call which would set a flag causing the the output channel to close whenever all inputs are unmixed, whether by user interaction or end-of-input, would be another solution. Thoughts? Should I publish the below (and related tooling -- such as an N-way split helper used to create such channels of channels) as a separate library? Submit patches to core.async adding appropriate functionality to the mix implementation? Or is there already a better way of achieving the desired effect? Thanks! (defn merge-channels Given a channel which yields other channels, combine output from all of these into a single output channel. Close output channel and exit when both the input channel and all channels read from that channel have closed. [in-chan] (let [out-chan (chan)] (go (loop [open-channels #{}, in-chan-open? true] (let [all-chans (if in-chan-open? (conj open-channels in-chan) open-channels) [v c] (when-not (empty? all-chans) (alts! (vec all-chans)))] (cond (empty? all-chans) nil (= c in-chan) (if v (recur (conj open-channels v) true) (recur open-channels false)) (nil? v) (do (recur (disj open-channels c) in-chan-open?)) :else (do (! out-chan v) (recur open-channels in-chan-open?)) out-chan)) -- 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.
citing Clojure and EDN?
For the purposes of academic publications (in areas well outside of SIGPLAN and such), are there any preferred citations for Clojure and EDN? Or could a recommendation for a citation for both (especially EDN) be proposed if there isn't one currently? -- 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: puzzled by RuntimeException
Just FYI, some background on keywords that start with a number... The reader docs (http://clojure.org/reader) states that symbols (and keywords follow symbols in these rules) must begin with a non-numeric character. The current Clojure reader accidentally accepts these due to a bug in the LispReader regex that reads symbols. We applied a fix for this bug early in Clojure 1.6 (http://dev.clojure.org/jira/browse/CLJ-1252). We then discovered that this broke code in a number of libraries and applications (often in test data, but also in some real code). Due to this issue, we rolled back the change. There is still an open ticket to do something to resolve this (likely by changing what we say is allowed) - this may have impacts on EDN as well. http://dev.clojure.org/jira/browse/CLJ-1286 Alex On Tuesday, April 22, 2014 6:11:23 PM UTC-5, squeegee wrote: On Apr 22, 2014, at 5:37 PM, Greg D gregoir...@gmail.com javascript: wrote: I believe this is a problem in REPL-y, which is used when using 'lein repl'. I used Cider to start a nREPL server, then used 'leing repl :connect' to get the REPL-y interface. The problem was evident in the latter, but not the former. I opened an issue for REPL-y. Thanks again, Steve You’re welcome! Following on your evidence, I tried running REPL-y from a checkout and found that the current head of master (0.3.1-SNAPSHOT) doesn’t throw the exception, but the current release (0.3.0) does. I used git bisect to find the commit that changed the behavior and found this: https://github.com/trptcolin/reply/issues/132 (Reader error on number-like keywords in maps) The fix is here: https://github.com/cgrand/sjacket/pull/16 (Number-like keywords) So, to avoid the exception you saw when using number-like keywords with lein repl, REPL-y needs a release and leiningen needs to pick it up. … and we got a view of a slice of the Clojure lib ecosystem… three layers deep. Neat. Cheers, —Steve -- 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.
ring streaming efficiency
When you set the body of a ring response to a java input stream and return it, is this still a thread per stream? or does it use some sort of java event loop for efficiency? I'm worried that a traffic download/upload server in ring wouldn't handle many concurrent large file uploads and downloads as efficiently as something like google go or nodejs would. I would like to use ring because I want Datomic to manage the access permissions. -- 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: Which linux distro has intelij ?
Just for reference, i use xubuntu (with the apt-get java jdk) and windows with cursive no problem. I love cursive compared to other clojure dev tools I've tried. On Wednesday, April 23, 2014 11:37:12 AM UTC+12, Andrew Chambers wrote: Don't install intellij from and package manager (it will probably be out of date/not there), just install java then download it from the intellij/cursive website. Its self updating anyway and should work on any distro and on windows that way. On Wednesday, April 23, 2014 5:11:54 AM UTC+12, Roelof Wobben wrote: Hello, Does anyone know a Linux distro which I can use to learn clojure and which has inteljij aviable. I really like to test the cursive plugin Roelof -- 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: citing Clojure and EDN?
I'm not sure exactly what you're looking for, but the EDN spec is https://github.com/edn-format/edn and was written by Rich Hickey. Seems like that is what you should cite. I don't know what it would mean to cite Clojure - it is software, written by many people over a period of years. Rich Hickey is the sole or join copyright holder on all of it. I don't know how software like this is cited but here's one thread suggesting some ideas: http://ubuntuforums.org/showthread.php?t=1230811. On Tuesday, April 22, 2014 9:42:05 PM UTC-5, vra...@gmail.com wrote: For the purposes of academic publications (in areas well outside of SIGPLAN and such), are there any preferred citations for Clojure and EDN? Or could a recommendation for a citation for both (especially EDN) be proposed if there isn't one currently? -- 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: ring streaming efficiency
Java input streams are blocking, rather than asynchronous, so yes it would use a thread per stream. In theory an asynchronous solution would be more efficient, and there are adapters, like http-kit, that support this optimisation. However, in practice, Java can handle many threads in a single process, so it's unlikely you'll run into difficulties until you have to support 1000s of concurrent downloads. It's often a good idea to avoid premature optimisations, particularly if you lack concrete benchmarks. It also depends a lot on how you're generating the downloads. If you're generating the files dynamically, you may find that your bottleneck is CPU-bound, rather than I/O-bound; in which case, there would be little benefit to going async. If you're just serving static files, then it might be useful hosting your files on a service like S3, and redirecting your users instead. - James On 23 April 2014 04:03, Andrew Chambers andrewchambe...@gmail.com wrote: When you set the body of a ring response to a java input stream and return it, is this still a thread per stream? or does it use some sort of java event loop for efficiency? I'm worried that a traffic download/upload server in ring wouldn't handle many concurrent large file uploads and downloads as efficiently as something like google go or nodejs would. I would like to use ring because I want Datomic to manage the access permissions. -- 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: ring streaming efficiency
I need access control for the static files. The alternative is signed s3 urls which expire. Uploads still require streaming through ring however as i cant generate signed upload urls with the parameters that I need. On Wednesday, April 23, 2014 3:27:09 PM UTC+12, James Reeves wrote: Java input streams are blocking, rather than asynchronous, so yes it would use a thread per stream. In theory an asynchronous solution would be more efficient, and there are adapters, like http-kit, that support this optimisation. However, in practice, Java can handle many threads in a single process, so it's unlikely you'll run into difficulties until you have to support 1000s of concurrent downloads. It's often a good idea to avoid premature optimisations, particularly if you lack concrete benchmarks. It also depends a lot on how you're generating the downloads. If you're generating the files dynamically, you may find that your bottleneck is CPU-bound, rather than I/O-bound; in which case, there would be little benefit to going async. If you're just serving static files, then it might be useful hosting your files on a service like S3, and redirecting your users instead. - James On 23 April 2014 04:03, Andrew Chambers andrewc...@gmail.comjavascript: wrote: When you set the body of a ring response to a java input stream and return it, is this still a thread per stream? or does it use some sort of java event loop for efficiency? I'm worried that a traffic download/upload server in ring wouldn't handle many concurrent large file uploads and downloads as efficiently as something like google go or nodejs would. I would like to use ring because I want Datomic to manage the access permissions. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: 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+u...@googlegroups.com javascript:. 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: Which linux distro has intelij ?
Arch has one always up to date. вторник, 22 апреля 2014 г., 21:11:54 UTC+4 пользователь Roelof Wobben написал: Hello, Does anyone know a Linux distro which I can use to learn clojure and which has inteljij aviable. I really like to test the cursive plugin Roelof -- 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: Clojure Office Hours
2014-04-18 11:35 GMT+02:00 Ulises ulises.cerv...@gmail.com: Inspired by Leif's offer, I've decided to offer Clojure office hours as well. I'm based in the UK so I reckon the times will be more amenable to those in Europe (not sure the times will be good for those in Asia unfortunately.) Sadly the offer is limited to 1h a day, but hopefully it'll still be useful. You can book me at https://ucb.youcanbook.me/ I had a session with Ulises yesterday. I found it very useful. I recommend everyone who wants to start programming in Clojure to do a session with a more experienced person: it gets your blood streaming. :-D -- Cecil Westerhof -- 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: Books for learning Clojure
2014-04-22 20:18 GMT+02:00 Cecil Westerhof cldwester...@gmail.com: I have a ‘little’ to learn. ;-) I have worked with a lot of languages, including Lisp. I was thinking about the following books (in that order): - Practical Clojure - Clojure in Action - The Joy of Clojure - Clojure Programming - Programming Clojure Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? Everyone thanks for there input. If there was a chance that I got bored, it certainly is not the case any-more. :-D I probably start with Programming Clojure and follow it up with The Joy of Clojure. And add a few other books. -- Cecil Westerhof -- 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: Books for learning Clojure
Let me also +10 for Eric Normand’s excellent Clojure videos, found at http://www.purelyfunctional.tv On Apr 22, 2014, at 10:13 PM, Cecil Westerhof cldwester...@gmail.com wrote: 2014-04-22 20:18 GMT+02:00 Cecil Westerhof cldwester...@gmail.com: I have a ‘little’ to learn. ;-) I have worked with a lot of languages, including Lisp. I was thinking about the following books (in that order): - Practical Clojure - Clojure in Action - The Joy of Clojure - Clojure Programming - Programming Clojure Someone told me it was better to start with Programming Clojure and after that The Joy of Clojure. Any idea's about this? Everyone thanks for there input. If there was a chance that I got bored, it certainly is not the case any-more. :-D I probably start with Programming Clojure and follow it up with The Joy of Clojure. And add a few other books. -- Cecil Westerhof -- 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. Best, Marcus Marcus Blankenship \\\ Problem Solver, Linear Thinker \\\ 541.805.2736 \ @justzeros \ skype:marcuscreo -- 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.