Re: Hotspot predictability

2013-09-17 Thread Jason Wolfe
I've found similar things with compiling schema validators. Be careful with doseq benchmarks like this though, if you aren't careful hotspot can completely eliminate parts of the computation as dead code if it can infer the results aren't used. Criterion has a neat trick for making sure this

[ANN] clojure.java.jdbc 0.3.0-alpha5 available on Maven Central

2013-09-17 Thread Sean Corfield
Clojure JDBC contrib library takes another step toward an 0.3.0 with a fifth alpha release! Release 0.3.0-alpha5 on 2013-09-15 * DDL now supports entities naming strategy JDBC-53. * Attempt to address potential memory leaks due to closures - see Christophe Grand's blog post on Macros, closures and

[ANN] mod-lang-clojure for Vert.x 0.2.0 released

2013-09-17 Thread Toby Crawley
mod-lang-clojure[0] 0.2.0 was released earlier today, and is now available in Maven Central. The biggest change in 0.2.0 is the addition of a ClojureScript wrapper around the client-side vertxbus.js.[1] For a full list of changes, see the ChangeLog[2]. # What is mod-lang-clojure? mod-lang-cloju

Re: Clojure, floats, ints and OpenGL

2013-09-17 Thread Mikera
Hi Christophe, Looks like a good patch to me - would you be able to submit it to JIRA? I already submitted an issue to add primitive support for statically compiled functions (http://dev.clojure.org/jira/browse/CLJ-1263) which I think would complement yours nicely. The combination of the two sh

Re: Reading namespaced keywords

2013-09-17 Thread Dave Ray
Cool. You learn something new every day :) On Tuesday, September 17, 2013, Brandon Bloom wrote: > > The double-colon is only shorthand for the current namespace: > > Or other namespaces via an alias: > > (alias 'clj 'clojure.core) > ::clj/foo => :clojure.core/foo > > Inside ns forms, the :as keyw

Re: Reading namespaced keywords

2013-09-17 Thread Brandon Bloom
> The double-colon is only shorthand for the current namespace: Or other namespaces via an alias: (alias 'clj 'clojure.core) ::clj/foo => :clojure.core/foo Inside ns forms, the :as keyword creates aliases. -- -- You received this message because you are subscribed to the Google Groups "Clojur

Re: Reading namespaced keywords

2013-09-17 Thread Andy Fingerhut
It is used in test.generative code by Stuart Halloway, which is probably about as supported as you can get: https://github.com/clojure/test.generative/blob/master/src/main/clojure/clojure/test/generative/runner.clj#L55 Andy On Tue, Sep 17, 2013 at 5:16 PM, Andy Fingerhut wrote: > Casper, in t

Re: Reading namespaced keywords

2013-09-17 Thread Andy Fingerhut
Casper, in the example source file you pointed at in the core.logic test suite, the only times it uses the ::/ syntax is where is an alias for a namespace that has been created by an earlier :require statement. In my limited testing in Clojure 1.5.1, that syntax throws an exception if is an exis

Re: [ANN] clojure-sql 0.1.0: relational algebra in clojure

2013-09-17 Thread Carlo Zancanaro
On Tue, Sep 17, 2013 at 02:28:08AM -0700, Daniel Neal wrote: > I'd be interested in knowing some more about your approach compared to that > of ClojureQL and the motivation behind it. Sure! The basic difference is that I tried to be a little bit more rigid in how queries must be constructed. I t

Re: Reading namespaced keywords

2013-09-17 Thread Dave Ray
A namespace-qualified keyword has a single colon: :my-namespace/something The double-colon is only shorthand for the current namespace: (in-ns 'my-namespace) ::something -> :my-namespace/something Dave On Tue, Sep 17, 2013 at 4:58 PM, Casper Clausen wrote: > The double colon keyword create

Re: Reading namespaced keywords

2013-09-17 Thread Casper Clausen
The double colon keyword creates a namespaced keyword and is perfectly valid syntax. It's just not used that often :) By default a keyword like ::test resolves to the current namespace like ::current-ns/test, but you can also provide another ns which causes the problem when reading. Have at l

Clojure BBM Channel

2013-09-17 Thread Josh Comer
For those using the beta version of BBM Channels, I have created a new channel all about clojure. Below is the barcode with which to join. Cheers, Josh -- -- You received this m

Reading namespaced keywords

2013-09-17 Thread Casper Clausen
I am reading a bunch of clojure files using the build-in reader (or tools.reader, it has the same problem) and I am running into a problem regarding namespaced keywords (is that the right term?) such as ::l/test. => (read-string "::l/test") RuntimeException Invalid token: ::l/test clojure.lang

Re: Reading namespaced keywords

2013-09-17 Thread Dave Ray
Hey, You have too many colons: user=> (read-string ":l/test") :l/test Dave On Tue, Sep 17, 2013 at 4:03 PM, Casper Clausen wrote: > I am reading a bunch of clojure files using the build-in reader (or > tools.reader, it has the same problem) and I am running into a problem > regarding names

Re: another game of exploding heap, via clojure.string/split

2013-09-17 Thread Andy Fingerhut
Some of the hits point at commercial tools, which you didn't mention. I've heard positive comments about YourKit in the past. It is commercial, but it looks pretty easy to get a 15-day evaluation license. I haven't used it, but it claims to have some features to aid in detecting and analyzing me

Re: Building Trees

2013-09-17 Thread Peter Mancini
I thought last night I had not stated the exact root problem, so I'm glad you brought it up. It is an underlying assumption with my co-workers, but out of that context it is important to state it explicitly. The issue is perplexity . The tree is built ro

Re: Hotspot predictability

2013-09-17 Thread Jamie Brandon
For larger patterns, the staged version is actually significantly faster: https://gist.github.com/jamii/6597235 On 17 September 2013 16:29, Jamie Brandon wrote: > I ran a little benchmark comparing different implementations of a toy > pattern matching protocol: > > https://gist.github.com/jamii/

Re: Memory leak problem

2013-09-17 Thread Brian Craft
I'm learning that the tooling for the jvm covers a spectrum from pathetically broken to non-existent. I've had some luck running jmap like "jmap -histo:live ". Pipe it through head and run with watch, and you have a crude real-time monitor. E.g. running against the processing running from a SNA

Re: another game of exploding heap, via clojure.string/split

2013-09-17 Thread Brian Craft
I did, of course, spend a lot of time with google before posting. All of the hits point to jconsole, jmap, and visualvm. None of these tools work reliably. They hang, they crash, they spit up errors, they generate useless results. You'll note in another thread this morning another developer hav

Re: another game of exploding heap, via clojure.string/split

2013-09-17 Thread Brian Craft
Awesome, thanks! I'd forgotten about the hits for MAT, because I don't use eclipse, and I had not found YourKit. On Tuesday, September 17, 2013 9:13:17 AM UTC-7, Andy Fingerhut wrote: > > I didn't notice before posting my previous message that YourKit also has a > free "for open source project u

Re: Clojure, floats, ints and OpenGL

2013-09-17 Thread Christophe Grand
I ported Mikera's benchmark to Clojure using my patch https://gist.github.com/cgrand/6595939 The ratio between time-float and time-double (0.632) is very similar to the ratio between timeFloat and timeDouble Mikera reported (0.618) On Tue, Sep 17, 2013 at 1:25 PM, Christophe Grand wrote: > Here

Re: another game of exploding heap, via clojure.string/split

2013-09-17 Thread Andy Fingerhut
I didn't notice before posting my previous message that YourKit also has a free "for open source project use only" license for their tool. Click on the "Open Source" or "License Comparison" tabs on this page: http://www.yourkit.com/purchase/index.jsp On Tue, Sep 17, 2013 at 8:56 AM, Andy Fi

Re: another game of exploding heap, via clojure.string/split

2013-09-17 Thread Julien
You might want to give Eclipse MAT (http://www.eclipse.org/mat/) a try. It can be used as a standalone tool. Julien Le mardi 17 septembre 2013 12:45:41 UTC-3, Brian Craft a écrit : > > I did, of course, spend a lot of time with google before posting. All of > the hits point to jconsole, jmap, a

Hotspot predictability

2013-09-17 Thread Jamie Brandon
I ran a little benchmark comparing different implementations of a toy pattern matching protocol: https://gist.github.com/jamii/6595850 I'm surprised to find that the staged version is not significantly slower than the compiled version. Now I'm wondering whether this is feasible on a larger scale.

Re: another game of exploding heap, via clojure.string/split

2013-09-17 Thread Brian Craft
On Thursday, September 12, 2013 7:47:02 PM UTC-7, Cedric Greevey wrote: > > On Thu, Sep 12, 2013 at 3:33 PM, Andy Fingerhut > > > wrote: > >> I have just added some discussion of this on ClojureDocs.org for the >> function clojure.core/subs, and references to that discussion for several >> ot

Re: another game of exploding heap, via clojure.string/split

2013-09-17 Thread Andy Fingerhut
Another possibility: The people who know aren't reading this thread. I'd tell you if I knew, but I haven't needed to track down a problem like this for several years, and forgotten whatever tool I used at the time (it was probably jmap). Suggestion: Google search "java memory leak" and see what t

Re: Weird core.async/ClojureScript not workings...

2013-09-17 Thread David Pollak
I continue to see the issue with 1878/0.1.0-SNAPSHOT, but when I rolled back to 1859, the issue went away. Thanks Keith! On Tue, Sep 17, 2013 at 6:42 AM, David Nolen wrote: > Works fine for me using core.async master. I just ran `lein install` from > the core.async directory and changed projec

Re: Weird core.async/ClojureScript not workings...

2013-09-17 Thread David Nolen
Works fine for me using core.async master. I just ran `lein install` from the core.async directory and changed project.clj core.async to: [core.async "0.1.0-SNAPSHOT"] David On Mon, Sep 16, 2013 at 11:29 PM, Keith Irwin wrote: > I'm having the same issue. > > Here's a project with a "timeout"

Re: Memory leak problem

2013-09-17 Thread Andy Fingerhut
If the problem persists after that change, then at least we know that it isn't the large strings produced by 'slurp' that are causing the problem, but something else. I don't have any guesses based on what you have shown where that might be. I've seen your message about difficulties using tools l

Re: Weird core.async/ClojureScript not workings...

2013-09-17 Thread Keith Irwin
I'm having the same issue. Here's a project with a "timeout" loop demonstrating the problem: https://github.com/zentrope/clock Using core.async SNAPSHOT and any clojurescript release after 1859 seems to break along the same lines as the OP. Other elements I have going: - cljsbuild 0.3.3

Re: [ANN] clojure-sql 0.1.0: relational algebra in clojure

2013-09-17 Thread Daniel Neal
This library looks great! I've always liked ClojureQL much more than the other Clojure SQL libraries, exactly for its emphasis on composability and relational algebra. At first looks - your library looks like it will be easier to extend for different database servers... I'd be interested in k

Re: Clojure, floats, ints and OpenGL

2013-09-17 Thread Christophe Grand
Here is the mundane patch I described earlier: https://github.com/cgrand/clojure/commit/4c202ad9757ce47ac9e669847c0e5bf68785e2d6 It adds four functions (add-, multiply-, divide- and subtract-float), backs them with their corresponding bytecodes and enhance the conversion emitted when going from lo

Re: "interleave" with one argument

2013-09-17 Thread Paul
My bad - fixed in 1.6! On Friday, February 15, 2013 9:15:31 PM UTC, Denis Washington wrote: > > Hi, > > I just solved the "Replicate a Sequence" problem on 4clojure [1] using > "interleave". However, I noticed that "interleave" cannot be called with > a single argument. My first attempt at solv

Re: "interleave" with one argument

2013-09-17 Thread Paul
Hi Denis, This should also work, but fails for the same reason you outline: #(apply interleave (repeat %2 %1)) The jira ticket says the enhancement was closed in V1.3 although it is still failing in V1.5.1. P. On Friday, February 15, 2013 9:15:31 PM UTC, Denis Washington wrote: > > Hi, > >

Re: Memory leak problem

2013-09-17 Thread Joachim De Beule
Dear Brian, Thanks for your reply. I tried to use jmap, unfortunately it fails: bash-3.2$ jmap -F -dump:file=heap.bin 58708 Attaching to process ID 58708, please wait... Debugger attached successfully. Server compiler detected. JVM version is 20.51-b01-457 Dumping heap to heap.bin ... Exception i

Re: Memory leak problem

2013-09-17 Thread Joachim De Beule
Dear Andy, Thanks for your reply. I am using java version 1.6.0_51. I'm a bit reluctant to upgrade however, so I was wondering how sure you are that this is indeed the problem? The problem persists after calling clojure.tools.reader.edn/read on (java.io.PushbackReader. (clojure.java.io/reader

Re: [ANN] Cognitect

2013-09-17 Thread Mikera
Congrats on the new venture - wishing you the best of luck! On Monday, 16 September 2013 21:50:46 UTC+8, Rich Hickey wrote: > > I just wanted to let everyone know that Metadata Partners (the company > behind Datomic) and I have merged with Relevance, Inc., to form Cognitect, > Inc. This merger i

Re: Clojure, floats, ints and OpenGL

2013-09-17 Thread Mikera
Please, no! Sure, forking Clojure is technically possible and might even solve the specific problem for the OP. But that's not the point. This isn't a technical problem, it's a social/organisational problem. The idea that we should fork Clojure (or even create an intricate clever new library t