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 Googl
On Jan 18, 10:55 pm, Tom Hicks 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 the article you p
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 wrote:
> Hi, I'm starting to convert some code over from Lisp to Clojure.
> Thus, I was wonde
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.
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 p
On Jan 17, 11:51 pm, Mark Allerton 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, you provide the rea
And btw, thanks Erik, Gene, and Abhi for your suggestions! I'll look
at those.
David :)
On Jan 18, 6:14 am, Erik Price wrote:
> On Sat, Jan 16, 2010 at 7:02 PM, David Beckwith
>
> wrote:
> > Can you guys recommend any good books, articles or code on
> > concurrency? I'm new to concurrency iss
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,
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 clo
2010/1/18 Alex Ott
> 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 message because you
=> {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 firs
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)?
http://okmij.org/ftp/Computation/Continua
> 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
On Jan 18, 6:46 pm, Stuart Halloway 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 you are
> => {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 {
what you are seeing is the transition from arraymap to hashmap
On Mon, Jan 18, 2010 at 6:46 PM, Stuart Halloway
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 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
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 String
I've now changed my test method to this.
(def pit (iterate list "bottom!"))
(defn get-bottom [p]
(loop [p (first p)]
(if (seq? p) (recur (first p)) p)))
(defn test-walk [walker shallowest deepest]
(doseq [depth (range shallowest deepest)]
(println (get-bottom
(walker #
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 equalsIgnoreCa
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 wrote:
> On Jan 16, 7:33 pm, Laurent PETIT wrote:
>
> > Fo
On Jan 16, 7:33 pm, Laurent PETIT 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, which I think is fu
The basic install prerequisites are emacs, slime, java, and git.
On Jan 18, 6:22 pm, Mark Hamstra wrote:
> Does "from scratch" assume Slime is already installed?
>
> On Jan 18, 4:42 pm, Brent Millare wrote:
>
> > I made a write up of my experiences setting up swank-clojure from
> > scratch. Alth
Does "from scratch" assume Slime is already installed?
On Jan 18, 4:42 pm, Brent Millare 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 (which can potential
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?
> 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 t
On Jan 18, 1:59 pm, Laurent PETIT 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
have used this a dozen
> On Jan 18, 4:22 pm, Raoul Duke 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 this
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 this
See *print-length* and *print-level* in the core API.
On Jan 18, 4:22 pm, Raoul Duke 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 t
>> 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.,
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 s
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 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 Rich -
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 fou
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 th
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 preserve
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
t
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 n
On Sat, Jan 16, 2010 at 7:02 PM, David Beckwith
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 examples of how to make y
On Sat, Jan 16, 2010 at 7:02 PM, David Beckwith
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 of how to
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
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" o
On Jan 16, 4:02 pm, David Beckwith 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 of how to make your
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 is
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 :
> Is there a good way to make a map case-insensitive for string keys? I
> first thought j
On 18 Jan 2010, at 11:23, Konrad Hinsen
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 need to split nested loop
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
Ne
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 wrote:
> For those who didn't click through, this is a really nifty code paste site
> that will actually run your pasted code and
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
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
http
Very cool.
On Mon, Jan 18, 2010 at 8:51 AM, Mark Allerton 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.
>
> The code is strictly "demo" or "p
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
--
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
wrote:
> Currently, if the result of the multiplication is too small, then the
> type will be dou
53 matches
Mail list logo