Re: `cljs.reader/read-string` on anonymous functions
On Friday, 7 September 2012 17:38:16 UTC+5:30, Moritz Ulrich wrote: This won't work, as ClojureScript doesn't includes a compiler in the runtime. You can't eval ClojureScript code at runtime and you can't read new anonymous functions in. Thanks, Moritz. It's dawning on me that `cljs.reader/read-string` is probably intended to parse EDN representation only -- it's no coincidence that S-expressions (without anonymous fn shortcuts) happen to be just valid EDN representation. I think I am having an Aha! moment. :-) Shantanu -- 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
Re: Question about sets
I think I may have figured it out. New patch attached to ticket CLJ-1065 that should eliminate run-time checks for duplicate map keys, for those maps whose keys are all compile-time constants. Andy On Sep 8, 2012, at 4:38 PM, Andy Fingerhut wrote: Rich: I'm not sure what you mean by the not-fastest-path possible that exists in today's Clojure code, so if you get a chance, see if the below is what you mean. As far as I can tell (i.e. putting debug println's in the Java code of RT.map), when someone enters a map literal in, say, a function definition, and all keys *and* values are compile time constants, it calls RT.map() while the function is being compiled, but never again when the function is called. If I make a similar function with run-time variable keys or values, RT.map() is called every time the function is invoked. Each of these calls repeats the check that the keys are unique. Do you mean that you want a new code path where if the keys are compile time constants, but the values are variables at compile-time, then at run time this map should be created with a method that avoids the unnecessary check for unique keys? And by the word restore do you mean to imply that it was this way at one time before? Thanks, Andy On Sep 8, 2012, at 5:29 AM, Rich Hickey wrote: Thanks! I'm still interested in patch for recommendation #3: Restore the fastest path possible for those cases where the keys are compile-time detectable unique constants I'd like to see all three recommendations go into a release as a set. On Sep 8, 2012, at 2:22 AM, Andy Fingerhut wrote: The new ticket CLJ-1065 has a patch that I think implements the desired behavior on the dev wiki page. i.e. set/map literals with duplicates are invalid (status quo) All constructor functions for sets and maps allow duplicates, and for maps, always take the value associated with the last occurrence of the same key. All constructor functions explicitly say this in their doc strings. Andy On Sep 7, 2012, at 2:06 PM, Rich Hickey wrote: On Sep 7, 2012, at 3:35 PM, Sean Corfield wrote: On Fri, Sep 7, 2012 at 10:49 AM, Rich Hickey richhic...@gmail.com wrote: I've added my feedback there (http://dev.clojure.org/display/design/Allow+duplicate+map+keys+and+set+elements) Thanx Rich! So the recommendation is: * set/map literals with duplicates are invalid (status quo) * hash-set/hash-map should change (to last key wins, as if conj'd/assoc'd) * sorted-set/sorted-map should not change (last key wins, as if conj'd/assoc'd) * array-map should not change (throws on dupes)? Highlighting that last one since it's not mentioned on the wiki and would then be the odd one out but perhaps there's a good reason? No, array-map should be the same too. -- 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 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 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
Re: ANN Ritz 0.4.1
On Sat, Sep 8, 2012 at 2:02 PM, Hugo Duncan duncan.h...@gmail.com wrote: Denis Labaye denis.lab...@gmail.com writes: On Fri, Sep 7, 2012 at 9:11 PM, Hugo Duncan h...@hugoduncan.org wrote: Ritz is a collection of repl servers, middleware and repl utility functions, supporting nREPL and swank/slime. The repl utilities can be used from any repl. Does ritz/swank replace lein-swank? The equivalent of lein-swank is lein-ritz [1]. cool, thx At the moment there is no simple way of starting ritz without the debugger (`lein ritz 4005 localhost :server-ns ritz.swank.repl` is the not so simple way of doing this). The jack-in instructions should probably also be given more prominence in the README. Hugo [1] https://github.com/pallet/ritz/tree/develop/swank -- 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 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
Re: Browser as an Evaluation Environment error
I don't use master - what's this ? Yes i used bootstrap at the begging. I added to the path :~/cljcode/clojurescript/script and invoke repl in cljcode folder and there are foo.cljs foo.js and index.html files I enter repl with ~/cljcode$ repl then i enter forms as described in manual and i am at clojurescript repl then i open http://localhost:9000/repl and get xpc error enter (+ 1 1) in clojurescript repl and it hangs. пятница, 7 сентября 2012 г., 20:19:20 UTC+4 пользователь David Nolen написал: On Thu, Sep 6, 2012 at 10:29 AM, goracio feli...@gmail.com javascript: wrote: Hi I try to follow this guide https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments and get an error No 'xpc' param provided to chid iframe when loading http://localhost:9000/repl and my clojurescript repl hangs Clojure 1.4.0 user= (require '[cljs.repl :as repl]) nil user= (require '[cljs.repl.browser :as browser]) nil user= (def env (browser/repl-env)) #'user/env user= (repl/repl env) Type: :cljs/quit to quit ClojureScript:cljs.user (+ 1 1) what could be wrong with this ? I just tried this with master, it seems to work fine. Sometimes you need to refresh the browser. I'm assuming you are using master and that you have bootstrapped? David -- 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
Re: edn
On Fri, Sep 7, 2012 at 3:01 AM, Rich Hickey richhic...@gmail.com wrote: I've started to document a subset of Clojure's data format in an effort to get it more widely used as a data exchange format, e.g. as an alternative to JSON. Please have a look: https://github.com/richhickey/edn Rich The proposed grammar for floating point numbers does not allow: 1M since at least a frac or exp part is required following the int part. Clojure does allow this. Is this deliberate? // Ben -- 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
Browser as an Evaluation Environment error
Could we get a bit more information about your environment. What release are you using? What version of closure, clojure? Thanks, David On Sunday, September 9, 2012, goracio wrote: I don't use master - what's this ? Yes i used bootstrap at the begging. I added to the path :~/cljcode/clojurescript/script and invoke repl in cljcode folder and there are foo.cljs foo.js and index.html files I enter repl with ~/cljcode$ repl then i enter forms as described in manual and i am at clojurescript repl then i open http://localhost:9000/repl and get xpc error enter (+ 1 1) in clojurescript repl and it hangs. пятница, 7 сентября 2012 г., 20:19:20 UTC+4 пользователь David Nolen написал: On Thu, Sep 6, 2012 at 10:29 AM, goracio feli...@gmail.com wrote: Hi I try to follow this guide https://github.com/clojure/**clojurescript/wiki/The-REPL-** and-Evaluation-Environmentshttps://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments and get an error No 'xpc' param provided to chid iframe when loading http://localhost:9000/repl and my clojurescript repl hangs Clojure 1.4.0 user= (require '[cljs.repl :as repl]) nil user= (require '[cljs.repl.browser :as browser]) nil user= (def env (browser/repl-env)) #'user/env user= (repl/repl env) Type: :cljs/quit to quit ClojureScript:cljs.user (+ 1 1) what could be wrong with this ? I just tried this with master, it seems to work fine. Sometimes you need to refresh the browser. I'm assuming you are using master and that you have bootstrapped? David -- 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 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
atom with metadata
Can I perform a swap! on an atom and have the metadata survive? Or else reapply it somehow? The only way I seem to be able to apply metadata is with the reader macro. -- 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
Re: atom with metadata
sorry, figured it out after I posted - to get at the meta have to deref the atom On Sunday, September 9, 2012 10:50:34 AM UTC-4, John Holland wrote: Can I perform a swap! on an atom and have the metadata survive? Or else reapply it somehow? The only way I seem to be able to apply metadata is with the reader macro. -- 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
Browser as an Evaluation Environment error
Could we get a bit more information about your environment. What release are you using? What version of closure, clojure? Thanks, David On Sunday, September 9, 2012, goracio wrote: I don't use master - what's this ? Yes i used bootstrap at the begging. I added to the path :~/cljcode/clojurescript/script and invoke repl in cljcode folder and there are foo.cljs foo.js and index.html files I enter repl with ~/cljcode$ repl then i enter forms as described in manual and i am at clojurescript repl then i open http://localhost:9000/repl and get xpc error enter (+ 1 1) in clojurescript repl and it hangs. пятница, 7 сентября 2012 г., 20:19:20 UTC+4 пользователь David Nolen написал: On Thu, Sep 6, 2012 at 10:29 AM, goracio feli...@gmail.com wrote: Hi I try to follow this guide https://github.com/clojure/**clojurescript/wiki/The-REPL-** and-Evaluation-Environmentshttps://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments and get an error No 'xpc' param provided to chid iframe when loading http://localhost:9000/repl and my clojurescript repl hangs Clojure 1.4.0 user= (require '[cljs.repl :as repl]) nil user= (require '[cljs.repl.browser :as browser]) nil user= (def env (browser/repl-env)) #'user/env user= (repl/repl env) Type: :cljs/quit to quit ClojureScript:cljs.user (+ 1 1) what could be wrong with this ? I just tried this with master, it seems to work fine. Sometimes you need to refresh the browser. I'm assuming you are using master and that you have bootstrapped? David -- 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 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
Re: edn
On Fri, Sep 7, 2012 at 3:01 AM, Rich Hickey richhic...@gmail.com wrote: I've started to document a subset of Clojure's data format in an effort to get it more widely used as a data exchange format, e.g. as an alternative to JSON. Please have a look: https://github.com/richhickey/edn Rich I assume that character literals are intended to be like those in Clojure, however these are legal in Clojure: \an actual space \an actual newline \an actual return \an actual tab I don't think it would be a good idea to support these in edn as they are hard for a human to read unambiguously. I'd suggest requiring: \space \newline \return \tab ... and disallowing whitespace immediately following the \ introducing a character literal. // Ben -- 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
Re: Browser as an Evaluation Environment error
i get clojurescript from repo couple of days ago- git clone clojurescript then bootrstraped and it installed clojure and closure libs in lib so all should be new i guess This particular error doesn't tell anything ? i thought it could point to the problem right away. On Sunday, September 9, 2012 7:49:22 PM UTC+4, David Nolen wrote: Could we get a bit more information about your environment. What release are you using? What version of closure, clojure? Thanks, David On Sunday, September 9, 2012, goracio wrote: I don't use master - what's this ? Yes i used bootstrap at the begging. I added to the path :~/cljcode/clojurescript/script and invoke repl in cljcode folder and there are foo.cljs foo.js and index.html files I enter repl with ~/cljcode$ repl then i enter forms as described in manual and i am at clojurescript repl then i open http://localhost:9000/repl and get xpc error enter (+ 1 1) in clojurescript repl and it hangs. пятница, 7 сентября 2012 г., 20:19:20 UTC+4 пользователь David Nolen написал: On Thu, Sep 6, 2012 at 10:29 AM, goracio feli...@gmail.com wrote: Hi I try to follow this guide https://github.com/clojure/**clojurescript/wiki/The-REPL-** and-Evaluation-Environmentshttps://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments and get an error No 'xpc' param provided to chid iframe when loading http://localhost:9000/repl and my clojurescript repl hangs Clojure 1.4.0 user= (require '[cljs.repl :as repl]) nil user= (require '[cljs.repl.browser :as browser]) nil user= (def env (browser/repl-env)) #'user/env user= (repl/repl env) Type: :cljs/quit to quit ClojureScript:cljs.user (+ 1 1) what could be wrong with this ? I just tried this with master, it seems to work fine. Sometimes you need to refresh the browser. I'm assuming you are using master and that you have bootstrapped? David -- 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 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
Re: Browser as an Evaluation Environment error
i get clojurescript from repo couple of days ago- git clone clojurescript then bootrstraped and it installed clojure and closure libs in lib so all should be new i guess This particular error doesn't tell anything ? i thought it could point to the problem right away. On Sunday, September 9, 2012 7:49:22 PM UTC+4, David Nolen wrote: Could we get a bit more information about your environment. What release are you using? What version of closure, clojure? Thanks, David On Sunday, September 9, 2012, goracio wrote: I don't use master - what's this ? Yes i used bootstrap at the begging. I added to the path :~/cljcode/clojurescript/script and invoke repl in cljcode folder and there are foo.cljs foo.js and index.html files I enter repl with ~/cljcode$ repl then i enter forms as described in manual and i am at clojurescript repl then i open http://localhost:9000/repl and get xpc error enter (+ 1 1) in clojurescript repl and it hangs. пятница, 7 сентября 2012 г., 20:19:20 UTC+4 пользователь David Nolen написал: On Thu, Sep 6, 2012 at 10:29 AM, goracio feli...@gmail.com wrote: Hi I try to follow this guide https://github.com/clojure/**clojurescript/wiki/The-REPL-** and-Evaluation-Environmentshttps://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments and get an error No 'xpc' param provided to chid iframe when loading http://localhost:9000/repl and my clojurescript repl hangs Clojure 1.4.0 user= (require '[cljs.repl :as repl]) nil user= (require '[cljs.repl.browser :as browser]) nil user= (def env (browser/repl-env)) #'user/env user= (repl/repl env) Type: :cljs/quit to quit ClojureScript:cljs.user (+ 1 1) what could be wrong with this ? I just tried this with master, it seems to work fine. Sometimes you need to refresh the browser. I'm assuming you are using master and that you have bootstrapped? David -- 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 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
Re: How to run Clooj?
Light Table may also be appropriate for you to use: http://www.chris-granger.com/2012/08/17/light-table-reaches-010/ Particularly notable is how it really is just a double-click experience with the latest release. N.B. I haven't checked in on Clooj recently, so please don't consider my suggesting Light Table to a dissuasion from using that. Good luck! --Josh On Thursday, August 30, 2012 9:19:07 PM UTC-4, gearss wrote: I am new to Clojure, I want to know how ot run the Clooj IDE? If it needs to install Clojure to my computer, or every time I use java -cp /path/to/the/clojure.jar clojure.main /path/to/your/code.clj to run my code? -- 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
clojure-clr question
I don't want to add noise to this group. Is there somewhere more appropriate to ask? (The wiki on the site doesn't seem to fit). Sorry for wasting bandwidth, James -- 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
Re: clojure-clr question
On Sunday, September 9, 2012 5:20:13 PM UTC-7, James Ashley wrote: I don't want to add noise to this group. Is there somewhere more appropriate to ask? (The wiki on the site doesn't seem to fit). No apologies necessary, this is the list according to the clojure-clr readme. -- 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
[ANN] rubydoc 0.3.0
rubydoc https://github.com/cldwalker/rubydoc is a project aimed at helping rubyists find clojure equivalents. There are now over 200+ ruby-clojure comparisons. 0.3.0 comes with some new features: * A comparison is not just limited to functions/methods. With the introduction of a :type field, comparisons between libraries, constants, special forms, variables, and general code are encouraged. * Records can be individually display * :raw option was added to just return records instead of printing them. * :ruby field can take multiple values (for method aliases). * :ruby-lib field was added for adding library names to methods More clojure-ruby comparisons welcome! For more info on contributing see here https://github.com/cldwalker/rubydoc#contributing. Thanks, Gabriel -- 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
[ANN] data.priority-map 0.0.2 available
https://github.com/clojure/data.priority-map Fixes: http://dev.clojure.org/jira/browse/DPRIMAP-1 Implements Iterable to be compatible with reducers per Alan Malloy. (yes, I know the README needs updating to the official format...) -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- 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