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
(recur (inc n)
(mod (+ nf (* (mod S p) z)) limit)
Per Alex Osborne's reference to BigInteger constructors, here's a
random BigInteger function:
(defn rand-bigint [#^BigInteger bign, #^Random rnd]
(let [bits (inc (.bitLength bign))
bigr (BigInteger. bits rnd)]
(-> bign (.multiply bigr) (.shiftRight bits
--
You received this mes
The latest Thoughtworks technology radar says that clojure is the best of
the functional languages out there at the moment. I'm hoping this will lead
to greater adoption.
http://www.thoughtworks.com/radar/
FTA: Of the current crop of functional languages, the one we like the most
is Clojure: a si
More than one clojure or contrib jar file one the classpath, perhaps.
Can you try starting the labrepl from the command line and see if you
get the same error?
Stu
I'm getting this error in Eclipse:
Clojure 1.2.0-master-SNAPSHOT
1:1 user=> * (require 'labrepl)
* (labrepl/-main)
#
ja
Can you send your .project and .classpath files, for analysis ? (Place
them in the files section of the google group, please)
2010/5/1 Keno :
> I'm getting this error in Eclipse:
>
> Clojure 1.2.0-master-SNAPSHOT
> 1:1 user=> * (require 'labrepl)
> * (labrepl/-main)
> #
> java.lang.Exceptio
Hello Stuart,
"they don't work as you'd expect".
Ah, I see. Thank you ;-)
Hm. Can you point me to some documentation about these special rules
then?
Many thanks, alux
On 30 Apr., 18:10, Stuart Sierra wrote:
> "ns" and "in-ns" have special evaluation rules. In general, they
> don't work as
On Sun, 02 May 2010 13:06:56 +1000
Alex Osborne wrote:
> e writes:
> > Can you imagine how disruptive it would be at this point to do it the
> > other way around? If you were starting out today without any Lisp
> > baggage, it seems TOTALLY obvious to me that lists would have been (1
> > 2 3), a
On May 2, 11:14 pm, Mike Meyer wrote:
> On Sun, 02 May 2010 13:06:56 +1000
> To get behavior similar to the vector constructs, you want to use
> list, which works like vector, except returning a list instead of a
> vector: (list 1 2 3 (print :hello)). It seems that what's missing here
> is a sy
Am Sonntag, 11. April 2010 00:59:47 schrieb DanL:
> On 11 Apr., 00:34, Ævar Arnfjörð Bjarmason wrote:
> > > As far as I know, there were problems with the protocol using symbols
> > > in CL's package::symbol syntax (and some other characters not being
> > > allowed in Clojure) after changes in CVS
On Sun, 2 May 2010 14:52:17 -0700 (PDT)
Jarkko Oranen wrote:
> On May 2, 11:14 pm, Mike Meyer 620...@mired.org> wrote:
> > On Sun, 02 May 2010 13:06:56 +1000
> > To get behavior similar to the vector constructs, you want to use
> > list, which works like vector, except returning a list instead of
I'm making a parsing library that can keep track of its location in a
stream of tokens, and the tokens can be of any type—character, map,
and so forth. I need advice on this question:
Can you think of an instance where the location would not be a line
number and column number, such as {:line 3, :c
Hey, ok so a noobie question here. I'm trying to use the 'http-agent'
function to make HTTP calls. I can do so easily as in fig. 1. But when I try
to make a PUT call as in fig. 2, I get a pretty ugly stacktrace, the bottom
one having the error "Caused by: java.lang.IllegalArgumentException: No
meth
On Sun, May 2, 2010 at 6:29 PM, joshua-choi wrote:
> I'm making a parsing library that can keep track of its location in a
> stream of tokens, and the tokens can be of any type—character, map,
> and so forth. I need advice on this question:
>
> Can you think of an instance where the location would
Unless you're dealing with 1) binary data or 2) structured data (ie. XML)
where a path is more appropriate, then I think line / column is the way to
go.
Now, is this a clojure parser? Or a clojure parser generator library that
consumes a BNF-like file that defines another lang? As far as I can tel
On 03/05/2010, at 10:47 AM, Timothy Washington wrote:
> Hey, ok so a noobie question here. I'm trying to use the 'http-agent'
> function to make HTTP calls. I can do so easily as in fig. 1. But when I try
> to make a PUT call as in fig. 2, I get a pretty ugly stacktrace, the bottom
> one havin
Yes, that was it.
Thanks
On Sun, May 2, 2010 at 10:04 PM, Antony Blakey wrote:
>
> On 03/05/2010, at 10:47 AM, Timothy Washington wrote:
>
> > Hey, ok so a noobie question here. I'm trying to use the 'http-agent'
> function to make HTTP calls. I can do so easily as in fig. 1. But when I try
> to
I've noticed that there are some big clojure-contrib source differences
between the 'master' branch and '1.1.0'. For example 1) 'io' is in master,
but not 1.1.0 2) json is in master, but json.read and json.write are in
1.1.0
I assume new developments are going into 1.1.0. But is it possible to ke
On Mon, May 3, 2010 at 3:43 AM, Robert Ewald wrote:
> Am Sonntag, 11. April 2010 00:59:47 schrieb DanL:
>> On 11 Apr., 00:34, Ævar Arnfjörð Bjarmason wrote:
>> > > As far as I know, there were problems with the protocol using symbols
>> > > in CL's package::symbol syntax (and some other character
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) 'io' is in master,
> but not 1.1.0 2) json is in master, but json.read and json.write are in 1.1.0
>
> I ass
On May 3, 2010, at 3:29 , joshua-choi wrote:
> Can you think of an instance where the location would not be a line
> number and column number, such as {:line 3, :column 25}?
I'd also add :file there (while this does not need to be a physical one it can
come in handy)
--
You received this mess
20 matches
Mail list logo