Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-08 Thread Johannes
Hi Jason, thank for your hints, perhaps I can use your workaround. Johannes Am Sonntag, 8. Mai 2016 03:43:22 UTC+2 schrieb Jason Wolfe: > > Hi Johannes, > > I've run into this before. Here is a ticket [1] and some context and a > potential workaround [2]: > > [1] http://dev.clojure.org/jira/b

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-08 Thread Johannes
Hi Mike! Am Samstag, 7. Mai 2016 19:00:11 UTC+2 schrieb Mike Rodriguez: > > ... > I can see how the docs @ http://clojure.org/reference/evaluation could > mislead someone to thinking that it is perfectly fine and acceptable to > embed any objects into a call to `eval`, but I really don't think t

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-07 Thread Jason Wolfe
Hi Johannes, I've run into this before. Here is a ticket [1] and some context and a potential workaround [2]: [1] http://dev.clojure.org/jira/browse/CLJ-1206 [2] https://groups.google.com/d/msg/clojure/BZwinR2zNgU/8HGOgzOxzosJ -Jason On Thursday, May 5, 2016 at 1:32:21 AM UTC+7, Johannes w

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-07 Thread Mike Rodriguez
I won't speak directly to your use-case other than saying that `extend` is already a function, so there is no reason to call it with a macro or via strange evaluation orders via quotes and eval. You can define the record first, as normal, then call `extend` after dynamically and without messing

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-04 Thread Ben Kovitz
On May 4, 2016, at 6:08 PM, Johannes wrote: > okay, but why does the following work without quotation? > user> (def f- (let [v 1 > f (fn [x] x)] f)) > ;; => #'user/f- > user> (eval {:d f-}) > ;; => {:d #function[user/fn--14679/f--14680]} > user> > > The problem is that the place

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-04 Thread Johannes
Am Mittwoch, 4. Mai 2016 23:47:07 UTC+2 schrieb Ben Kovitz: > > On May 4, 2016, at 5:28 PM, Johannes > > wrote: > > Maybe you are right. But I've deliberately given function objects to eval > often without any problems until I used functions of some special kind. I > do not understand why the

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-04 Thread Ben Kovitz
On May 4, 2016, at 5:28 PM, Johannes wrote: > Maybe you are right. But I've deliberately given function objects to eval > often without any problems until I used functions of some special kind. I do > not understand why the behavior for the 2 versions of the function f- I've > shown is differe

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-04 Thread Johannes
Am Mittwoch, 4. Mai 2016 21:24:08 UTC+2 schrieb Ben Kovitz: > > On May 4, 2016, at 2:32 PM, Johannes > > wrote: > > > Is there any explanation for this behavior? > > My understanding is that you can't eval function objects. Whatever you > give to eval needs to be code that you could enter int

Re: strange (for me) problem with "No matching ctor found for class ..."

2016-05-04 Thread Ben Kovitz
On May 4, 2016, at 2:32 PM, Johannes wrote: > Is there any explanation for this behavior? My understanding is that you can't eval function objects. Whatever you give to eval needs to be code that you could enter into the REPL. You couldn't type #function[user/fn--13335/f--13336] into the REPL

strange (for me) problem with "No matching ctor found for class ..."

2016-05-04 Thread Johannes
Hi! I have a function f- defined using a local function f which uses a local var v: user> (def f- (let [v 1 f (fn [x] v)] f)) ;; => #'user/f- Putting f- in a map user> {:d f-} ;; => {:d #function[user/fn--13335/f--13336]} all is as expected. But giving the map as argument to eval u