On page http://clojure.org/data_structures#toc2 there is written: Any
numeric operation involving Doubles yields a Double.
Hope this helps,
Lauri
On Sun, Jan 17, 2010 at 12:13 AM, Jevgeni Holodkov
jevgeni.holod...@gmail.com wrote:
Currently, if the result of the multiplication is too small,
Is there a good way to make a map case-insensitive for string keys? I
first thought just wrapping some function around it would be it, but
when I try it, it is really a bit more involved. Has anyone done this,
or is there a recommended way?
Florian
--
Florian Ebeling
florian.ebel...@gmail.com
Very cool.
On Mon, Jan 18, 2010 at 8:51 AM, Mark Allerton mark.aller...@gmail.comwrote:
Hi all,
I've been hacking on a bridge between Clojure and Cocoa, and have been
prompted to break cover by recent discussion of the subject of Objective-C
interfacing here on this list.
The code is
Hello all
I have a question to Rich - are there plans to introduce named
loop/recur? In Scheme it very handy to create named let, and create nested
loops. Currently in Clojure, I need to split nested loop into separate
function, that not so often good
--
With best wishes, Alex Ott, MBA
For those who didn't click through, this is a really nifty code paste site that
will actually run your pasted code and display the output next to the paste.
Worth a look; it's a nice piece of work.
-Steve
On 15 Jan 2010, at 21:23, sphere research wrote:
Hi,
test Clojure on ideone.com
I've been toying around something similar.
Here is a rough preview: http://preview.xpojure.com/snippet/view/2/
-Alen
On Mon, Jan 18, 2010 at 1:02 PM, Steve Purcell st...@sanityinc.com wrote:
For those who didn't click through, this is a really nifty code paste site
that will actually run
On 18.01.2010, at 12:03, Alex Ott wrote:
I have a question to Rich - are there plans to introduce named
loop/recur? In Scheme it very handy to create named let, and create
nested
loops. Currently in Clojure, I need to split nested loop into
separate
function, that not so often good
On 18 Jan 2010, at 11:23, Konrad Hinsen konrad.hin...@fastmail.net
wrote:
On 18.01.2010, at 12:03, Alex Ott wrote:
I have a question to Rich - are there plans to introduce named
loop/recur? In Scheme it very handy to create named let, and
create nested
loops. Currently in Clojure, I
There's a library in clojure.contrib which allows to create your own
getters / setters for maps :
http://richhickey.github.com/clojure-contrib/fnmap-api.html
HTH,
--
Laurent
2010/1/18 C. Florian Ebeling florian.ebel...@gmail.com:
Is there a good way to make a map case-insensitive for string
Hi Ben, thanks for the answer. Yes, I understand the problems with
representing float-point numbers using iee7654 and now I understand
that returing BigDecimal would not solve the actual problem. However,
we don't talk about 0.3(3) in my example, which is non-terminating
decimal. Entered 0.1
On Jan 16, 4:02 pm, David Beckwith thirdreplica...@gmail.com wrote:
Hi,
Can you guys recommend any good books, articles or code on
concurrency? I'm new to concurrency issues, and just finished the
Halloway book, so it would be great to have an introductory reference
with lots of examples
On 17.01.2010, at 23:13, Jevgeni Holodkov wrote:
decimal. Entered 0.1 is actually a very precise number and the fact
that it gets imprecise somewhere internally should now affect, IMHO,
the result of multiplying two very precise numbers. What's the point
There is no such thing as a precise or
Re
Konrad Hinsen at Mon, 18 Jan 2010 12:23:58 +0100 wrote:
KH On 18.01.2010, at 12:03, Alex Ott wrote:
I have a question to Rich - are there plans to introduce named
loop/recur? In Scheme it very handy to create named let, and create nested
loops. Currently in Clojure, I need to split
On Sat, Jan 16, 2010 at 7:02 PM, David Beckwith
thirdreplica...@gmail.com wrote:
Hi,
Can you guys recommend any good books, articles or code on
concurrency? I'm new to concurrency issues, and just finished the
Halloway book, so it would be great to have an introductory reference
with lots
On Sat, Jan 16, 2010 at 7:02 PM, David Beckwith
thirdreplica...@gmail.com wrote:
Can you guys recommend any good books, articles or code on
concurrency? I'm new to concurrency issues, and just finished the
Halloway book, so it would be great to have an introductory reference
with lots of
Hi,
This is interesting. I have often wanted something like this. Is
there a way to access clojure.contrib?
Thanks
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from
Hi Kyle!
I encountered the same problem:
(defn stack-fail
returns an empty lazy seq
[l i]
(if ( i 0)
(recur (remove #{1} (concat l '(1))) (dec i))
l))
(def foo (stack-fail () 1000))
foo
; Evaluation aborted.
if you call a non-lazy function (e.g. doall) on the collection from
Is there a good way to make a map case-insensitive for string keys? I
first thought just wrapping some function around it would be it, but
when I try it, it is really a bit more involved. Has anyone done this,
or is there a recommended way?
Do you want real case-insensitivity (i.e., you
Something like replacing the 1.1 with 1.1M or 11/10 before evaluating
the code?
I don't think so. The very first step of Clojure's expression
processing system, the reader, already interprets 1.1 as a floating-
point constant. You would need your own reader to give a different
meaning to
Hi all,
I'm one of the assistant teachers at RubyLearning
(http://rubylearning.org), a site offering free/cheap Ruby courses
which are generally quite well-received and we all do this as
volunteers without any monetary interest (the paid courses are there
to finance the site). More info can be
I'm confused. Shouldn't the inner loop have the proper conditionals
to break out of itself properly instead?
On Jan 18, 8:48 am, Alex Ott alex...@gmail.com wrote:
Re
Konrad Hinsen at Mon, 18 Jan 2010 12:23:58 +0100 wrote:
KH On 18.01.2010, at 12:03, Alex Ott wrote:
I have a question to
hi,
hmmm, i wish there were a way (or that it was the default) to tell the
repl to not continue to loop for ever over things it has already
printed out when i eval something that is a cyclic thing. anybody
have a patch, or thought on this?
thanks!
--
You received this message because you are
Is there a good way to make a map case-insensitive for string keys? I
first thought just wrapping some function around it would be it, but
when I try it, it is really a bit more involved. Has anyone done this,
or is there a recommended way?
Do you want real case-insensitivity (i.e., you
See *print-length* and *print-level* in the core API.
On Jan 18, 4:22 pm, Raoul Duke rao...@gmail.com wrote:
hi,
hmmm, i wish there were a way (or that it was the default) to tell the
repl to not continue to loop for ever over things it has already
printed out when i eval something that is
I made a write up of my experiences setting up swank-clojure from
scratch. Although my method ignores matching the versions up because
all is built from the current sources (which can potential cause parts
of swank to break), it should at least point in the generally right
direction. Hopefully
On Jan 18, 4:22 pm, Raoul Duke rao...@gmail.com wrote:
hi,
hmmm, i wish there were a way (or that it was the default) to tell the
repl to not continue to loop for ever over things it has already
printed out when i eval something that is a cyclic thing. anybody
have a patch, or thought on
On Jan 18, 1:59 pm, Laurent PETIT laurent.pe...@gmail.com wrote:
There's a library in clojure.contrib which allows to create your own
getters / setters for maps :
http://richhickey.github.com/clojure-contrib/fnmap-api.html
Not wanting to interrupt this thread, but this is amazing! I could
Mark
Chouser
thanks, all.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this
Hi Robert,
Thanks for your reply! Very interesting. I see what you're saying.
But, your code results in a OutOfMemoryError, rather than a
StackOverflow.
At least, that's what I see on my machine. Are you seeing the same?
Is there some way that this same concept could lead to a
StackOverflow?
Does from scratch assume Slime is already installed?
On Jan 18, 4:42 pm, Brent Millare brent.mill...@gmail.com wrote:
I made a write up of my experiences setting up swank-clojure from
scratch. Although my method ignores matching the versions up because
all is built from the current sources
The basic install prerequisites are emacs, slime, java, and git.
On Jan 18, 6:22 pm, Mark Hamstra markhams...@gmail.com wrote:
Does from scratch assume Slime is already installed?
On Jan 18, 4:42 pm, Brent Millare brent.mill...@gmail.com wrote:
I made a write up of my experiences setting up
On Jan 16, 7:33 pm, Laurent PETIT laurent.pe...@gmail.com wrote:
For the non lazy version , maybe using clojure.zip would help not blow
up the stack ?
(using clojure.zip/zip + a loop with recur on clojure.zip/next) ?
I've just tried it and it appears to be equivalent to the lazy walk
version,
I've found the real problem. The overflow was coming from recursion
between pr-on and print-method. It must be that way because it's not
really useful to print such deeply nested data structure anyway.
On Jan 18, 7:06 pm, Nicolas Buduroi nbudu...@gmail.com wrote:
On Jan 16, 7:33 pm, Laurent
Tapestry 5 includes a case-insenstive Map and the basic idea can be
adapted. It was important to that code base that the case of keys be
kept, but that lookup by key be case insensitive. The hash code is
based on a case normalized version of the true key, and comparisons
are based on
I haven't looked at how hard this would be to implement in Clojure; it
would be nice if there was those features (let me specify how to hash
keys, let me specify how to compare keys).
PersistentHashMap calls Util.hash(key), which calls key.hashCode().
You could use fnmap to replace input
Is this expected behavior?
{1 this 1 is 1 strange}
= {1 this, 1 is, 1 strange}
(into {} {1 this 1 is 1 strange})
= {1 strange}
{1 this 1 is 1 strange 1 but 1 if 1 I 1 try 1 hard 1
enough}
= {1 enough}
Stu
--
You received this message because you are subscribed to the Google
Groups
what you are seeing is the transition from arraymap to hashmap
On Mon, Jan 18, 2010 at 6:46 PM, Stuart Halloway
stuart.hallo...@gmail.com wrote:
Is this expected behavior?
{1 this 1 is 1 strange}
= {1 this, 1 is, 1 strange}
(into {} {1 this 1 is 1 strange})
= {1 strange}
{1 this 1 is 1
= {1 this, 1 is, 1 strange}
The literal representation is just blasted into an array map when the
number of entries are below a certain threshold (8 maybe). I think
the general view is that a literal with duplicate keys is the error
and to check for dups would sacrifice speed.
(into {} {1
On Jan 18, 6:46 pm, Stuart Halloway stuart.hallo...@gmail.com wrote:
Is this expected behavior?
{1 this 1 is 1 strange}
= {1 this, 1 is, 1 strange}
This can only happen with literal maps containing 8 or fewer entries.
Rich has commented on it elsewhere.
--
You received this message because
This uses a regular hash map.
No it doesn't apparently... it uses conj instead.
-m
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please
Hey, congratulations on finding and fixing the problem!
And thanks for the great link to the zipper explanationzippers
were
at the top of my list to learn (seriously). Did you catch this other
useful
link (in the comments of the article you provided)?
= {1 this, 1 is, 1 strange}
The literal representation is just blasted into an array map when the
number of entries are below a certain threshold (8 maybe). I think
the general view is that a literal with duplicate keys is the error
and to check for dups would sacrifice speed.
The first part
2010/1/18 Alex Ott alex...@gmail.com
But this will not allow to jump to outer loop from inside of inner loop...
If you require mutual recursion, letfn might be your answer
See example here:
http://groups.google.com/group/clojure/browse_thread/thread/a7aad1d5b94db748
--
You received this
Here is the previous discussion about duplicate keys in arraymaps, just for
reference:
http://groups.google.com/group/clojure/browse_thread/thread/5a38a6b61b09e025
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
By the way, I made the suggestion to publish a concurrency specific
book to Pragmatic Studios, and surprisingly Dave Thomas (of Ruby-world
fame: http://pragprog.com/titles/rails2/agile-web-development-with-rails
) wrote back and agreed. He said that he's looking for an author.
(See below.) So,
And btw, thanks Erik, Gene, and Abhi for your suggestions! I'll look
at those.
David :)
On Jan 18, 6:14 am, Erik Price erikpr...@gmail.com wrote:
On Sat, Jan 16, 2010 at 7:02 PM, David Beckwith
thirdreplica...@gmail.com wrote:
Can you guys recommend any good books, articles or code on
On Jan 17, 11:51 pm, Mark Allerton mark.aller...@gmail.com wrote:
Hi all,
I've been hacking on a bridge between Clojure and Cocoa, and have been
prompted to break cover by recent discussion of the subject of Objective-C
interfacing here on this list.
This is fantastic! In you README.md,
when i start the clojure box 1.0, the emacs client window stay on the
top of all the other windows, eventually it display a message **
ERROR ** Timeout wating for server, but 1.0RC1 no that issue.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post
Hi, I'm starting to convert some code over from Lisp to Clojure.
Thus, I was wondering, what's the appropriate mapping for the
following forms:
defvar
defparamater
let*
defconstant
mapcar
BTW, I was able to find the Clojure Programming Tutorials and Tips
but it didn't require the above forms.
Did you watch Rich's video Clojure for Lispers? That might help
(The only one I can answer for sure is that Clojure's let is CL's
let*)
http://blip.tv/file/1313398
On Jan 18, 10:49 pm, Conrad Taylor conra...@gmail.com wrote:
Hi, I'm starting to convert some code over from Lisp to Clojure.
On Jan 18, 10:55 pm, Tom Hicks hickstoh...@gmail.com wrote:
Hey, congratulations on finding and fixing the problem!
And thanks for the great link to the zipper explanationzippers
were
at the top of my list to learn (seriously). Did you catch this other
useful
link (in the comments of
defvar
defparamater
def, pretty much. (Some of the niceties of CL semantics don't really
apply.)
let*
let.
defconstant
No equivalent. Use def and allow the JIT to do the is this constant?
work.
mapcar
map.
--
You received this message because you are subscribed to the Google
52 matches
Mail list logo