Deterministic macro expansion for Clojure?
Hi all, I wonder if there is any way to make macro expansion in Clojure deterministic. That would be useful in unit tests. Something like this: ``` (defmacro lol [] `(let [a# 1] (inc a#))) (with-predictable-gensym-starting-from-zero (macroexpand '(lol)) ;; => `(let [a0 1] (inc a0)) ``` -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from 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: Joplin: No method in multimethod 'migrate-db' for dispatch value: :sql
joplin.jdbc.database works fine. Thanks for the tip. On Sat, Mar 21, 2015 at 9:55 PM, Hildeberto Mendonça wrote: > Hi Daniel, thanks for your feedback. > > On Sat, Mar 21, 2015 at 11:40 AM, Daniel Kersten > wrote: > >> Make sure you require the sql migrations in your jub.datasources source >> file. This is probably it since jub.datasources cannot find the correct >> defmethod for migrate-db. Also make sure the migrations are on the >> classpath. >> > > Could you be more specific about that? The readme file says that I have to > load the joplin.core namespace (done) and also the namespaces of the > database plugins, but it doesn't say a word about these plugins. I've tried > to refer the namespaces joplin.jdbc.database and joplin.sql.database, but > the error persists. > > Thanks a lot > -- Hildeberto Mendonça, Ph.D Blog: http://www.hildeberto.com Community: http://www.cejug.net Twitter: https://twitter.com/htmfilho -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from 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: Deterministic macro expansion for Clojure?
Well, I think it's nondeterministic by design, we usually just test its behavior, not the form it expanded to. 2015-03-23 10:52 GMT+08:00 myguidingstar : > Hi all, > I wonder if there is any way to make macro expansion in Clojure > deterministic. That would be useful in unit tests. Something like this: > > ``` > (defmacro lol [] > `(let [a# 1] (inc a#))) > > (with-predictable-gensym-starting-from-zero > (macroexpand '(lol)) > ;; => `(let [a0 1] (inc a0)) > ``` > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from 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.