Hello,
Am 19.10.2008 um 00:12 schrieb kwatford:
I don't think adding this should conflict with any existing code,
though I did notice that get currently accepts and apparently
ignores one extra parameter.
No. It does not ignore the extra parameter! This is a default value,
which is returned
I was reading though Phil Bagwells paper Ideal Hash Trees, when I
encountered this paragraph:
Note that the performance of the algorithm is seriously impacted
by the poor execution speed of the CTPOP emulation in Java, a problem
the Java
designers may wish to address.
I am assuming he means
Clojure's
(defn fib [n]
(if (or (zero? n) (= n 1))
1
(+ (fib (dec n) ) (fib (- n 2)
(time (fib 36))
Elapsed Time: 10475.325226 msecs
24157817
Scala's
def fib(n:Int):Int=if (n==0||n==1)1 else fib(n-1)+fib(n-2)
def time(cal: =Int)={
val
On Oct 19, 7:49 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Clojure's
(defn fib [n]
(if (or (zero? n) (= n 1))
1
(+ (fib (dec n) ) (fib (- n 2)
(time (fib 36))
Elapsed Time: 10475.325226 msecs
24157817
Scala's
def fib(n:Int):Int=if (n==0||n==1)1 else
Scala is sure to use java primitive int type underline, i.e value
type and boxed to java Integer when necessarily
But why not Clojure auto make this ?
gerry
On Oct 19, 11:31 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Here is coersion version for Clojure
(defn fib [n]
(let [n
There is also a faster way to calculate fibonacci numbers in Clojure
(code taken from from
http://en.wikibooks.org/wiki/Clojure_Programming#Lazy_Fibonacci):
(defn fib-seq []
((fn rfib [a b]
(lazy-cons a (rfib b (+ a b
0 1))
user= (time (take 38 (fib-seq)))
Elapsed time:
Rich,
I submitted a patch that adds support for exposing protected fields
inherited indirectly through the super class in gen-class. No problem
if it's unwanted, but would be good to know either way. Suppose the
original message should've had patch in the subject line; it's
exposing ancestral
This lazy cached calculate is wonderful ,but i think the benefit from
it mostly due to cache .
On Oct 19, 11:56 pm, Lauri Oherd [EMAIL PROTECTED] wrote:
There is also a faster way to calculate fibonacci numbers in Clojure
(code taken from
I think it might be more important where people are, where they live,
than where they come from. I live in Zürich, Switzerland.
On Oct 17, 11:27 am, Rastislav Kassak [EMAIL PROTECTED] wrote:
Hello Clojurians,
I think after 1st year of Clojure life it's good to check how far has
Clojure
Hello,
Am 19.10.2008 um 17:56 schrieb Lauri Oherd:
There is also a faster way to calculate fibonacci numbers in Clojure
(code taken from from
http://en.wikibooks.org/wiki/Clojure_Programming#Lazy_Fibonacci):
(defn fib-seq []
((fn rfib [a b]
(lazy-cons a (rfib b (+ a b
0 1))
On Oct 19, 2008, at 5:11 PM, J. McConnell wrote:
I've been thinking the same thing for awhile now and I'd love to help
contribute to an effort like this. Thanks for getting the idea out
there.
You're welcome. It seems like clojure.contrib could be a more
convenient place to keep this than
Hello,
I am a common lisp programmer and I use Slime extensively. I am
looking into using Clojure for an upcoming project (I have experience
with ABCL, but it is too slow) and I have clojure and swank-clojure
installed. Unfortunately slime-eval-print-last-expression (C-j in
*slime-scratch*) is
I like this idea and I would be willing to contribute.
On Oct 19, 6:43 pm, Stephen C. Gilardi [EMAIL PROTECTED] wrote:
On Oct 19, 2008, at 5:11 PM, J. McConnell wrote:
I've been thinking the same thing for awhile now and I'd love to help
contribute to an effort like this. Thanks for
Ditto. I've been thinking about this for a few weeks and would be
happy to help out where I can.
On Sun, Oct 19, 2008 at 6:22 PM, Paul Barry [EMAIL PROTECTED] wrote:
I like this idea and I would be willing to contribute.
On Oct 19, 6:43 pm, Stephen C. Gilardi [EMAIL PROTECTED] wrote:
On Oct
If you're interested only in counting the number of unique words, then
you don't even need a map. You can get by with a set, like this:
(defn unique-words-in-file
[file]
(count (set (split-on-whitespace (slurp file)
slurp reads file into a String object in memory. The hypothetical
Austin, Texas, USA.
On Oct 17, 9:18 am, Eric Rochester [EMAIL PROTECTED] wrote:
Atlanta, Georgia, US
On Fri, Oct 17, 2008 at 5:27 AM, Rastislav Kassak [EMAIL PROTECTED]wrote:
Hello Clojurians,
I think after 1st year of Clojure life it's good to check how far has
Clojure spread all
Rich, I'm the tech lead for the transparency team at Terracotta and
this is not exactly correct. For example, while you can read
clustered state outside of a clustered lock, it's possible for the tc
memory manager to clear that state at any time, allowing you to see a
null instead of the real
On Oct 20, 12:30 am, Paul Barry [EMAIL PROTECTED] wrote:
Krukow,
I agree, it would help to have a resource for learning Clojure. For
now, my best advice is to pick a real project to start working and
then specific questions in the IRC room, #clojure on irc.freenode.net.
Within a few
18 matches
Mail list logo