Re: How I can use InteractionEvent in clojure?
Yes I have tried using fn and I gives me the same error : Exception in thread main java.lang.NoSuchMethodError: invoke -- 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] kibit, A static code analyzer
It should unify: (foo ?x . ?y) If it doesn't we should open up a ticket for that. On Sunday, March 4, 2012, Jonas jonas.enl...@gmail.com wrote: On Sunday, March 4, 2012 9:39:19 PM UTC+2, David Nolen wrote: This is just ... fantastic! :D David, quick question about the core.logic unifier. Is it possible to unify on a sequence? For example (when ?x ??body) would unify with both (when (some pred) a) and (when (some pred) a b c) Thanks, Jonas -- 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] kibit, A static code analyzer
On Monday, March 5, 2012 2:51:23 PM UTC+2, David Nolen wrote: It should unify: (foo ?x . ?y) If it doesn't we should open up a ticket for that. It seems to work, thanks! https://github.com/jonase/kibit/commit/4ec52462d3920470be63916928021f266f838f1b -- 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: Google Summer of Code 2012 - any mentors?
Thanks! Unless somebody else wants to - I'm willing to be the backup admin. David On Mon, Mar 5, 2012 at 1:21 AM, Christopher Redinger redin...@gmail.comwrote: I've created a new page in Confluence with questions from the application. http://dev.clojure.org/display/community/Google+Summer+of+Code+2012+Application+Questions If some people can take a pass at getting answers posted to those questions, I can submit the application this week. Also needed: * Who is interested in being the backup admin (should something happen to cause me to be unable to perform those duties)? * I see primary mentors for many of the projects. Are there people willing to be back up mentors? Again, in case something prevents the primary mentor from doing so? On Sunday, March 4, 2012 4:37:53 PM UTC-5, Alexander Yakushev wrote: I hate to be boring but if the application has not been filed yet then now is the best time to do it. Only five days left, and it is good to have some spare time to correct the mistakes, you know:). -- 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
Clojurescript: persistent data structures?
Hi, I may not be fully up to speed with the latest developments re. Clojurescript, so please bear with me. I was wondering, what are the impediments of implementing persistent data structures in Clojurescript similar to those Clojure already has? (and getting rid of the current copy-on-write whenever I create a new value out of an existing one) Thanks! -- László Török -- 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: Clojurescript: persistent data structures?
On Mon, Mar 5, 2012 at 10:55 AM, László Török ltoro...@gmail.com wrote: Hi, I may not be fully up to speed with the latest developments re. Clojurescript, so please bear with me. I was wondering, what are the impediments of implementing persistent data structures in Clojurescript similar to those Clojure already has? (and getting rid of the current copy-on-write whenever I create a new value out of an existing one) Thanks! -- László Török We should definitely implement persistent data structures for ClojureScript. I've done some initial tests and the modern JS engines seem to handle them quite well. I think their performance will only continue ot improve. If you've sent in your CA feel free to start on them and note your progress on via tickets on JIRA :) 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: Clojurescript: persistent data structures?
David, Was it a straight port of the jvm implementation? Is there any gist, blog post of your findings? Thx L sent from my mobile device On Mar 5, 2012 5:05 PM, David Nolen dnolen.li...@gmail.com wrote: On Mon, Mar 5, 2012 at 10:55 AM, László Török ltoro...@gmail.com wrote: Hi, I may not be fully up to speed with the latest developments re. Clojurescript, so please bear with me. I was wondering, what are the impediments of implementing persistent data structures in Clojurescript similar to those Clojure already has? (and getting rid of the current copy-on-write whenever I create a new value out of an existing one) Thanks! -- László Török We should definitely implement persistent data structures for ClojureScript. I've done some initial tests and the modern JS engines seem to handle them quite well. I think their performance will only continue ot improve. If you've sent in your CA feel free to start on them and note your progress on via tickets on JIRA :) 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: Clojurescript: persistent data structures?
Straight port of the Java code: https://github.com/swannodette/persistent-vector/blob/master/persistent-vector.js Some quick performance notes: 10-25X longer to build than JS Array (could be improved w/ transients) 5-6X slower to access than JS Array But of course versus copy-on-write there's no competition: http://jsperf.com/persistentvector-js/6 David On Mon, Mar 5, 2012 at 11:10 AM, László Török ltoro...@gmail.com wrote: David, Was it a straight port of the jvm implementation? Is there any gist, blog post of your findings? Thx L sent from my mobile device On Mar 5, 2012 5:05 PM, David Nolen dnolen.li...@gmail.com wrote: On Mon, Mar 5, 2012 at 10:55 AM, László Török ltoro...@gmail.com wrote: Hi, I may not be fully up to speed with the latest developments re. Clojurescript, so please bear with me. I was wondering, what are the impediments of implementing persistent data structures in Clojurescript similar to those Clojure already has? (and getting rid of the current copy-on-write whenever I create a new value out of an existing one) Thanks! -- László Török We should definitely implement persistent data structures for ClojureScript. I've done some initial tests and the modern JS engines seem to handle them quite well. I think their performance will only continue ot improve. If you've sent in your CA feel free to start on them and note your progress on via tickets on JIRA :) 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 -- 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
datomic has been announced
Since not everyone reads twitter or hacker news, http://datomic.com/ has been updated with an unveiling of Rich's new project. -- 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: Heroku and lein-cljsbuild
Timothy Licata timothy.lic...@gmail.com writes: I've tried a few things. First of all, heroku doesn't put :dev-dependencies on the classpath by default[1]. When I enable LEIN_DEV, the :dev-dependencies are downloaded, but the app times out while booting[2]. If I try moving lein-cljsbuild from :dev-depencies to :plugins in my project.clj, heroku rejects my git push[3]. It looks like there's a bug in the Heroku buildpack for Clojure where JAVA_CMD isn't getting exported for when plugins are brought in. I've pushed a fix and will deploy it soon, but in the mean time you can bring it in with this command: $ heroku config:add BUILDPACK_URL=git://github.com/heroku/heroku-buildpack-clojure.git Thanks for catching this! -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
Re: Heroku and lein-cljsbuild
Sorry, that wasn't too clear. Using :plugins is the correct approach here. -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
Re: Google Summer of Code 2012 - any mentors?
I'll happily be a backup mentor. I've gone through the Summer of Code program twice as a student (Nmap and PyPy). I'll actively help any mentor or pair with any student. Paul On Mar 5, 10:38 am, David Nolen dnolen.li...@gmail.com wrote: Thanks! Unless somebody else wants to - I'm willing to be the backup admin. David On Mon, Mar 5, 2012 at 1:21 AM, Christopher Redinger redin...@gmail.comwrote: I've created a new page in Confluence with questions from the application. http://dev.clojure.org/display/community/Google+Summer+of+Code+2012+A... If some people can take a pass at getting answers posted to those questions, I can submit the application this week. Also needed: * Who is interested in being the backup admin (should something happen to cause me to be unable to perform those duties)? * I see primary mentors for many of the projects. Are there people willing to be back up mentors? Again, in case something prevents the primary mentor from doing so? On Sunday, March 4, 2012 4:37:53 PM UTC-5, Alexander Yakushev wrote: I hate to be boring but if the application has not been filed yet then now is the best time to do it. Only five days left, and it is good to have some spare time to correct the mistakes, you know:). -- 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 I can use InteractionEvent in clojure?
Actually, one last try before I build vtk and try it myself. The problem seems to me that vtk is looking for a method that takes no parameters and return void. invoke returns Object, let's use run instead. So try this: (def myCallback (fn [] (let [t (vtkTransform.)] (.GetTransform t) (- boxWidget .GetProp3D (.SetUserTransform t) ; AddObserver is looking for a no-args method that return void, and fns with no args qualify. For fns, run should work. (.AddObserver boxWidget interactionEvent myCallback run) -- 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: Pretty print defn
java -jar lib/clojure-1.3.0.jar user= (defn qw [] (inc 2)) #'user/qw user= (use 'clojure.repl) nil user= (clojure.repl/source-fn qw) ClassCastException user$qw cannot be cast to clojure.lang.Symbol clojure.core/ns-resolve (core.clj:3879) user= (clojure.repl/source-fn 'qw) nil user= (println (clojure.repl/source-fn 'qw)) nil nil user= What am I doing wrong? On Saturday, March 3, 2012 4:18:35 AM UTC+2, Mark Rathwell wrote: (clojure.repl/source-fn 'qw) will give you the source. On Fri, Mar 2, 2012 at 10:32 AM, Nikem gni...@gmail.com wrote: Hi. Is it possible to pretty print a source code of the function defined with defn? I have tried the following: (defn qw [] (inc 2)) (with-pprint-dispatch code-dispatch (pprint qw)) And got #user$qw user$qw@4743bf3d. But I would like to get at least (inc 2). Is it possible at all? Nikem -- 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: Rich Hickey Video - unit conversion language
And now there is Frinj! :) https://github.com/martintrojer/frinj On Monday, 21 June 2010 12:46:55 UTC+1, Julian wrote: Rich Hickey made reference in one of his videos to a language that could convert between all different kinds of units and dimensions. Does anybody recall what that was? -- 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
Weird issue with :require in clojurescript
It seems that when I require two namespaces in a namespace definition, the clojurescript compiler misses the first require. I have a module that has a ns definition more or less like the following: (ns my-namespace (:require [lib1 :as l1]) (:require [lib2 :as l2])) Using clojurescript master (53ecf3cd3a), the compiled javascript for the above definition is: goog.provide('my-namespace'); goog.require('cljs.core'); goog.require('lib2'); The compiler misses the first require. If I switch the definition around so that it reads like this: (ns my-namespace (:require [lib2 :as l2]) (:require [lib1 :as l1])) again, the compiler misses the first require and the output looks like this: goog.provide('my-namespace'); goog.require('cljs.core'); goog.require('lib1'); However, if I just write: (ns my-namespace (:require [lib2 :as l2] [lib1 :as l1])) the javascript output references both libraries just fine. Is it just wrong to use multiple requires in clojurescript, or is this really a bug? If there is a general convention that must be followed then it would be good to document it because as a relative new-comer, it took me a while to find a workaround. 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
Re: [ANN] kibit, A static code analyzer
I'm picturing flymake-clojure in our futures. On 03/04/2012 05:05 PM, Ambrose Bonnaire-Sergeant wrote: What an awesome idea! Nice work Jonas. Ambrose On Mon, Mar 5, 2012 at 3:23 AM, Jonas jonas.enl...@gmail.com mailto:jonas.enl...@gmail.com wrote: Kibit[1] is a simple code analysis tool (and leiningen plugin) which someone hopefully will find interesting or useful. The purpose of the tool is to tell its users that Hey, There's already a function for that!. Kibit uses the core.logic[2] unifier to search for patterns of code for which there might exist simpler functions. For example, if the analyzer finds (apply concat (apply map ...) It will notify its user about the availability of `mapcat`. Jonas [1] https://github.com/jonase/kibit [2] https://github.com/clojure/core.logic -- 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 mailto: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 mailto:clojure%2bunsubscr...@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: Disable colored output
Sorry, I am not actively working on Lazytest right now. I suggest patching your local version, or just ignoring it. -S On Monday, February 27, 2012 11:35:10 PM UTC-5, Vladimir Matveev wrote: mvn goalname -Dinsert.property.here=true I tried this and it didn't work. AFAICT, the lazytest maven plugin launches tests in a separate JVM: So I think the only way to overcome this is to make the plugin understand new configuration option. -- 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: Weird issue with :require in clojurescript
Yes, it is incorrect, in both Clojure and ClojureScript, to repeat the (:require ...) or (:use ...) forms in an `ns` declaration. -S On Monday, March 5, 2012 12:26:03 PM UTC-5, Aaron wrote: It seems that when I require two namespaces in a namespace definition, the clojurescript compiler misses the first require. I have a module that has a ns definition more or less like the following: (ns my-namespace (:require [lib1 :as l1]) (:require [lib2 :as l2])) Using clojurescript master (53ecf3cd3a), the compiled javascript for the above definition is: goog.provide('my-namespace'); goog.require('cljs.core'); goog.require('lib2'); The compiler misses the first require. If I switch the definition around so that it reads like this: (ns my-namespace (:require [lib2 :as l2]) (:require [lib1 :as l1])) again, the compiler misses the first require and the output looks like this: goog.provide('my-namespace'); goog.require('cljs.core'); goog.require('lib1'); However, if I just write: (ns my-namespace (:require [lib2 :as l2] [lib1 :as l1])) the javascript output references both libraries just fine. Is it just wrong to use multiple requires in clojurescript, or is this really a bug? If there is a general convention that must be followed then it would be good to document it because as a relative new-comer, it took me a while to find a workaround. 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
Re: Pretty print defn
Nikem gni...@gmail.com writes: java -jar lib/clojure-1.3.0.jar user= (defn qw [] (inc 2)) #'user/qw user= (use 'clojure.repl) nil user= (clojure.repl/source-fn qw) ClassCastException user$qw cannot be cast to clojure.lang.Symbol clojure.core/ns-resolve (core.clj:3879) user= (clojure.repl/source-fn 'qw) nil user= (println (clojure.repl/source-fn 'qw)) nil nil user= What am I doing wrong? source will only check for definitions on disk; you need serializable-fn for something like this to work. -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
Re: How I can use InteractionEvent in clojure?
I have tried the new code. There are not errors in the prompt, but the boxWidget still doesn't work. It seems like boxWidget and the cone are not well connected. The final code that I have after using run: (ns example (:import (javax.swing JFrame JPanel SwingUtilities))) (clojure.lang.RT/loadLibrary vtkCommonJava) (clojure.lang.RT/loadLibrary vtkWidgetsJava) (def boxWidget (vtk.vtkBoxWidget.)) (def myCallback (fn [] (let [t (vtk.vtkTransform.)] (.GetTransform t) (- boxWidget .GetProp3D (.SetUserTransform t) (defn main [] (let [cone (vtk.vtkConeSource.) coneMapper (vtk.vtkPolyDataMapper.) coneActor (vtk.vtkActor.) ren(vtk.vtkRenderer.) renWin (vtk.vtkRenderWindow.) iren (vtk.vtkRenderWindowInteractor.) style (vtk.vtkInteractorStyleTrackballCamera.) t (vtk.vtkTransform.)] (doto cone (.SetHeight 3.0) (.SetRadius 1.0) (.SetResolution 10)) (doto coneMapper (.SetInputConnection (.GetOutputPort cone))) (doto coneActor (.SetMapper coneMapper)) (doto ren (.GradientBackgroundOn) (.SetBackground 0.5 0.6 0.8) (.AddActor coneActor) (.ResetCamera)) (doto renWin (.AddRenderer ren) (.SetSize 300 300)) (doto iren (.SetRenderWindow renWin) (.SetInteractorStyle style)) (doto boxWidget (.SetInteractor iren) (.SetPlaceFactor 1.25) (.SetProp3D coneActor) (.PlaceWidget) (.AddObserver interactionEvent myCallback run) (.On)) (doto iren (.Initialize) (.Start (example/main) -- 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: datomic has been announced
Mindblowing! I can imagine many applications for datomic, it looks like a very powerful abstraction which is overcoming many of the problems I've been encountering when I've built applications. Thanks, Rich! Chris Grangers awesome experimental UI for developing javascript games is covered in Wired's blog Webmonkey: http://www.webmonkey.com/ (I found it browsing the http://Wired.com!) Congratulations! /Linus 2012/3/5 kovas boguta kovas.bog...@gmail.com Since not everyone reads twitter or hacker news, http://datomic.com/ has been updated with an unveiling of Rich's new project. -- 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: Weird issue with :require in clojurescript
On Mon, Mar 5, 2012 at 2:15 PM, Stuart Sierra the.stuart.sie...@gmail.com wrote: Yes, it is incorrect, in both Clojure and ClojureScript, to repeat the (:require ...) or (:use ...) forms in an `ns` declaration. Really? Most of the Clojure code I've seen out in the wild has a :require for each required library (and a :use for each used library). If it is incorrect, the `ns` macro should throw an error. This blog post to which everyone is constantly being referred for an explanation of namespaces, use, require etc shows multiple :require forms: http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html Given how common this usage is - and the fact that it _works_ in Clojure (for JVM), I'd argue this is a bug in ClojureScript. I'd also argue you can't unring this bell and now make it illegal in Clojure... -- 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
Re: datomic has been announced
From watching the presentation, it seems to include (but not be limited to!) the some of the good parts of Prevayler and CouchDB, so anyone familiar with those will find the Datomic concept familiar, too. Prevayler (www.prevayler.org) was announced on Slashdot in 2003 (!) and they basically made the point that RAM had gotten cheap enough to keep most working data in RAM that you could have your data just be POJOs and run your queries on in RAM using some in-language query mechanism that runs on the object graph. Near the start of the above presentation Rich talks about hardware and architectures have changed substantially which is what this is talking about. BTW, even back then before NoSQL became a meme this unmasked some of the SQL fanbois who saw their consulting revenues in jeopardy. :) Prevayler asks you to express all your changes to the object graph in transactions reified as Java objects, there called 'commands' from what I remember, and pass them through this bottleneck that serializes them to disk. This is similar to the transactor that Datomic seems to have. On the disk side of things, Prevayler would use a logging and snapshot combination that was a known design pattern before ( http://www.ibm.com/developerworks/library/wa-objprev/) but popularized by Prevayler. CouchDB exists since 2005 or so and offers the following concepts similar to Datomic: Replication across peers, except CouchDB also persists to disk on peers. The receive queue of transactions that can be filtered and reactive, no polling application design that Datomic offers its peers is similar to the CouchDB _changes stream of updates. CouchDB can filter _changes server-side to reduce load on the network, not sure Datomic can do that. CouchDB also implements the add facts, don't change data in place idea by keeping revisions of the data structures. All in all very exciting to see this confluence of ideas. -- hank On Tuesday, 6 March 2012 05:46:12 UTC+11, kovasb wrote: Since not everyone reads twitter or hacker news, http://datomic.com/ has been updated with an unveiling of Rich's new project. -- 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: Weird issue with :require in clojurescript
Thanks Stuart. In the documentation for ns it says that references can be zero or more of: (:refer-clojure ...) (:require ...) (:use ...) (:import ...) (:load ...) (:gen-class). Also, using (:require...) twice in clojure (1.3) actually does work. Maybe there could be some clarification in the future... Since it seems quite natural to repeat the require clauses coming from languages where you always have to write import many times, I imagine other people are making the same mistake. On Monday, March 5, 2012 5:15:47 PM UTC-5, Stuart Sierra wrote: Yes, it is incorrect, in both Clojure and ClojureScript, to repeat the (:require ...) or (:use ...) forms in an `ns` declaration. -S On Monday, March 5, 2012 12:26:03 PM UTC-5, Aaron wrote: It seems that when I require two namespaces in a namespace definition, the clojurescript compiler misses the first require. I have a module that has a ns definition more or less like the following: (ns my-namespace (:require [lib1 :as l1]) (:require [lib2 :as l2])) Using clojurescript master (53ecf3cd3a), the compiled javascript for the above definition is: goog.provide('my-namespace'); goog.require('cljs.core'); goog.require('lib2'); The compiler misses the first require. If I switch the definition around so that it reads like this: (ns my-namespace (:require [lib2 :as l2]) (:require [lib1 :as l1])) again, the compiler misses the first require and the output looks like this: goog.provide('my-namespace'); goog.require('cljs.core'); goog.require('lib1'); However, if I just write: (ns my-namespace (:require [lib2 :as l2] [lib1 :as l1])) the javascript output references both libraries just fine. Is it just wrong to use multiple requires in clojurescript, or is this really a bug? If there is a general convention that must be followed then it would be good to document it because as a relative new-comer, it took me a while to find a workaround. Thanks! On Monday, March 5, 2012 5:15:47 PM UTC-5, Stuart Sierra wrote: Yes, it is incorrect, in both Clojure and ClojureScript, to repeat the (:require ...) or (:use ...) forms in an `ns` declaration. -S On Monday, March 5, 2012 12:26:03 PM UTC-5, Aaron wrote: It seems that when I require two namespaces in a namespace definition, the clojurescript compiler misses the first require. I have a module that has a ns definition more or less like the following: (ns my-namespace (:require [lib1 :as l1]) (:require [lib2 :as l2])) Using clojurescript master (53ecf3cd3a), the compiled javascript for the above definition is: goog.provide('my-namespace'); goog.require('cljs.core'); goog.require('lib2'); The compiler misses the first require. If I switch the definition around so that it reads like this: (ns my-namespace (:require [lib2 :as l2]) (:require [lib1 :as l1])) again, the compiler misses the first require and the output looks like this: goog.provide('my-namespace'); goog.require('cljs.core'); goog.require('lib1'); However, if I just write: (ns my-namespace (:require [lib2 :as l2] [lib1 :as l1])) the javascript output references both libraries just fine. Is it just wrong to use multiple requires in clojurescript, or is this really a bug? If there is a general convention that must be followed then it would be good to document it because as a relative new-comer, it took me a while to find a workaround. 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
Re: Weird issue with :require in clojurescript
Then both Clojure and ClojureScript's `ns` macro should complain about multiple present (:require ..) or (:use ..) forms at compile-time. At lest Clojure's `ns` macro doesn't do that on clj-1.3. Regards, -Martin On 2012-03-05 17:15 , Stuart Sierra the.stuart.sie...@gmail.com wrote: Yes, it is incorrect, in both Clojure and ClojureScript, to repeat the (:require ...) or (:use ...) forms in an `ns` declaration. -S On Monday, March 5, 2012 12:26:03 PM UTC-5, Aaron wrote: It seems that when I require two namespaces in a namespace definition, the clojurescript compiler misses the first require. I have a module that has a ns definition more or less like the following: (ns my-namespace (:require [lib1 :as l1]) (:require [lib2 :as l2])) Using clojurescript master (53ecf3cd3a), the compiled javascript for the above definition is: goog.provide('my-namespace'); goog.require('cljs.core'); goog.require('lib2'); The compiler misses the first require. If I switch the definition around so that it reads like this: (ns my-namespace (:require [lib2 :as l2]) (:require [lib1 :as l1])) again, the compiler misses the first require and the output looks like this: goog.provide('my-namespace'); goog.require('cljs.core'); goog.require('lib1'); However, if I just write: (ns my-namespace (:require [lib2 :as l2] [lib1 :as l1])) the javascript output references both libraries just fine. Is it just wrong to use multiple requires in clojurescript, or is this really a bug? If there is a general convention that must be followed then it would be good to document it because as a relative new-comer, it took me a while to find a workaround. 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 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: Seesaw 1.4.0
Hi, Seesaw 1.4.0 is out now. The release notes [1] have highlights of all the changes since 1.3.0. Note there are two breaking changes in the API. I believe the impact of these changes should be minimal since they were in areas of the API even I was never able to use effectively. I'd also like to thank Sam and Jeff and everyone else working on Overtone. Its custom widget development really pushed the Seesaw API and exposed a number of issues I probably wouldn't have found otherwise. I'll see everybody at Clojure/West! Cheers, Dave [1] https://github.com/daveray/seesaw/wiki/Release-Notes -- 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