Re: [ANN] stories - bdd lib for clojure

2013-04-28 Thread Michael Klishin
2013/4/28 Steven Degutis sbdegu...@gmail.com I'd put it on Clojars but I can't really figure out how to deal with this gpg stuff. Seems way more complicated. Wish clojure had something easier, like homebrew and melpa. But whatever. GPG signint is currently optional. lein do pom, jar scp

Re: merge nested maps

2013-04-28 Thread Gary Verhaegen
Shouldn't that docstring read If vals are not maps ? On 25 April 2013 23:26, Stuart Sierra the.stuart.sie...@gmail.com wrote: Here's a way to do it from the Pedestal demo source code: (defn deep-merge Recursively merges maps. If keys are not maps, the last value wins. [ vals] (if

Re: Do functions never get inlined by jvm?

2013-04-28 Thread Gary Verhaegen
I never understood why people complain about the documentation of clojure/core. From the very beginning, I have found the docstrings to be exactly what I needed; when I first began 4clojure, I had On 26 April 2013 01:30, u1204 d...@axiom-developer.org wrote: ...0? :-) Tim Daly -- -- You

Re: Do functions never get inlined by jvm?

2013-04-28 Thread Gary Verhaegen
[sorry for a premature send...] I had the official documentation (http://clojure.github.io/clojure/clojure.core-api.html) open in a browser and was looking for things with plain search function of my browser. I always found the docstrings to be very clear and to the point. But then, I did it the

Re: conform to interface for related multi-methods?

2013-04-28 Thread Gary Verhaegen
Could you perhaps elaborate on what you would like to do that protocols do not support? On 26 April 2013 18:58, Steven Degutis sbdegu...@gmail.com wrote: I found that I want to have multiple multi-methods, but grouped together, much like an interface. Specifically, I have already-existing

[ANN] Clojure Cup 2013

2013-04-28 Thread Tero Parviainen
I've started putting together Clojure Cup, a global programming competition for Clojure and ClojureScript programmers. The idea is to have a 48-hour hackathon, similar to Rails Rumble and Node.js Knockout. Those events have been great fun, and I'm hoping we can put together something similar

recur doesn't complain when autoboxing fails?

2013-04-28 Thread AtKaaZ
= (defn abc [] 3) #'ants/abc = (loop [a 1] (when (= 1 a) (recur (abc NO_SOURCE_FILE:2 recur arg for primitive local: a is not matching primitive, had: Object, needed: long Auto-boxing loop arg: a nil = (loop [a 1] (when (= 1 a) (recur (long (abc) nil = (loop [a 1] (when

Re: recur doesn't complain when autoboxing fails?

2013-04-28 Thread John D. Hume
On Sun, Apr 28, 2013 at 5:46 AM, AtKaaZ atk...@gmail.com wrote: = (defn abc [] 3) #'ants/abc = (loop [a 1] (when (= 1 a) (recur (abc NO_SOURCE_FILE:2 recur arg for primitive local: a is not matching primitive, had: Object, needed: long Auto-boxing loop arg: a nil The compiler

Re: conform to interface for related multi-methods?

2013-04-28 Thread John D. Hume
On Fri, Apr 26, 2013 at 11:58 AM, Steven Degutis sbdegu...@gmail.comwrote: I found that I want to have multiple multi-methods, but grouped together, much like an interface. There's no syntax for grouping multimethods, but wouldn't it be good enough to put the defmulti forms near one another?

Re: [ANN] stories - bdd lib for clojure

2013-04-28 Thread Nelson Morris
On Apr 28, 2013 1:26 AM, Michael Klishin michael.s.klis...@gmail.com wrote: 2013/4/28 Steven Degutis sbdegu...@gmail.com I'd put it on Clojars but I can't really figure out how to deal with this gpg stuff. Seems way more complicated. Wish clojure had something easier, like homebrew and melpa.

Re: recur doesn't complain when autoboxing fails?

2013-04-28 Thread AtKaaZ
Thank you very much, I see it now. 1. boxing means from primitive to object; unboxing is from object to primitive (I disregarded this for some reason) 2. it does say the loop arg not the recur arg: Auto-boxing loop arg: a On Sun, Apr 28, 2013 at 3:38 PM, John D. Hume

Re: Parallel let form

2013-04-28 Thread Gunnar Völkel
It is not broken. It fulfills the discussed goal of having independent parallel calls in a let-like macro. Thus the name plet. Using a previous binding in another binding of plet was no goal. Therefore you can use the normal let macro. In a library one should add the intention to use it only

Re: Now *there*'s a machine made for Clojure.

2013-04-28 Thread Lee Spector
On Apr 28, 2013, at 12:34 AM, Timothy Baldridge wrote: E-mail thread had less to do with issues of Clojure per se, but more with issues the JVM had running on a 48-way machine. Or am I missing something? IIRC the Azul people played with Clojure a bit, I wonder if their suped-up JVM

Re: What Slows Down clojure-hadoop?

2013-04-28 Thread Ji Zhang
HI, I come with an update. Apart from the slow startup time issue, which I can resolve by resuing JVM or enlarge the splits, there's another factor that influence performance a lot, GC. It turns out Clojure will generate a lot of transient objects, which causes frequent young gc, over five

Re: [ANN] stories - bdd lib for clojure

2013-04-28 Thread Steven Degutis
Great, thanks. Now it's at https://clojars.org/stories -Steven On Sun, Apr 28, 2013 at 1:25 AM, Michael Klishin michael.s.klis...@gmail.com wrote: 2013/4/28 Steven Degutis sbdegu...@gmail.com I'd put it on Clojars but I can't really figure out how to deal with this gpg stuff. Seems way

Re: merge nested maps

2013-04-28 Thread Stuart Sierra
Yes. On Sun, Apr 28, 2013 at 4:55 AM, Gary Verhaegen gary.verhae...@gmail.comwrote: Shouldn't that docstring read If vals are not maps ? On 25 April 2013 23:26, Stuart Sierra the.stuart.sie...@gmail.com wrote: Here's a way to do it from the Pedestal demo source code: (defn deep-merge

Re: What Slows Down clojure-hadoop?

2013-04-28 Thread Gary Trakhman
We use clojure on hadoop by using the Cascading framework, it would be hard to see the influence of clojure on performance because the code is complicated. But, that means clojure is used mostly to specify the Flow (a DAG construct) that Cascading provides. That's a way to use clojure that

Re: What Slows Down clojure-hadoop?

2013-04-28 Thread Gary Trakhman
meant to say, uncontended atom swaps are going to be a bit slower than setting a java field, but unless you're doing a ton of them you probably wouldn't notice. On Sun, Apr 28, 2013 at 10:45 AM, Gary Trakhman gary.trakh...@gmail.comwrote: We use clojure on hadoop by using the Cascading

Re: Now *there*'s a machine made for Clojure.

2013-04-28 Thread Manuel Paccagnella
Il giorno domenica 28 aprile 2013 15:28:03 UTC+2, Lee ha scritto: On Apr 28, 2013, at 12:34 AM, Timothy Baldridge wrote: E-mail thread had less to do with issues of Clojure per se, but more with issues the JVM had running on a 48-way machine. Or am I missing something? IIRC the

Re: Now *there*'s a machine made for Clojure.

2013-04-28 Thread Lee Spector
On Apr 28, 2013, at 10:57 AM, Manuel Paccagnella wrote: This is an interesting perspective. Are you saying that currently Clojure doesn't offer adequate tools to take full advantage of parallel execution on multi-core machines? I am speaking only from my own experience, and only relative

Re: Now *there*'s a machine made for Clojure.

2013-04-28 Thread Gary Trakhman
I think it makes sense to consider cache-coherency and message passing to be on opposite ends of a spectrum, where with message-passing you're explicitly providing the communication protocol and giving more control, and in cache-coherent architectures you're relying on the CPU to do it for you. I

Re: Now *there*'s a machine made for Clojure.

2013-04-28 Thread Manuel Paccagnella
Ok, for everyone that is interested: thishttp://www.meetup.com/Functional-Programming-Connoisseurs/messages/boards/thread/30946382thread on meetup clarified things a bit for me and probably it's a good summary on the specific case that Lee found. Il giorno domenica 28 aprile 2013 17:07:04

Re: Now *there*'s a machine made for Clojure.

2013-04-28 Thread Gary Trakhman
Amdahl strikes again! I knew this lunch was too tasty to be free. I just thought of another analogy. When I think of something highly concurrent and scalable on the JVM, I think of web request handlers, which effectively use no memory-sharing for domain-specific work, at all, unless there is

Re: Now *there*'s a machine made for Clojure.

2013-04-28 Thread Andy Fingerhut
If the issue is that the GC implementation in Oracle's JVMs typically has a sequential bottleneck in it with default parameters, then yes, Amdahl's law is striking *for that GC implementation*. For problems that are embarassingly parallel (little or no communication or shared memory between

Re: Now *there*'s a machine made for Clojure.

2013-04-28 Thread Gary Trakhman
Ah, yes, I didn't mean to say that things are impossible, a good GC is already an example of a useful but leaky abstraction with appropriate knobs. Another example is a database like datomic. I mean that these tradeoffs and how they change with greater numbers of cores will force our hands in one

Re: Something like cond, but with test-fns

2013-04-28 Thread Stuart Sierra
You could do it with `condp`: (condp #(%1 %2) value foo-pred? (foo-result) bar-pred? (bar-result) else? (default-result)) -S On Saturday, April 20, 2013 5:15:14 AM UTC-4, Ken Scambler wrote: Hi there, I'm getting started with Clojure, and found myself really missing Scala-style

[ANN] repetition-hunter

2013-04-28 Thread mynomoto
Repetition hunter is a library to find repetitions in your code https://github.com/mynomoto/repetition-hunter Happy hunting! mynomoto https://github.com/mynomoto -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: [ANN] repetition-hunter

2013-04-28 Thread Alex Baranosky
Can it search for repetition across multiple namespaces? On Sun, Apr 28, 2013 at 11:45 AM, mynomoto mynom...@gmail.com wrote: Repetition hunter is a library to find repetitions in your code https://github.com/mynomoto/repetition-hunter Happy hunting! mynomoto https://github.com/mynomoto

Re: Now *there*'s a machine made for Clojure.

2013-04-28 Thread Lee Spector
On Apr 28, 2013, at 1:18 PM, Andy Fingerhut wrote: For problems that are embarassingly parallel (little or no communication or shared memory between threads), there is no law of the universe that says that GC must have a sequential bottleneck in it. A GC better tuned for such problems

Re: [ANN] repetition-hunter

2013-04-28 Thread Marcelo Yuji Nomoto
Not yet, but doesn't look hard to do. Will put in the todo list. On 4/28/13, Alex Baranosky alexander.barano...@gmail.com wrote: Can it search for repetition across multiple namespaces? On Sun, Apr 28, 2013 at 11:45 AM, mynomoto mynom...@gmail.com wrote: Repetition hunter is a library to

Re: [ANN] Clojure Cup 2013

2013-04-28 Thread Rob Lachlan
That looks like so much fun; can't wait! On Sunday, April 28, 2013 2:59:23 AM UTC-7, Tero Parviainen wrote: I've started putting together Clojure Cup, a global programming competition for Clojure and ClojureScript programmers. The idea is to have a 48-hour hackathon, similar to Rails Rumble

Re: clojure dependencies

2013-04-28 Thread John Gabriele
On Friday, April 26, 2013 8:04:02 PM UTC-4, jayvandal wrote: I have this code. (defproject jsql 1.0.0-SNAPSHOT :description FIXME: write :dependencies [[org.clojure/clojure 1.4.0]])(use 'clojure.java.jdbc) My question is where do the dependencies locate? I would put the files in the

memorize-clj

2013-04-28 Thread Jorge Urdaneta
Hi, I started a library called memorize-clj https://github.com/jorgeu/memorize-clj It provides a function memorize that take a function and cache its results using guava cache. Of course the function must be pure and the parameters should be easy to compare and get a hashcode. Maybe I'm

Re: memorize-clj

2013-04-28 Thread Leonardo Borges
As a matter of fact Clojure core has it :) Check it out: http://clojuredocs.org/clojure_core/clojure.core/memoize Leonardo Borges www.leonardoborges.com On Mon, Apr 29, 2013 at 1:51 PM, Jorge Urdaneta jorge.urdan...@gmail.comwrote: Hi, I started a library called memorize-clj

Re: memorize-clj

2013-04-28 Thread Jorge Urdaneta
Thank you. Shame on me On 28/04/13 23:28, Gary Trakhman wrote: Clojure has the http://clojuredocs.org/clojure_core/clojure.core/memoize function built-in, as well as https://github.com/clojure/core.memoize for more complicated stuff. On Sun, Apr 28, 2013 at 11:51 PM, Jorge Urdaneta

[ANN] Grojure, a Java/C# syntax atop Clojure using Kern

2013-04-28 Thread Gavin Grover
Grojure is a Java/C#/Groovy-like syntax atop Clojure using the Kern parser combinator library. It's also of interest as an example grammar for those using Kern to build their own grammars. Available from https://github.com/gavingroovygrover/grojure Gavin Groovy Grover -- -- You received

Re: memorize-clj

2013-04-28 Thread Baishampayan Ghose
One more reason to read Clojure's source code. Trust me, it's surprisingly easy to understand. Sent from phone. Please excuse brevity. On 29 Apr 2013 09:29, Jorge Urdaneta jorge.urdan...@gmail.com wrote: Thank you. Shame on me On 28/04/13 23:28, Gary Trakhman wrote: Clojure has the