Small parsing bug in data.json - advice sought

2015-07-28 Thread Matthew Gilliard
Hello. I'm interested in fixing this bug: http://dev.clojure.org/jira/browse/DJSON-21 data.json/read currently reads from the start of a java.io.Reader and as soon as it has a read and parsed a complete form it returns it. This is good and logical but it leads to input like "123abc" being parsed

Re: ANN: metrics-clojure 0.1.0

2011-11-02 Thread Matthew Gilliard
Ah - we'll certainly be using this soon - thanks! mg On Tue, Nov 1, 2011 at 4:32 PM, Steve Losh wrote: > Last night I released an initial version of metrics-clojure, which is a thin > Clojure wrapper around Coda Hale's awesome metrics[1] library: > > http://github.com/sjl/metrics-clojure > http

Re: why is it necessary to use identity to check for nils in an if statement

2011-08-23 Thread Matthew Gilliard
> user=> (defn if-a [a b] (if (a) (str a) (str b))) The problem is " (a) " - it tries to call a as a function, which throws NullPointer if a is nil. You meant: > user=> (defn if-a [a b] (if a (str a) (str b))) mg On Tue, Aug 23, 2011 at 9:37 PM, Andrew Xue wrote: > this doesn't work: > >

Re: Another ClojureScript app in the wild

2011-08-18 Thread Matthew Gilliard
formance issue with the Chrome js engine the only one operating > fast enough to smoothly render the game? > > Sam > > --- > http://sam.aaron.name > > On 17 Aug 2011, at 23:00, Matthew Gilliard wrote: > >> I've been playing around writing a fun little Clojur

Another ClojureScript app in the wild

2011-08-17 Thread Matthew Gilliard
I've been playing around writing a fun little ClojureScript project - it's a bit different, so I thought you might like to see it: http://mjg123.github.com/pacman/pacman.html As I was feeling my way quite blindly through ClojureScript and gClosure I have let the code get into a bit of a mess an

Re: ClojureScript browser-oriented REPL

2011-07-28 Thread Matthew Gilliard
I can confirm that this is awesome! Thanks Chris mg On Thu, Jul 28, 2011 at 7:40 PM, Chris Granger wrote: > Hey Guys, > > I set out and built a clojurescript REPL that uses the browser as it's > execution environment instead of rhino (yes, you can pop up all the > alerts you want!). I'm sure

Re: clojurescript: How to transform a clojurescript map to a javascript object?

2011-07-24 Thread Matthew Gilliard
A function to turn clojure maps is shown here: https://gist.github.com/1098417 to go the reverse way, use (js->clj), there are examples here: https://github.com/clojure/clojurescript/blob/master/samples/twitterbuzz/src/twitterbuzz/core.cljs mg On Fri, Jul 22, 2011 at 8:50 PM, Robert Luo wrote: