Reflection warnings in async/go-loop

2015-07-23 Thread Adam Krieg
Hi all, I have an issue with references to closed over references outside the go block not resolving types. The first function resolves fine. The second one cannot resolve (.readLine buf-reader) (defn parser-process-good "Consumes lines from a file, transforms entries of interest and puts t

Re: [ANN] Clojure 1.8.0-alpha2

2015-07-20 Thread Adam Krieg
Wow, I've upgraded a couple of projects and builds are roughly 50% faster over 1.7.0. Is that to be expected? On Saturday, July 18, 2015 at 9:12:12 AM UTC-4, Alex Miller wrote: > > Clojure 1.8.0-alpha1 and 1.8.0-alpha2 are now available. > > Try it via > - Download: > https://repo1.maven.org/ma

Re: Workaround for CLJ-1604?

2015-02-21 Thread Adam Krieg
gt; another alternative to the ones you mentioned. > > Andy > > On Thu, Feb 19, 2015 at 8:10 PM, Adam Krieg > wrote: > >> I'm running into what appears to be the same issue described in CLJ-1604 >> <http://dev.clojure.org/jira/browse/CLJ-1604>, where a li

Workaround for CLJ-1604?

2015-02-19 Thread Adam Krieg
I'm running into what appears to be the same issue described in CLJ-1604 , where a library that I'm using (Korma) has a function that clashes with a new function in Clojure core with 1.7, update. At the point of invocation, I get the compilation exce

Re: multimethod, record, type, and protocol pitfalls?

2014-11-05 Thread Adam Krieg
erally > not recommended. > > Extend-type is easier to use interactively than inline protocol extensions > (which are faster) as it's modifying dynamic globals. > > On Wed, Nov 5, 2014 at 6:03 PM, Adam Krieg <mailto:adammkr...@gmail.com>> wrote: >

Re: multimethod, record, type, and protocol pitfalls?

2014-11-05 Thread Adam Krieg
My experience with protocols is that the implementations can't be redefined, e.g changing an implementation. So if you change one of the applied protocols, you may need to restart your REPL. YMMV. Using records outside of their declared namespace is also really weird. You need to both require

Reading Metadata from Vars in scripts

2014-07-01 Thread Adam Krieg
I'm trying to read metadata from functions defined in several script files. By that, I mean, clojure files that are not in the classpath, but are executed directly from the repl, via (load-file "script.clj"). In each of the scripts, I have defined test functions similar to Clojure's clojure.te

Re: Sharing optional arguments among functions

2014-03-17 Thread Adam Krieg
Thanks, Luc! On Mar 17, 2014, at 11:08 AM, Luc Prefontaine wrote: > Use (apply base-fun opts) > > Luc P. > > >> I'm trying to define a couple of functions that support the same options, >> but return different return types. >> >> I have one function that is the "base" function that provide

Sharing optional arguments among functions

2014-03-17 Thread Adam Krieg
I'm trying to define a couple of functions that support the same options, but return different return types. I have one function that is the "base" function that provides the most raw access, and some other functions that call this base function and do their thing. I would like to make these k

Problems getting function metadata

2014-03-14 Thread Adam Krieg
I'm trying to get the meta data off a function that was stored in a map, (defn my-fun [x] x) (def fun-map {:function my-fun}) (meta (var my-fun)) ; this works (meta (var (:function fun-map))) ; This fails with CompilerException java.lang.ClassCastException: clojure.lang.PersistentList cannot b