Why not "sorted-set-by"?

2009-03-24 Thread hjlee
Hi, all. I'm experimenting clojure. Some code, I needed something like "sorted-set-by", but no such thing. So i used "sorted-map-by" ignoring value part. Is it deliberate for some reason? Or just not there? --~--~-~--~~~---~--~~ You received this message because

Why not sorted-set-by?

2009-03-24 Thread hjlee
Hi all. I'm experimenting cljoure. some code, i needed something like "sorted-set-by". but, no such thing, so I emulated that using "sorted-map-by". Is it deliberate for some reason? or just not there? --~--~-~--~~~---~--~~ You received this message because you ar

Why not "sorted-set-by"?

2009-03-24 Thread hjlee
Hi, all. I'm experimenting clojure. Some code, I needed something like "sorted-set-by", but no such thing. So i used "sorted-map-by" ignoring value part. Is it deliberate for some reason? Or just not there? --~--~-~--~~~---~--~~ You received this message because

I'm experimenting clojure - "sorted-set-by"?

2009-03-24 Thread hjlee
Hi, all. I don't know why my previous posts ignored. spam filtering? so i changed title. I'm experimenting clojure. Some code, I needed something like "sorted-set-by", but no such thing. So i used "sorted-map-by" ignoring value part. Is it deliberate for some reason? Or just not there? --~--~--

Re: Why not "sorted-set-by"?

2009-03-25 Thread hjlee
Thank you, hoeck. Thank you Chouser, your code taught me about "proxy". When I saw the patch 1st time, I missed java parts. before I saw your code, I thought if I need that again then I could use the code without affecting core. (What a wrong conclusion ^^; ) ps. I was embarrassed when my 4 post

Yet another trace library.

2009-03-25 Thread hjlee
While searching usable trace libray in clojure, I found 3 pieces of codes. - Stuart Sierra's clojure.contrib.trace - Rich Hickey's posting http://groups.google.com/group/clojure/browse_thread/thread/fd315d9dfdb8c32c/7479682cdf3a1b97?lnk=gst&q=trace#7479682cdf3a1b97 - Craig McDaniel's trace2.

Are there ways to propagate bindings to child threads?

2009-03-27 Thread hjlee
Hi, all. Story: I couldn't understand my "binding" form behavior. (binding [*print-level* 2 *print-length* 2] (some-function)) but, some outputs didn't confirm the bound value. After some investigation on my code and output, I found the reason. - I used pmap Well, I can use "set!", but I thi

"(binding ...)" form and "pmap" (was: Are there ways to propagate bindings to child threads?)

2009-03-27 Thread hjlee
I wrote a question, but I think my point was not clear. I wanted some trace output of my codes, but my code uses heavily liked structure. After I found out there are vars that controls output, I tried that. Let's consider below codes. (I made runnable example.) (The main differenece from real co

Re: bug in clojure.contrib.math/exact-integer-sqrt

2009-03-29 Thread hjlee
Thank you! And sorry, I made serious typo in last question. I had to write "private" instead of "public". (I want to pull my hairs.) I'm not sure, I think there might be cases the error part not needed. --~--~-~--~~~---~--~~ You received this message because you

Re: bug in clojure.contrib.math/exact-integer-sqrt

2009-03-29 Thread hjlee
e information that this one does. > > On Sun, Mar 29, 2009 at 4:34 PM, hjlee wrote: > > I'm not sure, I think there might be cases the error part not needed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Suggestion - change doc string of "rand-int"

2009-04-10 Thread hjlee
Hi. (doc rand-int) says "([n]) Returns a random integer between 0 (inclusive) and n (exclusive)." I think the word "integer" may cause some confusion, because it can be interpreted as clojure integer - including int, long and BigInteger. But the reality is with long or BigInteger n, rand-int