Brian Watkins 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 integer. Also look
Thank you for the pointer to unchecked-remainder. That runs much
better.
-B
On May 3, 6:23 pm, kaukeb 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 say whether t
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 f
On May 2, 10:59 pm, David Barksdale wrote:
> On Dec 28 2009, 7:03 am, Konrad Hinsen
> 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
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 1.1
On Mon, May 3, 2010 at 10:21 AM, Olivier Lefevre 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 using Scala ins
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 (lo
On Mon, May 3, 2010 at 4:21 PM, Brian Watkins wrote:
> Any ideas about this?
>
> On May 2, 1:44 am, Brian Watkins 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]
> >
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 wrote:
> Yes,http://github.com/joshua-
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
Paulo Candido 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 Enclojure.
>
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
Oh, I see I see. Good to know. Thank-you sir.
On Sun, May 2, 2010 at 11:55 PM, Antony Blakey wrote:
>
> 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 '1.1.0'. For example 1)
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 quickly.
Any ideas about this?
On May 2, 1:44 am, Brian Watkins 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 q)) nf
>
On Mon, May 3, 2010 at 7:42 PM, Heinz N. Gies wrote:
>
> 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
>>
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 wrote:
> This is my
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
> =>
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 Clo
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
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 pa
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 classloade
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
in-memo
> 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, sen
On May 3, 11:16 am, Ralph 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 functionality.
-S
--
You r
On 3 May 2010 16:13, Sean Devlin 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
>
> (defn hash-set
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 wrote:
> (let [url (ClassLoader/getSystemResource "META-INF/MANIFEST.MF")
> manifest (java.util.jar.Manifest. (.openStream url
(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
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."
([]
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.
(.openStre
>On May 1, 10:05 pm, Phil Hagelberg 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 exceptions. Y
On Dec 28 2009, 7:03 am, Konrad Hinsen
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 amounts of tokens.
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 other
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 (control.c
34 matches
Mail list logo