Re: CL conditions, exceptions, stack walking, ...

2008-09-30 Thread Rich Hickey
On Sep 30, 10:08 pm, dherring <[EMAIL PROTECTED]> wrote: > On Sep 30, 9:07 pm, Chouser <[EMAIL PROTECTED]> wrote: > > > On Tue, Sep 30, 2008 at 7:24 PM, dherring <[EMAIL PROTECTED]> wrote: > > > > Related question: Is there any way to "return" side-channel data past > > > intermediate frames wh

Re: CL conditions, exceptions, stack walking, ...

2008-09-30 Thread dherring
On Sep 30, 9:07 pm, Chouser <[EMAIL PROTECTED]> wrote: > On Tue, Sep 30, 2008 at 7:24 PM, dherring <[EMAIL PROTECTED]> wrote: > > > Related question:  Is there any way to "return" side-channel data past > > intermediate frames which don't understand the protocol (i.e. no > > throwing an exception

Re: CL conditions, exceptions, stack walking, ...

2008-09-30 Thread Chouser
On Tue, Sep 30, 2008 at 7:24 PM, dherring <[EMAIL PROTECTED]> wrote: > > Related question: Is there any way to "return" side-channel data past > intermediate frames which don't understand the protocol (i.e. no > throwing an exception and prematurely terminating them)? I don't know if this is suf

CL conditions, exceptions, stack walking, ...

2008-09-30 Thread dherring
First off, I wanted to thank Rich for an excellent presentation at Boston last night. It made me want to believe, but did induce a twinge of "and just what did *I* do in the last three years?". Anyway, Rich made a fairly accurate point that CL's condition system is largely an special-case of dyn

Re: true?

2008-09-30 Thread ntupel
On Tue, 2008-09-30 at 17:29 -0400, Stuart Halloway wrote: > For your specific case you should probably be using contains?, which > works for both. No. contains? is meant for maps, i.e. when applied to vectors it checks against indexes: user=> (contains? [1 2 3] 0) true --~--~-~--~--

Re: true?

2008-09-30 Thread Rich Hickey
On Sep 30, 4:37 pm, ntupel <[EMAIL PROTECTED]> wrote: > The following looks weird to me: > > Clojure > user=> (.contains [1 2 3] 2) > true > user=> (true? (.contains [1 2 3] 2)) > false > Fixed - thanks for the report. Rich --~--~-~--~~~---~--~~ You received thi

Re: true?

2008-09-30 Thread Stuart Halloway
For your specific case you should probably be using contains?, which works for both. But I agree it seems odd. > > The following looks weird to me: > > Clojure > user=> (.contains [1 2 3] 2) > true > user=> (true? (.contains [1 2 3] 2)) > false > > AFAICS true? is implemented using identical?

true?

2008-09-30 Thread ntupel
The following looks weird to me: Clojure user=> (.contains [1 2 3] 2) true user=> (true? (.contains [1 2 3] 2)) false AFAICS true? is implemented using identical? which tests by reference equality. Now since Java boolean values are boxed into Booleans we have not only Boolean.TRUE. Maybe true? (

(gensym "1")

2008-09-30 Thread MikeM
This may fall into the category of "well, don't do that", but it seems that gensym shouldn't return an invalid symbol. (gensym "1") ;=> 15459 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post t

Re: Clojure at the JVM Languages Summit

2008-09-30 Thread Allen Rohner
> > Thanks. The summit was really fantastic - so many interesting and > smart people and lots of great presentations and conversations. Left > me exhausted and a bit MIA here, which I'm afraid will continue > through my talk Monday at the Boston Lisp Group: > > http://fare.livejournal.com/134108.

Re: Patch: java.util.Map support

2008-09-30 Thread Achim Passen
Am 30.09.2008 um 17:20 schrieb Paul Barry: > On Sep 30, 11:17 am, Rich Hickey <[EMAIL PROTECTED]> wrote: >> I've been thinking about this Map vs Collection issue for a while now >> and am considering making the move to: Clojure maps implement Java >> Map. > > Yes, please do! +1! Yes, that’s muc

Re: Patch: java.util.Map support

2008-09-30 Thread Paul Barry
On Sep 30, 11:17 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > I've been thinking about this Map vs Collection issue for a while now > and am considering making the move to: Clojure maps implement Java > Map. Yes, please do! +1! --~--~-~--~~~---~--~~ You received th

Re: On Lisp -> Clojure

2008-09-30 Thread Alexander Kjeldaas
2008/9/30 Chouser <[EMAIL PROTECTED]> > > remove-if uses "regular" recursion, but because the JVM does not > optimize away tail calls the way Common Lisp (usually) does, this > could fail for very long lists. However, if you just replace "cons" > with "lazy-cons" and the other recursive call with

Re: Patch: java.util.Map support

2008-09-30 Thread Rich Hickey
On Sep 30, 5:04 am, Achim Passen <[EMAIL PROTECTED]> wrote: > On Sep 30, 5:20 am, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote: > > > After some more thought, I'm not sure whether this should be a concern > > or not. Since jmap's purpose is to wrap Clojure maps for passing to > > Java APIs, I'

Re: On Lisp -> Clojure

2008-09-30 Thread Fogus
The comment was held in moderation. Sadly, if I did not perform some triage on the site comments I would be inundated with comments on Viagra and mortgage loans. Far from being discouraged, I am enthusiastic by your recommendations. I am far less interested in being correct than in doing it corr

Re: On Lisp -> Clojure

2008-09-30 Thread Chouser
I tried to leave a comment on your blog, but it's not clear to me if it's being held for moderation, or simply failed. So I'll paste it here too. On Tue, Sep 30, 2008 at 10:06 AM, Fogus <[EMAIL PROTECTED]> wrote: > > In an attempt to get a feel for Clojure I have started porting Paul > Graham's

On Lisp -> Clojure

2008-09-30 Thread Fogus
In an attempt to get a feel for Clojure I have started porting Paul Graham's "On Lisp". I have a good feel for the syntax so far, but I feel that perhaps I am simply writing Common Lisp in Clojure. If anyone is interested, my early attempts are at: http://www.earthvssoup.com/tag/onlisp/ Feel f

Re: anybody want a ClojureCheck?

2008-09-30 Thread Meikel Brandmeyer
Hello Stuart, Am 29.09.2008 um 23:27 schrieb Stuart Halloway: At the JVM summit Clojure breakout someone suggested a Haskell QuickCheck/ScalaCheck library for Clojure. I am attaching a small spike in that direction below. A few questions: (1) Is anybody interested? YES! Actually this was on m

Re: Patch: java.util.Map support

2008-09-30 Thread Achim Passen
On Sep 30, 5:20 am, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote: > After some more thought, I'm not sure whether this should be a concern   > or not. Since jmap's purpose is to wrap Clojure maps for passing to   > Java APIs, I'm not sure when it will be necessary to compare jmaps to   > Clojur

Re: Patch: java.util.Map support

2008-09-30 Thread Achim Passen
Hi Steve, thank you for taking a look and for your suggestions! > This part concerns me: > > > Note: Since clojure maps are no java maps, they can't be equal to java > > maps. This holds for wrapped clojure maps as well - surprisingly (in a > > bad sense), but i don't see a way around this: > >