Re: 12 Days of Christmas in idiomatic(?) clojure

2008-12-29 Thread MattyDub
Emeka, In short, no. Remember, this was about me learning some functional tools, so this shouldn't be viewed as pedagogical. Well, *my* code shouldn't - I can't speak for the other posters in this thread. -Matt On Dec 27, 7:28 am, Emeka wrote: > >(defn sum-up-to [n] > >   >"returns the sum

Re: Proxying in clojure

2008-12-26 Thread MattyDub
This might be off-topic, but when I launched "snake" from SLIME (via load-file and then "run-snake"), the app didn't receive any UI Events. I thought at first it might be because the snake Frame didn't have focus, but even when I gave it focus, it still didn't receive any Events. When I ran it f

Re: 12 Days of Christmas in idiomatic(?) clojure

2008-12-24 Thread MattyDub
Whoa - what is this "reductions" of which you speak? I've never heard of it. That does shorten it... -Matt On Dec 24, 11:47 am, Randall R Schulz wrote: > On Wednesday 24 December 2008 11:30, Stephen C. Gilardi wrote: > > > ... > > > Nice, Matt! > > > With the "reductions" function recently dis

12 Days of Christmas in idiomatic(?) clojure

2008-12-24 Thread MattyDub
I was presented with the question "How many gifts, total, are mentioned in the song 'The 12 Days of Christmas'?" I thought, "Aha! I'll use clojure to figure it out." But I wanted to do it idiomatically, using some functional constructs (with which I'm not very familiar). First, I needed to know

Re: Proxying in clojure

2008-12-23 Thread MattyDub
Ah, I didn't know about the doto change, thanks Stephen. It runs now, although it doesn't seem to catch any of my key presses. Thanks, -Matt On Dec 23, 3:08 pm, "Stephen C. Gilardi" wrote: > On Dec 23, 2008, at 5:19 PM, MattyDub wrote: > > > On the Java

Proxying in clojure

2008-12-23 Thread MattyDub
On the Java Interop page (http://clojure.org/java_interop), the proxy macro is described as creating "...a instance of a proxy class that implements the named class/interface(s)...". Is this done using Java Dynamic Proxy Classes (http://java.sun.com/j2se/1.5.0/docs/guide/ reflection/proxy.html)?

Re: FAQ

2008-12-19 Thread MattyDub
+1 to Mon Key's suggestions. Those are very FAQ-like questions. -Matt On Dec 19, 12:45 am, Mon Key wrote: > Some thoughts on really stupid things that have tripped me up: > > - How do I exit Clojure - srsly > C-c > > - Whatsa JVM - does this mean Clojure is really just Java with parens? > > - W

Typo on "Refs and Transactions" page

2008-12-18 Thread MattyDub
Hi all, I don't know if this is the right place to post this (if it's not, please let me know where to go), but the documentation on "Refs and Transactions" (http://clojure.org/refs) has a typo in the first sentence: "While Vars ensure safe use of mutable mutable storage locations". There shoul

Re: A newbie question on Agents and ants

2008-12-15 Thread MattyDub
nters? (Perhaps this exposes some lack of knowledge of google on my part, but I am unable to find any results for, e.g., http://www.google.com/search?q=clojure+"*agent*"; The asterisks are just lost, even with the quoting.) -Matt On Dec 8, 5:48 pm, MattyDub wrote: > This talk was very info

Re: Patch: precompiling Clojure core sources in Ant build script

2008-12-11 Thread MattyDub
; - Bill > > On Wed, Dec 10, 2008 at 1:09 PM, Bill Clementson wrote: > > Hi Matt, > > > On Wed, Dec 10, 2008 at 12:47 PM, MattyDub wrote: > > >> I can confirm that that patch fixed my problem - I can now M-. to > >> render-place.  Thanks, Bill! > >

Re: Patch: precompiling Clojure core sources in Ant build script

2008-12-10 Thread MattyDub
l Clementson > > > On Wed, Dec 10, 2008 at 9:57 AM, Bill Clementson <[EMAIL PROTECTED]> wrote: > >> Hi Matt, > > >> Yes, you should let Jeffrey know about the bug. > > >> - Bill > > >> On Wed, Dec 10, 2008 at 9:20 AM, MattyDub <[EMAIL PRO

Re: Patch: precompiling Clojure core sources in Ant build script

2008-12-10 Thread MattyDub
Thanks for confirming the bug, Bill. Should we post this to Jeffrey Chu (assuming it's a swank-clojure issue)? What's the protocol at this point? -Matt On Dec 9, 11:03 pm, "Bill Clementson" <[EMAIL PROTECTED]> wrote: > Hi Matt, > > > > On Tue, Dec 9, 20

Re: Patch: precompiling Clojure core sources in Ant build script

2008-12-09 Thread MattyDub
-edit-definition- hooks) name where) (slime-edit-definition-cont (slime-find-definitions name) name where)) slime-edit-definition("render-place") call-interactively(slime-edit-definition) I must be doing something wrong - any ideas what? -Matt On Dec 9, 4:23 pm, "Bill Clementson"

Re: Patch: precompiling Clojure core sources in Ant build script

2008-12-09 Thread MattyDub
I recently tried M-. for the first time with clojure + SLIME and it broke for me (with a "Lisp error: (error "Synchronous Lisp Evaluation aborted.")"); other parts of SLIME work (e.g., C-M-x, or C-x C-e), but this doesn't . I didn't understand the previous messages in this thread: 1) Stephen Gila

Re: A newbie question on Agents and ants

2008-12-08 Thread MattyDub
This talk was very informative, and I was glad for it. There were several informative things in the talk that I haven't seen documented anywhere (like the explanation of the thread pools backing (send ...) vs (send-off ...)). But is there anyplace I could read this information? Is there anyplac