Re: Calling object members with symbols

2015-10-18 Thread dennis zhuang
In such case you have to use `eval`, another post https://groups.google.com/forum/#!topic/clojure/YJNRnGXLr2I 2015-10-19 9:10 GMT+08:00 James Reeves : > On 18 October 2015 at 23:54, Timur wrote: > >> Hi all, >> >> Is there anyway to call an object

Re: lazyseq?

2015-10-18 Thread Timothy Baldridge
Often if you want to know if something is a lazy seq, you really want to know if it is a delayed computation. If that's the case, realized? may help. But I also wonder what you are trying to accomplish. There are many seqs in Clojure that are not lazy, and so could have interesting results if you

lazyseq?

2015-10-18 Thread Brian Marick
Is there a way to tell if `v` is a lazyseq other than `(instance? clojure.lang.LazySeq v)`? Seems like there should be, but I'm not seeing it. [Preparing to say "duh!"] -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Calling object members with symbols

2015-10-18 Thread Timur
Hi all, Is there anyway to call an object member using its symbol? For instance we have an object o, we get the symbol of a method, e.g., toString, of our object o using clojure.reflect/reflect and and I want to execute this method on this object through the symbol. For instance *(. obj

Re: Calling object members with symbols

2015-10-18 Thread Michael Blume
Nope, still won't work. (let [s 'toString] (invoke 1 s)) java.lang.IllegalArgumentException: No matching field found: s for class java.lang.Long On Sun, Oct 18, 2015 at 5:51 PM dennis zhuang wrote: > You may have to use macro: > > user=> (defmacro invoke [obj sym] `(.

Re: Calling object members with symbols

2015-10-18 Thread dennis zhuang
You may have to use macro: user=> (defmacro invoke [obj sym] `(. ~obj ~sym)) #'user/invoke user=> (invoke 1 toString) "1" 2015-10-19 6:54 GMT+08:00 Timur : > Hi all, > > Is there anyway to call an object member using its symbol? > > For instance we have an object o, we get

Re: Calling object members with symbols

2015-10-18 Thread James Reeves
On 18 October 2015 at 23:54, Timur wrote: > Hi all, > > Is there anyway to call an object member using its symbol? > > For instance we have an object o, we get the symbol of a method, e.g., > toString, of our object o using clojure.reflect/reflect and and I want to >

Re: [Video] Game development in Clojure (with play-clj)

2015-10-18 Thread Zach Oakes
That function was renamed to `key-pressed?`. On Saturday, October 17, 2015 at 7:32:44 PM UTC-4, amirteymuri wrote: > > Dear James, > is-pressed? can not be resolved for me. Is this a version matter? Is there > still a is-pressed? function? > Greetings > > Am Donnerstag, 27. März 2014 18:07:21

ClojureCLR setup guide/examples?

2015-10-18 Thread Rui Carmo
Hello guys, I'm re-investing in the .NET ecosystem, and decided to try my hand at adding ClojureCLR to the mix given my very positive experience with the JVM version. However, I'm having trouble with two basic things: - I can't find a comprehensive guide regarding setting up a working