Re: ExceptionInInitialization error

2016-02-24 Thread Punit Naik
Thank you so much Gary. Updating Cheshire totally worked!! But may I ask how were you able to deduce that Cheshire was the problem? Do tell me so that in the future I can fix these kind of problems myself. On Thu, Feb 25, 2016 at 12:07 PM, Punit Naik wrote: > Okay thanks a lot Gary. Will try tha

Re: ExceptionInInitialization error

2016-02-24 Thread Punit Naik
Okay thanks a lot Gary. Will try that. On Thu, Feb 25, 2016 at 6:49 AM, Gary Verhaegen wrote: > So when I do `lein deps :tree` with these dependencies (except for the > swissknife one, which my computer does not seem to find), I get a > *lot* of conflicts with riemann, starting with: > > $ lein

Re: [ANN] debux 0.2.0 is out

2016-02-24 Thread Robert Levy
Looks like there's some overlap with the debugging utils in https://github.com/AlexBaranosky/print-foo On Wed, Feb 24, 2016 at 4:57 PM, Philos Kim wrote: > Debux is a simple but useful library for debugging Clojure and > ClojureScript. I wrote this library to debug my own Clojure(Script) code >

Re: ExceptionInInitialization error

2016-02-24 Thread Gary Verhaegen
So when I do `lein deps :tree` with these dependencies (except for the swissknife one, which my computer does not seem to find), I get a *lot* of conflicts with riemann, starting with: $ lein deps :tree Possibly confusing dependencies found: [cheshire "5.3.1"] overrides [riemann "0.2.10"] -> [clj

[ANN] debux 0.2.0 is out

2016-02-24 Thread Philos Kim
Debux is a simple but useful library for debugging Clojure and ClojureScript. I wrote this library to debug my own Clojure(Script) code and to analyze other developer's Clojure(Script) code. This version includes the new features of debugging ->, ->>, let and comp forms. https://github.com/phi

Re: Scripting with Clojure / "slow" boot time

2016-02-24 Thread ZhX Chen
Hi Alex, A couple of months ago I did an investigation on the slow boot time of `lein repl`. As you said, a lot of time (around 30% time on my computer) are spent on the features like completion. Also, I notice that there is a parsing library called `sjacket ` at https://github.com/cgrand/s

Re: [ANN] Doubling down on Onyx

2016-02-24 Thread Colin Fleming
Hi Michael, Congratulations! That's fantastic - I'm really happy to see more people being able to work full time on tools :) Cheers, Colin On 25 February 2016 at 05:22, Michael Drogalis wrote: > Hi everyone, > > I'm happy to announce that, starting next week, I'll be supporting the Onyx > Plat

Re: Add support for seq on Java streams?

2016-02-24 Thread Andrew Oberstar
If you want to use reduce or transducers on a stream, you could take a look at ike.cljj (shameless plug). Depending on your use case, it might not provide a lot of benefit over Gary's suggestion. https://github.com/ike-tools/ike.cljj Andrew Oberstar On Wed, Feb 24, 2016 at 7:07 AM <676c7...@gmai

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Michael du Breuil
If the JIT is eating it then you're right I'm absolutely fine with it. My concern is driven because this is in the hot loop of the program and the functions that are being called are fairly straightforward math that accumulate results into an array, and I am pushing the performance limits on th

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Kevin Downey
On 02/24/2016 02:53 AM, Michael du Breuil wrote: > The following (this is interop with libgdx if anyone is curious, > hud-corner-top-left is a delayed TextureRegion > > (.draw batch ^TextureRegion @hud-corner-top-left >(float -199) >(float -32)) > > Which yields the follow

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Michael du Breuil
A more reproduceable example: (let [y (float 10)] (println (str y))) Yields this: float y = RT.uncheckedFloatCast(10L); ((IFn)const__42.getRawRoot()).invoke(((IFn)const__43.getRawRoot()).invoke(Float.valueOf(y))); On Wednesday, February 24, 2016 at 1:15:41 PM UTC-7, Michael d

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Michael du Breuil
(let [x (float -199)] (.draw batch ^TextureRegion @hud-corner-top-left x (float -32))) That's an interop call to libgdx. That generated the disassembly I pasted before. On Wednesday, February 24, 2016 at 5:05:30 AM UTC-7, Nicola Mometto wrote: > > > > On 24 Feb 2016, at

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Michael du Breuil
I posted the disassembly from the AOT'd result, so I'm pretty clearly still seeing all the casting happening at runtime. I'm not sure why that is different then no.disassemble... On Wednesday, February 24, 2016 at 5:05:30 AM UTC-7, Nicola Mometto wrote: > > > > On 24 Feb 2016, at 11:58, Michael

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Nicola Mometto
Can you post the actual code you're compiling? > On 24 Feb 2016, at 20:03, Michael du Breuil > wrote: > > I posted the disassembly from the AOT'd result, so I'm pretty clearly still > seeing all the casting happening at runtime. I'm not sure why that is > different then no.disassemble... >

[ANN] Gorilla REPL v0.3.6

2016-02-24 Thread Jony Hudson
Hi All, I'm happy to point you to a new Gorilla REPL release. I can't take any credit for this, as all of the work was done by contributors in this release :-) From the changelog: ## Version 0.3.6 - Axis labels on plots (thanks to @dtolpin). - Bump to latest CIDER-nrepl version 0.10.2. - Undo

Re: [ANN] Doubling down on Onyx

2016-02-24 Thread Bruce Durling
Michael, Congrats! A great thing to get behind. cheers, Bruce On Wed, Feb 24, 2016 at 4:22 PM, Michael Drogalis wrote: > Hi everyone, > > I'm happy to announce that, starting next week, I'll be supporting the Onyx > Platform full time. > I want to thank the incredible Clojure community that's h

Re: [ANN] Doubling down on Onyx

2016-02-24 Thread Colin Yates
Congrats Michael - Onyx is a thing of beauty :-). On 24 February 2016 at 16:22, Michael Drogalis wrote: > Hi everyone, > > I'm happy to announce that, starting next week, I'll be supporting the Onyx > Platform full time. > I want to thank the incredible Clojure community that's helped to make Ony

[ANN] Doubling down on Onyx

2016-02-24 Thread Michael Drogalis
Hi everyone, I'm happy to announce that, starting next week, I'll be supporting the Onyx Platform full time. I want to thank the incredible Clojure community that's helped to make Onyx a successful open source project. Read on in the blog post

Re: Add support for seq on Java streams?

2016-02-24 Thread 676c7473
Thanks, Alex and Gary. I understand that Java 8 is not yet on the roadmap, so iterator-seq seems like the best solution. -- 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 fro

Re: Add support for seq on Java streams?

2016-02-24 Thread Gary Verhaegen
In the mean time, you can probably get pretty far with the java.util.stream.BaseStream#iterator method and the clojure.core/iterator-seq function. On Tuesday, 23 February 2016, Alex Miller wrote: > It may, however keep in mind that Clojure supports Java 1.6+ and Stream > was added in 1.8. That's

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Nicola Mometto
> On 24 Feb 2016, at 11:58, Michael du Breuil > wrote: > > That just performs a runtime cast to a variable then reference the variable > later, which is even worse. > > float x = RT.uncheckedFloatCast(-199L);((SpriteBatch)batch) > > .draw((TextureRegion)((IFn)const__5.getRawRoot()).inv

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Michael du Breuil
That just performs a runtime cast to a variable then reference the variable later, which is even worse. float x = RT.uncheckedFloatCast(-199L);((SpriteBatch)batch) .draw((TextureRegion)((IFn)const__5.getRawRoot()).invoke(const__42.getRawRoot()), x, RT.uncheckedFloatCast(-32

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Nicola Mometto
Those are runtime casts, this is the expected behaviour (although one could argue that clojure should be able to optimize them away at compile time). If you want to avoid the runtime casting, you can do something like this: (let [x (float 123)] (defn y [..] (.foo bar x))) > On 24 Feb 2

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Michael du Breuil
The following (this is interop with libgdx if anyone is curious, hud-corner-top-left is a delayed TextureRegion (.draw batch ^TextureRegion @hud-corner-top-left (float -199) (float -32)) Which yields the following: .draw((TextureRegion)((IFn)const__5.getRawRoot()).in

Re: Compile time constants not generated with the appropriate type.

2016-02-24 Thread Nicola Mometto
Can you post the code? > On 24 Feb 2016, at 10:26, Michael du Breuil > wrote: > > I have some interop code that I have carefully specified all the arguments to > be in the correct type (IE the function signature takes 3 floats, so I cast > everything to float so that I can avoid reflection).

Compile time constants not generated with the appropriate type.

2016-02-24 Thread Michael du Breuil
I have some interop code that I have carefully specified all the arguments to be in the correct type (IE the function signature takes 3 floats, so I cast everything to float so that I can avoid reflection). What I'm surprised by is compile time constants such as (float -173) or (float 8.5) are

Re: Compojure does not augment response map

2016-02-24 Thread Torsten Uhlmann
Got it, makes sense. Thanks, Gary! -- 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 new members are moderated - please be patient with your first post. To unsubscribe

Re: ExceptionInInitialization error

2016-02-24 Thread Punit Naik
Okay. So this is my project.clj: (defproject chowkidar "0.3.0-SNAPSHOT" :description "Formcept Monitoring Framework" :dependencies [[org.clojure/clojure "1.6.0"] [org.clojure/java.jmx "0.3.0"] [org.clojure/tools.logging "0.3.1"] [riemann/riem

Re: Compojure does not augment response map

2016-02-24 Thread Gary Verhaegen
My understanding is that compojure concerns itself mostly with routing and does not try (anymore?) to handle response maps. Concerning ring.util.response, I think these functions are meant to be threaded: (-> (not-found "oh noes") (content-type "text")) On Wednesday, 24 February 2016, Torste

Re: Compojure does not augment response map

2016-02-24 Thread Torsten Uhlmann
Thanks Gary! I haven't touched the middleware stack for a while, and I only found out about this thing when testing my routes for security. But, if response maps are supposed to be left alone, how is ring.util.response supposed to work, for instance the "not-found" function: (defn not-found "

Re: ExceptionInInitialization error

2016-02-24 Thread Gary Verhaegen
No sign of conflict there - that's a bit surprising. Can you post your project.clj? Do you have any explicit exclusions? What did you change last before it broke? Is it possible that you somehow corrupted your Maven repository and are missing the mentioned class? Maybe it's not a dependency issue

Re: Compojure does not augment response map

2016-02-24 Thread Gary Verhaegen
IIRC this has always been the behaviour of compojure: if you return a string it wraps it into a minimalist, valid Ring map, but if you return a map it assumes it is a Ring map and leaves it alone. There is a content-type ring middleware somewhere on the web, though in general I don't think the con

Re: ExceptionInInitialization error

2016-02-24 Thread Gary Verhaegen
Caused by:java.lang.ClassNotFoundException:com.fasterxml.jackson.dataformat. cbor.CBORFactory Looks like a dependency problem. If you can't share the whole code, can you please post the result of lein deps :tree On Wednesday, 24 February 2016, Punit Naik wrote: > I was compiling my project and

Compojure does not augment response map

2016-02-24 Thread Torsten Uhlmann
Hi, I'm experiencing a strange behavior in my app. I'm not sure if that's because of a version update or something I broke... The Compojure version used is 1.4.0 In the past a response like this would usually work: {:status 404 :headers {} :body "Not authorized"} The map would be augmented