Re: [ANN] ClojureCLR 1.3.0 released
ClojureCLR 1.3.0 is now available. Same updates as Clojure 1.3.0. Wow, David. That's some incredible work that you've done. Even though I don't use ClojureCLR, I can understand the amount of effort that has gone into the release. Heartiest congratulations. Regards, BG -- Baishampayan Ghose b.ghose at gmail.com -- 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: beginner question
Hi, regarding the writing of a game in Clojure, I think http://codethat.wordpress.com/2011/09/10/writing-tetris-in-clojure/ is a good post to read. Regards, Stefan -- 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: aquamacs, slime and clojure on OS X
Coming from Eclipse, I can't live without the file browser. I'm having this problem with ECB, please help: http://stackoverflow.com/questions/7541693/ecb-context-menu-in-aquamacs Thanks, Ngoc -- 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: beginner question
the website says: deftype supports mutable fields, defrecord does not so deftype seems to be what would be a java bean with simple properties in java Nope. :-) Domain information should use defrecord, and should never be mutable. This is the closest thing to a Java bean, but is radically different in being (1) immutable, (2) persistent, and (3) accessible generically as a map. Game state would modeled with defrecord. deftype is for things like custom data structures. In a Clojure-in-Clojure implementation, deftype would be used to implement maps, vectors, and lists. deftype's mutation ability would be used to implement transients. Stu -- 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: :use :only support in ClojureScript now available
Nice! This is great. Will the :only directive always be required, or will we eventually be able to pull in entire namespaces? - Jason Probably the former. Pulling in entire namespaces is generally considered bad practice. Stu -- 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: beginner question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 25.09.2011 14:00, schrieb Stuart Halloway: the website says: deftype supports mutable fields, defrecord does not so deftype seems to be what would be a java bean with simple properties in java Nope. :-) Domain information should use defrecord, and should never be mutable. This is the closest thing to a Java bean, but is radically different in being (1) immutable, (2) persistent, and (3) accessible generically as a map. Game state would modeled with defrecord. what's the difference between persistent and immutable? deftype is for things like custom data structures. In a Clojure-in-Clojure implementation, deftype would be used to implement maps, vectors, and lists. deftype's mutation ability would be used to implement transients. Stu - -- -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOfyimAAoJENRtux+h35aGtacQALmFsfHsPuCMt/QZM1gfwMNN e3C0Q2Dju0GgG/PNGTyV25mWII0JGrvl5UK13VLb2q93bNW4l43SeS4glxE1USBd Btbo1QwGiAkIffhSrcXLQT+2K4PM4b0fbLwkF41obAEVEf3JDpMjZ9Qjxbrz9D7v WDH+JBx5rQxvk3ctPqtK59OCkH7fRtMM6bLuwHdFc9YhQt7VjmloaZaAmuXfL3+B sq//dTOuUy94ZZSsERUWWYeqRIvL5gTVkT1QTbElVHCzixH25fnTX8G3b/04bmX6 ME2P/3iSsrYdHfO35caRwQfIm29JYkljwER1vyX0n4iotouodOyTxo4s4du5PZM1 G+xWrzw65ejn3Y6GaSOFjb02wJUhku2cHyXcjY+Xdb3RXNgtTBQurW5Jx+wCmGV5 Kj3GtharuM16n4weCS0aK5meNFFmu8Djn11+cWePyjQ9qVos1ei3f8s01bN13Qbv p1qUh+5D4eJb39A4cETrJpINXIhXf2Ngg7tpyQQjzppT/iqtIVdKHMVFOiazHzh2 1aLFCBRGVoErCukB84fCmwZ9JJP8NiRzyw7choMbNeBREKhX9+WFJfwDZyygrezD kTRa7F2iwz1gEfO3kP8vevdObmtQdQgAMxQ/4IG4xLtmptfL25U/5pgvvi9jOX5T WYY70N5yr64Evgw6Bt9S =y3Ge -END PGP SIGNATURE- -- 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: beginner question
what's the difference between persistent and immutable? See http://en.wikipedia.org/wiki/Persistent_data_structure, which now has a nice shout out to Clojure. Stu -- 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
apply func
I cannot understand why this does'nt work (apply inc [1 2 3 4]) ; apply inc to each vector element while this works (apply println [1 2 3 4]) ;; takes each element and prints it why inc can't take each element and incr it giving the result ... 2 3 4 5 thanks in advance vincent -- 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: apply func
why inc can't take each element and incr it giving the result ... 2 3 4 5 thanks in advance apply works as if you were calling the function with the elements of the vector. In other words: (apply inc [1 2 3 4 5) ==is like saying=== (inc 1 2 3 4 5) Which is not what you want. However, the following will with each individual element in the vector, call a function and return a new sequence with the results in each subsequent slot: (map inc [1 2 3 4 5] ;= (2 3 4 5 6) -- 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: apply func
On Sun Sep 25 06:38 2011, Vincent wrote: I cannot understand why this does'nt work (apply inc [1 2 3 4]) ; apply inc to each vector element From the documentation: clojure.core/apply ([f args* argseq]) Applies fn f to the argument list formed by prepending args to argseq. This means that apply invokes the function once with the collection expanded to become the arguments to the function. So, (apply inc [1 2 3 4]) essentially expands to (inc 1 2 3 4). However, inc only takes one argument at a time. What you want to do instead is invoke the function for each item in the vector. For this, there is map: clojure.core/map ([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 colls]) Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments. Using map, (map inc [1 2 3 4]) essentially becomes: '((inc 1) (inc 2) (inc 3) (inc 4)), except that it is lazy, meaning that none of the increments are actually invoked until you actually try to use them. If you really want a vector, you can use apply for that: user= (apply vector (map inc [1 2 3 4])) [2 3 4 5] This apply/map combination is common in Clojure and other functional languagues. while this works (apply println [1 2 3 4]) ;; takes each element and prints it This works because takes a variable number of arguments. You can compare how map and apply differ when using them with println: user= (apply println [1 2 3 4]) ; one invocation with all arguments 1 2 3 4 nil user= (map println [1 2 3 4]) ; an invocation for each argument (1 2 3 4 nil nil nil nil) why inc can't take each element and incr it giving the result ... 2 3 4 5 I hope my explanation helps. Sincerely, Daniel Solano Gómez signature.asc Description: Digital signature
Overtone 0.4.0 - Clojure 1.3 ready
Hi everyone, given that Clojure 1.3 has recently gone GOLD (http://www.youtube.com/watch?v=n0pvFulUd98) I thought we should celebrate with a new version of Overtone with full Clojure 1.3 support. Overtone 0.4.0 is now on Clojars and tagged on Github. https://github.com/overtone/overtone/tree/0.4.0 In addition, all of Overtone's direct dependencies: osc-clj, at-at, midi-clc, byte-spec and indirect dependencies (if you have a monome) serial-port, monome-serial and polynome have all been updated to support Clojure 1.3. Here's the changelog: ### New * Support for Clojure 1.3 * Provide more separation between 'public' and 'private' APIs by moving non-public aspects of overtone.sc into overtone.sc.machinery * Similarly pull out 'private' machinery from overtone.sc.server into overtone.sc.machinery.server - overtone.sc.server now contains only public fns. * Create new helpers namespace for useful 'public' fns. overtone.util is now meant for internal/private util fns. * Define and use default Overtone at-at pool * Remove server dependence on studio.rig. Use #'boot-rig to boot and wait for rig to complete its initialisation * Improve doc for sin-osc-fb ugen * Improve doc for node-free * Clean up implementation of cgen macro * Rename boot to boot-server * Rename quit to kill-server * Make osc-validator check for actual types not the 'fuzzy' types Clojure uses * Add information about resolving collider ugen fns to collider docstrings * Teach resolve-degree about sharps and flats * Stop users from attempting to receive osc messages from the server when it's not connected * Various ugen metadata fixes * Various docstring improvements ### Examples * Add piano piece - Gnossienne No. 1 by Erik Satie ### Helpers * Add some useful string manipulation fns * Add some file helper fns * Move splay-pan into helpers ns * Move sc-lang converter here ### REPL * Add odoc - Overtone version of doc which gives information about ugen colliders * Add super rudimentary (but still pretty fun) shell fns ls and grep * Make find-ug and find-ug-doc macros so you can pass unquoted symbols as args * Allow ugen searches to also match the ugen name in addition to its full doc string * Teach find-ug to print the full docstring of the match if only one is returned ### Deprecated * Support for vijual representation of node tree ### Bugfixes * Fix clear-ids in allocator * Don't explicitly free node id when freeing node as this is already handled by a callback * Fix resolve-gen-name * Fix cgen bug in arglist generation * Fix snare drum inst Sam --- http://sam.aaron.name -- 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.contrib.io, clojure.contrib.http.agent and clojure.contrib.http.connection for Clojure 1.3
Hi guys, not really sure if this is of any interest, since I am sure you have plans for all the contrib libraries. However I needed a version of clojure.contrib.io, clojure.contrib.http.agent and clojure.contrib.http.connection for a workshop that we are doing, and we really want to use 1.3, so I made version of these which work with 1.3. Basically all I did was add ^dynamic where needed. The results are pushed to github: https://github.com/stoyle/clojure.contrib.io To make it work with leiningen I installed the jars in a privately hosted maven proxy. I don't want to take any credit for the libraries, of course, but I did this the quickest way I could, for instance created a new git repo. Hope it is ok. If you have plans to migrate these libraries in any other way, I will gladly help. Cheers, Alf -- 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: aquamacs, slime and clojure on OS X
+1 for me too on Snow Leopard with latest Aquamacs 2011/9/23 Durgesh Mankekar durg...@gmail.com +1 here. These instructions have worked for me with Aquamacs. On Sep 23, 2011, at 2:46 PM, Justin Kramer wrote: * install Leiningen * install the swank-clojure plugin: lein plugin install swank-clojure 1.3.2 * install clojure-mode (you can do this from git) * navigate to a project and do M-x clojure-jack-in That's all it takes. It might work with Aquamacs, but since that fork is not portable it's impossible for me to test on it. So GNU Emacs is recommended. For what it's worth, I use this setup with Aquamacs and everything works perfectly. Justin -- 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 -- László Török Skype: laczoka2000 Twitter: @laczoka -- 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: Overtone 0.4.0 - Clojure 1.3 ready
Sam, shameless-plug Is this the version you'll be covering at your talk at skillsmatter on 3 October? http://skillsmatter.com/event/java-jee/london-clojure-user-group-october-meetup We'll be having 2 lightning talks as well. :-D /shameless-plug cheers, Bruce On Sun, Sep 25, 2011 at 15:59, Sam Aaron samaa...@gmail.com wrote: Hi everyone, given that Clojure 1.3 has recently gone GOLD (http://www.youtube.com/watch?v=n0pvFulUd98) I thought we should celebrate with a new version of Overtone with full Clojure 1.3 support. Overtone 0.4.0 is now on Clojars and tagged on Github. https://github.com/overtone/overtone/tree/0.4.0 In addition, all of Overtone's direct dependencies: osc-clj, at-at, midi-clc, byte-spec and indirect dependencies (if you have a monome) serial-port, monome-serial and polynome have all been updated to support Clojure 1.3. Here's the changelog: ### New * Support for Clojure 1.3 * Provide more separation between 'public' and 'private' APIs by moving non-public aspects of overtone.sc into overtone.sc.machinery * Similarly pull out 'private' machinery from overtone.sc.server into overtone.sc.machinery.server - overtone.sc.server now contains only public fns. * Create new helpers namespace for useful 'public' fns. overtone.util is now meant for internal/private util fns. * Define and use default Overtone at-at pool * Remove server dependence on studio.rig. Use #'boot-rig to boot and wait for rig to complete its initialisation * Improve doc for sin-osc-fb ugen * Improve doc for node-free * Clean up implementation of cgen macro * Rename boot to boot-server * Rename quit to kill-server * Make osc-validator check for actual types not the 'fuzzy' types Clojure uses * Add information about resolving collider ugen fns to collider docstrings * Teach resolve-degree about sharps and flats * Stop users from attempting to receive osc messages from the server when it's not connected * Various ugen metadata fixes * Various docstring improvements ### Examples * Add piano piece - Gnossienne No. 1 by Erik Satie ### Helpers * Add some useful string manipulation fns * Add some file helper fns * Move splay-pan into helpers ns * Move sc-lang converter here ### REPL * Add odoc - Overtone version of doc which gives information about ugen colliders * Add super rudimentary (but still pretty fun) shell fns ls and grep * Make find-ug and find-ug-doc macros so you can pass unquoted symbols as args * Allow ugen searches to also match the ugen name in addition to its full doc string * Teach find-ug to print the full docstring of the match if only one is returned ### Deprecated * Support for vijual representation of node tree ### Bugfixes * Fix clear-ids in allocator * Don't explicitly free node id when freeing node as this is already handled by a callback * Fix resolve-gen-name * Fix cgen bug in arglist generation * Fix snare drum inst Sam --- http://sam.aaron.name -- 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: beginner question
On Sep 25, 2011 6:12 AM, Dennis Haupt d.haup...@googlemail.com wrote: what's the difference between persistent and immutable? I have written a summary of this distinction on my blog: http://technomancy.us/132 Hope that helps. -Phil -- 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]: Minnesota Clojure Group
There's a few of us here in Minneapolis/St. Paul who have been getting together monthly for about a year now to talk about Clojure. I figure it's about time to mention it here in case there's anyone else in the area who's interested in joining us. We're meeting on the first Wednesday of the month at the Refactr offices in Minneapolis (thanks for the space Refactr!). At our next meeting Greg will be talking about Clojure's Java Integration and Ben will talk about Relational Algebra and sets. Does anyone know who to contact to get on the list on this page? http://clojure.org/community Next Meeting: October 5th, at 7:00pm at Refactr - http://refactr.com/contact/ The mailing list and more info can be found here: http://clojure.mn/ Cheers, Brian -- 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: Overtone 0.4.0 - Clojure 1.3 ready
On 25 Sep 2011, at 17:55, Bruce Durling wrote: Is this the version you'll be covering at your talk at skillsmatter on 3 October? Of course and perhaps other bits and bobs I develop between now and then :-) It should be a lot of fun. Sam --- http://sam.aaron.name -- 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: Trying to use CDT on 1.3.0
This is the most up-to-date documentation: http://georgejahad.com/clojure/swank-cdt.html Is that what you are using? g On Sep 22, 1:25 pm, Brent Millare brent.mill...@gmail.com wrote: Hmm, I think it was a version mismatch for target repl and debug repl. So it works now. New issue though, I'm running through the breakpoint example and I'm getting an error. The source file doesn't load upon reaching a breakpoint. I have set cdt-dir and cdt-source-path (setq cdt-dir /home/user/cdt) (setq cdt-source-path /home/user/clojure-1.3.0-RC0/src/clj:/home/ user/clojure-1.3.0-RC0/src/jvm:) bp set on (#LocationImpl clojure.set$difference:61 #LocationImpl clojure.set$difference:53 #LocationImpl clojure.set$difference:48) error in process filter: get-jar-entry: Search failed: clojure/ set.clj$ error in process filter: Search failed: clojure/set.clj$ On Sep 22, 1:10 pm, Brent Millare brent.mill...@gmail.com wrote: Hi I'm trying to use the clojure debugging toolkit but I'm getting an exception when I reach a breakpoint. exception in event handler java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file. You may need to restart CDT Anyone know what's going on? Best, Brent -- 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: beginner question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 so there is no difference. Am 25.09.2011 15:28, schrieb Stuart Halloway: what's the difference between persistent and immutable? See http://en.wikipedia.org/wiki/Persistent_data_structure, which now has a nice shout out to Clojure. Stu - -- -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOf3QyAAoJENRtux+h35aGsKQP/jHBNqhUCQfSQ7XjCe3vTlF5 zhjcXmyhWbRUF7fEsrmljtpOu630gAnl51cmlBOwpOQXLmGJg386422GzUtRexG3 A4KcrYEahAKBK5R1Tiu3WMqAr/h3t9oYi6APYaU29qJqqO6lnZR/bp1yAR+wnmZT ausVGzUlE+p5DlfWHAMaAsEVYp1XX282BKecgr/cHsBy9Jwl2NdWQl0Ss/ZYPj7x JE04/y6T/1jomWdM+dwXZ/oCucWmDjSgg3nHMUy/P9yab0kN2qHprqomBCBQeOpj zY5KS2/0x6nS9XpNfKF1f7VdqG8RkVdE+iE14a5uzCWzAQfMbeZUQcyOv8H8QQXU v0VYO1htvWwoJRqoCUan5UhrucM+LDqFEml7n8S4y7kbWWy9CJHD0bq9VjgIBIJY oo8VrFM7ciO+9mmJ7VfdNmUKPmcclWVFp3PVbNKJVMFXO7s+Myj5y/irWDJ3fBTY VYiCKNtbU9uaNZRVfyTQhVF5i+607BfH78S6wA1fEXYWWcvNiwEBoTaKi4cHh6wF nbaVf2xOLahJngEg6m8yBQfcnRm5H6WZ2h53UA+c1AgwiRgOAt+FGiK6J695EZbp LlslJGUH9QVZXsDVWPthtr2Qk8fJtT7c7UQksfYU+F8lANtyTMcN/kAQ2ngZ2pbq aLOthkidIm51E9NkBRH5 =SNNL -END PGP SIGNATURE- -- 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: beginner question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 so persistent is immutable + x like car is movable + x. it doesn't make sense to ask what the difference is. Am 25.09.2011 18:59, schrieb Phil Hagelberg: On Sep 25, 2011 6:12 AM, Dennis Haupt d.haup...@googlemail.com mailto:d.haup...@googlemail.com wrote: what's the difference between persistent and immutable? I have written a summary of this distinction on my blog: http://technomancy.us/132 Hope that helps. -Phil -- 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 - -- -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOf3/bAAoJENRtux+h35aGFrIQAJCTY0ZVAQ1LHda9tIkiV/am hi/bSleO4qFJceGUWuoDP8nrTIc6kDZrhNv7IIYeV59GzETYsEctfUIIosNEnS94 Oya6DpoOWLFlVwLsSVrIkFNbl5WEnEhoi7myO3zxuO0PksefmzLs57oC5ijw24PP 3CQrGiLpO1dI9s7bk8fBEuBDnC+d0GOZH4YAa3EYMp/1VQoRFLgBy3Occ1DVcqcZ nTac2Gexru0vA9On1RW6d0xSNEPQk33gAnt5fU72LCTi9bAekEPb66y538LKElS4 0nc4x6rEI9ijOLxvTkariCPEIy3yGZ5NcQxZWI1XR1c6J5sD8rsB3d5HZTzsy2Ez n4NnRXw/zrIxyqLWwoYaZyfqltJdoIvE2qf9d4zMmuj0JHlW518GF7M3aXigdImt uuSqQkUJ4tadSb/UKWITqEN+F/UpaohNamnWLCbvgDl4MGJ2kGU46tC91Su4N79e iPfZ3gcyNMuRuO2i2v31OTw86TOwxGhtAJEEDvL8MRIce038fpt+QVybHUsDiGzS G9OczcysVZstfPphSzfUpMsUUUNSc5lmyskYBQV6xiqwC8VOE+bY/+ejlNm4nHQC 8Qdfqzq7sI7gXPg5yUUvc3xaT8RdT/X2FqL1B54g17pz44gDJW9LlvNXNwP0jTOm cBFvQnI1tQZRvEcqbaTO =C3n7 -END PGP SIGNATURE- -- 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
can't see the error
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 (let [rand (new java.util.Random) nextInt (fn [a] (.nextInt rand))] ((map (print) (iterate ((nextInt dummy) 0) the error is: java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0) why does it want to cast my 0 to a function? and how can i get rid of the dummy parameter [a]? -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOf4ZIAAoJENRtux+h35aG19UP/1tWgqcQifwUI5zHdkKWTcY8 iY9vXGEr3IvTC2nB1yXJESJ6T/4OTpGhUT9ctX+6xGxPHFC9OPUdvnp5gGUOjCFQ Qa9G8Qc6Za1uc0HFzbWYxP9yi8TAPg1WVA3RF046kKuS/m9X8uUMtCulSJH8y6m4 VmREcGlyQNjgCDMSRmMX5Y7vVuU2e6KoV6VjSopBHzX/sXBsMd0AZcnCRokBUKre 7J1PyK3YKBmRLZ6gdvnOTz4kDBoKE7yrbh2gpIsQciqsawZ0wWYlBou7JceSxtN3 Zwzm64YLxW8f6DjaRL7ZUAwTVMBkIru86hgm2bMK5pFX5f8bzBcmx09eIgd1fgLV c3bHtFYWzVrCRAGA+7iqeedQiFmkX2aK6yIcEma8KvoPXRlU5XhTiTN4B4sfPrpC qHM0U30WVIV05qs9E8rW2JDmpm1X7RpkZ9P3PEQXgYV1yJaSjPPyxRC1R0wi7f0o KUEXu+WO0egLyh3d8kfD1GMR/ztRGlS0UbJ3htqso710uD+R4GzFvRcitF99bQtm cOgz7sLB0hJTS3AblNhRzwt0CRdsPjHfBixrqbxGbXcLvkXFyoZMebuJwMZNcpzY wFhgEGyVxShXQASNub3dzNS8peU5fgoAGLexHh46e02K8a1YWjK3OOokZ3W9uCpt ghqI1/wkly1r9F/FroFo =+5YI -END PGP SIGNATURE- -- 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: can't see the error
On Sun Sep 25 21:51 2011, Dennis Haupt wrote: (let [rand (new java.util.Random) nextInt (fn [a] (.nextInt rand))] ((map (print) (iterate ((nextInt dummy) 0) the error is: java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0) why does it want to cast my 0 to a function? and how can i get rid of the dummy parameter [a]? I don't think it's trying to cast your zero to a function. Instead, here's what I think is going on: In this expression: ((nextInt dummy) 0) The inner expression gets evaluated to some integer. The end result is: (some int 0) And that is where an integer is trying to be invoked as a function. Ultimately, I am not sure that 'iterate' is really the function you want. If you want an infinite lazy sequence of random integers, you probably want something more like 'repeatedly': (let [rand (java.util.Random.) nextInt #(.nextInt rand)] (map print (repeatedly nextInt))) Note that this sequence, being infinite, will not terminate. If you only want to print the first five random numbers, you can do something like: (let [rand (java.util.Random.) nextInt #(.nextInt rand)] (map print (take 5 (repeatedly nextInt I hope this helps. Sincerely, Daniel Solano Gómez signature.asc Description: Digital signature
Re: can't see the error
On Mon, Sep 26, 2011 at 1:21 AM, Dennis Haupt d.haup...@googlemail.com wrote: (let [rand (new java.util.Random) nextInt (fn [a] (.nextInt rand))] ((map (print) (iterate ((nextInt dummy) 0) the error is: java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0) why does it want to cast my 0 to a function? and how can i get rid of the dummy parameter [a]? You have too many parentheses in your code. The error is coming because of the ``((nextInt dummy) 0)'' line where you are trying to call an integer (the result of calling nextInt on dummy) as a function. I don't know what exactly you are trying to achieve here, but assuming that you want n consecutive pseudo-random integers, I would write it like this - (let [rnd (java.util.Random.) next-int #(.nextInt rnd)] (repeatedly 10 next-int)) ; substitute 10 with desired number Regards, BG -- Baishampayan Ghose b.ghose at gmail.com -- 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: can't see the error
(let [rand (new java.util.Random) nextInt (fn [a] (.nextInt rand))] ((map (print) (iterate ((nextInt dummy) 0) extra parenthesis in three places, and the first argument to iterate is a function, not a long: (let [rand (new java.util.Random) nextInt (fn [a] (.nextInt rand))] (map print (iterate nextInt 0))) On Sun, Sep 25, 2011 at 3:51 PM, Dennis Haupt d.haup...@googlemail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 (let [rand (new java.util.Random) nextInt (fn [a] (.nextInt rand))] ((map (print) (iterate ((nextInt dummy) 0) the error is: java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0) why does it want to cast my 0 to a function? and how can i get rid of the dummy parameter [a]? -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOf4ZIAAoJENRtux+h35aG19UP/1tWgqcQifwUI5zHdkKWTcY8 iY9vXGEr3IvTC2nB1yXJESJ6T/4OTpGhUT9ctX+6xGxPHFC9OPUdvnp5gGUOjCFQ Qa9G8Qc6Za1uc0HFzbWYxP9yi8TAPg1WVA3RF046kKuS/m9X8uUMtCulSJH8y6m4 VmREcGlyQNjgCDMSRmMX5Y7vVuU2e6KoV6VjSopBHzX/sXBsMd0AZcnCRokBUKre 7J1PyK3YKBmRLZ6gdvnOTz4kDBoKE7yrbh2gpIsQciqsawZ0wWYlBou7JceSxtN3 Zwzm64YLxW8f6DjaRL7ZUAwTVMBkIru86hgm2bMK5pFX5f8bzBcmx09eIgd1fgLV c3bHtFYWzVrCRAGA+7iqeedQiFmkX2aK6yIcEma8KvoPXRlU5XhTiTN4B4sfPrpC qHM0U30WVIV05qs9E8rW2JDmpm1X7RpkZ9P3PEQXgYV1yJaSjPPyxRC1R0wi7f0o KUEXu+WO0egLyh3d8kfD1GMR/ztRGlS0UbJ3htqso710uD+R4GzFvRcitF99bQtm cOgz7sLB0hJTS3AblNhRzwt0CRdsPjHfBixrqbxGbXcLvkXFyoZMebuJwMZNcpzY wFhgEGyVxShXQASNub3dzNS8peU5fgoAGLexHh46e02K8a1YWjK3OOokZ3W9uCpt ghqI1/wkly1r9F/FroFo =+5YI -END PGP SIGNATURE- -- 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
What happened to bignum support? (clojure 1.3.0)
Greetings, Clojure community. I've been playing around with clojure, and just downloaded 1.3.0. Here's a REPL session, wherein I define a power-of-two function, and apply it a couple of times. lecturer-01:clojure-1.3.0 kangas$ java -cp clojure-1.3.0.jar clojure.main Clojure 1.3.0 user= (defn pow2 [n] (loop [n n, p 1] (if (zero? n) p (recur (dec n) (+ p p)) ))) #'user/pow2 user= (pow2 62) 4611686018427387904 user= (pow2 63) ArithmeticException integer overflow clojure.lang.Numbers.throwIntOverflow (Numbers.java:1374) user= Previous versions would silently, automagically convert to bignums and give me the answer I wanted. Is clojure-1.3.0 too serious, enterprisy, and Java-like for this sort of thing? I found no clue in the list of changes. thanks, George -- 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: What happened to bignum support? (clojure 1.3.0)
Greetings, Clojure community. I've been playing around with clojure, and just downloaded 1.3.0. Here's a REPL session, wherein I define a power-of-two function, and apply it a couple of times. lecturer-01:clojure-1.3.0 kangas$ java -cp clojure-1.3.0.jar clojure.main Clojure 1.3.0 user= (defn pow2 [n] (loop [n n, p 1] (if (zero? n) p (recur (dec n) (+ p p)) ))) #'user/pow2 user= (pow2 62) 4611686018427387904 user= (pow2 63) ArithmeticException integer overflow clojure.lang.Numbers.throwIntOverflow (Numbers.java:1374) user= Previous versions would silently, automagically convert to bignums and give me the answer I wanted. Is clojure-1.3.0 too serious, enterprisy, and Java-like for this sort of thing? I found no clue in the list of changes. This has to do with the primitive math support in Clojure 1.3. Every number is now a primitive unless otherwise mentioned. `(pow2 63)` is throwing an exception now because 63 is a primitive int. If you want `pow2` to work well on large numbers you will have to use the arbitrary precision math functions like +', -', *', /', etc. You can also take advantage of BigInteger contagion by switching the initial value of p to 1N instead of 1. Thus you can write your function in two ways - ;;; Use arbitrary precision add function. Will return BigInteger when needed. (defn pow2 [n] (loop [n n, p 1] (if (zero? n) p (recur (dec n) (+' p p) ; +' instead of + ;;; Utilize BigInteger contagion. Will always return BigInteger. (defn pow2 [n] (loop [n n, p 1N] ; this is different (if (zero? n) p (recur (dec n) (+ p p) I hope that helps. Regards, BG -- Baishampayan Ghose b.ghose at gmail.com -- 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: What happened to bignum support? (clojure 1.3.0)
Hi George, On 25 Sep 2011, at 22:25, George Kangas wrote: Previous versions would silently, automagically convert to bignums and give me the answer I wanted. Is clojure-1.3.0 too serious, enterprisy, and Java-like for this sort of thing? I found no clue in the list of changes. In addition to Baishampayan's excellent answer, it might also be useful to point you to the relevant documentation. The 1.3 changelist mentions Enhanced Primitive Support (https://github.com/clojure/clojure/blob/master/changes.txt#L75) which points to the following two pages: http://dev.clojure.org/display/doc/Enhanced+Primitive+Support http://dev.clojure.org/display/doc/Documentation+for+1.3+Numerics which may be helpful for you. Sam --- http://sam.aaron.name -- 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 1.3 Released
On Sep 23, 2:44 pm, Christopher Redinger redin...@gmail.com wrote: We are pleased to announce today the release of Clojure 1.3: The chameneos-redux program that now timeout after 30 minutes, previously completely after 100 seconds with Clojure 1.2 The thread-ring programs that now timeout after 30 minutes, previously completely after 58 seconds with Clojure 1.2 ...OK binarytrees.clojure-4.clojure [33] ...OK binarytrees.clojure-2.clojure [32] ...OK .binarytrees.clojure [31] ...OK .binarytrees.clojure-5.clojure [30] ...OK .binarytrees.clojure-3.clojure [29] ...TIMED OUT .chameneosredux.clojure [28] ...OK fannkuchredux.clojure-2.clojure [27] ...OK .fasta.clojure [26] .PROGRAM FAILED fasta.clojure-3.clojure [25] ...OK .fasta.clojure-5.clojure [24] .PROGRAM FAILED fasta.clojure-4.clojure [23] ...OK .fasta.clojure-2.clojure [22] .PROGRAM FAILED fastaredux.clojure-4.clojure [21] ...OK knucleotide.clojure [20] ...OK knucleotide.clojure-4.clojure [19] ...OK knucleotide.clojure-2.clojure [18] .PROGRAM FAILED knucleotide.clojure-3.clojure [17] ...OK .mandelbrot.clojure-2.clojure [16] ...OK .mandelbrot.clojure-6.clojure [15] ...OK .mandelbrot.clojure-5.clojure [14] ...OK .mandelbrot.clojure [13] .OK .meteor.clojure-2.clojure [12] ...OK .nbody.clojure [11] ...OK .pidigits.clojure-2.clojure [10] ...OK .regexdna.clojure-3.clojure [9] ...OK .revcomp.clojure-3.clojure [8] ...OK .revcomp.clojure-4.clojure [7] ...OK .spectralnorm.clojure-7.clojure [6] ...OK .spectralnorm.clojure-2.clojure [5] ...OK .spectralnorm.clojure-5.clojure [4] ...OK .spectralnorm.clojure-6.clojure [3] ...TIMED OUT .threadring.clojure-2.clojure [2] ...TIMED OUT .threadring.clojure [1] http://shootout.alioth.debian.org/u64q/measurements.php?lang=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
Re: aquamacs, slime and clojure on OS X
I'm quite happy using emacs's Scheme support. But then, I've never experienced the luxury of swank and slime. The Scheme modes work a bit better (for Clojure) than the Lisp modes, because: 1) it highlights matching square and curly brackets, not just parentheses; and 2) after you do C-u M-x run-scheme / java -cp... to start inferior Scheme mode, you can restart it with just M-x run- scheme (within the same emacs session). So, until you man up, and build the great edifice of leiningen + ant + maven + ..., something I'll probably never get around to, you can make do with Scheme mode. Good enough for the '90s! Some people are happy with mini-IDE called clooj that's under developement. You can find that on github. ciao, George -- 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: What happened to bignum support? (clojure 1.3.0)
Thanks, Baishampayan and Sam! Since so little effort is required to get the BigInt behavior, you'll all be relieved to hear that I Approve of This Change. Should I ever need high performance from Clojure, I'll actually be happy about it. Notwithstanding the snarking tone of my original post. George -- 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: aquamacs, slime and clojure on OS X
I have some trouble. I'm on OSX Lion, and have a few hours ago installed Aquamacs and SLIME from http://aquamacs.org/download.shtml. Then installed lein/swank/and clojure-mode, as Phil suggested. In order to make it work I had to remove the autodoc option, by commenting line 20 from /Library/Application Support/Aquamacs Emacs/SLIME/contrib/slime-fancy.el: ;(slime-autodoc-init) So by starting swank manually with lein swank (or swank-clojure) + M-x slime-connect I can now evaluate Clojure code in the REPL; instead when doing a clojure-jack-in I get the following error: (from *Messages* buffer) Starting swank server... error in process filter: progn: Invalid read syntax: ) error in process filter: Invalid read syntax: ) (last lines from *swank* buffer) (provide 'slime-repl) ;;; slime-repl.el ends here (run-hooks 'slime-load-hook) Any idea? On Sun, Sep 25, 2011 at 5:52 PM, László Török ltoro...@gmail.com wrote: +1 for me too on Snow Leopard with latest Aquamacs 2011/9/23 Durgesh Mankekar durg...@gmail.com +1 here. These instructions have worked for me with Aquamacs. On Sep 23, 2011, at 2:46 PM, Justin Kramer wrote: * install Leiningen * install the swank-clojure plugin: lein plugin install swank-clojure 1.3.2 * install clojure-mode (you can do this from git) * navigate to a project and do M-x clojure-jack-in That's all it takes. It might work with Aquamacs, but since that fork is not portable it's impossible for me to test on it. So GNU Emacs is recommended. For what it's worth, I use this setup with Aquamacs and everything works perfectly. Justin -- 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 -- László Török Skype: laczoka2000 Twitter: @laczoka -- 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: beginner question
All persistent data structures are immutable, but not all immutable data structures are persistent. For example, imagine an immutable array that, unlike Clojure's vector data structure, implemented conj by copying the entire array into a new one with the original elements plus the new one. Immutable, but the performance characteristics are abysmal. As a more subtle example, imagine an immutable array that, unlike Clojure's vector data structure, let you update arbitrary elements, and did not copy the entire array, but created an imbalanced tree of vector indices that had their values updated. A lookup in this augmented data structure would require first looking through the imbalanced tree for the index, to see if it had been modified, and only if it failed to find it in the tree would it be looked up in the original array. Immutable, but not persistent in the sense that it maintains the performance characteristics of the original data structure -- the augmented/updated data structure has slow access times than the original. Andy On Sun, Sep 25, 2011 at 11:34 AM, Dennis Haupt d.haup...@googlemail.comwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 so there is no difference. Am 25.09.2011 15:28, schrieb Stuart Halloway: what's the difference between persistent and immutable? See http://en.wikipedia.org/wiki/Persistent_data_structure, which now has a nice shout out to Clojure. Stu - -- -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJOf3QyAAoJENRtux+h35aGsKQP/jHBNqhUCQfSQ7XjCe3vTlF5 zhjcXmyhWbRUF7fEsrmljtpOu630gAnl51cmlBOwpOQXLmGJg386422GzUtRexG3 A4KcrYEahAKBK5R1Tiu3WMqAr/h3t9oYi6APYaU29qJqqO6lnZR/bp1yAR+wnmZT ausVGzUlE+p5DlfWHAMaAsEVYp1XX282BKecgr/cHsBy9Jwl2NdWQl0Ss/ZYPj7x JE04/y6T/1jomWdM+dwXZ/oCucWmDjSgg3nHMUy/P9yab0kN2qHprqomBCBQeOpj zY5KS2/0x6nS9XpNfKF1f7VdqG8RkVdE+iE14a5uzCWzAQfMbeZUQcyOv8H8QQXU v0VYO1htvWwoJRqoCUan5UhrucM+LDqFEml7n8S4y7kbWWy9CJHD0bq9VjgIBIJY oo8VrFM7ciO+9mmJ7VfdNmUKPmcclWVFp3PVbNKJVMFXO7s+Myj5y/irWDJ3fBTY VYiCKNtbU9uaNZRVfyTQhVF5i+607BfH78S6wA1fEXYWWcvNiwEBoTaKi4cHh6wF nbaVf2xOLahJngEg6m8yBQfcnRm5H6WZ2h53UA+c1AgwiRgOAt+FGiK6J695EZbp LlslJGUH9QVZXsDVWPthtr2Qk8fJtT7c7UQksfYU+F8lANtyTMcN/kAQ2ngZ2pbq aLOthkidIm51E9NkBRH5 =SNNL -END PGP SIGNATURE- -- 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
clojure : collaborative learning ...
Hi guys : - We started the BioClojure project to learn about Clojure by applying it to some bioinformatics problems. -Its gone well, and we now know the basics of leiningan, java-interop, and basic map-oriented programming. -But of course, thats not enough --- we are now aspiring to reach that next level of Clojure zen -- using the really powerful features, like macros --- to engineer a real app. So Is anyone interested in learning about incanter, machine learning, parser combinators, and clojure ? We wanted to add a text file analysis module to BioClojure, and it would be a good learning experience for all of us. In particular, we're interested in learning more about macros, and higher level programming/engineering in 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
Sample application as showcase of Clojure DSL / Metaprogramming?
Hello, I'm learning Clojure (work mainly with Java and Ruby), interested in it after reading Paul Graham and watched very interesting presentation about persistent data structures by Rich Hickey. So, one of the cornerstones of Paul Graham articles is - Lisp has no syntax, so You can create any syntax that suits You best, and because code is just a data it's very easy to do. You can model any concept - create DSL best suited for Your problem or model Object Oriented approach, Inheritance, and so on. But I believe, it's very hard to demonstrate this advantages on the simple samples. You has to do something real and complex to see advantages of this approach. So, maybe there's an interesting Open Source Project that uses this approach? With clean code that can be seen as showcase of such techniks, and You can dig in it and see all this in action by Yourself? It would be really interesting. Thanks. P.S. One more small question - as far as I know right now ClojureScript doesn't support eval and requires Java for compiling, any plans to support this in future? ClojureScript compiler written in ClojureScript / JavaScript without Java requirement? -- 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: Something missing from the clojure compiler's java annotation support for gen-class and defrecord? Am I driving while bouncing off the guard rails?
what about code using 1.2, and clojure-contrib, how to make transition. -- 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: Unable to use/refer/require clojure.contrib
is there easy way to make transition to 1.3 -- 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
Display elapsed time in REPL
How do you get the REPL to display the elapsed time for a function? -- 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: apply func
inc takes number as an argument, not a seq. The function that you are probably looking for is map: (map inc [1 2 3 4]) -- 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: Sample application as showcase of Clojure DSL / Metaprogramming?
On Sat, Sep 24, 2011 at 5:17 PM, alexey.petrushin alexey.petrus...@gmail.com wrote: P.S. One more small question - as far as I know right now ClojureScript doesn't support eval and requires Java for compiling, any plans to support this in future? ClojureScript compiler written in ClojureScript / JavaScript without Java requirement? It's a possibility. But what's the tangible advantage? 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: Display elapsed time in REPL
(time (expr)) On Sep 25, 2:43 am, captobvious chrismmag...@gmail.com wrote: How do you get the REPL to display the elapsed time for a function? -- 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: Sample application as showcase of Clojure DSL / Metaprogramming?
You might find my article useful: http://pragprog.com/magazines/2011-07/growing-a-dsl-with-clojure (Errata: http://forums.pragprog.com/forums/134/topics/9318) You can then dig into the code of stevedore: https://github.com/pallet/stevedore It's basically building an interpreter, but all of the same concepts as building a DSL. Thanks, Ambrose On Sun, Sep 25, 2011 at 5:17 AM, alexey.petrushin alexey.petrus...@gmail.com wrote: Hello, I'm learning Clojure (work mainly with Java and Ruby), interested in it after reading Paul Graham and watched very interesting presentation about persistent data structures by Rich Hickey. So, one of the cornerstones of Paul Graham articles is - Lisp has no syntax, so You can create any syntax that suits You best, and because code is just a data it's very easy to do. You can model any concept - create DSL best suited for Your problem or model Object Oriented approach, Inheritance, and so on. But I believe, it's very hard to demonstrate this advantages on the simple samples. You has to do something real and complex to see advantages of this approach. So, maybe there's an interesting Open Source Project that uses this approach? With clean code that can be seen as showcase of such techniks, and You can dig in it and see all this in action by Yourself? It would be really interesting. Thanks. P.S. One more small question - as far as I know right now ClojureScript doesn't support eval and requires Java for compiling, any plans to support this in future? ClojureScript compiler written in ClojureScript / JavaScript without Java requirement? -- 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: Sample application as showcase of Clojure DSL / Metaprogramming?
1. No compilation step, quick live prototyping in browser. 2. Pure browser environment, no need to install anything. -- 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: Sample application as showcase of Clojure DSL / Metaprogramming?
Am 24.09.2011 23:17, schrieb alexey.petrushin: Hello, I'm learning Clojure (work mainly with Java and Ruby), interested in it after reading Paul Graham and watched very interesting presentation about persistent data structures by Rich Hickey. Speaking of Paul Graham, have you read On Lisp? It's code samples are based on pre-ANSI Common Lisp, but are very impressive and show nicely what Lisp macros can do. The book is available for download on Graham's homepage: http://www.paulgraham.com/onlisp.html Regards, Denis -- 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