Re: Support for destructuring in clojure/binding

2008-09-21 Thread Stephen C. Gilardi
On Sep 22, 2008, at 12:42 AM, Stephen C. Gilardi wrote: > It looks like tagging the gensym'd symbols with metadata will work. > I'm having a go at it. I've uploaded http://groups.google.com/group/clojure/web/binding-destructure.patch . --Steve --~--~-~--~~~---

Re: Support for destructuring in clojure/binding

2008-09-21 Thread Stephen C. Gilardi
On Sep 21, 2008, at 10:36 PM, Stephen C. Gilardi wrote: > If it's feasible, it's a feature I'd like to see in Clojure at some > point. It looks like tagging the gensym'd symbols with metadata will work. I'm having a go at it. --Steve --~--~-~--~~~---~--~~ Y

Re: Cells in Clojure

2008-09-21 Thread Stuart Sierra
Hi Mike, This is interesting, thanks for writing it. I understand Refs better than Agents, but even so, I'm thinking I was wrong when I first suggested using Agents for Cells. Pondering aloud here: The critical property of a Cell is that it is completely finished updating before any of its depe

Support for destructuring in clojure/binding

2008-09-21 Thread Stephen C. Gilardi
I was surprised that clojure/binding doesn't support destructuring bind: Clojure user=> (def a) #'user/a user=> (def b) #'user/b user=> (binding [[a b] [1 2]] (+ a b)) java.lang.ClassCastException: clojure.lang.LazilyPersistentVector cannot be cast to clojure.lang.Symbol (NO_SOURCE_FILE:3) user=

Re: Cells in Clojure

2008-09-21 Thread MikeM
Thanks for doing this. I've been curious about cells for a while, and wondered how it could be done in Clojure. Your comment (in the other thread) about using agents inspired me to see how this would work. I've uploaded acells.clj to the group, which is my attempt at converting your cells impleme

Re: "Getting Started" is NOT starting for me...

2008-09-21 Thread .Bill Smith
Just so we're all clear about this, if you run the program from, say, inferior mode in Emacs on Windows XP, the "Hello World!" dialog will appear, but it may appear *behind* the Emacs window, i.e. non- intuitively, it does not start out in front of all the other windows. Moreover, nothing in the X

Simple TSP solver

2008-09-21 Thread Rich Hickey
I've uploaded a simple ant system solver for the traveling salesman problem. It's not a very good solver, but it is a simple, truly parallel implementation, with agents for 'ants' and refs/transactions for the shared edge data. http://clojure.googlegroups.com/web/tsp.zip Have fun! Rich --~--~-

Re: Cells in Clojure

2008-09-21 Thread Stuart Sierra
On Sep 21, 8:08 am, Albert Cardona <[EMAIL PROTECTED]> wrote: > clojure.lang.Compiler$CompilerException: cells.clj:35: Unable to resolve > symbol: sequential? in this context > > What am I missing? I have latest svn clojure. Hi Albert, I'm not sure. I can't reproduce this on Clojure SVN rev. 103

Re: Cells in Clojure

2008-09-21 Thread Albert Cardona
Stuart, > I've attached a trivial implementation of Cells in Clojure. It's not > as fancy as the original CL version, but I think it gets the idea > across. > clojure.lang.Compiler$CompilerException: cells.clj:35: Unable to resolve symbol: sequential? in this context What am I missing?