Re: One benefit of having a REPL

2009-11-28 Thread Nathan Hawkins
Stefan Kamphausen wrote: > Hi, > > On Nov 28, 2:20�pm, John Harrop wrote: > >> One benefit of having a REPL: it makes regular expressions usable. So easy >> to test and tweak your RE compared to the traditional compile/test/debug >> cycle! I never even bothered with the java.util.regex package

Re: [OT] Convincing others about Clojure

2009-06-25 Thread Nathan Hawkins
On Thu, 25 Jun 2009 11:29:24 +0530 Baishampayan Ghose wrote: > > Their concerns are thus: > > 1. How do you get Clojure programmers? Lisp is not for the faint > hearted. You can always ask on this list. I'd guess that at any given point in time there are probably several people who'd rather b

Re: agent questions - DOS - asynchrony - protection

2009-06-10 Thread Nathan Hawkins
On Wed, 10 Jun 2009 12:44:00 -0600 Daniel Lyons wrote: > On Jun 10, 2009, at 12:03 PM, Toralf Wittner wrote: > > On Wed, 2009-06-10 at 10:22 -0600, Daniel Lyons wrote: > >> If the actions are executed serially, what is the benefit of having > >> multiple threads per agent? > > > > There is none.

Re: What books have helped you wrap your brain around FP and Clojure?

2009-06-08 Thread Nathan Hawkins
Programming Erlang is also good. The syntax and message passing emphasis aren't relevant to Clojure, but Erlang also uses immutable data, and is definitely a functional language. On Sat, 6 Jun 2009 13:12:16 +0200 Robert Campbell wrote: > > Going beyond the language-specific Programming Clojure

Re: What books have helped you wrap your brain around FP and Clojure?

2009-06-06 Thread Nathan Hawkins
Higher Order Perl. While I don't want to use Perl anymore, I do know it very well, and it provided a good introduction to FP in a more familiar language. YMMV. Robert Campbell wrote: > Going beyond the language-specific Programming Clojure book, what > other books have best helped you make the

Re: Clojure as a Java lib documentation / examples?

2009-05-21 Thread Nathan Hawkins
Try here: http://code.google.com/p/clojure/source/browse/ Brett Morgan wrote: > Hi guys, > > I have some evil thoughts of using Clojure as a java library so that i > can use both the STM and the persistent data structures in projects > that my team of java developers can work with. > > As much

Re: constructing maps

2009-05-05 Thread Nathan Hawkins
On Tue, 05 May 2009 09:39:21 +0200 Christophe Grand wrote: > > Kevin Downey a écrit : > > (into {} (apply map vector > > '((cars bmw chevrolet ford peugeot) > > (genres adventure horror mystery > > > > {ford mystery, chevrolet horror, bmw adventure, cars ge

Re: constructing maps

2009-05-04 Thread Nathan Hawkins
On Mon, 04 May 2009 16:31:21 +0200 Christophe Grand wrote: > > Nathan Hawkins a écrit : > > Ok, my example seems to have misled. You're missing the point a > > little bit: > > > > 1. I was trying to avoid the (reduce conj {} ...), by having the map > &

Re: constructing maps

2009-05-04 Thread Nathan Hawkins
On Mon, 4 May 2009 16:07:06 +0200 Christopher Taylor wrote: > > Hi Nathan, > > On 04.05.2009, at 15:47, Nathan Hawkins wrote: > > > > > On Mon, 4 May 2009 06:16:14 -0700 (PDT) > > Drew Raines wrote: > >> > >> Whoops, that (seq) is a debug

Re: constructing maps

2009-05-04 Thread Nathan Hawkins
On Mon, 4 May 2009 06:16:14 -0700 (PDT) Drew Raines wrote: > > On May 4, 8:05 am, Drew Raines wrote: > > > user> (let [test-str "foo=1;bar=2;baz=3"] > >         (reduce conj {} > >            (map #(apply hash-map (seq (.split % "="))) > >                (.split test-str ";" > > Whoops,

constructing maps

2009-05-04 Thread Nathan Hawkins
Possibly I'm going about this wrong. I'm trying to understand how best to construct maps from sequences, by applying a function which returns a key / value pair. Something like this: (ns test (:use clojure.contrib.str-utils)) (def test-str "foo=1;bar=2;baz=3") (defn split-kv [text] (let [[k