> So wherever are you come from, be proud and say it.
Oulu, Finland.
>
> I'm from Slovakia. :)
>
> RK
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@g
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
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
> > Cl
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 val
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
spli
In the game I'm writing, state is held in a single var *state*.
Actions are reified and represented by maps. So I have a single
function
(defmulti execute :Action)
that operates on *state* and returns a new state object (state is
immutable). So to execute a sequence of actions would look like this
Hi all,
I have a somewhat embarassing newbie question on the use of hash maps
in a functional environment.
Consider a little utility that counts the number of unique words in a
file. A hash map mapping strings to integers is the obvious data
structure for this, but the fact that (assoc) returns
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
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 f
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 f
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 th
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 months, we'll have the beta book:
http://www.pragprog.com/titles/shc
> As a more general thought, we Clojure users would benefit from a test suite
> for the functions (and macros) shipped with the Clojure distribution. This
> seems like an ideal thing for members of the community to work together
> on--a large effort that can be done in parallel. Any work we do on
I'm starting up work again on my Clojure-based game. Up until this
point I've been doing things the "dirty" way by re-defing a bunch of
global variables and/or storing the values in the Java objects I need
to use to get access to the game framework.
This approach is pretty unwieldy, and means I m
On Oct 19, 2008, at 3:02 PM, Achim Passen wrote:
> Hi,
>
> user> (= #{1 4} #{2 3})
> true
>
> it's not, is it?
It's not. Line 62 of APersistentSet.java should be:
if (!contains(aM))
rather than
if (!m.contains(aM))
As a more general thought, we Clojure users would
On Oct 19, 3:02 pm, Achim Passen <[EMAIL PROTECTED]> wrote:
> Hi,
>
> user> (= #{1 4} #{2 3})
Fixed - thanks for the report.
Rich
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to
On Sun, Oct 19, 2008 at 3:02 PM, Achim Passen <[EMAIL PROTECTED]> wrote:
>
>user> (= #{1 4} #{2 3})
>true
>
> it's not, is it?
I hope not!
Patch attached.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Hi,
user> (= #{1 4} #{2 3})
true
it's not, is it?
Kind regards,
achim
--
http://rauschabstand.twoday.net
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group
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))
user=
Thanks for the patch! Hang tight, during the work on AOT compilation
I've been revisiting whether or not I can bundle the functionality of
genclass right into AOT compilation - I think I can, yielding a much
streamlined process.
At that point, I'll have some syntax for adorning defns with m
Tokyo, Japan
On Oct 17, 2: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 over the world.
>
> So wherever are you come from, be proud and say it.
>
> I'm from Slovakia. :)
>
> R
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
> Clojur
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
> fromhttp://en.wikibooks.org/wiki/Cloju
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 ancestra
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: 0.0329
Hi Steve,
thanks for your answer!
Am 19.10.2008 um 17:13 schrieb Stephen C. Gilardi:
> That looks strictly better than the other examples to me. If you're
> willing and if you send a Contributer Agreement to Rich, I'd like to
> adopt it in clojure.contrib.lazy-seqs. In the meantime, the wik
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]
> (l
Here is coersion version for Clojure
(defn fib [n]
(let [n (int n)]
(if (or (zero? n) (= n 1))
1
(+ (fib (dec n) ) (fib (- n 2))
(time (fib 36))
"Elapsed time 8848.865149"
not much better and how to type hint for a int type?
--~--~-~--~~
On Oct 19, 2008, at 8:49 AM, Achim Passen wrote:
> (def fibs (lazy-cat [0 1] (map + fibs (rest fibs
That looks strictly better than the other examples to me. If you're
willing and if you send a Contributer Agreement to Rich, I'd like to
adopt it in clojure.contrib.lazy-seqs. In the
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 (
Just use type hint in Clojure version and you'll see quite a
difference in performance.
Your scala version is completely optimized / crippled to integers
(maybe even unboxed), so there is no dynamic runtime overhead.
IMHO, this kind of microbenchmarks are just good for finding general
weak point
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 beginTime=System.currentTimeMi
Hi,
I wrote a very simple swing app and wrote a little about it. Mostly
aimed at newbies with some lisp knowledge. (map/let is not explained
for example)
http://blog.jalat.com/2008/10/game-clojure-version.html
Even such a small program ended up using quite a bit of clojure stuff:
lazy sequences,
... is not some new form of dance music from the UK, but what appears
to be a recurring - dare i say - pattern in the definition of lazy
sequences: the combination of lazy-consing and a step function. There
are plenty of these in boot.clj and in contrib's lazy-seq.clj.
Here's an example (po
On Oct 19, 5:27 am, Krukow <[EMAIL PROTECTED]> wrote:
> 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
>
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 t
Dresden, Germany
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 spread all over the world.
>
> So wherever are you come from, be proud and say it.
>
> I'm from Slovakia. :)
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
38 matches
Mail list logo