Re: Create dynamic vars programmatically

2012-09-07 Thread Marc Dzaebel
Sorry for delay, I had difficulties with Google Groups ... posted several times. Thanks about the hint about *with-local-vars*, Marc -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note t

Re: How create dynamic vars programmatically?

2012-09-07 Thread Marc Dzaebel
>> .setDynamic on the var. Works fine! See also http://blog.zolotko.me/2012/06/making-variable-dynamic-in-clojure.html. Should be documented ... Great help, thanks, Marc -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send e

Re: How create dynamic vars programmatically?

2012-09-07 Thread Baishampayan Ghose
.setDynamic on the var. This is implementation detail though... Sent from phone. Please excuse brevity. On 7 Sep 2012 13:04, "Marc Dzaebel" wrote: > (intern *ns* 's) creates a non dynamic variable, but how do I achieve (def > ^:dynamic s) programmatically? > > Thanks, Marc > > -- > You received

How create dynamic vars programmatically?

2012-09-07 Thread Marc Dzaebel
(intern *ns* 's) creates a non dynamic variable, but how do I achieve (def ^:dynamic s) programmatically? Thanks, Marc -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from

Re: Create dynamic vars programmatically

2012-09-04 Thread Herwig Hochleitner
Beware however, that interning vars programmatically is not recommended. If you need fresh vars during runtime, use with-local-vars, which also produces dynamic vars. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Create dynamic vars programmatically

2012-09-04 Thread Herwig Hochleitner
2012/9/4 mdzaebel > (doseq [s '(a b c)] (intern *ns* s 0)) creates non-dynamic var's. > > However, how could I produce *dynamic* var's. I tried with-meta but > failed. In other words, what does (def ^:dynamic a) internally do? > You can use clojure.lang.Var.setDynamic https://github.com/clojure/

Create dynamic vars programmatically

2012-09-04 Thread mdzaebel
(doseq [s '(a b c)] (intern *ns* s 0)) creates non-dynamic var's. However, how could I produce *dynamic* var's. I tried with-meta but failed. In other words, what does (def ^:dynamic a) internally do? *Thanks in advance, Marc* -- You received this message because you are subscribed to the Goog