Re: What Windows IDE are you using?

2008-10-12 Thread Hans Huebner
On Sat, Oct 11, 2008 at 20:34, CuppoJava <[EMAIL PROTECTED]> wrote: > If anyone is using Windows, please share what environment you're using > to program in. I am using Emacs and Slime, and that works rather well. Emacs for Windows: http://ourcomments.org/cgi-bin/emacsw32-dl-latest.pl Slime: htt

Re: GUIs in Clojure

2008-10-12 Thread Monsieur Pinocchio
On Thu, Oct 9, 2008 at 4:26 PM, falcon <[EMAIL PROTECTED]> wrote: > > I think it will be far better to model any Clojure GUI libraries on > JavaFX rather than straight Swing. In fact, some code samples people > have posted here remind me of JavaFX code. > > Don Sym, of F# develops his programs on

Re: Casting java arguments...

2008-10-12 Thread Timothy Pratley
> Rich, I may be old school (surely just because of my age) but would it > be possible some day to create a cook book in PDF ? FYI Hans uploaded a manual.pdf to the files section of this group, which is great. Thanks Hans. Very useful. See original post http://groups.google.com/group/clojure/bro

Re: REPL does not print stack trace in some cases

2008-10-12 Thread Mike Hinchey
Either of these work, but they are a lot of work for a convience feature like *e: (.printStackTrace *e *err*) (.printStackTrace *e (java.io.PrintWriter. *out*)) This helps, so *e will have verbose printing in the REPL: (defmethod print-method Throwable [#^Throwable t, #^java.io.Writer w] (if *p

patch: "no matching ctor" exceptions tell class name

2008-10-12 Thread Achim Passen
Hi! Here's a tiny bit of error message cosmetics i just added while debugging some code. Maybe it's a useful addition. Kind regards, achim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: Currying selected library functions?

2008-10-12 Thread rincewind
Hi, On Oct 12, 10:18 pm, "Christian Vest Hansen" <[EMAIL PROTECTED]> wrote: > Some library functions are very amenable to currying; reduce, filter > and map all come to mind. > > Here's a patch that implements partial application for reduce, for instance: > (def sum (reduce +)) > > What do you g

Re: help a journalist: why Clojure?

2008-10-12 Thread Zak Wilson
I think the big ones are that it makes it easy to write concurrent programs that run fast and don't blow up, and that it integrates very nicely with Java, which the PHB probably already knows and loves. Intel already has 8-core chips on its short-term roadmap, and it won't be long before ability t

Currying selected library functions?

2008-10-12 Thread Christian Vest Hansen
Some library functions are very amenable to currying; reduce, filter and map all come to mind. Here's a patch that implements partial application for reduce, for instance: Index: src/clj/clojure/boot.clj === --- src/clj/clojure/boot

Re: two dimensional arrays

2008-10-12 Thread Mark H.
On Oct 12, 7:08 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > As this discussion highlights, Clojure doesn't have a proper notion of > multidimensional arrays or vectors. I saw a presentation on IBM's X10 > [1] and was impressed by their point-indexed arrays. I think there are > some good ideas in

Re: A workaround for thread-local binding.

2008-10-12 Thread CuppoJava
Yes thank you Rich. I had the suspicion that my expectations had some contradictions hidden in there. I would be very interested in hearing your opinion about using dynamic vars. I'm primarily interested in using them for avoiding passing around long and unintuitive argument lists. eg: (defn my-

Re: A workaround for thread-local binding.

2008-10-12 Thread Rich Hickey
On Oct 12, 11:27 am, CuppoJava <[EMAIL PROTECTED]> wrote: > Never mind my previous post. I realized my problem doesn't have > anything to do with threads at all. What I'm really asking is: Is it > possible for a closures to automatically capture a dynamic variable? > They wouldn't be dynamic th

Re: A workaround for thread-local binding.

2008-10-12 Thread CuppoJava
Never mind my previous post. I realized my problem doesn't have anything to do with threads at all. What I'm really asking is: Is it possible for a closures to automatically capture a dynamic variable? ie. The following doesn't work as you expect: (def env) (defn create-fn [] (fn [] (println

Re: What Windows IDE are you using?

2008-10-12 Thread CuppoJava
Thanks for the tips, I'll give installing Vim another try. Thanks for the instructions Meikel. And I'll give Context a look. I've never heard of it till now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" g

Re: TransactionalHashMap

2008-10-12 Thread Rich Hickey
On Oct 11, 11:06 pm, Chouser <[EMAIL PROTECTED]> wrote: > On Sat, Oct 11, 2008 at 9:50 PM, Mark McGranaghan <[EMAIL PROTECTED]> wrote: > > > I was just wondering what the intended use is for > > TransactionalHashMap. Its a Java class defined in the Clojure source, > > but not used anywhere else

Re: Event Listeners in Functional Programming

2008-10-12 Thread CuppoJava
Thank you for all your help, I read through some of the papers on functional reactive programming for GUI, but it seems like it's adding unnecessary complexity to an otherwise conceptually easy task. I guess GUI is still most intuitive when modeled as a stateful object. Thank you for the reading t

Re: two dimensional arrays

2008-10-12 Thread Rich Hickey
On Oct 12, 1:33 am, "Mark H." <[EMAIL PROTECTED]> wrote: > On Oct 11, 10:23 pm, "Mark H." <[EMAIL PROTECTED]> wrote: > > > Some people might want to take slices of matrices -- e.g., the following > > (in Matlab notation): > > > A( 1:2:end, 1:3:end ) > > > which is a matrix containing every secon

Re: Event Listeners in Functional Programming

2008-10-12 Thread Rich Hickey
On Oct 10, 8:14 pm, CuppoJava <[EMAIL PROTECTED]> wrote: > Hi guys, > I'm getting started with Clojure, and I'm programming a small gui. > > The Java "idiom" for eg. a button, is to create a button object which > contains a list of "event listeners (closures/callback functions)" > that get calle

Re: Event Listeners in Functional Programming

2008-10-12 Thread Matthias Benkard
Hi, there are some papers about “functional reactive programming” out there, which you might find interesting. FranTk [0] and, developed more recently, Grapefruit [1], are functional reactive GUI toolkit for Haskell, for example. On the other hand, Gtk2Hs [2], probably the most popular GUI fram

Re: What Windows IDE are you using?

2008-10-12 Thread hotcore
Hi, I am using the free Context editor ( http://www.contexteditor.org/index.html ). I uploaded the file "Clojure-Context.zip" to the files section of this group, to do a Clojure setup for Context. HTH, Arie On 11 okt, 20:34, CuppoJava <[EMAIL PROTECTED]> wrote: > Hi guys, > If anyone is usin

Re: What Windows IDE are you using?

2008-10-12 Thread Meikel Brandmeyer
Hi, If anyone is using Windows, please share what environment you're using to program in. I'm using a Windows Vim with Cygwin's rxvt and mercurial. That is: I edit in Vim, run a REPL in screen in a rxvt to send code to and mercurial and mq for playing with different ideas before going on. I don