About with-meta source, can explain it by itself?
Hi, I read the source about with-meta, and find def with-meta using with-meta, can it? someone give a explain? user= (source with-meta) (def ^{:arglists '([^clojure.lang.IObj obj m]) :doc Returns an object of the same type and value as obj, with map m as its metadata. :added 1.0 :static true} with-meta (fn ^:static with-meta [^clojure.lang.IObj x m] (. x (withMeta m -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ANN] avl.clj: sorted maps and sets with fast rank queries via nth
As of 0.0.3, avl.clj offers sorted maps with lookups unambiguously faster than those of the built-ins. Construction times for large instances are also faster thanks to transients. The lookup performance comes at a cost in the form of slower non-transient assoc/dissoc. I've posted some benchmark results to clojure-dev; I'll post a similar message here once I'm ready to cut an 0.1.0 release (which basically needs more tests for added confidence, a test suite on the ClojureScript side and such). Cheers, Michał On 21 September 2013 04:28, Michał Marczyk michal.marc...@gmail.com wrote: On 21 September 2013 02:42, Michał Marczyk michal.marc...@gmail.com wrote: [avl.clj 0.0.1] dependency groupIdavl.clj/groupId artifactIdavl.clj/artifactId version0.0.1/version /dependency Make that [avl.clj 0.0.2] and dependency groupIdavl.clj/groupId artifactIdavl.clj/artifactId version0.0.2/version /dependency Cheers, Michał -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: About with-meta source, can explain it by itself?
Actually with-meta's definition does not refer to with-meta. Rather, it calls withMeta, a method in the clojure.lang.IObj interface which the first argument to with-meta is supposed to implement. Cheers, Michał On 21 September 2013 09:01, ljcppu...@gmail.com wrote: Hi, I read the source about with-meta, and find def with-meta using with-meta, can it? someone give a explain? user= (source with-meta) (def ^{:arglists '([^clojure.lang.IObj obj m]) :doc Returns an object of the same type and value as obj, with map m as its metadata. :added 1.0 :static true} with-meta (fn ^:static with-meta [^clojure.lang.IObj x m] (. x (withMeta m -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: About with-meta source, can explain it by itself?
You are right, i noticed it calls withMeta, but in the expression, actually use with-meta to define with-meta, it's very strange, thank you very much! (def with-meta (fn ^:static with-meta [^clojure.lang.IObj x m] (. x (withMeta m On Saturday, September 21, 2013 3:30:30 PM UTC+8, Michał Marczyk wrote: Actually with-meta's definition does not refer to with-meta. Rather, it calls withMeta, a method in the clojure.lang.IObj interface which the first argument to with-meta is supposed to implement. Cheers, Michał On 21 September 2013 09:01, ljcp...@gmail.com javascript: wrote: Hi, I read the source about with-meta, and find def with-meta using with-meta, can it? someone give a explain? user= (source with-meta) (def ^{:arglists '([^clojure.lang.IObj obj m]) :doc Returns an object of the same type and value as obj, with map m as its metadata. :added 1.0 :static true} with-meta (fn ^:static with-meta [^clojure.lang.IObj x m] (. x (withMeta m -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: About with-meta source, can explain it by itself?
The with-meta in (fn ^:static with-meta ...) is just the name the function created by the fn form will know itself by. It will also be used as the final segment of the name of the class of this function object. It's not being evaluated in this position, and in fact it could be replaced with, say, foo (and then you'd get mentions of a class with name ending with foo in stack traces caused by improper uses of with-meta). On the other hand, the fact that the function has a name means that it could call itself through this name, return itself as a value etc.; effectively giving a function a name creates a local holding the function itself within the function body. Cheers, Michał On 21 September 2013 11:36, ljcppu...@gmail.com wrote: You are right, i noticed it calls withMeta, but in the expression, actually use with-meta to define with-meta, it's very strange, thank you very much! (def with-meta (fn ^:static with-meta [^clojure.lang.IObj x m] (. x (withMeta m On Saturday, September 21, 2013 3:30:30 PM UTC+8, Michał Marczyk wrote: Actually with-meta's definition does not refer to with-meta. Rather, it calls withMeta, a method in the clojure.lang.IObj interface which the first argument to with-meta is supposed to implement. Cheers, Michał On 21 September 2013 09:01, ljcp...@gmail.com wrote: Hi, I read the source about with-meta, and find def with-meta using with-meta, can it? someone give a explain? user= (source with-meta) (def ^{:arglists '([^clojure.lang.IObj obj m]) :doc Returns an object of the same type and value as obj, with map m as its metadata. :added 1.0 :static true} with-meta (fn ^:static with-meta [^clojure.lang.IObj x m] (. x (withMeta m -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@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+u...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: OSGi manifest creation for Clojure projects
These pages are no longer available. Can you re-post new URLs for them? Thanks! On Friday, March 16, 2012 2:48:42 PM UTC-7, Paudi Moriarty wrote: Hi, I've spent quite a lot of time with Clojure and OSGi lately and have had some success in using Bnd and tools.namespace to generate a manifest for my mixed Clojure/Java project. I'm using clojure.osgi successfully to handle using requiring and loading clojure namespaces and to register and track OSGi services. I've posted the results in 2 posts on the topic if anyone is interested. http://paudo.posterous.com/clojure-osgi http://paudo.posterous.com/clojure-and-osgi-sitting-in-a-tree Regards, Paudi -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: two pass compilation, intern and def
Well, do actually means execute all of the following forms, sequentially, at this point. It seems to me that the position of saying this also works when this point is the top-level is sensible. I do not know what your actual use-case is, but, as Meikel said, it seems a bit strange to use intern if you know the symbol at compile time. On Friday, 20 September 2013, Phillip Lord wrote: Meikel Brandmeyer brandmeyer.mei...@gmail.com javascript:; writes: 2013/9/20 Phillip Lord phillip.l...@newcastle.ac.uk javascript:; (def bob3 3) introduces a new symbol, I am struggling to see why (intern 'user 'bob3 3) cannot be recognised similarly. Because intern happens at runtime. It's a normal function. The above intern call is easily translated to the def. intern is only interesting when bob3 is computed based on runtime information, which is not available at compile time. But then the compile cannot special case it anyway. From a user perspective, I think that this is very messy. I can see your example about do, but then I think using a common form like do is a mistake; having do behave differently depending on whether it is top level or not is exposing a lot of detail that should not be. 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.comjavascript:; Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com javascript:; For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com javascript:;. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Fwd: jvm.tools.analyzer 0.5.1
Hi, jvm.tools.analyzer 0.5.1 has breaking changes from 0.4.5. The arguments for analyze-ns have been changed. Also, analyze-file is added and source file information is added to the AST. See the changelog for more details. Dependency info https://github.com/clojure/jvm.tools.analyzer Changeloghttps://github.com/clojure/jvm.tools.analyzer/blob/master/CHANGELOG.md Thanks, Ambrose -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.