Re: labrepl: kl...@feersum:~/projects/labrepl$ script/repl java.lang.ExceptionInInitializerError (control.clj:9)

2010-05-03 Thread gnash
I still seem to be having this problem with the latest from github. This is what is listed in my project.clj [org.clojure/clojure 1.2.0-master-20100430.160229-59] Yields: Clojure 1.2.0-master-SNAPSHOT user= (require 'labrepl) java.lang.ExceptionInInitializerError

Re: Debugger REPL feature request

2010-05-03 Thread JS
On May 1, 10:05 pm, Phil Hagelberg p...@hagelb.org wrote: Have you read about this? http://hugoduncan.org/post/2010/swank_clojure_gets_a_break_with_the_l... Looks good! Thnx for the link. If you are going to interact with other libraries on the JVM, you must be capable of handling Java

Re: Monad problem: rewriting a recursive domonad call to not blow up the stack

2010-05-03 Thread David Barksdale
On Dec 28 2009, 7:03 am, Konrad Hinsen konrad.hin...@fastmail.net wrote: On 27.12.2009, at 01:47, samppi wrote: creates a new rule that repeats a given subrule. The problem with rep+ right now is that it increases the stack for every token it consumes, which overflows the stack with large

Re: Any Clojure job out there?

2010-05-03 Thread Robert J Berger
We're on the lookout to hire folks into Clojure. Our entire backend is now in Clojure. We're also leveraging Hadoop/HBase, RabbitMQ, and Javascript among other tech.. We are finding that the use of Clojure allows us to do things with a very small team that would have been quite difficult with

Reading the manifest file

2010-05-03 Thread Ralph
Crossposted to StackoverFlow. How can a Clojure program find its own MANIFEST.MF (assuming it is packaged in a JAR file). I am trying to do this from my -main function, but I can't find a class to use in the following code: (.getValue (.. (java.util.jar.Manifest.

Interesting contrast in core

2010-05-03 Thread Sean Devlin
These two fns are right next to each other in core: (defn hash-map keyval = key val Returns a new hash map with supplied mappings. ([] {}) ([ keyvals] (. clojure.lang.PersistentHashMap (createWithCheck keyvals (defn hash-set Returns a new hash set with supplied keys. ([] #{})

Re: Reading the manifest file

2010-05-03 Thread Nurullah Akkaya
(let [url (ClassLoader/getSystemResource META-INF/MANIFEST.MF) manifest (java.util.jar.Manifest. (.openStream url))] (println (.entrySet (.getMainAttributes manifest ClassLoader/getSystemResource does allow you to get rid of Class/forName... -- Nurullah Akkaya http://nakkaya.com

Re: Reading the manifest file

2010-05-03 Thread Ralph
Yes, but I don't believe that it guarantees that you will get the manifest for the enclosing JAR file if you have more than one. On May 3, 10:28 am, Nurullah Akkaya nurul...@nakkaya.com wrote: (let [url (ClassLoader/getSystemResource META-INF/MANIFEST.MF)       manifest (java.util.jar.Manifest.

Re: Interesting contrast in core

2010-05-03 Thread Michael Wood
On 3 May 2010 16:13, Sean Devlin francoisdev...@gmail.com wrote: These two fns are right next to each other in core: (defn hash-map  keyval = key val  Returns a new hash map with supplied mappings.  ([] {})  ([ keyvals]   (. clojure.lang.PersistentHashMap (createWithCheck keyvals

Re: Reading the manifest file

2010-05-03 Thread Stuart Sierra
On May 3, 11:16 am, Ralph grkunt...@gmail.com wrote: Yes, but I don't believe that it guarantees that you will get the manifest for the enclosing JAR file if you have more than one. I don't think that's possible in the general sense. Application containers like OSGI may provide this

Re: Interesting contrast in core

2010-05-03 Thread Armando Blancas
I'm curious why hash-map uses a form to createWithCheck, and hash-set uses a static method. They both use a static method, though hash-set uses the newer idiomatic syntax. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

StackOverflow exception problem in filter

2010-05-03 Thread Anders Rune Jensen
Hello In a small project of mine, to learn clojure, I've run into a pesky stackoverflow bug. To sum up the problem, I have a compojure project running on clojure 1.1. My data model is just an in-memory ref to a (2300) items big list. When I a request in, I select what I need out from this

Re: Reading the manifest file

2010-05-03 Thread Laurent PETIT
Ralph, Using the Class.forName alone will not suffice, you'll also have to AOT compile your code, I guess. OSGi environments like Eclipse or other OSGi containers will more and more separate things into bundle class loaders, and in this context using JVM wide utilities or the context classloader

Re: clojure 1.2 seq fn enhancement FAQ

2010-05-03 Thread Olivier Lefevre
On 4/29/2010 6:49 PM, Michael Gardner wrote: +1. I can't imagine any use case for looking up a whole [key, value] pair in a hash-map. Agreed. The whole point of a map is to provide key-based lookup. Iterating over all (key, value) pairs in the map makes sense, not so much looking for one in

Re: StackOverflow exception problem in filter

2010-05-03 Thread Stuart Halloway
Not all the way to a solution, but here is a trivial example that demonstrates the issue: (def x (loop [ct 0 s (lazy-seq)] (if ( ct 1) s (recur (inc ct) (lazy-seq (filter identity s)) x = java.lang.StackOverflowError Hello In a small project of mine, to

Re: Any Clojure job out there?

2010-05-03 Thread Olivier Lefevre
On 5/2/2010 12:55 AM, ieslick wrote: Compass Labs is a silicon valley based social media startup company. Their data mining team just switched all their internal tools and data mining work to Clojure (production infrastructure is mostly Java/Scala/C) I find it interesting that they use both

Re: StackOverflow exception problem in filter

2010-05-03 Thread Heinz N. Gies
On May 3, 2010, at 20:20 , Stuart Halloway wrote: Not all the way to a solution, but here is a trivial example that demonstrates the issue: (def x (loop [ct 0 s (lazy-seq)] (if ( ct 1) s (recur (inc ct) (lazy-seq (filter identity s)) x =

Re: Trouble with Leiningen and Autodoc

2010-05-03 Thread Tom Faulhaber
Hi Joshua, Autodoc depends on clojure 1.1, which Phil has suggested might be a problem (he told me not to depend on a clojure version at all). Let me pull that dependency and see if that fixes the problem. Is this in your repo on github? Tom On May 1, 7:17 pm, joshua-choi rbysam...@gmail.com

Re: Primitive arithmetic and mod

2010-05-03 Thread Brian Watkins
Any ideas about this? On May 2, 1:44 am, Brian Watkins wildu...@gmail.com wrote: I'm trying to speed up computing terms of a simple recurrence where the terms are computed modulo some value each iteration, (defn NF-mod-limit [p q limit]  (loop [n 0, nf 0, z 0, S 290797]        (if (= n (inc

Re: Any Clojure job out there?

2010-05-03 Thread Dimitry Gashinsky
Hi, I am VP of Engineering for a financial technology startup Pico Quantitative Trading http://www.picotrading.com. We are located in New York and we are looking for people with Clojure and Financial background. We have around 20 thousand lines of Clojure code already and it is growing

Re: clojure-contrib diffs?

2010-05-03 Thread Timothy Washington
Oh, I see I see. Good to know. Thank-you sir. On Sun, May 2, 2010 at 11:55 PM, Antony Blakey antony.bla...@gmail.comwrote: On 03/05/2010, at 1:06 PM, Timothy Washington wrote: I've noticed that there are some big clojure-contrib source differences between the 'master' branch and

About paths

2010-05-03 Thread Paulo Candido
I have a very basic doubt: I have a script, say foo.clj in a namespace com.company.ns. foo.clj uses functions from another script, bar.clj in the same namespace. foo's namespace has the line (:use com.company.ns.bar). It works in the REPL, it works inside Netbeans with Enclojure. Now I'm stuck

Re: About paths

2010-05-03 Thread Alex Osborne
Paulo Candido paulo.cand...@gmail.com writes: I have a script, say foo.clj in a namespace com.company.ns. foo.clj uses functions from another script, bar.clj in the same namespace. foo's namespace has the line (:use com.company.ns.bar). It works in the REPL, it works inside Netbeans with

Re: Trouble with Leiningen and Autodoc

2010-05-03 Thread joshua-choi
Yes, http://github.com/joshua-choi/fnparse/tree/develop. You must use the latest tree in the develop branch (which is at the time of this writing commit baf3b39f51fdd3893471f52d330336b5a794fa6d). Thanks for the help, and I look forward to what you figure out. On May 3, 12:12 pm, Tom Faulhaber

Re: Trouble with Leiningen and Autodoc

2010-05-03 Thread joshua-choi
Actually, disregard the message above! You don't want the latest tree on the develop branch; it currently throws errors because defalias doesn't work with macros anymore. You want to use the tree at the tag 3.α.3! My apologies. On May 3, 5:15 pm, joshua-choi rbysam...@gmail.com wrote:

Re: Primitive arithmetic and mod

2010-05-03 Thread David Nolen
On Mon, May 3, 2010 at 4:21 PM, Brian Watkins wildu...@gmail.com wrote: Any ideas about this? On May 2, 1:44 am, Brian Watkins wildu...@gmail.com wrote: I'm trying to speed up computing terms of a simple recurrence where the terms are computed modulo some value each iteration, (defn

Re: Any Clojure job out there?

2010-05-03 Thread Sean Corfield
On Mon, May 3, 2010 at 10:21 AM, Olivier Lefevre lefev...@yahoo.com wrote: I find it interesting that they use both Clojure and Scala besides Java: I would have thought that these two represent opposite takes on post- or beyond-Java alternatives and that they'd use either one or the other. I'm

Re: Primitive arithmetic and mod

2010-05-03 Thread kaukeb
Using unchecked-remainder and adding a type declaration to the last constant keeps the primitives unboxed and improves performance by a factor of 6 for me. I couldn't say whether there's a reason rem and mod don't work like you'd expect here. (defn NF-mod-limit [p q limit] (let [p (long p) q

1.2 release ?

2010-05-03 Thread lprefontaine
Hi all, it's not that I want to put pressure on anyone here but there has been a number of discussions about the 1.2 release and I was wondering what's the horizon for a first release ? We are still in prod with 1.0 but some are salivating about some of the features of 1.2. We did not move to

Re: Monad problem: rewriting a recursive domonad call to not blow up the stack

2010-05-03 Thread David Barksdale
On May 2, 10:59 pm, David Barksdale amatus.amon...@gmail.com wrote: On Dec 28 2009, 7:03 am, Konrad Hinsen konrad.hin...@fastmail.net wrote: On 27.12.2009, at 01:47, samppi wrote: creates a new rule that repeats a given subrule. The problem with rep+ right now is that it increases

Re: Primitive arithmetic and mod

2010-05-03 Thread Brian Watkins
The main example is (NF-mod-limit 61 1000 (reduce * (repeat 10 61))) It runs in about 10 seconds but this is somewhat typical of other computations I want to be able to do that take longer. I'd just like to be able to make the integer math as fast as is reasonable in Clojure. I'll try rem

Re: Primitive arithmetic and mod

2010-05-03 Thread Brian Watkins
Thank you for the pointer to unchecked-remainder. That runs much better. -B On May 3, 6:23 pm, kaukeb kau...@gmail.com wrote: Using unchecked-remainder and adding a type declaration to the last constant keeps the primitives unboxed and improves performance by a factor of 6 for me. I couldn't

Re: Primitive arithmetic and mod

2010-05-03 Thread Alex Osborne
Brian Watkins wildu...@gmail.com writes: I'll try rem for time but I see that I still have to cast to long; Clojure doesn't think (rem (long ) (long x)) is a long. The error is recur arg for primitive local: nf must be matching primitive. Looks like it's casting it back to an