Re: [ANN] tools.reader 0.8.0 released
Cool, nice work Nicola and Alex! Ambrose On Thu, Nov 21, 2013 at 2:16 PM, Nicola Mometto brobro...@gmail.com wrote: https://github.com/clojure/tools.reader Changelog: https://github.com/clojure/tools.reader/blob/master/CHANGELOG.md Leiningen dependency information: [org.clojure/tools.reader 0.8.0] While the releases I made on the last months contained mainly small bugfixes and enhancements needed specifically for better integration in clojurescript, this one contains a more interesting enhancement. Thanks to the awesome work by Alex Redington, tools.reader now provides richer informations regarding the forms it is reading in the form of attached metadata; specifically it now adds end-line/end-column metadata information as opposed to only line/column info and can optionally keep source information. To see it in action: clojure.tools.reader (meta (read (source-logging-push-back-reader [^:foo bar]))) {:end-column 12, :end-line 1, :column 1, :line 1, :source [^:foo bar]} clojure.tools.reader (meta (first (read (source-logging-push-back-reader [^:foo bar] {:foo true, :end-column 11, :end-line 1, :column 8, :line 1, :source ^:foo bar} Nicola -- -- 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: println / for unexpected behaviour
Hi Edward, I believe the return value of your expression is (nil nil nil nil ...), but the printlns are forced just after the ( is printed. Thanks, Ambrose On Mon, Nov 25, 2013 at 9:14 PM, edw...@kenworthy.info wrote: Some (println) weirdness (board is a vector to vectors): (println (board 0)) (println (board 1)) (println (board 2)) (println (board 3)) (println (board 4)) (println (board 5)) (println (board 6)) (println (board 7)) Works as I would expect, printing to the console. However: (for [row board] (println row)) Doesn't: the output from println is part of the result of evaluating the for (along with a slew of nils). ([:empty :empty :empty :empty :empty :empty :empty :empty] [:empty :empty :empty :empty :empty :empty :empty :empty] [:empty :empty :empty :empty :empty :empty :empty :empty] [:empty :empty :empty :white :black :empty :empty :empty] [:empty :empty :empty :black :white :empty :empty :empty] [:empty :empty :empty :empty :empty :empty :empty :empty] [:empty :empty :empty :empty :empty :empty :empty :empty] [:empty :empty :empty :empty :empty :empty :empty :empty] nil nil nil nil nil nil nil nil) Any idea why there is any difference at all between the two? The only thing I can think of is for's lazy evaluation but I don't see how. -- -- 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: Breaking out of doseq
Hi Jonathon, I'm not sure I fully understand what you're after, but I suspect reduce + reduced would be helpful. (reduce (fn [a c] (reduced 'foo)) [] [1 2 3]) ;= 'foo As far as I'm aware you can't exit a doseq early. (Actually I guess you could use a mutable reference as the argument to :while, but reduced is nicer). http://clojuredocs.org/clojure_core/clojure.core/for#example_913 Thanks, Ambrose On Wed, Nov 27, 2013 at 10:26 PM, Jonathon McKitrick jmckitr...@gmail.comwrote: I'm iterating a map (regex - function) and I'd like to call FUNCTION with the result of re-groups after a match for REGEX is found. I also want to exit the sequence, returning the results of FUNCTION. In common lisp, I would use return-from, but how would this be done 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 --- 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: Breaking out of doseq
reduced wraps a value in such a way that it stops the current reduce and returns a value. You might want `some` in this case. (let [matched (some matches? regexes)] ...) http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/some Also filter + first has a similar effect. Thanks, Ambrose On Wed, Nov 27, 2013 at 10:43 PM, Jonathon McKitrick jmckitr...@gmail.comwrote: To clarify what I'm trying to do, I have a map of regexes, and after iterating them, when one matches (the order of the regexes is significant) I want exactly one result returned by applying the looked up function to the string. After that regex matches, no more matches should be attempted. What is the 'reduced' function? On Wednesday, November 27, 2013 9:26:21 AM UTC-5, Jonathon McKitrick wrote: I'm iterating a map (regex - function) and I'd like to call FUNCTION with the result of re-groups after a match for REGEX is found. I also want to exit the sequence, returning the results of FUNCTION. In common lisp, I would use return-from, but how would this be done 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 --- 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: [ANN] Clara 0.3.0: Rete in ClojureScript
Congrats! Ambrose On Fri, Nov 29, 2013 at 11:49 PM, Ryan Brush rbr...@gmail.com wrote: Clara 0.3.0, a forward-chaining rules engine in pure Clojure, has been released. The headliner is ClojureScript support, although a handful of fixes and optimizations were included as well. Some discussion of the ClojureScript port is in that group: https://groups.google.com/forum/#!topic/clojurescript/MMwjpcFUPqE The github project: https://github.com/rbrush/clara-rules Example usage from ClojureScript: https://github.com/rbrush/clara-examples/blob/master/src/main/clojurescript/clara/examples/shopping.cljs Feel free to ping me (@ryanbrush) with any questions or suggestions, or log issues via github. -Ryan -- -- 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: ANNOUNCE: Cognitect is sponsoring CinC contrib libraries
Wow! Congrats! Ambrose On Fri, Dec 6, 2013 at 4:42 AM, Nicola Mometto brobro...@gmail.com wrote: I'm happy to announce that after Ambrose BS commissioned me to continue working on my CinC libraries as part of his typed-clojure campaign (http://www.indiegogo.com/projects/typed-clojure), Cognitect (http://cognitect.com/) offered me sponsorship for my work on CinC contrib libraries. The libraries I'm referring to with CinC libraries are: * tools.analyzer: https://github.com/clojure/tools.analyzer * tools.analyzer.jvm: https://github.com/clojure/tools.analyzer.jvm * tools.emitter.jvm: https://github.com/clojure/tools.emitter.jvm I want to thanks Justin Gehtland and Tim Baldridge that helped this happen and Alex Miller for his prompt help in setting up the JIRA and Hudson workflows. Thanks again to Ambrose BS and a bit unrelately I want to thanks Andy Fingerhut who lately has been a great help to me, trying out tools.analyzer[.jvm] and reporting bugs along the way. Thanks, Nicola Mometto (Bronsa) -- -- 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: require and :require
By coincidence they are both equivalent and expand to exactly the same code. The latter is preferred, and it's debatable if the former should even be legal. Thanks, Ambrose On Fri, Dec 6, 2013 at 5:07 PM, BillZhang jingege...@gmail.com wrote: hi all, What's the difference between these two snippets? 1. (ns my-ns (require [package.name.a])) 2. (ns my-ns (:require [package.name.a])) They all works!But I wonder what's the differences between them. thx! -- -- 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: Excluding an Automatically-Imported Java Class
Interesting, I had no idea clojure.lang.Compiler was automatically imported. You probably want ns-unmaphttp://clojuredocs.org/clojure_core/clojure.core/ns-unmap . (ns rdoc.core ...) (ns-unmap *ns* 'Compiler) (import 'com.google.javascript.jscomp.Compiler) Thanks, Ambrose On Sun, Dec 8, 2013 at 9:15 AM, Jay Young jayyoung9...@gmail.com wrote: My interest in Clojure has been building lately, and I have a great project to get my feet wet. One of the dependencies for my project is the Closure javascript compiler (having Clojure and Closure in the project is going to make for some interesting typo-hunting). When I try to import com.google.javascript.jscomp.Compiler with the namespace declaration (ns rdoc.core (:import (com.google.javascript.jscomp Compiler))), I get an error that says Compiler already refers to: class clojure.lang.Compiler in namespace: rdoc.core, so I'm assuming this means that clojure.lang is automatically imported. I haven't found a way to import com.google.javascript.jscomp.Compiler with an alias, and I can't figure out if it's possible to exclude clojure.lang.Compiler. I've tried different combinations of import, refer, and use but I'm afraid I'm still a bit too new to the environment to know all the options. Any ideas on how to be able to import the Closure compiler, either as an alias or just as Compiler would be greatly appreciated. My project will use this class extensively, and the Clojure compiler not at all, so it'd be nice to be able to use the one I need without fully qualifying the name. Cheers, --Jay -- -- 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: ANN - [vinyasa 0.1.0] - Give your clojure workflow more flow
Thanks for sharing! Ambrose On Wed, Jan 1, 2014 at 12:56 PM, zcaudate z...@caudate.me wrote: I've done a write up of my workflow here: http://z.caudate.me/give-your-clojure-workflow-more-flow/ -- -- 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: [ANN] tools.analyzer(.jvm) 0.1.0-alpha1
Congrats! FWIW I won't be porting core.typed while tools.analyzer is still in alpha but I'll definitely be pointing people your way. Thanks, Ambrose On Sat, Jan 11, 2014 at 9:23 AM, Nicola Mometto brobro...@gmail.com wrote: Today I released the first version of the tools.analyzer[1] and tools.analyzer.jvm[2] contrib libraries, here are the leiningen coordinates: [org.clojure/tools.analyzer 0.1.0-alpha1] [org.clojure/tools.analyzer.jvm 0.1.0-alpha1] Right now the only documentation for both those libraries is in the form of docstrings and can be found at http://clojure.github.io/tools.analyzer/ and http://clojure.github.io/tools.analyzer.jvm/ more extended documentation will be available before the first non-alpha release, hopefully very soon. While this is an alpha release, during the last months a big amount of bugs have been fixed thanks to the work of Andy Fingerhut who moved the Eastwood[3] linter from Ambrose's analyzer to tools.analyzer.jvm; thanks to this, the analyzer has been run with success on a large number of popular clojure libraries including almost all clojure contrib libraries and clojure's own namespaces, thus proving that it's effectively working. Please, try it out and if you find any bug report them in the Bug Tracker[4] (tools.analyzer and tools.analyzer.jvm share the same JIRA project) or if you have any questions, feel free to ask them and I'll do my best to answer them. Thanks, Nicola [1] https://github.com/clojure/tools.analyzer [2] https://github.com/clojure/tools.analyzer.jvm [3] https://github.com/jonase/eastwood [4] http://dev.clojure.org/jira/browse/TANAL -- -- 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: [ANN] dynalint 0.1.0
Hi everyone, Please try [lein-dynalint 0.1.1]. You should be able to specify a file to dump the verbose warnings like: lein dynalint test :output my-name-name Please give it a shot. Thanks, Ambrose On Sun, Jan 12, 2014 at 1:04 AM, Eric Normand ericwnorm...@gmail.comwrote: Hi Ambrose, This looks great! I'll give it a try. Eric http://lispcast.com On Saturday, January 11, 2014 8:46:40 AM UTC-6, Ambrose Bonnaire-Sergeant wrote: Hi, For those who like analysing their programs I present Dynalint, a simplistic linter. It's essentially a bunch of manually curated runtime warnings and errors for the core Clojure library. https://github.com/frenchy64/dynalint Please read the README for instructions and caveats. Here's the gist: user= (require '[dynalint.lint :as dyn]) nil user= (dyn/lint) :ok user= (require '[clojure.set :as set]) nil user= (set/union #{1} nil) WARNING (Dynalint id 1): clojure.set/union should have set arguments: nil #{1} user= (vals nil) nil user= (vals 1) ExceptionInfo ERROR (Dynalint id 2): First argument to clojure.core/vals must be seqable: 1 clojure.core/ex-info (core.clj:4327) user= (update-in {} [] identity) WARNING (Dynalint id 3): clojure.core/update-in key path should be non-empty: [] {nil nil} Also lein-dynalint is a Leiningen plugin which some might find helpful. https://github.com/frenchy64/lein-dynalint Enjoy! 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. -- -- 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: core.typed
Hi, There is some conflict with ClojureScript, some others have also observed this. Is there some library that is upgrading the Clojurescript version to one different to what core.typed depends on? Thanks, Ambrose On Tue, Jan 28, 2014 at 5:38 PM, t x txrev...@gmail.com wrote: ## Background I'm using [org.clojure/core.typed 0.2.25] ## Question: Which is the following is true: (1) my code is correct / should work, and therefore there is something with my setup (2) my code is wrong (and please point out how I can fix it) ## Code (ns test #+clj (:require [clojure.core.typed]) #+clj (:use [clojure.core.typed])) (ann add [Number Number - Number]) (defn add [a b] (+ a b)) (check-ns) ## Error When I execute the above, I get the following error. It's not clear to me what I'm doing wrong. java.lang.NullPointerException: null at clojure.core$deref_future.invoke (core.clj:2108) clojure.core$deref.invoke (core.clj:2129) cljs.analyzer$resolve_var.invoke (analyzer.clj:347) cljs.analyzer$resolve_var.invoke (analyzer.clj:308) clojure.core.typed.util_cljs$resolve_var.invoke (util_cljs.clj:40) clojure.core.typed.parse_unparse$resolve_type_cljs.invoke (parse_unparse.clj:585) clojure.core.typed.parse_unparse/fn (parse_unparse.clj:709) clojure.lang.MultiFn.invoke (MultiFn.java:227) clojure.core.typed.parse_unparse/fn (parse_unparse.clj:723) clojure.lang.MultiFn.invoke (MultiFn.java:227) clojure.core.typed.parse_unparse$parse_function.invoke (parse_unparse.clj:879) clojure.core.typed.parse_unparse/fn (parse_unparse.clj:900) clojure.lang.MultiFn.invoke (MultiFn.java:227) clojure.core.typed.base_env_cljs$generator_init_jsnominals$iter__17058__17062$fn__17063$fn__17320$iter__17321__17325$fn__17326.invoke (base_env_cljs.clj:31) clojure.lang.LazySeq.sval (LazySeq.java:42) clojure.lang.LazySeq.seq (LazySeq.java:60) clojure.lang.RT.seq (RT.java:484) clojure.core$seq.invoke (core.clj:133) clojure.core.protocols$seq_reduce.invoke (protocols.clj:30) clojure.core.protocols/fn (protocols.clj:54) clojure.core.protocols$fn__5979$G__5974__5992.invoke (protocols.clj:13) clojure.core$reduce.invoke (core.clj:6177) clojure.core$into.invoke (core.clj:6229) clojure.lang.AFn.applyToHelper (AFn.java:163) clojure.lang.AFn.applyTo (AFn.java:151) clojure.core$apply.invoke (core.clj:619) clojure.core.contracts.constraints$apply_contract$fn__845.doInvoke (constraints.clj:175) clojure.lang.RestFn.applyTo (RestFn.java:137) clojure.lang.AFunction$1.doInvoke (AFunction.java:29) clojure.lang.RestFn.invoke (RestFn.java:421) clojure.core.typed.base_env_cljs$generator_init_jsnominals$iter__17058__17062$fn__17063$fn__17320.invoke (base_env_cljs.clj:31) clojure.core.typed.base_env_cljs$generator_init_jsnominals$iter__17058__17062$fn__17063.invoke (base_env_cljs.clj:31) clojure.lang.LazySeq.sval (LazySeq.java:42) clojure.lang.LazySeq.seq (LazySeq.java:60) clojure.lang.RT.seq (RT.java:484) clojure.core$seq.invoke (core.clj:133) clojure.core$dorun.invoke (core.clj:2780) clojure.core$doall.invoke (core.clj:2796) clojure.core.typed.base_env_cljs$generator_init_jsnominals.invoke (base_env_cljs.clj:31) clojure.core.typed.base_env_cljs$init_jsnominals.invoke (base_env_cljs.clj:29) clojure.core.typed.base_env_cljs$reset_jsnominal_env_BANG_.invoke (base_env_cljs.clj:67) clojure.core.typed.base_env_cljs$generator_init_alias_env.invoke (base_env_cljs.clj:138) clojure.core.typed.base_env_cljs$init_alias_env.invoke (base_env_cljs.clj:136) clojure.core.typed.base_env_cljs$reset_alias_env_BANG_.invoke (base_env_cljs.clj:159) clojure.core.typed.base_env_cljs$reset_cljs_envs_BANG_$fn__17803.invoke (base_env_cljs.clj:188) clojure.core.typed.base_env_cljs$reset_cljs_envs_BANG_.invoke (base_env_cljs.clj:187) clojure.core.typed.reset_env$reset_envs_BANG_.invoke (reset_env.clj:24) clojure.core.typed$check_ns_info.doInvoke (typed.clj:1490) clojure.lang.RestFn.invoke (RestFn.java:410) clojure.lang.AFn.applyToHelper (AFn.java:161) clojure.lang.RestFn.applyTo (RestFn.java:132) clojure.core$apply.invoke (core.clj:619) clojure.core.typed$check_ns.doInvoke (typed.clj:1559) clojure.lang.RestFn.invoke (RestFn.java:410) clojure.core.typed$check_ns.invoke (typed.clj:1557) test$eval21761.invoke (NO_SOURCE_FILE:1) clojure.lang.Compiler.eval (Compiler.java:6619) clojure.lang.Compiler.eval (Compiler.java:6582) clojure.core$eval.invoke (core.clj:2852) clojure.main$repl$read_eval_print__6588$fn__6591.invoke (main.clj:259) clojure.main$repl$read_eval_print__6588.invoke (main.clj:259) clojure.main$repl$fn__6597.invoke (main.clj:277) clojure.main$repl.doInvoke (main.clj:277) clojure.lang.RestFn.invoke (RestFn.java:1096)
Re: core.typed
0.2.26 contains a workaround by disabling the WIP Clojurescript support. You might need the Sonatypehttps://github.com/clojure/core.typed#releases-and-dependency-information repo. I've got a GRE exam on Monday so I can't work on this properly yet. Please let me know if it worked. Also Sean (CCed), please try 0.2.26 against your Light Table failure case. I believe this is the same issue. Thanks, Ambrose On Tue, Jan 28, 2014 at 9:03 PM, t x txrev...@gmail.com wrote: Hi Ambrose, Yes, I have a manual dependency on: [org.clojure/clojurescript 0.0-2138] I looked at the project.clj of core.typed, and got: https://github.com/clojure/core.typed/blob/master/project.clj#L13 Is the dependency on [org.clojure/clojurescript 0.0-1859] correct? (it seems rather outdated). Thanks! On Tue, Jan 28, 2014 at 4:59 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi, There is some conflict with ClojureScript, some others have also observed this. Is there some library that is upgrading the Clojurescript version to one different to what core.typed depends on? Thanks, Ambrose On Tue, Jan 28, 2014 at 5:38 PM, t x txrev...@gmail.com wrote: ## Background I'm using [org.clojure/core.typed 0.2.25] ## Question: Which is the following is true: (1) my code is correct / should work, and therefore there is something with my setup (2) my code is wrong (and please point out how I can fix it) ## Code (ns test #+clj (:require [clojure.core.typed]) #+clj (:use [clojure.core.typed])) (ann add [Number Number - Number]) (defn add [a b] (+ a b)) (check-ns) ## Error When I execute the above, I get the following error. It's not clear to me what I'm doing wrong. java.lang.NullPointerException: null at clojure.core$deref_future.invoke (core.clj:2108) clojure.core$deref.invoke (core.clj:2129) cljs.analyzer$resolve_var.invoke (analyzer.clj:347) cljs.analyzer$resolve_var.invoke (analyzer.clj:308) clojure.core.typed.util_cljs$resolve_var.invoke (util_cljs.clj:40) clojure.core.typed.parse_unparse$resolve_type_cljs.invoke (parse_unparse.clj:585) clojure.core.typed.parse_unparse/fn (parse_unparse.clj:709) clojure.lang.MultiFn.invoke (MultiFn.java:227) clojure.core.typed.parse_unparse/fn (parse_unparse.clj:723) clojure.lang.MultiFn.invoke (MultiFn.java:227) clojure.core.typed.parse_unparse$parse_function.invoke (parse_unparse.clj:879) clojure.core.typed.parse_unparse/fn (parse_unparse.clj:900) clojure.lang.MultiFn.invoke (MultiFn.java:227) clojure.core.typed.base_env_cljs$generator_init_jsnominals$iter__17058__17062$fn__17063$fn__17320$iter__17321__17325$fn__17326.invoke (base_env_cljs.clj:31) clojure.lang.LazySeq.sval (LazySeq.java:42) clojure.lang.LazySeq.seq (LazySeq.java:60) clojure.lang.RT.seq (RT.java:484) clojure.core$seq.invoke (core.clj:133) clojure.core.protocols$seq_reduce.invoke (protocols.clj:30) clojure.core.protocols/fn (protocols.clj:54) clojure.core.protocols$fn__5979$G__5974__5992.invoke (protocols.clj:13) clojure.core$reduce.invoke (core.clj:6177) clojure.core$into.invoke (core.clj:6229) clojure.lang.AFn.applyToHelper (AFn.java:163) clojure.lang.AFn.applyTo (AFn.java:151) clojure.core$apply.invoke (core.clj:619) clojure.core.contracts.constraints$apply_contract$fn__845.doInvoke (constraints.clj:175) clojure.lang.RestFn.applyTo (RestFn.java:137) clojure.lang.AFunction$1.doInvoke (AFunction.java:29) clojure.lang.RestFn.invoke (RestFn.java:421) clojure.core.typed.base_env_cljs$generator_init_jsnominals$iter__17058__17062$fn__17063$fn__17320.invoke (base_env_cljs.clj:31) clojure.core.typed.base_env_cljs$generator_init_jsnominals$iter__17058__17062$fn__17063.invoke (base_env_cljs.clj:31) clojure.lang.LazySeq.sval (LazySeq.java:42) clojure.lang.LazySeq.seq (LazySeq.java:60) clojure.lang.RT.seq (RT.java:484) clojure.core$seq.invoke (core.clj:133) clojure.core$dorun.invoke (core.clj:2780) clojure.core$doall.invoke (core.clj:2796) clojure.core.typed.base_env_cljs$generator_init_jsnominals.invoke (base_env_cljs.clj:31) clojure.core.typed.base_env_cljs$init_jsnominals.invoke (base_env_cljs.clj:29) clojure.core.typed.base_env_cljs$reset_jsnominal_env_BANG_.invoke (base_env_cljs.clj:67) clojure.core.typed.base_env_cljs$generator_init_alias_env.invoke (base_env_cljs.clj:138) clojure.core.typed.base_env_cljs$init_alias_env.invoke (base_env_cljs.clj:136) clojure.core.typed.base_env_cljs$reset_alias_env_BANG_.invoke (base_env_cljs.clj:159) clojure.core.typed.base_env_cljs$reset_cljs_envs_BANG_$fn__17803.invoke (base_env_cljs.clj:188) clojure.core.typed.base_env_cljs$reset_cljs_envs_BANG_.invoke
Re: core.typed
Great, thanks! On Wed, Jan 29, 2014 at 1:54 AM, Sean Corfield s...@corfield.org wrote: I can confirm that I can evaluate namespaces that use core.typed 0.2.26 inside LightTable - and run check-ns, which failed inside LightTable with 0.2.25! Sean On Jan 28, 2014, at 5:34 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: 0.2.26 contains a workaround by disabling the WIP Clojurescript support. You might need the Sonatypehttps://github.com/clojure/core.typed#releases-and-dependency-information repo. I've got a GRE exam on Monday so I can't work on this properly yet. Please let me know if it worked. Also Sean (CCed), please try 0.2.26 against your Light Table failure case. I believe this is the same issue. Thanks, Ambrose On Tue, Jan 28, 2014 at 9:03 PM, t x txrev...@gmail.com wrote: Hi Ambrose, Yes, I have a manual dependency on: [org.clojure/clojurescript 0.0-2138] I looked at the project.clj of core.typed, and got: https://github.com/clojure/core.typed/blob/master/project.clj#L13 Is the dependency on [org.clojure/clojurescript 0.0-1859] correct? (it seems rather outdated). Thanks! On Tue, Jan 28, 2014 at 4:59 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi, There is some conflict with ClojureScript, some others have also observed this. Is there some library that is upgrading the Clojurescript version to one different to what core.typed depends on? Thanks, Ambrose On Tue, Jan 28, 2014 at 5:38 PM, t x txrev...@gmail.com wrote: ## Background I'm using [org.clojure/core.typed 0.2.25] ## Question: Which is the following is true: (1) my code is correct / should work, and therefore there is something with my setup (2) my code is wrong (and please point out how I can fix it) ## Code (ns test #+clj (:require [clojure.core.typed]) #+clj (:use [clojure.core.typed])) (ann add [Number Number - Number]) (defn add [a b] (+ a b)) (check-ns) ## Error When I execute the above, I get the following error. It's not clear to me what I'm doing wrong. java.lang.NullPointerException: null at clojure.core$deref_future.invoke (core.clj:2108) clojure.core$deref.invoke (core.clj:2129) cljs.analyzer$resolve_var.invoke (analyzer.clj:347) cljs.analyzer$resolve_var.invoke (analyzer.clj:308) clojure.core.typed.util_cljs$resolve_var.invoke (util_cljs.clj:40) clojure.core.typed.parse_unparse$resolve_type_cljs.invoke (parse_unparse.clj:585) clojure.core.typed.parse_unparse/fn (parse_unparse.clj:709) clojure.lang.MultiFn.invoke (MultiFn.java:227) clojure.core.typed.parse_unparse/fn (parse_unparse.clj:723) clojure.lang.MultiFn.invoke (MultiFn.java:227) clojure.core.typed.parse_unparse$parse_function.invoke (parse_unparse.clj:879) clojure.core.typed.parse_unparse/fn (parse_unparse.clj:900) clojure.lang.MultiFn.invoke (MultiFn.java:227) -- -- 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: Improving the bean function with caching
Is there any way to invalidate this cache? Thanks, Ambrose On Thu, Jan 30, 2014 at 9:35 PM, pron ron.press...@gmail.com wrote: The bean function is a very useful Java interop feature that provides a read-only view of a Java Bean as a Clojure map. As it stands, the function performs introspection on the bean's class whenever the function is called: (defn bean Takes a Java object and returns a read-only implementation of the map abstraction based upon its JavaBean properties. {:added 1.0} [^Object x] (let [c (. x (getClass)) pmap (reduce1 (fn [m ^java.beans.PropertyDescriptor pd] (let [name (. pd (getName)) method (. pd (getReadMethod))] (if (and method (zero? (alength (. method (getParameterTypes) (assoc m (keyword name) (fn [] (clojure.lang.Reflector/prepRet (.getPropertyType pd) (. method (invoke x nil) m))) {} (seq (.. java.beans.Introspector (getBeanInfo c) (getPropertyDescriptors v (fn [k] ((pmap k))) snapshot (fn [] (reduce1 (fn [m e] (assoc m (key e) ((val e {} (seq pmap)))] (proxy [clojure.lang.APersistentMap] [] (containsKey [k] (contains? pmap k)) (entryAt [k] (when (contains? pmap k) (new clojure.lang.MapEntry k (v k (valAt ([k] (when (contains? pmap k) (v k))) ([k default] (if (contains? pmap k) (v k) default))) (cons [m] (conj (snapshot) m)) (count [] (count pmap)) (assoc [k v] (assoc (snapshot) k v)) (without [k] (dissoc (snapshot) k)) (seq [] ((fn thisfn [plseq] (lazy-seq (when-let [pseq (seq plseq)] (cons (new clojure.lang.MapEntry (first pseq) (v (first pseq))) (thisfn (rest pseq)) (keys pmap)) I propose to cache the pmap value for each class using JDK 7's ClassValuehttp://docs.oracle.com/javase/7/docs/api/. Here's a proposed implementation: (def ^:private ^java.lang.ClassValue bean-class-value (proxy [java.lang.ClassValue] [] (computeValue [c] (reduce (fn [m ^java.beans.PropertyDescriptor pd] (let [name (. pd (getName)) method (. pd (getReadMethod)) type (.getPropertyType pd)] (if (and method (zero? (alength (. method (getParameterTypes) (assoc m (keyword name) (fn [x] (clojure.lang.Reflector/prepRet type (. method (invoke x nil) m))) {} (seq (.. java.beans.Introspector (getBeanInfo c) (getPropertyDescriptors))) (defn bean Takes a Java object and returns a read-only implementation of the map abstraction based upon its JavaBean properties. {:added 1.0} [^Object x] (let [c (. x (getClass)) pmap (.get bean-class-value c) v (fn [k] ((pmap k) x)) snapshot (fn [] (reduce (fn [m e] (assoc m (key e) ((val e) x))) {} (seq pmap)))] (proxy [clojure.lang.APersistentMap] [] (containsKey [k] (contains? pmap k)) (entryAt [k] (when (contains? pmap k) (new clojure.lang.MapEntry k (v k (valAt ([k] (when (contains? pmap k) (v k))) ([k default] (if (contains? pmap k) (v k) default))) (cons [m] (conj (snapshot) m)) (count [] (count pmap)) (assoc [k v] (assoc (snapshot) k v)) (without [k] (dissoc (snapshot) k)) (seq [] ((fn thisfn [plseq] (lazy-seq (when-let [pseq (seq plseq)] (cons (new clojure.lang.MapEntry (first pseq) (v (first pseq))) (thisfn (rest pseq)) (keys pmap)) -- 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
dynalint, lein-dynalint 0.1.2 - Warn on (zipmap (keys m) (vals m))
Hi, If you're interested in refactoring out instances of (zipmap (keys m) (vals m)), then dynalint 0.1.2 may help. [com.ambrosebs/dynalint 0.1.2] I've added a simplistic case that warns if a clojure.lang.APersistentMap$KeysSeq or ValsSeq is passed to zipmap. user= (require '[dynalint.lint :as dyn]) nil user= (dyn/lint) :ok user= (let [m {1 2 3 4} #_= ks (keys m) #_= vs (vals m)] #_= (zipmap ks vs)) WARNING (Dynalint id 1): Should not pass result of clojure.core/keys to zipmap WARNING (Dynalint id 2): Should not pass result of clojure.core/vals to zipmap {3 4, 1 2} user= Note: dynalint only supports Clojure 1.5.1. dynalint README https://github.com/frenchy64/dynalint dynalint CHANGELOG https://github.com/frenchy64/lein-dynalint lein-dynalint README https://github.com/frenchy64/lein-dynalint 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.
Re: dynalint, lein-dynalint 0.1.2 - Warn on (zipmap (keys m) (vals m))
Hi Sam, Are you familiar of dynalint.lint/print-warning? That's really the best idea I've come up with. Thanks, Ambrose On Sat, Feb 1, 2014 at 9:54 PM, Sam Ritchie sritchi...@gmail.com wrote: I added this to the :injections vector of my lein project; it looks really helpful, but when compiling in emacs via nRepl, without the line number, it's really hard to track down these errors. Is there any way that dynalint could (optionally) output more info about where the infraction takes place? Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com February 1, 2014 6:38 AM Hi, If you're interested in refactoring out instances of (zipmap (keys m) (vals m)), then dynalint 0.1.2 may help. [com.ambrosebs/dynalint 0.1.2] I've added a simplistic case that warns if a clojure.lang.APersistentMap$KeysSeq or ValsSeq is passed to zipmap. user= (require '[dynalint.lint :as dyn]) nil user= (dyn/lint) :ok user= (let [m {1 2 3 4} #_= ks (keys m) #_= vs (vals m)] #_= (zipmap ks vs)) WARNING (Dynalint id 1): Should not pass result of clojure.core/keys to zipmap WARNING (Dynalint id 2): Should not pass result of clojure.core/vals to zipmap {3 4, 1 2} user= Note: dynalint only supports Clojure 1.5.1. dynalint README https://github.com/frenchy64/dynalint dynalint CHANGELOG https://github.com/frenchy64/lein-dynalint lein-dynalint README https://github.com/frenchy64/lein-dynalint 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. -- Sam Ritchie (@sritchie) Paddleguru Co-Founder 703.863.8561 www.paddleguru.com Twitter http://twitter.com/paddleguru // Facebookhttp://facebook.com/paddleguru -- 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. postbox-contact.jpg
Re: dynalint, lein-dynalint 0.1.2 - Warn on (zipmap (keys m) (vals m))
I just realised it's undocumented. (print-warning) prints the latest warning. (print-warning id) prints the dynalint warning with the corresponding id (print-warning id depth) also has depth like clojure.repl/pst. Ditto with print-error. Thanks, Ambrose On Sat, Feb 1, 2014 at 10:14 PM, Sam Ritchie sritchi...@gmail.com wrote: Let me see how I can work that into the flow. Thanks! Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com February 1, 2014 6:58 AM Hi Sam, Are you familiar of dynalint.lint/print-warning? That's really the best idea I've come up with. 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. Sam Ritchie sritchi...@gmail.com February 1, 2014 6:54 AM I added this to the :injections vector of my lein project; it looks really helpful, but when compiling in emacs via nRepl, without the line number, it's really hard to track down these errors. Is there any way that dynalint could (optionally) output more info about where the infraction takes place? Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com February 1, 2014 6:38 AM Hi, If you're interested in refactoring out instances of (zipmap (keys m) (vals m)), then dynalint 0.1.2 may help. [com.ambrosebs/dynalint 0.1.2] I've added a simplistic case that warns if a clojure.lang.APersistentMap$KeysSeq or ValsSeq is passed to zipmap. user= (require '[dynalint.lint :as dyn]) nil user= (dyn/lint) :ok user= (let [m {1 2 3 4} #_= ks (keys m) #_= vs (vals m)] #_= (zipmap ks vs)) WARNING (Dynalint id 1): Should not pass result of clojure.core/keys to zipmap WARNING (Dynalint id 2): Should not pass result of clojure.core/vals to zipmap {3 4, 1 2} user= Note: dynalint only supports Clojure 1.5.1. dynalint README https://github.com/frenchy64/dynalint dynalint CHANGELOG https://github.com/frenchy64/lein-dynalint lein-dynalint README https://github.com/frenchy64/lein-dynalint 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. -- Sam Ritchie (@sritchie) Paddleguru Co-Founder 703.863.8561 www.paddleguru.com Twitter http://twitter.com/paddleguru // Facebookhttp://facebook.com/paddleguru -- 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. postbox-contact.jpgpostbox-contact.jpg
Re: dynalint, lein-dynalint 0.1.2 - Warn on (zipmap (keys m) (vals m))
For those playing along, it seems (= m (zipmap (keys m) (vals m))) *is* a valid property to rely on. http://dev.clojure.org/jira/browse/CLJ-1302?focusedCommentId=33627page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-33627 Thanks, Ambrose On Sat, Feb 1, 2014 at 10:22 PM, Sam Ritchie sritchi...@gmail.com wrote: Thanks for the help! This is great. Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com February 1, 2014 7:16 AM I just realised it's undocumented. (print-warning) prints the latest warning. (print-warning id) prints the dynalint warning with the corresponding id (print-warning id depth) also has depth like clojure.repl/pst. Ditto with print-error. 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. Sam Ritchie sritchi...@gmail.com February 1, 2014 7:14 AM Let me see how I can work that into the flow. Thanks! Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com February 1, 2014 6:58 AM Hi Sam, Are you familiar of dynalint.lint/print-warning? That's really the best idea I've come up with. 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. Sam Ritchie sritchi...@gmail.com February 1, 2014 6:54 AM I added this to the :injections vector of my lein project; it looks really helpful, but when compiling in emacs via nRepl, without the line number, it's really hard to track down these errors. Is there any way that dynalint could (optionally) output more info about where the infraction takes place? Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com February 1, 2014 6:38 AM Hi, If you're interested in refactoring out instances of (zipmap (keys m) (vals m)), then dynalint 0.1.2 may help. [com.ambrosebs/dynalint 0.1.2] I've added a simplistic case that warns if a clojure.lang.APersistentMap$KeysSeq or ValsSeq is passed to zipmap. user= (require '[dynalint.lint :as dyn]) nil user= (dyn/lint) :ok user= (let [m {1 2 3 4} #_= ks (keys m) #_= vs (vals m)] #_= (zipmap ks vs)) WARNING (Dynalint id 1): Should not pass result of clojure.core/keys to zipmap WARNING (Dynalint id 2): Should not pass result of clojure.core/vals to zipmap {3 4, 1 2} user= Note: dynalint only supports Clojure 1.5.1. dynalint README https://github.com/frenchy64/dynalint dynalint CHANGELOG https://github.com/frenchy64/lein-dynalint lein-dynalint README https://github.com/frenchy64/lein-dynalint 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. -- Sam Ritchie (@sritchie) Paddleguru Co-Founder 703.863.8561 www.paddleguru.com Twitter http://twitter.com/paddleguru // Facebookhttp://facebook.com/paddleguru -- 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
Re: order of returned values from keys and vals
zipmap could also potentially use transients (which would be a nice addition). keys/vals are also lazy, so I would be surprised if there was any performance difference with walking the seq twice. Thanks, Ambrose On Sun, Feb 2, 2014 at 11:35 AM, Justin Smith noisesm...@gmail.com wrote: Realistically, how many situations are there where running keys and vals independently is preferable to running seq once and using the two element vectors that returns? Usually this way one can avoid walking the whole thing twice. (into {} (map (fn [[k v]] [k (inc v)]) {:a 0 :b 1})) is representative of the idiom I usually use. As a bonus, into uses transients, which can create the resulting structure in fewer cycles / less time. On Saturday, February 1, 2014 10:00:33 AM UTC-8, Sam Ritchie wrote: Looks like Rich just chimed in with: keys order == vals order == seq order Matching Socks January 31, 2014 7:31 PM Actually, http://dev.clojure.org/jira/browse/CLJ-1302 keys and vals consistency not mentioned in docstring was declined, with the comment The absence of this property in the docs is correct. You should not rely on this. On Wednesday, August 11, 2010 6:03:39 PM UTC-4, Chouser wrote: -- 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. -- Sam Ritchie (@sritchie) Paddleguru Co-Founder 703.863.8561 www.paddleguru.com Twitter http://twitter.com/paddleguru // Facebookhttp://facebook.com/paddleguru -- 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: order of returned values from keys and vals
Thanks Michał, voted. Ambrose On Sun, Feb 2, 2014 at 12:13 PM, Michał Marczyk michal.marc...@gmail.comwrote: On 2 February 2014 04:54, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: zipmap could also potentially use transients (which would be a nice addition). My patch for this has been waiting in JIRA since end of May 2012: http://dev.clojure.org/jira/browse/CLJ-1005 Cheers, Michał keys/vals are also lazy, so I would be surprised if there was any performance difference with walking the seq twice. Thanks, Ambrose On Sun, Feb 2, 2014 at 11:35 AM, Justin Smith noisesm...@gmail.comwrote: Realistically, how many situations are there where running keys and vals independently is preferable to running seq once and using the two element vectors that returns? Usually this way one can avoid walking the whole thing twice. (into {} (map (fn [[k v]] [k (inc v)]) {:a 0 :b 1})) is representative of the idiom I usually use. As a bonus, into uses transients, which can create the resulting structure in fewer cycles / less time. On Saturday, February 1, 2014 10:00:33 AM UTC-8, Sam Ritchie wrote: Looks like Rich just chimed in with: keys order == vals order == seq order Matching Socks January 31, 2014 7:31 PM Actually, http://dev.clojure.org/jira/browse/CLJ-1302 keys and vals consistency not mentioned in docstring was declined, with the comment The absence of this property in the docs is correct. You should not rely on this. On Wednesday, August 11, 2010 6:03:39 PM UTC-4, Chouser wrote: -- 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. -- Sam Ritchie (@sritchie) Paddleguru Co-Founder 703.863.8561 www.paddleguru.com Twitter http://twitter.com/paddleguru // Facebookhttp://facebook.com/paddleguru -- 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. -- 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
Re: order of returned values from keys and vals
It also might help to notice KeySeq defines first/next, but never explicitly walks the seq. That's left to the user of the KeySeq. Thanks, Ambrose On Sun, Feb 2, 2014 at 12:18 PM, Michał Marczyk michal.marc...@gmail.comwrote: On 2 February 2014 05:14, Justin Smith noisesm...@gmail.com wrote: Pardon my ignorance but if this is producing a lazy result, how is it doing so? https://github.com/clojure/clojure/blob/dff9600387b962f16fc78e6477e10e34651fd366/src/jvm/clojure/lang/APersistentMap.java#L134 APersistentMap's KeySeq.create and ValSeq.create are pretty much equivalent to (map key entry-seq) and (map val entry-seq). The logic producing entry-seq lives in the individual map types and is indeed lazy. Cheers, Michał On Saturday, February 1, 2014 7:54:32 PM UTC-8, Ambrose Bonnaire-Sergeant wrote: zipmap could also potentially use transients (which would be a nice addition). keys/vals are also lazy, so I would be surprised if there was any performance difference with walking the seq twice. Thanks, Ambrose On Sun, Feb 2, 2014 at 11:35 AM, Justin Smith noise...@gmail.comwrote: Realistically, how many situations are there where running keys and vals independently is preferable to running seq once and using the two element vectors that returns? Usually this way one can avoid walking the whole thing twice. (into {} (map (fn [[k v]] [k (inc v)]) {:a 0 :b 1})) is representative of the idiom I usually use. As a bonus, into uses transients, which can create the resulting structure in fewer cycles / less time. On Saturday, February 1, 2014 10:00:33 AM UTC-8, Sam Ritchie wrote: Looks like Rich just chimed in with: keys order == vals order == seq order Matching Socks January 31, 2014 7:31 PM Actually, http://dev.clojure.org/jira/browse/CLJ-1302 keys and vals consistency not mentioned in docstring was declined, with the comment The absence of this property in the docs is correct. You should not rely on this. On Wednesday, August 11, 2010 6:03:39 PM UTC-4, Chouser wrote: -- 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. -- Sam Ritchie (@sritchie) Paddleguru Co-Founder 703.863.8561 www.paddleguru.com Twitter http://twitter.com/paddleguru // Facebookhttp://facebook.com/paddleguru -- 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
Re: GSoC 2014: org applications now open
Hi Daniel, Thanks for chasing this up. I will volunteer for mentoring and any administration that needs doing. I'll send you my username. Thanks, Ambrose On Tue, Feb 4, 2014 at 3:59 AM, Daniel Solano Gómez cloj...@sattvik.comwrote: Hello, all, Apparently, it's already time for organisations to apply for Google Summer of Coder 2014 [1]. This is a great program, and there have been several notable projects that have benefited as a result. For example, last year's successful projects included: * Enhance Neko for Android, Alexander Yakushev * core.typed: Extensions and Documentation, Ambrose Bonnaire-Sergeant * Clojure Compiler port to Clojure (CinC), Bronsa * Implementation of core.matrix-compatible multidimensional array in Clojure, Dmitry Groshev * Algebraic Expressions, Maik Schünemann * ClojureScript optimization and source maps support, Michal Marczyk I would love to see Clojure participate again this year. In order to do so, we need to start our application which is due in less than two weeks. We need volunteers to help prepare our application, and in particular it would be great to have administrators that can help lead the process. I am certainly willing to help out, but if there is someone who wants to lead up this effort, I would happy to assist. Ideally, we could have multiple administrators to spread out the following duties: * Updating the community wiki for the year [2] * Recruiting potential mentors * Raising the profile of GSoC within the community If we are accepted as a GSoC organisation, administrator duties include: * Ensuring we meet the deadlines * Arranging for travel to the mentor submit * Arranging for students' travel to conferences * If necessary, solve problems I am afraid that last year I let the ball drop a bit with the mentor summit and getting students to conferences. With multiple administrators to help spread the work around, I am sure we can make GSoC an even better experience for everyone involved. If you are interested in helping out in this effort, please set up a profile on Melange [3] and e-mail me your profile name. Thanks for your help. Sincerely, Daniel [1]: http://google-opensource.blogspot.com/2014/02/mentoring-organization-applications-now.html [2]: http://dev.clojure.org/display/community/Google+Summer+of+Code+2013 [3]: http://en.flossmanuals.net/melange/ -- 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.
jvm.tools.analyzer 0.6.1
Hi, jvm.tools.analyzer 0.6.1 now supports ClojureScript 0.0-2138. [org.clojure/jvm.tools.analyzer 0.6.1] README https://github.com/clojure/jvm.tools.analyzer/blob/master/README.md 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.
Re: GSoC 2014: We need ideas and mentors
Thank Nikita, added. Ambrose On Fri, Feb 7, 2014 at 9:17 PM, Nikita Beloglazov nikelandj...@gmail.comwrote: Hi I don't have editing rights for wiki so I post project idea here: *Quil on ClojureScript**Brief explanation: *Quilhttp://github.com/quil/quilis a drawing and animation library for clojure. It is basically wrapper over Processing http://processing.org. Currently Quil works only on vanilla clojure (JVM based). It would be cool to have it also on ClojureScript. Processing already have javascript version: Processing.jshttp://processingjs.org, so it can be used for our goals. *Expected results: *quil clojurescript library capable of running regular quil sketches, documentation how to use it in clojurescript project. *Knowledge prerequisites: *familiarity with clojurescript, javascript *Skill level: *medium *Mentor: *Nikita Beloglazov (nikelandj...@gmail.com) Thank you, Nikita On Wednesday, February 5, 2014 6:19:55 PM UTC, Daniel Solano Gómez wrote: Hello, all, It's time once again to prepare our application for Google Summer of Code, a program where Google pays students from around the world to work on open source projects. Clojure has successfully participated in the program for two years now, and I would love to make it a third. GSoC has helped projects like Typed Clojure, Clojure in Clojure, Clojure on Android, core.matrix, and ClojureScript. In order to have a strong application, we need you to help populate our project ideas page [1]. You can also review the ideas for 2012 [2] and 2013 [3] to help you come up with new ideas. Having a great ideas page is key to a successful application, and having many members from the community participate as potential mentors will be a big boost. At this point, you are not committing to anything--we just need your ideas. If you don't have edit rights to the wiki and don't want to sign up for an account, just post to the mailing list using '[GSoC Idea]' in the subject line, and I'll add it for you. Lastly, if you would like to review the answers to the organization application [4], I would appreciate the input. The application deadline the 14th of February. Thank you for time and ideas. Sincerely, Daniel [1]: http://dev.clojure.org/display/community/Project+Ideas [2]: http://dev.clojure.org/display/community/Google+Summer+of+Code+2012 [3]: http://dev.clojure.org/display/community/Project+Ideas+2013 [4]: http://dev.clojure.org/display/community/Mentoring+ Organization+Application -- 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: map semantics
On Sun, Feb 9, 2014 at 12:40 AM, Andy C andy.coolw...@gmail.com wrote: Every persistent collection in Clojure supports conversion to the sequence of items. This is clearly documented in the official docs and there is no surprise here. Would you mind to point me to that piece where doc describes what order seq chooses when converting a set to it. (I honestly tried to find it but could not.) The seq order is undefined for non-sequential, unsorted collections like clojure.lang.PersistentHashSet (the result of clojure.core/{hash-,}set). 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.
dynalint, lein-dynalint 0.1.3
Hi, dynalint 0.1.3 has a bunch of improvements. You can now configure linting with `configure-linting!`. Stack traces now look a lot nicer, dynalint wrappers should disappear ( example https://github.com/frenchy64/dynalint#errors). lein-dynalint 0.1.3 has a BREAKING CHANGE. The dynalint version must now be specified manually in your profiles.clj or similar. See the respective changelogs for more details. [com.ambrosebs/dynalint 0.1.3] dynalint README https://github.com/frenchy64/dynalint dynalint CHANGELOG https://github.com/frenchy64/lein-dynalint lein-dynalint README https://github.com/frenchy64/lein-dynalint lein-dynalint CHANGELOGhttps://github.com/frenchy64/lein-dynalint/blob/master/CHANGELOG.md Enjoy! 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.
[ANN] vim-typedclojure
Hi, Good news for core.typed + vim users (which includes me)! Check out vim-typedclojurehttps://github.com/typedclojure/vim-typedclojurefor some fun. Big thanks to Tim Pope for vim-fireplacehttps://github.com/typedclojure/vim-typedclojure and all his vim plugins of which I've copied the format and style liberally from. Enjoy! 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.
lein-dynalint 0.1.4
Hi, lein-dynalint 0.1.4 is a little more robust. It now outputs results under target/dynalint-output, and always outputs results even when tests fail (writing the output is now in a try/finally). There is a nicer error message when the dynalint dependency is missing. README https://github.com/frenchy64/lein-dynalint CHANGELOGhttps://github.com/frenchy64/lein-dynalint/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.
[$Bounty] Emacs plugin for Typed Clojure
Hi, I need a relatively straightforward Emacs plugin for Typed Clojure written. I'm offering a $200US bounty. If you would also like to see this, please bump up the $$. If you're interested in claiming, see the bounty pagehttps://www.bountysource.com/issues/1406536-emacs-plugin-for-typed-clojure and the Jira issue http://dev.clojure.org/jira/browse/CTYP-103 for a brief description. Please comment or email me if you are interested. 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.
Re: [$Bounty] Emacs plugin for Typed Clojure
Hi John, Wow! One thing, if clojure.core.typed is aliases in the current namespace, then the ann* refactor should use that alias. If there is no alias, then use the fully qualified namespace. If the var is referred into the current ns-map, then use the fully qualified namespace or a namespace alias prefix if available. Thanks, Ambrose On Wed, Feb 12, 2014 at 3:18 PM, john walker john.lou.wal...@gmail.comwrote: I'm still on my first cup, so let me know what you think: https://github.com/johnwalker/typed-clojure-el On Tuesday, February 11, 2014 12:01:36 PM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi, I need a relatively straightforward Emacs plugin for Typed Clojure written. I'm offering a $200US bounty. If you would also like to see this, please bump up the $$. If you're interested in claiming, see the bounty pagehttps://www.bountysource.com/issues/1406536-emacs-plugin-for-typed-clojure and the Jira issue http://dev.clojure.org/jira/browse/CTYP-103 for a brief description. Please comment or email me if you are interested. 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. -- 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: [$Bounty] Emacs plugin for Typed Clojure
Hi John, I don't mind that ns-aliases can go out of date. Please use the output of ns-alias as authoritative, and make a documentation note of this quirk. Thanks, Ambrose On Wed, Feb 12, 2014 at 4:03 PM, john walker john.lou.wal...@gmail.comwrote: Ahh, this turned out to be fairly interesting. My first thought was to check the aliases using (ns-alias), but it turns out that re-evaluating a namespace after removing the alias leaves the original aliases in place. So I'm just going to use a regex, which is probably easier anyway. On Wednesday, February 12, 2014 2:29:31 AM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi John, Wow! One thing, if clojure.core.typed is aliases in the current namespace, then the ann* refactor should use that alias. If there is no alias, then use the fully qualified namespace. If the var is referred into the current ns-map, then use the fully qualified namespace or a namespace alias prefix if available. Thanks, Ambrose On Wed, Feb 12, 2014 at 3:18 PM, john walker john.lo...@gmail.comwrote: I'm still on my first cup, so let me know what you think: https://github.com/johnwalker/typed-clojure-el On Tuesday, February 11, 2014 12:01:36 PM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi, I need a relatively straightforward Emacs plugin for Typed Clojure written. I'm offering a $200US bounty. If you would also like to see this, please bump up the $$. If you're interested in claiming, see the bounty pagehttps://www.bountysource.com/issues/1406536-emacs-plugin-for-typed-clojure and the Jira issue http://dev.clojure.org/jira/browse/CTYP-103 for a brief description. Please comment or email me if you are interested. Thanks, Ambrose -- 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: [$Bounty] Emacs plugin for Typed Clojure
Hi John, I gave it a whirl, it's exactly what I wanted. When you're ready please claim the bounty. Thanks, Ambrose On Wed, Feb 12, 2014 at 4:46 PM, john walker john.lou.wal...@gmail.comwrote: Well, that was easy to find. It will be fixed in the next version of clojure mode. If you are impatient, do C-h f clojure-match-next-def, click on clojure-mode.el and replace the line (when (re-search-backward ^(def\sw* nil t) with (when (re-search-backward ^(def\\sw* nil t) then recompile your clojure-mode.el. This probably will not exist after the February 1st snapshot. Source: https://github.com/clojure-emacs/clojure-mode/commit/32feee877233a4d98fb934dcbd42789e56dac790 On Wednesday, February 12, 2014 3:24:12 AM UTC-5, john walker wrote: Added. The next big thing I see is fixing which-function. On Wednesday, February 12, 2014 3:07:44 AM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi John, I don't mind that ns-aliases can go out of date. Please use the output of ns-alias as authoritative, and make a documentation note of this quirk. Thanks, Ambrose On Wed, Feb 12, 2014 at 4:03 PM, john walker john.lo...@gmail.comwrote: Ahh, this turned out to be fairly interesting. My first thought was to check the aliases using (ns-alias), but it turns out that re-evaluating a namespace after removing the alias leaves the original aliases in place. So I'm just going to use a regex, which is probably easier anyway. On Wednesday, February 12, 2014 2:29:31 AM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi John, Wow! One thing, if clojure.core.typed is aliases in the current namespace, then the ann* refactor should use that alias. If there is no alias, then use the fully qualified namespace. If the var is referred into the current ns-map, then use the fully qualified namespace or a namespace alias prefix if available. Thanks, Ambrose On Wed, Feb 12, 2014 at 3:18 PM, john walker john.lo...@gmail.comwrote: I'm still on my first cup, so let me know what you think: https://github.com/johnwalker/typed-clojure-el On Tuesday, February 11, 2014 12:01:36 PM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi, I need a relatively straightforward Emacs plugin for Typed Clojure written. I'm offering a $200US bounty. If you would also like to see this, please bump up the $$. If you're interested in claiming, see the bounty pagehttps://www.bountysource.com/issues/1406536-emacs-plugin-for-typed-clojure and the Jira issue http://dev.clojure.org/jira/browse/CTYP-103 for a brief description. Please comment or email me if you are interested. Thanks, Ambrose -- 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 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
Re: [$Bounty] Emacs plugin for Typed Clojure
I guess it takes awhile to propagate to BountySource. Did you have any projects in mind for GSoC? Perhaps more Typed Clojure work? Thanks, Ambrose On Wed, Feb 12, 2014 at 11:32 PM, john walker john.lou.wal...@gmail.comwrote: OK, thanks! I realigned the repository name / filename / modename to be both more correct and compliant with your fork. My version can now be seen here: https://github.com/johnwalker/typed-clojure-mode I didn't immediately see how to claim a bounty, but I see that the issue has to be marked as resolved first. I'm going to send in a CA tonight too, since I was planning on trying gsoc anyway. On Wednesday, February 12, 2014 6:44:08 AM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi John, I gave it a whirl, it's exactly what I wanted. When you're ready please claim the bounty. Thanks, Ambrose On Wed, Feb 12, 2014 at 4:46 PM, john walker john.lo...@gmail.comwrote: Well, that was easy to find. It will be fixed in the next version of clojure mode. If you are impatient, do C-h f clojure-match-next-def, click on clojure-mode.el and replace the line (when (re-search-backward ^(def\sw* nil t) with (when (re-search-backward ^(def\\sw* nil t) then recompile your clojure-mode.el. This probably will not exist after the February 1st snapshot. Source: https://github.com/clojure- emacs/clojure-mode/commit/32feee877233a4d98fb934dcbd42789e56dac790 On Wednesday, February 12, 2014 3:24:12 AM UTC-5, john walker wrote: Added. The next big thing I see is fixing which-function. On Wednesday, February 12, 2014 3:07:44 AM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi John, I don't mind that ns-aliases can go out of date. Please use the output of ns-alias as authoritative, and make a documentation note of this quirk. Thanks, Ambrose On Wed, Feb 12, 2014 at 4:03 PM, john walker john.lo...@gmail.comwrote: Ahh, this turned out to be fairly interesting. My first thought was to check the aliases using (ns-alias), but it turns out that re-evaluating a namespace after removing the alias leaves the original aliases in place. So I'm just going to use a regex, which is probably easier anyway. On Wednesday, February 12, 2014 2:29:31 AM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi John, Wow! One thing, if clojure.core.typed is aliases in the current namespace, then the ann* refactor should use that alias. If there is no alias, then use the fully qualified namespace. If the var is referred into the current ns-map, then use the fully qualified namespace or a namespace alias prefix if available. Thanks, Ambrose On Wed, Feb 12, 2014 at 3:18 PM, john walker john.lo...@gmail.comwrote: I'm still on my first cup, so let me know what you think: https://github.com/johnwalker/typed-clojure-el On Tuesday, February 11, 2014 12:01:36 PM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi, I need a relatively straightforward Emacs plugin for Typed Clojure written. I'm offering a $200US bounty. If you would also like to see this, please bump up the $$. If you're interested in claiming, see the bounty pagehttps://www.bountysource.com/issues/1406536-emacs-plugin-for-typed-clojure and the Jira issue http://dev.clojure.org/jira/browse/CTYP-103 for a brief description. Please comment or email me if you are interested. Thanks, Ambrose -- 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 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 clo...@googlegroups.com Note that posts from new members are moderated - please be patient with your first
Re: Clojure pre assertion functions does not work with keyword?
Hi Mamun, This is the correct syntax (you're missing some parens). (defn check-keyword [v] {:pre [(keyword? v)]} v) Thanks, Ambrose On Thu, Feb 13, 2014 at 6:47 PM, Mamun mamuni...@gmail.com wrote: Hi I am just testing clojure :pre condition. But look like using keyword?, it is not working in clojure 1.5.1. (defn check-keyword [v] {:pre [keyword? v]} v) (defn check-nil [v] {:pre [nil? v]} v) (check-keyword sdf) ;Not throwing exception here (check-nil nil) ;Throwing exception Br, Mamun -- 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: Clojure pre assertion functions does not work with keyword?
It doesn't work, in your OP it incorrectly throws an exception when you pass it nil. :pre just takes a sequence of expressions which are executed like `do`, and throws an exception if any expression returns a false value. Thanks, Ambrose On Thu, Feb 13, 2014 at 7:53 PM, Mamun mamuni...@gmail.com wrote: HI Ambrose, Thanks for your reply. But why this one is working? (defn check-nil [v] {:pre [nil? v]} v) Br, Mamun On Thursday, February 13, 2014 11:51:31 AM UTC+1, Ambrose Bonnaire-Sergeant wrote: Hi Mamun, This is the correct syntax (you're missing some parens). (defn check-keyword [v] {:pre [(keyword? v)]} v) Thanks, Ambrose On Thu, Feb 13, 2014 at 6:47 PM, Mamun mamu...@gmail.com wrote: Hi I am just testing clojure :pre condition. But look like using keyword?, it is not working in clojure 1.5.1. (defn check-keyword [v] {:pre [keyword? v]} v) (defn check-nil [v] {:pre [nil? v]} v) (check-keyword sdf) ;Not throwing exception here (check-nil nil) ;Throwing exception Br, Mamun -- 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.
[ANN] typed-clojure-mode emacs plugin
Hi, Happy to announce the first version of typed-clojure-modehttps://github.com/typedclojure/typed-clojure-mode, an emacs minor mode for Typed Clojure. Thanks to John Walker who wrote the core functionality, he earned this open source bountyhttps://www.bountysource.com/issues/1406536-emacs-plugin-for-typed-clojurefor his work. I'll be maintaining typed-clojure-mode from here, please open an issuehttps://github.com/typedclojure/typed-clojure-mode/issuesor get in touch if something is broken or missing. 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.
Re: [ANN] seqspert - demystify the internals of Clojure Sequences
Nice, thanks for releasing! Ambrose On Fri, Feb 21, 2014 at 5:47 AM, Jules jules.gosn...@gmail.com wrote: I've been teaching myself a bit about the internals of various Clojure seqs over the last week or so... maps, sets, vectors etc.. I started with a little Clojure to help me drill into the Seq POJOS - this quickly grew into Seqspert :-) I think that if you want to write performant code, you need to understand a bit about your hardware (mechanical sympathy), the JVM and the Clojure runtime. The Seqs are a large part of this and Seqspert will help you quickly understand how they work. Please take a look: https://github.com/JulesGosnell/seqspert.git regards, Jules -- 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: Question about map destrustures
Hi, There's no core function for this (would probably be called mapply). Try calling (apply concat m) on your map, then passing with (apply a (apply concat m)). Thanks, Ambrose On Mon, Feb 24, 2014 at 10:34 PM, bob wee@gmail.com wrote: Hi, There is a function a (defn a [ {:as m}] (println m)) it accepts pair of params , for example (a :k 1 :j 2), however now I have a map {:k 1 :j 2}, the question is how to convert the map to be accepted by a? Thanks -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/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: [ANN] clojure.test.check (previously, simple-check)
Congrats! Ambrose On Fri, Feb 28, 2014 at 1:22 AM, Reid Draper reiddra...@gmail.com wrote: I'm happy to announce the first release of the newest Clojure contrib library: test.check [1]. Previously named simple-check [1], test.check is a property-based testing library, based on QuickCheck. The README has a guide for migrating from simple-check, as well as some getting-started documentation. I'm happy to answer any questions here as well. Or, stop by my Clojure/West talk in March. [1] https://github.com/clojure/test.check [2] https://github.com/reiddraper/simple-check -- 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: A faster clojure startup
Sounds promising, looking forward to testing the clojure-jvm patch! Ambrose On Sat, Mar 1, 2014 at 12:08 AM, Gal Dolber g...@dolber.com wrote: No, its a bit more than that, but it shouldn't be hard to port. The changes already generate the right bytecode. I'm working a clean patch for clojure-jvm that should work on android. On Fri, Feb 28, 2014 at 12:58 PM, Adam Clements adam.cleme...@gmail.comwrote: This sounds like an awesome shortcut to speeding things up on android/ios while we're waiting for CinC and friends. Do you know how much work it would be to port your changes to clojure-android and try it out there? I'd be very interested to test it out and do some debugging on android. Is it just a tweaked Var class or is there more to it? Adam On Fri, Feb 28, 2014 at 3:16 PM, Gal Dolber g...@dolber.com wrote: Here're some notes on the lean compiler I've been working on for clojure-objc http://galdolber.tumblr.com/post/78110050703/reduce-startup Feedback's welcome -- 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. -- 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: case statement and java constants
I'm not 100% sure if this works, but have you tried writing a macro that gets the Java field value, and inserting into the case statement? (defmacro motion-case [...] `(case .. ~MotionEvent/ACTION_POINTER_DOWN ... ~ MotionEvent/ACTION_UP ... )) On Sat, Mar 1, 2014 at 12:15 AM, Adam Clements adam.cleme...@gmail.comwrote: I'm having some trouble with java constants in a case statement. I know I could use condp, but these are things I could put in a java switch statement and so it's annoying to give up constant time dispatch: (case (.getActionMasked event) MotionEvent/ACTION_POINTER_DOWN :down MotionEvent/ACTION_UP :up MotionEvent/ACTION_POINTER_UP :up MotionEvent/ACTION_MOVE :move MotionEvent/ACTION_CANCEL :cancel MotionEvent/ACTION_OUTSIDE :outside :none)) Always gives me :none because java constants aren't literals, it dispatches on the symbol instead. Is there a way to do this without resorting to condp = or am I stuck? Should this be a something that case handles by default? I can't think of a reason these couldn't be converted to literals... Thanks, Adam -- 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: case statement and java constants
IMO that would needlessly complicate an otherwise simple construct, especially since a simple macro can endlessly customise it. Thanks, Ambrose On Sat, Mar 1, 2014 at 12:40 AM, Adam Clements adam.cleme...@gmail.comwrote: That works perfectly, thanks! It does feel like it should just work as a normal case statement though, where the value is static final, and warn if it isn't. Is there a good reason this shouldn't be supported by the case statement that anyone can think of? Worth filing an enhancement request on clojure core? Thanks, Adam Adam On Fri, Feb 28, 2014 at 4:21 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: I'm not 100% sure if this works, but have you tried writing a macro that gets the Java field value, and inserting into the case statement? (defmacro motion-case [...] `(case .. ~MotionEvent/ACTION_POINTER_DOWN ... ~ MotionEvent/ACTION_UP ... )) On Sat, Mar 1, 2014 at 12:15 AM, Adam Clements adam.cleme...@gmail.comwrote: I'm having some trouble with java constants in a case statement. I know I could use condp, but these are things I could put in a java switch statement and so it's annoying to give up constant time dispatch: (case (.getActionMasked event) MotionEvent/ACTION_POINTER_DOWN :down MotionEvent/ACTION_UP :up MotionEvent/ACTION_POINTER_UP :up MotionEvent/ACTION_MOVE :move MotionEvent/ACTION_CANCEL :cancel MotionEvent/ACTION_OUTSIDE :outside :none)) Always gives me :none because java constants aren't literals, it dispatches on the symbol instead. Is there a way to do this without resorting to condp = or am I stuck? Should this be a something that case handles by default? I can't think of a reason these couldn't be converted to literals... Thanks, Adam -- 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. -- 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: map and lazy sequence
Hi Andy, Lazy sequences are realised in chunks of 32. You can see this by running: (take 1 (map prn (range))) (0 1 .. 30 31 nil) Thanks, Ambrose On Sat, Mar 1, 2014 at 1:04 AM, Andy Smith the4thamig...@googlemail.comwrote: Hi, Can someone correct my misunderstanding here. I was lead to believe that map produced a lazy sequence, so why do I get three printed trace lines in the following code : user= (take 1 (map #(do (println (str trace: %)) %) [1 2 3])) (trace:1 trace:2 trace:3 1) Thanks for your help Andy -- 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: [ANN] avi: A lively vi. 0.1.0
Hi Jason, Angela, Wow, looks like fun! It would be nice just have to specify the install prefix path once, instead of in the bash and install.clj file. Also the bin directory needs to be manually created (same with the prefix directory). I tried running the executable, I got this: ambrose@ambrose-VirtualBox:~/avi/bin$ ./avi Exception in thread main java.lang.UnsatisfiedLinkError: no avi_terminal_Screen in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709) at java.lang.Runtime.loadLibrary0(Runtime.java:844) at java.lang.System.loadLibrary(System.java:1051) at avi.terminal.Screen.start(Screen.java:6) at avi.core$_main.doInvoke(core.clj:43) at clojure.lang.RestFn.invoke(RestFn.java:397) at clojure.lang.AFn.applyToHelper(AFn.java:159) at clojure.lang.RestFn.applyTo(RestFn.java:132) at avi.core.main(Unknown Source) Thanks, Ambrose On Sun, Mar 2, 2014 at 12:25 PM, Jason Felice jason.m.fel...@gmail.comwrote: From https://github.com/maitria/avi Avi is a vi written in Clojure. It's currently very basic and read-only, but has solved the hardest problems first (JNI terminal writing, installation, booting the JVM). It currently supports h,j,k,l,^E,^Y,$,^,0,G,:q and command repeat counts. *Vision* A lively vi with support for incremental compilation, deep language integration and source navigation, realtime shells and REPLs, and plugins, written so *it* can be a plugin in other IDEs. *Guiding Principles* - Test driven. All functionality covered by tests. - Don't defeat vim muscle memory. - Code is for people. Be expressive as hell. - Be friendly. Especially to noobs. Thanks! We'd love to hear any and all feedback. -Jason Angela -- 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: transient map bug?
It's undefined behaviour; you should use assoc! like assoc. Ambrose On Thu, Mar 6, 2014 at 11:16 PM, Sergey Kupriyanov sku...@gmail.com wrote: Thanks for the answers. It's not my real code. It's just trivial demo for the bug report. I can rewrite it with no problems, but the question is - is it normal behavior or is it bug in transient map? -- 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.
Request for Mentors for GSoC Projects
Hi, I have a handful of projects (steadily increasing) lined up for GSoC 2014. Of course at this stage they haven't been accepted, since student allocations are still a few weeks away, however there are enthusiastic students waiting in the wings. I would be grateful for help mentoring these projects. I'm looking for mentors who have a good history of Clojure involvement, and/or relevant experience in the project areas. I'm looking for 2-3 mentors per project, including myself. GSoC provides $500US per student/project for mentors, which will be split evenly between them. There's a trail of information about mentoring herehttp://dev.clojure.org/display/community/Google+Summer+of+Code+2014#GoogleSummerofCode2014-Mentors. The timeline for this year is herehttps://www.google-melange.com/gsoc/events/google/gsoc2014. About 1-5 hours a week is needed during the project period (May-August). If you're interested, you can do one of: - email me - respond to this post - request to be a Clojure mentor on Melangehttp://www.google-melange.com/gsoc/homepage/google/gsoc2014, noting which project you're interested in GSoC FAQhttp://www.google-melange.com/gsoc/document/show/gsoc_program/google/gsoc2014/help_page Here's a brief summary of the projects lined up (with students). Note the mentor requirements indicate what the mentor should know by May, when the project starts proper. Dynalint: Improved runtime errors and identification of undefined behaviour for Clojure and ClojureScript Goals - extend Dynalint - get it working on ClojureScript and extend Required for mentor - Familiar with most standard Clojure idioms - Familiarity with Clojure standard library Typed Clojure Beginner Tutorial, Annotations Error Messages Goals - small tutorial for core.typed - annotations for external libraries - work on identifying bad error messages in core.typed + improvements Required for mentor - experience with or willing to learn basics of Typed Clojure, enough to observe the student's progress Typed Clojure Core Annotations Goals - annotate all remaining namespaces included in the Clojure jar Required for mentor - Familiarity with Clojure's core library - basic Typed Clojure knowledge (how to annotate and check some namespaces) Typed Clojure: Heterogeneous operations Dotted Polymorphism Goals - extend and improve Clojure's heterogeneous operations eg. assoc-in/update-in - express heterogeneous operations on the type level eg. Assoc, Merge, Dissoc - extend dotted polymorphism to handle the common pattern variable arguments increase by 2 (like assoc) Required for mentor - Good knowledge on the heterogeneous operations Typed Clojure currently provides (not particularly internals) - Familiarity with local type inferencehttp://www.cis.upenn.edu/~bcpierce/papers/lti.pdf - Familiarity with dotted polymorphismhttp://www.ccs.neu.edu/racket/pubs/esop09-sthf.pdf(like the type for clojure.core/map) Typed Clojure: Occurrence Typing Goals - improve on the existing occurrence typing implementation - better proposition compacting - implement aliasing propositions (these two local bindings are aliased, therefore they have the same type) - investigate how paths interact with aliases (bindings `a` and `b` are aliased, we update `a` via (number? (- a :a :b :c)), we now should update `b`) Required for mentor - Familiarity with occurrence typinghttp://www.ccs.neu.edu/racket/pubs/icfp10-thf.pdf - Familiarity with local type inferencehttp://www.cis.upenn.edu/~bcpierce/papers/lti.pdf Typed ClojureScript Annotations Goals - annotate core ClojureScript libraries - annotate some external libraries Required for mentor - Familiarity with Typed Clojure types - Familiarity with ClojureScript, the core libraries and idioms Typed ClojureScript Implementation Goals - a useful implementation of Typed ClojureScript Required for mentor - Familiarity of Clojure ClojureScript - Familiarity with ClojureScript compiler/analyzer - Some experience with static analysis -- Please get in touch if you need more information. 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/d/optout.
Re: declare and def
Wasn't aware of that. Looks like it's being used here https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L401 Thanks, Ambrose On Thu, Mar 13, 2014 at 10:14 PM, Gal Dolber g...@dolber.com wrote: #'declare adds extra meta to the var {:declared true} I don't think it's being used right now, but it can be specially handled by the compiler, for example, to ignore the #'declare stataments from the emitted bytecode, I'm experimenting with this here: https://github.com/galdolber/clojurefast/commit/649672baede3e0f1cc8b3e9e42b6e899927a9c09 On Thu, Mar 13, 2014 at 10:57 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: No difference, but declare can take multiple vars as arguments. Thanks, Ambrose On Thu, Mar 13, 2014 at 9:51 PM, Plínio Balduino pbaldu...@gmail.comwrote: Hi there Is there any difference between declare and def when I'm making a forward declaration? Thanks Plínio -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [GSoC] Codexes project
Hi Morg, There's still time left, hopefully Jamie will chime in on the list. Thanks, Ambrose On Sun, Mar 16, 2014 at 7:17 PM, Morgawr Havenlost morg...@gmail.comwrote: Hello everybody :) I might be a bit too late, but I was interested in having a look at the Codexes project for the GSoC 2014 (as linked here http://dev.clojure.org/display/community/Project+Ideas ), however I do not know how to contact the mentor or how to find him (irc?), what are the required steps before submitting a proper proposal/application? I'm still a bit new to GSoC so I'm sorry if this is the wrong place to ask! Morg. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [GSoC] Mentor for self-hosting ClojureScript compiler project?
Hi Max, Seems like an interesting project. I suggest submitting a proposal on Melange and we can work out the details there, since student applications close soon. Please follow the guidelineshttp://dev.clojure.org/display/community/Student+application+guidelines . Thanks, Ambrose On Tue, Mar 18, 2014 at 9:56 PM, Timothy Baldridge tbaldri...@gmail.comwrote: Unfortunately, a prerequisite to this project would most likely be replacing the ClojureScript analyzer with the tools.analyzer. There is already a proposal for this work in GSOC. Perhaps some collaboration is possible? In addition there would probably need to be some talk around how to handle large code sizes as the minification provided by google closure is a major boon to performance. Just some thoughts Timothy Baldridge On Tue, Mar 18, 2014 at 12:42 AM, Max Kreminski maxkremin...@gmail.comwrote: Hello all, I'm applying to GSoC this year, and I'm interested in taking the opportunity to go full-speed on a project I've been toying with on the side for the last month or so now. Specifically, I'm interested in writing a self-hosting ClojureScript compiler - either by forking the current ClojureScript codebase and making whatever changes are necessary to get it to compile itself, or by putting way more time and energy into the toy CLJS compiler I've been writing from the ground up in my spare time. It's an ambitious project either way, but I've been pleasantly surprised enough by my progress so far that it seems to be within reach. You can see the progress I've made lately on Ceci, the aforementioned toy CLJS compiler, at http://github.com/mkremins/ceci. Fair warning: it's pretty rusty, and a lot of functionality is just plain missing or unsupported at the moment - patching up some of these holes could be part of my summer work if my application gets accepted :) Is anyone interested in mentoring this or a similar project? I'd love to chat. Thanks, Max -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- One of the main causes of the fall of the Roman Empire was that-lacking zero-they had no way to indicate successful termination of their C programs. (Robert Firth) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST
I think I found a difference between 1.5.1-1.6.0-RC1. (compile 'cljs.core) fails with a NPE in 1.6.0-RC1. I realise this isn't particularly supported by CLJS, but it still worked in 1.5.1. https://github.com/frenchy64/clojure-16-fail Help narrowing this is appreciated. Thanks, Ambrose On Wed, Mar 19, 2014 at 3:05 AM, Alex Miller a...@puredanger.com wrote: Thanks Ken! You're the cheese on my nachos. On Tuesday, March 18, 2014 12:45:46 PM UTC-5, Ken Barber wrote: We had some bugs related to assumed ordering in our code which 1.6.0-RC1 surfaced (https://github.com/puppetlabs/puppetdb/pull/887), otherwise everything looks good for our project - thanks for all the hard work on this release. ken. On Tue, Mar 18, 2014 at 2:21 PM, Alex Miller al...@puredanger.com wrote: Hello all, We would love to release Clojure 1.6.0 final soon. We need your help in checking out the current release candidate - this is your opportunity to let us know about problems *before* we release, rather than after. Try it via - Download: http://central.maven.org/maven2/org/clojure/clojure/1. 6.0-RC1 - Leiningen: [org.clojure/clojure 1.6.0-RC1] See the full change log here: https://github.com/clojure/clojure/blob/master/changes.md If you have questions, feel free to drop them here. For issues, please log them in JIRA. Alex -- 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/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST
I believe this is because cljs.core defines unsigned-bit-shift-right, which now conflicts with clojure.core/unsigned-bit-shift-right (added with 1.6.0). 1.6.0 doesn't seem to break anything here, aside from adding to clojure.core. Thanks, Ambrose On Wed, Mar 19, 2014 at 3:12 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: I think I found a difference between 1.5.1-1.6.0-RC1. (compile 'cljs.core) fails with a NPE in 1.6.0-RC1. I realise this isn't particularly supported by CLJS, but it still worked in 1.5.1. https://github.com/frenchy64/clojure-16-fail Help narrowing this is appreciated. Thanks, Ambrose On Wed, Mar 19, 2014 at 3:05 AM, Alex Miller a...@puredanger.com wrote: Thanks Ken! You're the cheese on my nachos. On Tuesday, March 18, 2014 12:45:46 PM UTC-5, Ken Barber wrote: We had some bugs related to assumed ordering in our code which 1.6.0-RC1 surfaced (https://github.com/puppetlabs/puppetdb/pull/887), otherwise everything looks good for our project - thanks for all the hard work on this release. ken. On Tue, Mar 18, 2014 at 2:21 PM, Alex Miller al...@puredanger.com wrote: Hello all, We would love to release Clojure 1.6.0 final soon. We need your help in checking out the current release candidate - this is your opportunity to let us know about problems *before* we release, rather than after. Try it via - Download: http://central.maven.org/maven2/org/clojure/clojure/1. 6.0-RC1 - Leiningen: [org.clojure/clojure 1.6.0-RC1] See the full change log here: https://github.com/clojure/clojure/blob/master/changes.md If you have questions, feel free to drop them here. For issues, please log them in JIRA. Alex -- 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/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST
FYI `mvn test` will fail on core.typed because of this issue. I believe it otherwise passes. Ambrose On Wed, Mar 19, 2014 at 3:45 AM, Alex Miller a...@puredanger.com wrote: Yeah, that's a thing. I think the name was chosen intentionally to be the same across those as cljs had it first. On Tuesday, March 18, 2014 2:29:04 PM UTC-5, Ambrose Bonnaire-Sergeant wrote: I believe this is because cljs.core defines unsigned-bit-shift-right, which now conflicts with clojure.core/unsigned-bit-shift-right (added with 1.6.0). 1.6.0 doesn't seem to break anything here, aside from adding to clojure.core. Thanks, Ambrose On Wed, Mar 19, 2014 at 3:12 AM, Ambrose Bonnaire-Sergeant abonnair...@gmail.com wrote: I think I found a difference between 1.5.1-1.6.0-RC1. (compile 'cljs.core) fails with a NPE in 1.6.0-RC1. I realise this isn't particularly supported by CLJS, but it still worked in 1.5.1. https://github.com/frenchy64/clojure-16-fail Help narrowing this is appreciated. Thanks, Ambrose On Wed, Mar 19, 2014 at 3:05 AM, Alex Miller al...@puredanger.comwrote: Thanks Ken! You're the cheese on my nachos. On Tuesday, March 18, 2014 12:45:46 PM UTC-5, Ken Barber wrote: We had some bugs related to assumed ordering in our code which 1.6.0-RC1 surfaced (https://github.com/puppetlabs/puppetdb/pull/887), otherwise everything looks good for our project - thanks for all the hard work on this release. ken. On Tue, Mar 18, 2014 at 2:21 PM, Alex Miller al...@puredanger.com wrote: Hello all, We would love to release Clojure 1.6.0 final soon. We need your help in checking out the current release candidate - this is your opportunity to let us know about problems *before* we release, rather than after. Try it via - Download: http://central.maven.org/maven2/org/clojure/clojure/1. 6.0-RC1 - Leiningen: [org.clojure/clojure 1.6.0-RC1] See the full change log here: https://github.com/clojure/clojure/blob/master/changes.md If you have questions, feel free to drop them here. For issues, please log them in JIRA. Alex -- 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/d/optout. -- 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/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: every? expected behavior
It's very common for a sequence argument to also work with nil, with the same semantics as an empty sequence. They are completely different things but Clojure is sloppy in this regard. I believe this is intended. Thanks, Ambrose On Tue, Apr 8, 2014 at 2:08 PM, Jeff Mad jeff...@gmail.com wrote: Hi, I am new to Clojure, so please forgive me if this does not make sense. I was surprised to find out in the REPL that every? returns true if you pass in an empty or nil collection. user= (every? #(= 77 %) nil) true user= (every? #(= 77 %) '()) true I looked at the source for every? and it made sense to me why this happens given that every? is recursive and the termination condition is when coll runs out of items to process. Would it make more sense to define every? with a loop, or is the caller expected to know better than to call it with nil? Thanks, --jeff (defn every2? Returns true if (pred x) is logical true for every x in coll, else false. {:tag Boolean :added 1.0 :static true} [pred coll] (if (empty? coll) false (loop [c coll] (cond (nil? (seq c)) true (pred (first c)) (recur (next c)) :else false -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: The Cons in iterate's return value
Ah so it seems a lazy sequence implements IPending? Thanks, Ambrose On Thu, Apr 17, 2014 at 3:39 AM, gianluca torta giato...@gmail.com wrote: this issue on core.typed http://dev.clojure.org/jira/browse/CTYP-96 in particular the comment: This is starting to make me rethink what a clojure.core docstring means exactly by a lazy sequence cheers, Gianluca On Wednesday, April 16, 2014 6:45:01 PM UTC+2, Mars0i wrote: The docstring for iterate says that it returns a lazy sequence, but it returns a Cons wrapped around a LazySeq. This means, for example, that realized? can't be applied to what iterate returns. Is this a problem with the iterate docstring? Or should realized? be applicable to Conses? I assume that there's a good reason that iterate returns a Cons instead of a LazySeq. Clojure 1.6.0 user= (doc iterate) - clojure.core/iterate ([f x]) Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects nil user= (def xs (iterate inc 0)) #'user/xs user= (class xs) clojure.lang.Cons user= (class (rest xs)) clojure.lang.LazySeq user= (realized? (rest xs)) false user= (realized? xs) ClassCastException clojure.lang.Cons cannot be cast to clojure.lang.IPending clojure.core/realized? (core.clj:6883) user= (take 5 xs) (0 1 2 3 4) user= (realized? (rest xs)) true user= (realized? xs) ClassCastException clojure.lang.Cons cannot be cast to clojure.lang.IPending clojure.core/realized? (core.clj:6883) user= (doc realized?) - clojure.core/realized? ([x]) Returns true if a value has been produced for a promise, delay, future or lazy sequence. nil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ANN] analyze 0.3.0 - Hygienic transformation
IMO that's the job of a linter-style tool, which can be written easily with `analyze`. On Tue, Feb 12, 2013 at 11:58 PM, Michael Wood esiot...@gmail.com wrote: It might be useful, though, to be able to enable warnings for shadowed variables. On 12 February 2013 17:38, Timothy Baldridge tbaldri...@gmail.com wrote: This sort of pattern is used quite a lot in clojure (even in core): (let [data (if (string? data) (read-string data) data) data (if (string? (first data)) (first data) (next data)) data (if (string? (first data)) (first data) (next data))] data) Throwing exceptions on overridden variable names would not only break Clojure code, but also is very non-lispy. Timothy On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com wrote: it makes sense to not throw now that I think about it, when using _ instead of a I'm also thinking of cases like: = (let [a 1] (let [b 2 a 3] (println a b))) 3 2 nil is there something that would let me know I'm overwriting a ? I figure if something like this would slip by would be tough to track down On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esiot...@gmail.com wrote: On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote: what would this do: (let [a 1, a 2] a) becomes: (let [a 1, a123 2] a) or (let [a 1, a123 2] a123) or exception[I prefer] It would be the second option, i.e.: (let [a 1, a123 2] a123) The original code is valid, so it would not throw an exception. On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Processing a hygienic AST relieves the burden of worrying about shadowing of locals. Wherever a binding would normally be shadowed, it is instead renamed to a local binding currently not in scope. eg. (let [a 1, a a] a) becomes (let [a 1, a123 a] a123) It can be useful for those processing Clojure's analysis results. Thanks, Ambrose On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta kovas.bog...@gmail.com wrote: What is a hygienic AST? Thanks k On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi everyone, Happy to release analyze 0.3.0 with new hygienic code transformation capabilities. [analyze 0.3.0] In a line: analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy emit-hy) ((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922 Hygienic AST's have enabled large performance boosts in core.typed. I'm excited to see how it could be as useful to others. Note: hygienic AST's (those transformed with `analyze.hygienic/ast-hy` can be printed normally with `analyze.emit-form/emit-form`, and hygienically with `analyze.hygienic/emit-hy`. https://github.com/frenchy64/analyze 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 . -- -- 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
Re: [ANN] analyze 0.3.0 - Hygienic transformation
Jonas already has another project which uses analyze https://github.com/jonase/eastwood On Fri, Feb 15, 2013 at 12:19 PM, ronen nark...@gmail.com wrote: It looks as if https://github.com/jonase/kibit/ is a lint/check style tool that only reads the source code, this limits its utilization: Kibit readshttp://clojure.github.com/clojure/clojure.core-api.html#clojure.core/read source code without any macro expansion or evaluation. A macro can therefor easily invalidate a rule. Also, kibit will not know if the symbol + in the form (+ x 1) actually refers to a local or to a function in a namespace other than clojure.core. Expect some false positives. So there is a place for an AST based one (more similar to findbugs I guess) On Wednesday, February 13, 2013 9:21:52 AM UTC+2, Ambrose Bonnaire-Sergeant wrote: IMO that's the job of a linter-style tool, which can be written easily with `analyze`. On Tue, Feb 12, 2013 at 11:58 PM, Michael Wood esio...@gmail.com wrote: It might be useful, though, to be able to enable warnings for shadowed variables. On 12 February 2013 17:38, Timothy Baldridge tbald...@gmail.com wrote: This sort of pattern is used quite a lot in clojure (even in core): (let [data (if (string? data) (read-string data) data) data (if (string? (first data)) (first data) (next data)) data (if (string? (first data)) (first data) (next data))] data) Throwing exceptions on overridden variable names would not only break Clojure code, but also is very non-lispy. Timothy On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com wrote: it makes sense to not throw now that I think about it, when using _ instead of a I'm also thinking of cases like: = (let [a 1] (let [b 2 a 3] (println a b))) 3 2 nil is there something that would let me know I'm overwriting a ? I figure if something like this would slip by would be tough to track down On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esio...@gmail.com wrote: On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote: what would this do: (let [a 1, a 2] a) becomes: (let [a 1, a123 2] a) or (let [a 1, a123 2] a123) or exception[I prefer] It would be the second option, i.e.: (let [a 1, a123 2] a123) The original code is valid, so it would not throw an exception. On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant abonnair...@gmail.com wrote: Processing a hygienic AST relieves the burden of worrying about shadowing of locals. Wherever a binding would normally be shadowed, it is instead renamed to a local binding currently not in scope. eg. (let [a 1, a a] a) becomes (let [a 1, a123 a] a123) It can be useful for those processing Clojure's analysis results. Thanks, Ambrose On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta kovas@gmail.com wrote: What is a hygienic AST? Thanks k On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant abonnair...@gmail.com wrote: Hi everyone, Happy to release analyze 0.3.0 with new hygienic code transformation capabilities. [analyze 0.3.0] In a line: analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy emit-hy) ((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922 Hygienic AST's have enabled large performance boosts in core.typed. I'm excited to see how it could be as useful to others. Note: hygienic AST's (those transformed with `analyze.hygienic/ast-hy` can be printed normally with `analyze.emit-form/emit-form`, and hygienically with `analyze.hygienic/emit-hy`. https://github.com/frenchy64/**analyzehttps://github.com/frenchy64/analyze Thanks, Ambrose -- -- 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=enhttp://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 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 clo...@googlegroups.com Note that posts from new members are moderated
Re: Google Summer of Code 2013
Interesting idea, but the specifics of the project are not clear to me. Could you flesh out what you're trying to achieve in particular? Would you build on top of core.logic and core.typed? Thanks, Ambrose On Thu, Feb 21, 2013 at 12:13 AM, Maik Schünemann maikschuenem...@gmail.com wrote: given the current position of core.logic and core.typed I wonder if it would be in range of a gsoc project to implement something similar to Qis type system for clojure (here is a link to an example of using Qis type system http://programmingkungfuqi.blogspot.de/2006/04/qi-and-magic-prime-type.html and it is documented in detail in the official qi book http://www.lambdassociates.org/Book/page000.htm) If something like this is possible I'w be happy to give it a try On Sat, Feb 16, 2013 at 2:43 PM, Daniel Solano Gómez cloj...@sattvik.comwrote: These sound like some good ideas. Feel free to add a core.matrix category to the project ideas page. Thanks, Daniel On Sat Feb 16 01:02 2013, Mikera wrote: Awesome stuff! core.matrix has a lot of great opportunities to work on something meaningful, and I'd be happy to mentor one or more students in this area. Top of my list would be: - Extending core.matrix support to Incanter (medium, needs collaboration with Incanter team) - A full NumPy style NDArray implementation in Clojure (large, quite advanced) - core.matrix support for data tables (e.g. database resultsets, statistical datasets etc.) (medium) Will post a proposal along these lines. On Friday, 15 February 2013 02:03:58 UTC+8, Daniel Solano Gómez wrote: Hello, all, It's official: Google Summer of Code 2013 is on. Last year, Clojure was able to get four students who worked on projects like Typed Clojure, Clojure on Android, Clojure and Lua, and Overtone, and I'd love to see Clojure be a mentoring organisation again this year. I have created a GSoC 2013 page on the Clojure community wiki http://dev.clojure.org/display/community/Google+Summer+of+Code+2013. Here you will be able to find the latest information about what's going on with Clojure's GSoC 2013 effort and how to get involved. Here's some ways you can help: * Let people in your local user groups or university know about Clojure and GSoC. * If you're going to Clojure/West, attend the GSoC unsession. For students * Start researching project ideas and get involved with the relevant communities to find mentors. For developers: Does your open source project have a backlog of features to implement? GSoC is a great way to draw new contributors to your project. * Post it to the project idea page and become a mentor. * Let people know about GSoC on your project mailing list. I'd like to thank everyone in advance for helping with our GSoC 2013 project. Sincerely, Daniel -- -- 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. -- -- 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
Re: Google Summer of Code 2013
I've added two projects related to core.typed. FYI: I am technically qualified to participate as a student in GSoC 2013, but I may participate as a mentor instead. I'm hoping to find out in the next few weeks. http://dev.clojure.org/display/community/Project+Ideas#ProjectIdeas-TypeSystems On Thu, Feb 21, 2013 at 12:41 AM, David Nolen dnolen.li...@gmail.comwrote: It's probably possible but too broad a scope for GSoC 2013. I think the community would be better served by directly contributing to core.logic core.typed both of which could use lots of help :) On Wed, Feb 20, 2013 at 11:13 AM, Maik Schünemann maikschuenem...@gmail.com wrote: given the current position of core.logic and core.typed I wonder if it would be in range of a gsoc project to implement something similar to Qis type system for clojure (here is a link to an example of using Qis type system http://programmingkungfuqi.blogspot.de/2006/04/qi-and-magic-prime-type.html and it is documented in detail in the official qi book http://www.lambdassociates.org/Book/page000.htm) If something like this is possible I'w be happy to give it a try On Sat, Feb 16, 2013 at 2:43 PM, Daniel Solano Gómez cloj...@sattvik.com wrote: These sound like some good ideas. Feel free to add a core.matrix category to the project ideas page. Thanks, Daniel On Sat Feb 16 01:02 2013, Mikera wrote: Awesome stuff! core.matrix has a lot of great opportunities to work on something meaningful, and I'd be happy to mentor one or more students in this area. Top of my list would be: - Extending core.matrix support to Incanter (medium, needs collaboration with Incanter team) - A full NumPy style NDArray implementation in Clojure (large, quite advanced) - core.matrix support for data tables (e.g. database resultsets, statistical datasets etc.) (medium) Will post a proposal along these lines. On Friday, 15 February 2013 02:03:58 UTC+8, Daniel Solano Gómez wrote: Hello, all, It's official: Google Summer of Code 2013 is on. Last year, Clojure was able to get four students who worked on projects like Typed Clojure, Clojure on Android, Clojure and Lua, and Overtone, and I'd love to see Clojure be a mentoring organisation again this year. I have created a GSoC 2013 page on the Clojure community wiki http://dev.clojure.org/display/community/Google+Summer+of+Code+2013 . Here you will be able to find the latest information about what's going on with Clojure's GSoC 2013 effort and how to get involved. Here's some ways you can help: * Let people in your local user groups or university know about Clojure and GSoC. * If you're going to Clojure/West, attend the GSoC unsession. For students * Start researching project ideas and get involved with the relevant communities to find mentors. For developers: Does your open source project have a backlog of features to implement? GSoC is a great way to draw new contributors to your project. * Post it to the project idea page and become a mentor. * Let people know about GSoC on your project mailing list. I'd like to thank everyone in advance for helping with our GSoC 2013 project. Sincerely, Daniel -- -- 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. -- -- 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
Re: Redefinition of datatypes
Hi Stuart, Sorry about that, I just changed it to analyze 0.3.0, which is on Clojars. Try pulling again. As for dependencies: - the Trammel dep could be refactored to use core.contracts - I'm happy to offer analyze as a contrib project if needed. It's crucial to core.typed. - other deps can be deleted easily. Thanks, Ambrose On Sun, Feb 24, 2013 at 12:35 AM, Stuart Sierra the.stuart.sie...@gmail.com wrote: Hi Ambrose, I would try to help diagnose this, but I can't even try to compile core.typed in its present state because of dependencies: core.typed declares a dependency on analyze 0.3.1-SNAPSHOThttps://github.com/clojure/core.typed/blob/78d09859cee78967e9dd0ee7d74e0f52bd3be6f1/project.clj#L3, which I cannot find anywhere, including the sourcehttps://github.com/frenchy64/analyzeon GitHub. Even if we fix that, there are larger issues with releasing core.typed as a contrib library. The Maven-based builds on build.clojure.org do not include Clojars.org in their list of repositories. All of the contrib libraries released so far have no dependencies other than Clojure itself. There has been an *implicit* policy that contrib libraries may not have external dependencies, on which Rich has the final say. Furthermore, according to the policy of the Maven Central Repositoryhttp://search.maven.org/, we cannot deploy anything which depends on third-party repositories. Therefore we cannot deploy core.typed to the Central Repository unless all its dependencies are also deployed there. I will do whatever I can to help you get core.typed up and running on build.clojure.org, but these are the constraints we have to work in. Feel free to contact me off-list if you have additional questions. Thanks, -S On Friday, February 22, 2013 2:26:31 AM UTC-5, Ambrose Bonnaire-Sergeant wrote: Hi, I don't understand why this `assert` fails when the namespace is compiled with `compile`. It seems like the datatype A is being compiled twice. (ns mvn-test.core) (deftype A []) (assert (= (class (A.)) (class ((fn [] (A.)) user= (compile 'mvn-test.core) CompilerException java.lang.AssertionError: Assert failed: (= (class (A.)) (class ((fn [] (A.), compiling:(core.clj:5:1) Here is the project.clj: (defproject mvn-test 0.0.1-SNAPSHOT :source-paths [src/main/clojure] :dependencies [[org.clojure/clojure 1.5.0-RC16]]) I found this behaviour was the root cause of why `mvn test` fails in core.typed, while `lein test` works perfectly. Any pointers would be appreciated. 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. -- -- 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: [GSoC 2013] CinC
Is there enough to do here for a few months work? I've added a new project here: http://dev.clojure.org/display/community/Project+Ideas#ProjectIdeas-ClojureinClojure Feel free to change it Aaron. Thanks, Ambrose On Sat, Mar 2, 2013 at 2:11 PM, Aaron Cohen aa...@assonance.org wrote: I'd really like to see this happen actually. If there's interest I'd be happy to help or mentor. The current status is that I have a commit that needs finishing to implement letfn and I believe that was the last major special form that needed implementing in the compiler. Next up would be figuring out how to bootstrap a little better. It would also be nice to pull in the work that's been done recently on the reader in clojure and datastructures in clojure. On Sat, Mar 2, 2013 at 12:50 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi, I think completing Aaron Cohen's CinC implementation would be a fantastic GSoC 2013 project. https://github.com/remleduff/CinC Is Aaron willing to mentor this project? If the core.typed proposal isn't chosen, I would be interested in this project also as a student. Thoughts? 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. -- -- 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: [GSoC 2013] CinC
Any prospective students interested? On Mon, Mar 4, 2013 at 11:04 PM, Aaron Cohen aa...@assonance.org wrote: I think there probably is pretty easily a few months work there. If more work were needed, it would be interesting to try to get the clojurescript and clojure compilers using the same front-end. I'm fairly confident that's at least a summer's work. :) --Aaron On Sat, Mar 2, 2013 at 11:05 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Is there enough to do here for a few months work? I've added a new project here: http://dev.clojure.org/display/community/Project+Ideas#ProjectIdeas-ClojureinClojure Feel free to change it Aaron. Thanks, Ambrose On Sat, Mar 2, 2013 at 2:11 PM, Aaron Cohen aa...@assonance.org wrote: I'd really like to see this happen actually. If there's interest I'd be happy to help or mentor. The current status is that I have a commit that needs finishing to implement letfn and I believe that was the last major special form that needed implementing in the compiler. Next up would be figuring out how to bootstrap a little better. It would also be nice to pull in the work that's been done recently on the reader in clojure and datastructures in clojure. On Sat, Mar 2, 2013 at 12:50 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi, I think completing Aaron Cohen's CinC implementation would be a fantastic GSoC 2013 project. https://github.com/remleduff/CinC Is Aaron willing to mentor this project? If the core.typed proposal isn't chosen, I would be interested in this project also as a student. Thoughts? 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. -- -- 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. -- -- 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: Querying hierarchies in core.logic
Hi, There's a brief transcript of a conversation with Tassilo under the ns. He also wrote a nice blog post on the technique http://tsdh.wordpress.com/2012/01/06/using-clojures-core-logic-with-custom-data-structures/ Thanks, Ambrose On Mon, Mar 11, 2013 at 12:21 PM, JvJ kfjwhee...@gmail.com wrote: I understand that it is possible, and I have found a code example here : https://github.com/frenchy64/Logic-Starter/blob/master/src/logic_introduction/extend.clj#L76 However, the code presented is rather terse, and some functions, such as lvar-in? aren't documented. Does anyone know of something that describes this code, or at least the process involved? Thanks. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/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: Redefinition of datatypes
core.typed dependencies are all in Central now. Here's a reproducible example of this failure. http://build.clojure.org/job/core.typed/3/console Thanks, Ambrose On Sun, Feb 24, 2013 at 12:50 AM, Chas Emerick c...@cemerick.com wrote: On Feb 23, 2013, at 11:35 AM, Stuart Sierra wrote: Furthermore, according to the policy of the Maven Central Repositoryhttp://search.maven.org/, we cannot deploy anything which depends on third-party repositories. Therefore we cannot deploy core.typed to the Central Repository unless all its dependencies are also deployed there. Straying further off-topic, but: FWIW, unless they've changed the verification of POMs being promoted recently, that's not so. The official guide to OSS deployment only says it's strongly discouraged ( https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide), and links to blog posts that indicate that Sonatype is (was?) planning on rewriting POMs to remove external repository definitions, but tons of artifacts in central still contain them, e.g.: http://repo1.maven.org/maven2/org/openid4java/openid4java-nodeps/0.9.6/openid4java-nodeps-0.9.6.pom (…which refers to a now-defunct Guice repository, thus highlighting the rationale for the proposed no-external-repositories policy.) Cheers, - Chas -- -- 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: [ANN] jvm.tools.analyzer / clr.tools.analyzer
How useful is a fully macroexpanded AST to Codeq? There are line numbers associated with the AST nodes, and column numbers if you're using Clojure 1.5.0+. Ambrose On Thu, Mar 14, 2013 at 12:48 AM, Rich Morin r...@cfcl.com wrote: On Mar 13, 2013, at 09:21, Ambrose Bonnaire-Sergeant wrote: I have two recently created contrib projects to help use analysis results for Clojure and ClojureCLR. Have you considered whether an how this information could be used as part of Codeq's analysis phase? For example, how hard would it be to relate the AST to specific line and column numbers? -r -- http://www.cfcl.com/rdmRich Morin http://www.cfcl.com/rdm/resume r...@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Software system design, development, and documentation -- -- 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: ANN: core.logic 0.8.0
This is epic, and a long time coming! Thanks for the hard work David and congrats to the other contributors, especially Nada and Jonas! Thanks, Ambrose On Mon, Mar 18, 2013 at 3:50 AM, David Nolen dnolen.li...@gmail.com wrote: I'm happy to announce the release of core.logic 0.8.0. There are far too changes, bug fixes, and enhancements to cover here. For the most part the miniKanren portion of core.logic has been left unchanged from the standpoint of the user. The biggest change is the inclusion of extensible constraint logic programming (CLP) - specifically we now support constraint logic programming over finite domains as well as nominal logic programming. It's been a long time since the last release, getting all the CLP bits working has been a quite a job, but moving forward releases should be considerably more incremental. https://github.com/clojure/core.logic Happy relational hacking! 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 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: Clojure - CLR - JS - Visual Studio Extension
Hi David, Excellent work so far! I'll have a dig around and see what I find. Thanks, Ambrose On Fri, Mar 22, 2013 at 10:53 AM, dmiller dmiller2...@gmail.com wrote: Last update on this here: The port of core.logic to ClojureCLR that resides here: https://github.com/**dmiller/clr.core.logichttps://github.com/dmiller/clr.core.logic the datomic piece is not ported. All tests run EXCEPT: test-binding-map-* test-binding-map-as-1 test-binding-map-constraints-1 test-unifier-constraints-* test-flatteno test-unifier-anon-constraints-3 test-36-unifier-behavior These tests mostly involve clojure.core.logic.unifier/unify and .../unifier. It is rather daunting to just jump into core.logic and debug this kind of thing, so it might take a while for me to solve this. I invite anyone interested in ClojureCLR + core.logic to take a look. -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 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: Clojure - CLR - JS - Visual Studio Extension
I'm using Mono on Ubuntu, and I have these errors/failures (including project.clj at the bottom): https://gist.github.com/frenchy64/5218783 This is with commit 3b387f914815e389313897977eb02a9fba89dea2 Is this to do with my environment? Thanks, Ambrose On Fri, Mar 22, 2013 at 11:09 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi David, Excellent work so far! I'll have a dig around and see what I find. Thanks, Ambrose On Fri, Mar 22, 2013 at 10:53 AM, dmiller dmiller2...@gmail.com wrote: Last update on this here: The port of core.logic to ClojureCLR that resides here: https://github.com/**dmiller/clr.core.logichttps://github.com/dmiller/clr.core.logic the datomic piece is not ported. All tests run EXCEPT: test-binding-map-* test-binding-map-as-1 test-binding-map-constraints-1 test-unifier-constraints-* test-flatteno test-unifier-anon-constraints-3 test-36-unifier-behavior These tests mostly involve clojure.core.logic.unifier/unify and .../unifier. It is rather daunting to just jump into core.logic and debug this kind of thing, so it might take a while for me to solve this. I invite anyone interested in ClojureCLR + core.logic to take a look. -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 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: Redefinition of datatypes
Now that ClojureWest has finished, I'll gently bump this thread :) Thanks, Ambrose On Wed, Mar 13, 2013 at 12:51 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: core.typed dependencies are all in Central now. Here's a reproducible example of this failure. http://build.clojure.org/job/core.typed/3/console Thanks, Ambrose On Sun, Feb 24, 2013 at 12:50 AM, Chas Emerick c...@cemerick.com wrote: On Feb 23, 2013, at 11:35 AM, Stuart Sierra wrote: Furthermore, according to the policy of the Maven Central Repositoryhttp://search.maven.org/, we cannot deploy anything which depends on third-party repositories. Therefore we cannot deploy core.typed to the Central Repository unless all its dependencies are also deployed there. Straying further off-topic, but: FWIW, unless they've changed the verification of POMs being promoted recently, that's not so. The official guide to OSS deployment only says it's strongly discouraged ( https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide), and links to blog posts that indicate that Sonatype is (was?) planning on rewriting POMs to remove external repository definitions, but tons of artifacts in central still contain them, e.g.: http://repo1.maven.org/maven2/org/openid4java/openid4java-nodeps/0.9.6/openid4java-nodeps-0.9.6.pom (…which refers to a now-defunct Guice repository, thus highlighting the rationale for the proposed no-external-repositories policy.) Cheers, - Chas -- -- 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: Redefinition of datatypes
On Sat, Mar 23, 2013 at 7:32 AM, Hugo Duncan duncan.h...@gmail.com wrote: Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com writes: Now that ClojureWest has finished, I'll gently bump this thread :) Thanks, Ambrose Ambrose, I had a quick look at this. I tried running with zi:test, and it complained about a missing dependency on tools.macro. Adding that as a test scoped dependency and running again gives me: [ERROR] InvocationTargetException: java.lang.StringIndexOutOfBoundsException: String index out of range: 1, compiling:(clojure/core/typed/test/mini_kanren.clj:575:3) The original error seems to have something to do with the core.contracts expansion. Defining TopFilter and BotFilter with c.core/defrecord (and defining appropriate type predicate functions) seems to get further. Cheers Hugo. You're right, it does get further with some defrecords, then gets stuck at another defconstrainedrecord predicate. This is the macroexpansion for a defconstrainedrecord predicate: (clojure.core/let [t__3815__auto__ (clojure.core/defrecord TopFilter [])] (clojure.core/defn TopFilter? [r__3816__auto__] (clojure.core.contracts.constraints/= t__3815__auto__ (clojure.core/type r__3816__auto__ Perhaps we should be doing an (instance? TopFilter r) here instead? The output of `defrecord` seems to be out of date immediately when compiling. 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.
Re: Redefinition of datatypes
Hi Stuart, I think the problem is slightly deeper with core.typed. I use `derive` to define a common supertype for several defrecords, which is the source of the original (Filter? +) assertion error. Filter? is defined (def Filter ::filter) (defn Filter? [a] (isa? (class a) Filter)) This ends up with lots of weirdness with compilation. How do I disable AOT? I don't know if I even want AOT anyway: I'm moving towards lazily loading most of core.typed. Thanks, Ambrose On Mon, Mar 25, 2013 at 9:08 AM, Stuart Sierra the.stuart.sie...@gmail.comwrote: Ah yes, the joys of AOT-compilation and static initializers. I know them well. Strange things happen with AOT-compilation. Classes get loaded in a different order, or get loaded by different classloaders. Maybe someday we can figure it all out. Try replacing that with `instance?` as you say. (Is the return value of `defrecord` even defined?) If nothing else works, it is possible to disable AOT-compilation altogether. The Contrib super-POM does it only as a sanity check. I tried this and got failures during the test phase: [INFO] --- clojure-maven-plugin:1.3.13:test (clojure-test) @ core.typed --- Exception in thread main java.lang.StringIndexOutOfBoundsException: String index out of range: 1, compiling:(clojure/core/typed/test/mini_kanren.clj:575:3) at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567) at clojure.lang.Compiler.analyze(Compiler.java:6361) -S On Friday, March 22, 2013 9:08:00 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: On Sat, Mar 23, 2013 at 7:32 AM, Hugo Duncan dunca...@gmail.com wrote: Ambrose Bonnaire-Sergeant abonnair...@gmail.com writes: Now that ClojureWest has finished, I'll gently bump this thread :) Thanks, Ambrose Ambrose, I had a quick look at this. I tried running with zi:test, and it complained about a missing dependency on tools.macro. Adding that as a test scoped dependency and running again gives me: [ERROR] InvocationTargetException: java.lang.** StringIndexOutOfBoundsExceptio**n: String index out of range: 1, compiling:(clojure/core/typed/**test/mini_kanren.clj:575:3) The original error seems to have something to do with the core.contracts expansion. Defining TopFilter and BotFilter with c.core/defrecord (and defining appropriate type predicate functions) seems to get further. Cheers Hugo. You're right, it does get further with some defrecords, then gets stuck at another defconstrainedrecord predicate. This is the macroexpansion for a defconstrainedrecord predicate: (clojure.core/let [t__3815__auto__ (clojure.core/defrecord TopFilter [])] (clojure.core/defn TopFilter? [r__3816__auto__] (clojure.core.contracts.**constraints/= t__3815__auto__ (clojure.core/type r__3816__auto__ Perhaps we should be doing an (instance? TopFilter r) here instead? The output of `defrecord` seems to be out of date immediately when compiling. 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. -- -- 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: Redefinition of datatypes
I think I figured out how to disable compilation. Seems to work. (just failing unit tests now) http://build.clojure.org/job/core.typed/17/console Thanks! Ambrose On Mon, Mar 25, 2013 at 9:30 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi Stuart, I think the problem is slightly deeper with core.typed. I use `derive` to define a common supertype for several defrecords, which is the source of the original (Filter? +) assertion error. Filter? is defined (def Filter ::filter) (defn Filter? [a] (isa? (class a) Filter)) This ends up with lots of weirdness with compilation. How do I disable AOT? I don't know if I even want AOT anyway: I'm moving towards lazily loading most of core.typed. Thanks, Ambrose On Mon, Mar 25, 2013 at 9:08 AM, Stuart Sierra the.stuart.sie...@gmail.com wrote: Ah yes, the joys of AOT-compilation and static initializers. I know them well. Strange things happen with AOT-compilation. Classes get loaded in a different order, or get loaded by different classloaders. Maybe someday we can figure it all out. Try replacing that with `instance?` as you say. (Is the return value of `defrecord` even defined?) If nothing else works, it is possible to disable AOT-compilation altogether. The Contrib super-POM does it only as a sanity check. I tried this and got failures during the test phase: [INFO] --- clojure-maven-plugin:1.3.13:test (clojure-test) @ core.typed --- Exception in thread main java.lang.StringIndexOutOfBoundsException: String index out of range: 1, compiling:(clojure/core/typed/test/mini_kanren.clj:575:3) at clojure.lang.Compiler.analyzeSeq(Compiler.java:6567) at clojure.lang.Compiler.analyze(Compiler.java:6361) -S On Friday, March 22, 2013 9:08:00 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: On Sat, Mar 23, 2013 at 7:32 AM, Hugo Duncan dunca...@gmail.com wrote: Ambrose Bonnaire-Sergeant abonnair...@gmail.com writes: Now that ClojureWest has finished, I'll gently bump this thread :) Thanks, Ambrose Ambrose, I had a quick look at this. I tried running with zi:test, and it complained about a missing dependency on tools.macro. Adding that as a test scoped dependency and running again gives me: [ERROR] InvocationTargetException: java.lang.** StringIndexOutOfBoundsExceptio**n: String index out of range: 1, compiling:(clojure/core/typed/**test/mini_kanren.clj:575:3) The original error seems to have something to do with the core.contracts expansion. Defining TopFilter and BotFilter with c.core/defrecord (and defining appropriate type predicate functions) seems to get further. Cheers Hugo. You're right, it does get further with some defrecords, then gets stuck at another defconstrainedrecord predicate. This is the macroexpansion for a defconstrainedrecord predicate: (clojure.core/let [t__3815__auto__ (clojure.core/defrecord TopFilter [])] (clojure.core/defn TopFilter? [r__3816__auto__] (clojure.core.contracts.**constraints/= t__3815__auto__ (clojure.core/type r__3816__auto__ Perhaps we should be doing an (instance? TopFilter r) here instead? The output of `defrecord` seems to be out of date immediately when compiling. 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. -- -- 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: Clojure is in GSoC 2013!
Yay! On Tue, Apr 9, 2013 at 3:33 AM, Daniel Solano Gómez cloj...@sattvik.comwrote: Hello, all, I am happy to report that Clojure has been accepted as a mentoring organization for Google Summer of Code 2013. Now is the time for sudents to start researching their projects and reaching out to members. At the same time, we need to start putting together an application template for students. I'll write more in the coming days. Sincerely, Daniel -- -- 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: [GSOC 2013] core.match refactoring
Hi Patrick, I'm sure David will respond on the list. Racket's pattern matching facilities are very impressive: http://docs.racket-lang.org/reference/match.html FWIW the Typed Racket implementation has lots of cool examples using pattern matching. I can be more specific if you want. Thanks, Ambrose On Wed, Apr 10, 2013 at 2:07 PM, crawfor...@mymail.vcu.edu wrote: Hello all, Can anyone point me in the right direction to contacting David Nolen about refactoring/documenting core.match? I've done a bit of tinkering around with Erlang and it's gotten me intrigued with the implementation of pattern matching. I'm also looking over the papers mentioned in the repo, which is getting me even more psyched. Are there any projects that use pattern matching extensively in Clojure (or other Lisps) that I should check out? Or perhaps some repos of similar Clojure code that would be instructive? -Patrick Crawford -- -- 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: Thanks!
Awesome, congrats! Is there a copy available? Thanks, Ambrose On Wed, Apr 24, 2013 at 12:17 AM, JvJ kfjwhee...@gmail.com wrote: I just submitted my master's thesis, written in Clojure, and I'd just like to say the community here has been really helpful. Thanks to David Nolen and Ambrose Bonnaire-Sergeant for helping me out with a number of core.logic questions. Thanks to Norman Richards for the pldb library, which helped quite a bit... and... thanks to anyone else who has answered my question on the forums. you guys are great! -- -- 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: Do functions never get inlined by jvm?
jvm.tools.analyzer is a nice tool for exploration in this area. I don't personally know all the subtleties here, but after some playing I managed to emit an unboxing function. I could tell from the AST. https://gist.github.com/frenchy64/5459989 Thanks, Ambrose On Thu, Apr 25, 2013 at 9:44 PM, Alice dofflt...@gmail.com wrote: Primitive hinted funtions seem to be not an exception. (defn my-inc ^long [^long l] (inc l)) (defn f1 [^long l] (inc l)) (defn f2 [^long l] (my-inc l)) (time (dotimes [n 1] (f1 1))) (time (dotimes [n 1] (f1 1))) (time (dotimes [n 1] (f1 1))) (time (dotimes [n 1] (f2 1))) (time (dotimes [n 1] (f2 1))) (time (dotimes [n 1] (f2 1))) Elapsed time: 68.683431 msecs Elapsed time: 68.964182 msecs Elapsed time: 68.105047 msecs Elapsed time: 108.576746 msecs Elapsed time: 100.992193 msecs Elapsed time: 100.945511 msecs On Apr 25, 10:32 pm, David Nolen dnolen.li...@gmail.com wrote: primitive hinted fns will get inlined. You can also play the same kinds of games that Clojure does with definterface+deftype and fns that declare :inline metadata. If you don't want to learn the subtleties of Clojure performance tuning then you can always write your performance critical bits in Java and call into it. Some folks, like the people at Prismatic, seem to be doing pretty well writing all their performance critical code in Clojure, but they've built some tools to avoid the various potential pitfalls. On Thu, Apr 25, 2013 at 9:19 AM, Alice dofflt...@gmail.com wrote: I create many small methods in java without worrying about the performance since it's usually the target of inline optimization. For example, public class Foo { public static long inc(long l) { return ++l; } public static long f1() { long l = 0; for (int i=0; i 10; i++) { l++; } return l; } public static long f2() { long l = 0; for (int i=0; i 10; i++) { l = inc(l); } return l; } } (time (Foo/f1)) (time (Foo/f1)) (time (Foo/f1)) (time (Foo/f2)) (time (Foo/f2)) (time (Foo/f2)) Elapsed time: 23.309532 msecs Elapsed time: 23.333039 msecs Elapsed time: 21.714753 msecs Elapsed time: 22.943366 msecs Elapsed time: 21.612783 msecs Elapsed time: 21.71376 msecs But clojure funtions seem to be never get inlined. (def obj (Object.)) (defn getObj [] obj) (defn f1 [] obj) (defn f2 [] (getObj)) (time (dotimes [n 1] (f1))) (time (dotimes [n 1] (f1))) (time (dotimes [n 1] (f1))) (time (dotimes [n 1] (f2))) (time (dotimes [n 1] (f2))) (time (dotimes [n 1] (f2))) Elapsed time: 67.758744 msecs Elapsed time: 68.555306 msecs Elapsed time: 68.725147 msecs Elapsed time: 104.810459 msecs Elapsed time: 103.273618 msecs Elapsed time: 103.374595 msecs -- -- 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, visithttps://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
Re: [GSOC 2013] Program analysis suite, based on Rich Hickey's Codeq
Hi Navgeet, I'm not sure if rewriting jvm.tools.analyzer is a good idea, given that there is CinC project for this year's GSoC. Perhaps you could contribute to the CinC analyzer, and then follow with integration with Codeq? Thanks, Ambrose On Wed, May 1, 2013 at 1:45 AM, Navgeet Agrawal navgeet.agra...@gmail.comwrote: Hi all, I've started with the application, though it has gotten quite late. I've explained what I intend to do in this gist - https://gist.github.com/Navgeet/5490202 I'm kinda stuck in the last part - analysis techniques. I would appreciate suggestions that are not too heavy to deal with, given my tight schedule in the later half of coding period. Cheers Navgeet -- -- 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: [GSOC 2013] Program analysis suite, based on Rich Hickey's Codeq
Hi Navgeet, Yes CinC is a big job. Ah, I read the proposal more closely. I think you're on the right track. You should only need one more AST node for unexpanded macros, or maybe even just extra metadata on the :invoke :op. As a quick and dirty approach I like it. Thanks, Ambrose On Wed, May 1, 2013 at 3:29 PM, Navgeet Agrawal navgeet.agra...@gmail.comwrote: Hi Ambrose, Agreed, using CinC to analyze would be the best way. However given the wish list [1], I do not feel its suitable for me. Btw, I meant extending Codeq's analyzer rather than rewriting jvm.tools.analyzer. [1]: http://dev.clojure.org/display/design/Compiler+in+Clojure Cheers Navgeet -- -- 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: [GSOC 2013] Program analysis suite, based on Rich Hickey's Codeq
I'm not sure how useful unexpanding analyzer will actually be useful for Codeq, especially if you want to do analysis like who calls this function from it. Forms passed to a macro aren't necessarily going to be useful as unexpanded forms. eg. a macro that rewrites (+ 1 2) to (plus 1 2) might count as a call to clojure.core/+. Have you considered these issues? Will you have a tolerance for false positives? Thanks, Ambrose On Wed, May 1, 2013 at 3:47 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi Navgeet, Yes CinC is a big job. Ah, I read the proposal more closely. I think you're on the right track. You should only need one more AST node for unexpanded macros, or maybe even just extra metadata on the :invoke :op. As a quick and dirty approach I like it. Thanks, Ambrose On Wed, May 1, 2013 at 3:29 PM, Navgeet Agrawal navgeet.agra...@gmail.com wrote: Hi Ambrose, Agreed, using CinC to analyze would be the best way. However given the wish list [1], I do not feel its suitable for me. Btw, I meant extending Codeq's analyzer rather than rewriting jvm.tools.analyzer. [1]: http://dev.clojure.org/display/design/Compiler+in+Clojure Cheers Navgeet -- -- 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: [GSOC 2013] Program analysis suite, based on Rich Hickey's Codeq
What about calls to `let`, `defn`, `loop`, `cond` and `fn`, which are all macros? Thanks, Ambrose On Wed, May 1, 2013 at 4:34 PM, Navgeet Agrawal navgeet.agra...@gmail.comwrote: If I understand correctly, a macro invocation of the form `(expand '(+ 1 2)) = (plus 1 2)` will be analyzed as invoking the macro 'expand' on the list (+ 1 2). The list is never analyzed to be a call to clojure.core/+. As far as analysis like who calls this function are concerned, I think its best to limit them to function invocations, those not from macro expansions. That said, I think versioned analysis of macro expansions would be useful. I will add it to the gist. Cheers Navgeet -- -- 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: Bug in reader or repl? reading keyword :#abc
According to the reader page, # isn't a valid character in a symbol/keyword. http://clojure.org/reader Thanks, Ambrose On Wed, May 1, 2013 at 10:22 PM, Dave Sann daves...@gmail.com wrote: I came across the following... ;; = ok; (let [v :abc] nil) ;; = ok; (let [v :abc] nil) ;; = ok; (let [v :#abc] nil) ;; = fail; (let [v :#abc] nil) $ lein repl nREPL server started on port 33719 REPL-y 0.1.10 Clojure 1.5.1 ... user= ;; = ok; user= (let [v :abc] nil) nil user= user= ;; = ok; user= (let [v :abc] #_=nil) nil user= user= ;; = ok; user= (let [v :#abc] nil) nil user= user= user= ;; = fail; user= (let [v :#abc] RuntimeException EOF while reading, starting at line 1 clojure.lang.Util.runtimeException (Util.java:219) user= nil) nil RuntimeException Unmatched delimiter: ) clojure.lang.Util.runtimeException (Util.java:219) user= -- -- 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.
[ANN] core.typed 0.1.14
Hi, Announcing a new release of core.typed, with a bunch of improvements and fixes. Leiningen: [org.clojure/core.typed 0.1.14] Highlights: - support optional mandatory function keyword arguments - def-alias takes a docstring, and adds appropriate :doc metadata to the alias var. - accumulates and displays multiple type errors per run - heterogeneous maps can track known absent keys - supports letfn via letfn See changes for 0.1.14: https://github.com/clojure/core.typed/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.
Re: [ANN] core.typed 0.1.14
Thanks! I'll be open sourcing a hobby project in the next few days that shows off these features. Ambrose On Sat, May 11, 2013 at 10:12 PM, Max Penet m...@qbits.cc wrote: Hi, Some nice improvements here, thanks! - Max On Saturday, May 11, 2013 3:53:02 PM UTC+2, Ambrose Bonnaire-Sergeant wrote: Hi, Announcing a new release of core.typed, with a bunch of improvements and fixes. Leiningen: [org.clojure/core.**typed 0.1.14] Highlights: - support optional mandatory function keyword arguments - def-alias takes a docstring, and adds appropriate :doc metadata to the alias var. - accumulates and displays multiple type errors per run - heterogeneous maps can track known absent keys - supports letfn via letfn See changes for 0.1.14: https://github.com/**clojure/core.typed/blob/** master/CHANGELOG.mdhttps://github.com/clojure/core.typed/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.
[ANN] core.typed 0.1.15
Hi, A brief but highly visible release of core.typed: types and forms in error messages are abbreviated where possible. See the changelog and check-ns docstring for details. In a nutshell: fire.main= (check-ns 'fire.simulate) ... Type Error (fire.simulate:72) Expected type: Grid Actual: (CompleteHMap {:rows (U Long (Value 100)), :grid (APersistentVector (IPersistentVector State)), :history [], :cols (U Long (Value 100))}) in: {:history [], :grid (clojure.core/vec #), :rows rows, :cols cols} ... fire.main= (require '[clojure.core.typed :as typed]) nil fire.main= (binding [*typed/*verbose-forms* true, typed/*verbose-types* true*] (check-ns 'fire.simulate)) ... Type Error (fire.simulate:72) Expected type: fire.simulate/Grid Actual: (CompleteHMap {:rows (U java.lang.Long (Value 100)), :grid (clojure.lang.APersistentVector (clojure.lang.IPersistentVector fire.simulate/State)), :history [], :cols (U java.lang.Long (Value 100))}) in: {:history [], :grid (clojure.core/vec (let* [iter__170__auto__ (clojure.core.typed/ann-form* (fn* iter__19706 ([s__19707] (new clojure.lang.LazySeq (fn* ([] (clojure.core.typed/loop-ann ((fn* ([] (loop* [s__1970721240 s__19707] (let* [temp__4092__auto__ (clojure.core/seq s__1970721240)] (if temp__4092__auto__ (let* [s__1970721241 temp__4092__auto__] (if (clojure.core/chunked-seq? s__1970721241) (let* [c__168__auto__ (clojure.core/chunk-first s__1970721241) size__169__auto__ (clojure.lang.RT/intCast (clojure.lang.RT/count c__168__auto__)) b__19709 (clojure.core.typed/ann-form* (clojure.core/chunk-buffer size__169__auto__) (quote (clojure.lang.ChunkBuffer (IPersistentVector State] (if (clojure.core.typed/loop-ann ((fn* ([] (loop* [i__19708 (clojure.lang.RT/longCast (clojure.lang.RT/intCast 0))] (if (clojure.lang.Numbers/lt i__19708 size__169__auto__) (let* [row (clojure.lang.RT/nth c__168__auto__ i__19708)] (do (clojure.core/chunk-append b__19709 (clojure.core.typed/ann-form* (clojure.core/vec (let* [iter__170__auto__ (clojure.core.typed/ann-form* (fn* iter__19714 ([s__19715] (new clojure.lang.LazySeq (fn* ([] (clojure.core.typed/loop-ann ((fn* ([] (loop* [s__1971521242 s__19715] (let* [temp__4092__auto__21243 (clojure.core/seq s__1971521242)] (if temp__4092__auto__21243 (let* [s__1971521244 temp__4092__auto__21243] (if (clojure.core/chunked-seq? s__1971521244) (let* [c__168__auto__21245 (clojure.core/chunk-first s__1971521244) size__169__auto__21246 (clojure.lang.RT/intCast (clojure.lang.RT/count c__168__auto__21245)) b__19717 (clojure.core.typed/ann-form* (clojure.core/chunk-buffer size__169__auto__21246) (quote (clojure.lang.ChunkBuffer State)))] (if (clojure.core.typed/loop-ann ((fn* ([] (loop* [i__19716 (clojure.lang.RT/longCast (clojure.lang.RT/intCast 0))] (if (clojure.lang.Numbers/lt i__19716 size__169__auto__21246) (let* [col (clojure.lang.RT/nth c__168__auto__21245 i__19716)] (do (clojure.core/chunk-append b__19717 (clojure.core.typed/ann-form* (state-fn [row col]) (quote State))) (recur (clojure.lang.Numbers/unchecked_inc i__19716 true) (quote ((U Long Integer (clojure.core/chunk-cons (clojure.core/chunk b__19717) (iter__19714 (clojure.core/chunk-rest s__1971521244))) (clojure.core/chunk-cons (clojure.core/chunk b__19717) nil))) (let* [col (clojure.core/first s__1971521244)] (clojure.core/cons (state-fn [row col]) (iter__19714 (clojure.core/rest s__1971521244)) nil)) (quote ((clojure.core.typed/Option (clojure.lang.Seqable AnyInteger)) (quote [(clojure.core.typed/Option (clojure.lang.Seqable AnyInteger)) - (clojure.lang.LazySeq State)]))] (iter__170__auto__ (clojure.core/range cols (quote (IPersistentVector State (recur (clojure.lang.Numbers/unchecked_inc i__19708 true) (quote ((U Long Integer (clojure.core/chunk-cons (clojure.core/chunk b__19709) (iter__19706 (clojure.core/chunk-rest s__1970721241))) (clojure.core/chunk-cons (clojure.core/chunk b__19709) nil))) (let* [row (clojure.core/first s__1970721241)] (clojure.core/cons (clojure.core/vec (let* [iter__170__auto__ (clojure.core.typed/ann-form* (fn* iter__19731 ([s__19732] (new clojure.lang.LazySeq (fn* ([] (clojure.core.typed/loop-ann ((fn* ([] (loop* [s__1973221247 s__19732] (let* [temp__4092__auto__21248 (clojure.core/seq s__1973221247)] (if temp__4092__auto__21248 (let* [s__1973221249 temp__4092__auto__21248] (if (clojure.core/chunked-seq? s__1973221249) (let* [c__168__auto__ (clojure.core/chunk-first s__1973221249) size__169__auto__ (clojure.lang.RT/intCast (clojure.lang.RT/count c__168__auto__)) b__19734 (clojure.core.typed/ann-form* (clojure.core/chunk-buffer size__169__auto__) (quote (clojure.lang.ChunkBuffer State)))] (if (clojure.core.typed/loop-ann ((fn* ([] (loop* [i__19733 (clojure.lang.RT/longCast (clojure.lang.RT/intCast 0))] (if (clojure.lang.Numbers/lt i__19733 size__169__auto__) (let* [col (clojure.lang.RT/nth c__168__auto__ i__19733)] (do (clojure.core/chunk-append b__19734 (clojure.core.typed/ann-form* (state-fn [row col]) (quote State)))
Re: Some feedback on coding style
Hi David, Clojure can generate auto-syms with a trailing #. user= `(fn [x#] x#) (clojure.core/fn [x__349__auto__] x__349__auto__) Thanks, Ambrose On Mon, May 27, 2013 at 9:08 AM, David Pollak feeder.of.the.be...@gmail.com wrote: Mark and James, Thank you for your input. There are two reasons why I don't want to simply test for nil as the result of running the pattern match: - The right side of the pattern can be side-effecting. For example, if you are servicing a web request, there may be database calls, etc. Therefore, I need a test that does not have side effects. - There may be a choice of multiple partial functions where the best choice is chosen (e.g., 3 different partial functions can serve a web request, but given the response type weighting, we may want to choose the JSON response, but we don't know which response type to choose until we've checked what the possibilities are) Anyway, using the joys of arity, I've solved the problem. (pf 33) ;; apply the partial function to 33 (pf :defined? 33) ;; is the function defined at 33 I blogged about the design choices at http://blog.goodstuff.im/first_clojure_macro Thanks! David On Sat, May 25, 2013 at 11:26 AM, James Reeves ja...@booleanknot.comwrote: In Scala, PartialFunction is a trait, which in Clojure I'd represent using a protocol: (defprotocol Partial (defined-at? [x])) (defn partial-fn [guard f] (reify Partial (defined-at? [x] (guard x)) clojure.lang.IFn (invoke [f x] {:pre [(guard x)]} (f x And then, when I have a mechanism to create a partial function, I'd then work on a macro to transform: (pfn [x :guard even?] (/ x 2)) Into: (partial-fn even? (fn [x] (/ x 2))) I'm not sure how much benefit you'd get out of partial functions that are not part of the core language. You'd need to write a fair bit of infrastructure around them, but it might be worth it. In Clojure, it seems quite common to use functions that return nil to achieve the same effect as partial functions, and there are several functions and macros, like some- and keep, that support that idiom. - James On 25 May 2013 17:14, David Pollak feeder.of.the.be...@gmail.com wrote: Hello, This is my first post to this group. If my post or the tone of my post is not up to this communities standards, please give me feedback so that I can integrate with the community. I'm coming from Scala-land. In Scala, there's a PartialFunction: http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/library/index.html#scala.PartialFunction The key take-away for PartialFunctions is ... is a unary function where the domain does not necessarily include all values of type A. The ability to test a PartialFunction to see if the domain includes a particular value is very helpful. pf.isDefinedAt(x) allows testing to see if the function is defined at a given value of x. But a PartialFunction is a subclass of Function, so PartialFunctions can be applied: pf(x) The Scala compiler will take a pattern and turn it into a PartialFunction: def pf: PartialFunction[String, Number] = { case = 0 // special case blank to zero case x if isInt(x) = x.toInt case x if isDouble(x) = x.toDouble case x if isBigInt(x) = asBigInt(x) } Another property of PartialFunction is they can be composed: pf = pf1 orElse pf2 orElse pf3 // pf isDefinedAt any place any of the partial functions are defined We use PartialFunctions extensively in Lift to allow choosing if a particular URL should be served by Lift, if it should be served by a particular REST handler, etc. For example, defining a REST route in Lift: serve { case api :: user :: AsLong(userId) :: _ GetJson _ = User.find(userId).map(_.toJson) } As I've been learning Clojure in preparation for a presentation at Strange Loop and as part of a new project I've been working on ( http://blog.goodstuff.im/plugh), I am looking to bring the best things in Lift into the Clojure code I write. Clojure's pattern matching stuff is pretty nifty. I especially like how you can extract values out of a Map (this is *so* much more powerful that Scala's pattern matching, even with unapply... but I digress). So, I wrote a macro (it's my first, so feedback on the style for the macro itself): (defmacro match-func [ body] `(fn [~'x] (match [~'x] ~@body))) This creates a function that is the application of the match to a parameter, so: ((match-func [q :guard even?] (+ 1 q) [z] (* 7 z)) 33) ;; 231 I am struggling with the right style for how to create something that's both a function: (def my-test (match-func [q :guard even?] (+ 1 q) [z] (* 7 z))) (my-test 33) And also something that can be tested for definition at a given value. Put another way, if Clojure had something that's both a function and a thing that could be asked if it's defined for a given input, how would one in Clojure apply that thing and
Re: Some feedback on coding style
Hi John, By :pre, do you mean function preconditions? eg. (fn [] {:pre [..]}) ? How is :pre related to metadata and dispatch? AFAICT it's purely for macroexpansion and there is no metadata available on the precondition post-macroexpansion. Thanks, Ambrose On Mon, May 27, 2013 at 9:00 PM, John D. Hume duelin.mark...@gmail.comwrote: On May 26, 2013 8:53 PM, Mark Engelberg mark.engelb...@gmail.com wrote: Another possible design choice is to store a domain-testing predicate in the function's metadata. Using metadata would be a much more idiomatic choice than using arity. Multiple arities are idiomatically used (like method overloading) to default arguments. An interesting detail James thought of but didn't call out is putting the domain check in the :pre metadata of the fn. This is an infrequently used Clojure feature, but it's a perfect fit for partial functions. Calling a fn with an argument that fails the :pre check will throw an exception, so the body can be written to assume it's got good input. Anyone can grab the :pre metadata to test for applicability, and anyone who knows clojure will have at least passing familiarity with the concept. Your macro can still pull apart the pattern matching forms to build the :pre fn, and it's still easy to do orElse-style composition. Unrelated: If you haven't already, you may want to read and follow up on the May 16 thread core.match before going very far with it. -- -- 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: Google Summer of Codeq
Congrats and good luck! Ambrose On Tue, May 28, 2013 at 9:06 AM, Rich Morin r...@cfcl.com wrote: I am delighted to report that my notion of a GSoC project on Codeq was (a) taken up by Navgeet Agrawal and (b) accepted by Google. Paul deGrandis, Tom Faulhaber, and I will be Navgeet's official mentors for the project, but everyone is welcome to help: Program analysis suite, based on Rich Hickey's Codeq http://www.google-melange.com/gsoc/project/google/gsoc2013/navgeet/7001 A number of folks on this list have expressed interest in Codeq; here is an opportunity to help move it from prototype to production status! I have set up a public Google Group for announcements, comments, ideas, reports, questions, etc. If you are interested in this project, please sign up: Google Summer of Codeq https://groups.google.com/forum/?fromgroups#!forum/gsocq Please contact me directly if you experience any trouble in signing up. -r -- http://www.cfcl.com/rdmRich Morin http://www.cfcl.com/rdm/resume r...@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Software system design, development, and documentation -- -- 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: [GSoC] core.matrix NDArray project feature requests
First of all, congrats on the project! Could you elaborate on your mention of QuickCheck, I couldn't find it in the proposal. Thanks, Ambrose On Tue, May 28, 2013 at 4:25 PM, Dmitry Groshev lambdadmi...@gmail.comwrote: Hello, Clojurians. I was selected during GSoC process to implement a core.matrix-compatible NDArray in Clojure. More info about this project can be found at [1] and [2]. However, I would be really happy to know if there are any comments, wishes or feature requests regarding that proposals (please take note that there is also a clojurecheck / QuickCheck mention in my proposal) from you, the community, so I can plan ahead my commitment to the project. So, please, feel free to speak about your matrix- (or pure-function-testing-) related itches. [1] https://google-melange.appspot.com/gsoc/proposal/review/google/gsoc2013/si14/10001 [2] http://dev.clojure.org/display/community/Project+Ideas#ProjectIdeas-NDArrayImplementationinClojure -- -- 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: Shortcut for variadic map destructuring?
[ {:as m}] On Fri, Jun 7, 2013 at 3:23 AM, JvJ kfjwhee...@gmail.com wrote: Consider the following: (let [ [{:keys [] :as m}] [:a 1 :b 2 :c 3]] m) == {:a 1 :b 2 :c 3} Is there a shorter form of [{:keys [] :as 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: [ANN] 'primitive-math', a library for predictable arithmetic operations
FWIW a third option to determine the exact method called is jvm.tools.analyzer: clojure.tools.analyzer= (clojure.pprint/pprint (ast (+ 1 2))) {:op :static-method, :env {:source NO_SOURCE_FILE, :column 29, :line 1, :locals {}, :ns {:name clojure.tools.analyzer}}, :class clojure.lang.Numbers, :method-name add, :method {:name add, :return-type long, :declaring-class clojure.lang.Numbers, :parameter-types [long long], :exception-types [], :flags #{:static :public}}, :args ({:op :number, :env {:locals {}, :ns {:name clojure.tools.analyzer}}, :val 1} {:op :number, :env {:locals {}, :ns {:name clojure.tools.analyzer}}, :val 2}), :tag nil} nil Thanks, Ambrose On Sat, Jun 8, 2013 at 5:59 AM, Zach Tellman ztell...@gmail.com wrote: What (+ x y) compiles down is highly dependent on the surrounding context, including but not limited to the local type-hints and the value of *unchecked-math*. Actually verifying that it's calling the primitive, unboxed, easily inlined clojure.lang.Numbers.add(long, long) requires either a profiler or a decompiler. For a lot of use cases, this doesn't matter. But where it does matter, it tends to turn into a mind-numbing cycle of adding type-hints, seeing whether that changed the compilation output, and then trying again. Since I've gone through this more times than I'd like to admit, I rolled my own: https://github.com/ztellman/primitive-math. This is not meant to be a replacement for Clojure's numeric tower, rather it's meant to supplement it when the range of possible inputs is intentionally narrow. I expect this should be immediately useful in a variety of applications and libraries. If anyone has questions, I'm happy to answer them. -- -- 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: Reflective method invocation
Hi Nathan, I just had a quick look at the implementation: I think Clojure picks the first matching method if several are found. https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Reflector.java#L70 It's probably worth testing this out though. Thanks, Ambrose On Tue, Jun 11, 2013 at 9:24 PM, N8Dawgrr nathan.r.matth...@gmail.comwrote: Hi All, I have a question regarding ambiguity in reflective dynamic invocation. In Clojure you can dynamically invoke a method on a Java class like so: (. some-instance bar arg) where bar is a method name. If the type inferencer can't ascertain the type of some-instance a runtime reflective path is used to perform the method invocation. Lets suppose some-instance is of type Foo which has two overloads of method bar: bar(Apple arg) and bar(Orange arg) Now lets suppose Apple is an interface which extends Fruit and so is Orange. Now lastly lets suppose we have a class MutantFruit which implements BOTH Apple and Orange. My question is what method is invoked at runtime for the following code: (. some-instance bar mutant) where mutant is an instance of MutantFruit Regards, Nathan -- -- 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: Conversion of one java example to clojure?
What is the Java source for setting up the Window object? Ambrose On Fri, Jun 24, 2011 at 1:24 AM, Antonio Recio amdx6...@gmail.com wrote: I have tried to translate an example of vaadin in java to clojure. But I get errors. This is the java code: Panel panel = new Panel(Split Panels Inside This Panel); HorizontalSplitPanel hsplit = new HorizontalSplitPanel(); panel.setContent(hsplit); Tree tree = new Tree(Menu, TreeExample.createTreeContent()); hsplit.setFirstComponent(tree); VerticalSplitPanel vsplit = new VerticalSplitPanel(); hsplit.setSecondComponent(vsplit); vsplit.addComponent(new Label(Here's the upper panel)); vsplit.addComponent(new Buton(Here's the lower panel)); And this the clojure code. Where I am doing wrong? (defn -init [this] (let [app this] (.setMainWindow this (doto (Window. Test application) (add (panel (doto (Panel. Split panels inside this panel) (.setContent hsplit))) (hsplit (doto (HorizontalSplitPanel.) (.setFirstComponent tree) (.setSecondComponent vsplit))) (tree Tree. Menu) (vsplit VerticalSplitPanel. (add (Label. upper panel) (Button. lower panel -- 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: Conversion of one java example to clojure?
Does Window's add() method take multiple arguments? It looks like you're passing 4 arguments to it. Also (tree Tree. Menu) should be (tree (Tree. Menu)) Same with (vsplit VerticalSplitPanel. (add (Label. upper panel) (Button. lower panel Could you post the full source? Looks like you're using some helper functions like tree and vsplit and panel. Ambrose On Fri, Jun 24, 2011 at 2:19 AM, Antonio Recio amdx6...@gmail.com wrote: There are not window in the java code, anyway I have added it in the clojure code (could be deleted). The window java code could be something like this: setMainWindow(new Window(Test application)); -- 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: Tree vaadin?
I've never used it, but you would use amap instead of map in this situation, because it is a Java array. http://clojuredocs.org/clojure_core/clojure.core/amap Ambrose On Mon, Jun 27, 2011 at 1:08 PM, Linus Ericsson oscarlinuserics...@gmail.com wrote: Maybe (map #(.addItem tree (.toString (first %))) planets) where #(.addItem tree (.toString (first %))) should be replaced with the correct java interop for inserting into the tree, and the % becomes one and one of the items in the planets vector (that is regarded as a sequence) the argument. /Linus 2011/6/27 Antonio Recio amdx6...@gmail.com How I can translate this in clojure? for (int i=0; iplanets.length; i++) { String planet = (String) (planets[i][0]); tree.addItem(planet); -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: exloring library
If you want to play around with it in a REPL, you need to require or use the namespace you want, and then you will have access to the functions in that namespace. There is an example of this on the project page (see Synopsis): https://github.com/mmcgrana/clj-json Ambrose On Mon, Jun 27, 2011 at 6:04 PM, Vincent vincent@gmail.com wrote: I want to explore clj-json lib . how to do load this library and starting using its function using repl. If i have a project.clj in lein project and i have clj-json as one of dependencies , will this library loaded when i connect thru emacs slime connect . What has to be done so that i can start using this library function when slime repl gets connected to swank thru lein? 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 -- 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: Collaboration Proposal: Beyond CLOS Generic Methods, Predicate Dispatch, and Pattern Matching
I'm interested too. Just sent in my CA from Australia, so hopefully shouldn't be too long. I think I looked through the essays briefly when this was first posted, I coincidentally am working through the The Art of the Metaobject Protocol right now. +1 on an update please :) Ambrose On Thu, Jul 7, 2011 at 12:37 PM, Brent Millare brent.mill...@gmail.comwrote: How's the progress on this project going? During my spare time I've been reading through some of the logic programming literature, trying to learn about this, but there is still much to learn. While I could spend hours continuing to read the literature, I feel it might be more productive to get dirty instead and learn as I go. What area needs the most help at the moment? And what would be the best reference for tackling that sector? Best, Brent On May 14, 5:20 am, Heinz N. Gies he...@licenser.net wrote: On May 13, 2011, at 14:37 , David Nolen wrote: On Fri, May 13, 2011 at 2:04 AM, Heinz N. Gies he...@licenser.net wrote: Hearing Pattern Matching, do you mean Erlang like Pattern matching? Regards, Heinz Erlang, OCaml, SML, Haskell, Scala all have the kind of pattern matching I'm talking about. One important point is that they all support guards on patterns. It's not clear to me that current implementation actually use guards to shape the tree, but that is my plan. In the system I'm proposing guards are actually logical predicates that can be reasoned about. (match n ([x] :guard [(number? x)] ...) ([0] ...)) This is not ok in OCaml, SML, or Haskell (or Scala and Erlang as far as I know). This would be ok in the system I'm proposing since number? is a logical predicate and we can test for such cases and reorder the pattern. Erlang not only allows predicate functions, simple math is also just fine like f(x) when x 0 - ... then again erlangs reasoning for only allowing certain BIF's and simple arithmetics in guards is speed, those are writtin in plain C so are blazing fast compared to erlang functions ^^. That is a issue Clojure does not have to face so I don't think it would make sense to limit the code you can put in guard expressions. Regards, Heinz smime.p7s 2KViewDownload -- 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: Results from 2011 State of Clojure survey
I've found that (some of) Clojure's advanced features are best taught in terms of simpler ideas that most programmers would be familiar with. For example, excuse the plug, I motivated multimethods by relating them to simple conditionals like case. I think I succeeded in making MMs just look like a fancier conditional, which is much more friendly than an arbitrary dispatch mechanism ;) http://pragprog.com/magazines/2011-07/growing-a-dsl-with-clojure I'm brainstorming how we could approach teaching the other features you mentioned similarly. Thanks, Ambrose On Wed, Jul 13, 2011 at 6:52 PM, Albert Cardona sapri...@gmail.com wrote: Chas, It seems that relatively few people are taking advantage of some of Clojure’s most sophisticated and unique features: metadata; protocols, records, and types; and multimethods. These facilities are absolutely game-changers, at least IMO. Either most domains have no use for them (I can’t believe that), or most people don’t know how to use them effectively, thus they are left unused. Those of us that write about and teach Clojure, take note. What prevents me from using it is that clojure 1.3.* is still alpha or early beta, and it's been for a long time. If clojure 1.3 was released and development continued into 1.4, I predict that protocols and records would suddenly start being used a lot more. Albert -- http://albert.rierol.net http://www.ini.uzh.ch/~acardona/ -- 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: Results from 2011 State of Clojure survey
Hi, On Wed, Jul 13, 2011 at 7:57 PM, Jonathan Fischer Friberg odysso...@gmail.com wrote: multimethods - since close to every mention of multimethods also involves telling how slow they are, these are most often shunned. I don't get that impression. MM's seem to be pushed as a first choice for implementing prototypes over protocols, much like maps are often recommended over records. At least on this mailing list, maybe more generally you hear recounting their experience of converting MM to protocols as an optimization. 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
Re: clooj, a lightweight IDE for clojure
This is a first for me, a Clojure IDE that just works. Big thumbs up! 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
Re: Excellent intro to core.logic
(I'm frenchy64) More cool stuff to come, watch this space http://twitter.com/#!/ambrosebs Ambrose On Tue, Jul 19, 2011 at 11:50 AM, Devin Walters dev...@gmail.com wrote: Thanks David! (And French64 of course) -- Devin Walters On Monday, July 18, 2011 at 10:33 PM, Brent Millare wrote: Nice, I'll be sure to go through it. On Jul 18, 10:56 am, David Nolen dnolen.li (http://dnolen.li)...@ gmail.com (http://gmail.com) wrote: I highly recommend checking this out if you're curious about core.logic,https://github.com/frenchy64/Logic-Starter/wiki 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 (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+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