Re: Eager map?

2008-11-17 Thread mb
Hi, On 18 Nov., 03:01, Adam Jones <[EMAIL PROTECTED]> wrote: > I'm in the middle of writing some code to extract sql results, which > means I'm doing a *lot* of forcing right now. It's almost enough for > me to wish there was a convention (and provided definitions) for > denoting lazy/strict vers

Re: offtopic - where are you come from? (poll)

2008-11-17 Thread Rastislav Kassak
You forgot about Kia / Hyundai and Daewoo (now Chevrolet). :) On 11/16/08, Chanwoo Yoo <[EMAIL PROTECTED]> wrote: > > Seoul, South Korea, which LG and Samsung are belongs to (I know there > is few who knows where South Korea is. ^_^; It is placed between China > and Japan.) > > > On 10월22일, 오후

Re: offtopic - where are you come from? (poll)

2008-11-17 Thread Geoffrey Teale
I'm from the UK, but I live in Munich, Germany. 2008/11/17 [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > +1 for Baltimore. > > On Oct 17, 8:12 am, Paul Barry <[EMAIL PROTECTED]> wrote: > > Baltimore, Maryland, US > > > > On Oct 17, 5:27 am, "Rastislav Kassak" <[EMAIL PROTECTED]> wrote: > > > > > Hel

Re: Working combination of .emacs, Aquamacs, swank-clojure, clojure-mode?

2008-11-17 Thread Cosmin Stejerean
On Tue, Nov 18, 2008 at 12:17 AM, Raffael Cavallaro < [EMAIL PROTECTED]> wrote: > > > > On Nov 17, 11:55 pm, "Cosmin Stejerean" <[EMAIL PROTECTED]> wrote: > > > Most of these projects change on a daily basis and so far I've never run > > into any issues using the latest version of each. During ini

Re: Working combination of .emacs, Aquamacs, swank-clojure, clojure-mode?

2008-11-17 Thread Raffael Cavallaro
On Nov 17, 11:55 pm, "Cosmin Stejerean" <[EMAIL PROTECTED]> wrote: > Most of these projects change on a daily basis and so far I've never run > into any issues using the latest version of each. During initial > installation the chances of issues being due to user error are far greater > than pr

Re: Patch: standalone compiler (almost)

2008-11-17 Thread Stephen C. Gilardi
On Nov 17, 2008, at 11:42 PM, Stephen C. Gilardi wrote: > It seems there's something not quite right, though. I did a fresh > checkout of 1108 and built with "ant" and ran with "java -jar > clojure.jar" and got an exception: Making pushNS public on line 4461 of src/jvm/clojure/lang/ Compile

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread cwyang
What a great name 'conj' is, for project hosting site name! (no shame for self-complement :-) ) user=> (def repository '(proj-foo proj-bar)) #=(var user/repository) user=> (conj repository 'proj-yours) (proj-yours proj-foo proj-bar) However, conj.net is already occupied. ;-( conj.us is avaliable

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread cwyang
How about 'conj'? conj is (1) for 'conj' in Clojure, and (2) for abbrev of 'conjure', meaning (Conjuring Clojure). 'cons' for lisp, and 'conj' for clojure. :-) -- Chul-Woong Yang On Nov 18, 4:52 am, Drew Crampsie <[EMAIL PROTECTED]> wrote: > Hey All, > > I've finally found some time to start g

Re: Working combination of .emacs, Aquamacs, swank-clojure, clojure-mode?

2008-11-17 Thread Cosmin Stejerean
On Mon, Nov 17, 2008 at 9:25 PM, Raffael Cavallaro < [EMAIL PROTECTED]> wrote: > > > > On Nov 17, 8:43 pm, "Bill Clementson" <[EMAIL PROTECTED]> wrote: > > > > Rather than ask someone to assemble a package and post it for you, it > > is usually nicer (and a better learning experience) if you list

Re: Patch: standalone compiler (almost)

2008-11-17 Thread Stephen C. Gilardi
On Nov 17, 2008, at 10:33 PM, Rich Hickey wrote: > Fixed (SVN 1108) - thanks for the report. Cool, thanks. I especially like "loadClassForName". It seems there's something not quite right, though. I did a fresh checkout of 1108 and built with "ant" and ran with "java -jar clojure.jar" and g

Re: Patch: standalone compiler (almost)

2008-11-17 Thread Rich Hickey
On Nov 17, 8:50 am, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote: > On Nov 16, 2008, at 10:34 PM, Rich Hickey wrote: > > > Since it only requires main, might I suggest you write this in > > Clojure instead? > > I gave that a try. > > Here's a simple version of a driver for the compiler, stored

Re: Working combination of .emacs, Aquamacs, swank-clojure, clojure-mode?

2008-11-17 Thread Raffael Cavallaro
On Nov 17, 8:43 pm, "Bill Clementson" <[EMAIL PROTECTED]> wrote: > > Rather than ask someone to assemble a package and post it for you, it > is usually nicer (and a better learning experience) if you list > exactly what you did, and post the minimal config scripts that you the > tried out and wh

Re: multi-method dispatch for structs

2008-11-17 Thread [EMAIL PROTECTED]
On Nov 14, 3:42 pm, Chouser <[EMAIL PROTECTED]> wrote: > On Fri, Nov 14, 2008 at 2:11 PM, Jeff Rose <[EMAIL PROTECTED]> wrote: > > Does my dispatch function have to inspect the passed in values to > > figure out whichtypeof struct they are, or can I query that > > somehow? > > My understanding is

Re: Eager map?

2008-11-17 Thread Chouser
On Mon, Nov 17, 2008 at 9:01 PM, Adam Jones <[EMAIL PROTECTED]> wrote: > > I'm in the middle of writing some code to extract sql results, which > means I'm doing a *lot* of forcing right now. It's almost enough for > me to wish there was a convention (and provided definitions) for > denoting lazy/

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Giancarlo Angulo
+1 for projecture = ANGOL = -|[EMAIL PROTECTED], =|+^_^X++~_~,@- "The only thing worse than a hopeless romantic is a hopeful one" Magbasa bago Mamuna. Mag-isip bago mambatikos Without Truth there is no Justice, Without Justice, there is Tyranny Semper fi Proof of Desire is

Re: Eager map?

2008-11-17 Thread Adam Jones
On Nov 17, 4:25 pm, Bradbev <[EMAIL PROTECTED]> wrote: > On Nov 17, 3:50 pm, Adam Jones <[EMAIL PROTECTED]> wrote: > > > On Nov 17, 3:26 pm, Robert Ewald <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > Doing some small experiments I stumbled over map returning a lazy seq > > > instead > > > o

Re: Daily Build

2008-11-17 Thread Adam Jones
On Nov 17, 5:22 pm, Robert <[EMAIL PROTECTED]> wrote: > Is there a server that tests every day if Clojure builds correctly? I > pulled the latest a few days ago and couldn't get it to build (whereas > the 2008-09-16 "release" does build for me). Having such a server > would > assist in determini

Re: Working combination of .emacs, Aquamacs, swank-clojure, clojure-mode?

2008-11-17 Thread Bill Clementson
Hi Raffael, On Mon, Nov 17, 2008 at 4:21 PM, Raffael Cavallaro <[EMAIL PROTECTED]> wrote: > As the mention of Aquamacs in the title suggests, I'm on Mac OS X. > I've read Bill Clementson's Blog on setting up clojure, and I'm not > exactly a neophyte - I've been using slime with sbcl, openmcl, and

Daily Build

2008-11-17 Thread Robert
Is there a server that tests every day if Clojure builds correctly? I pulled the latest a few days ago and couldn't get it to build (whereas the 2008-09-16 "release" does build for me). Having such a server would assist in determining if such problems are the user's fault (likely, in my case) or n

Working combination of .emacs, Aquamacs, swank-clojure, clojure-mode?

2008-11-17 Thread Raffael Cavallaro
As the mention of Aquamacs in the title suggests, I'm on Mac OS X. I've read Bill Clementson's Blog on setting up clojure, and I'm not exactly a neophyte - I've been using slime with sbcl, openmcl, and other lisps for years. Nevertheless, even starting with an absolutely blank .emacs and freshly

Re: Eager map?

2008-11-17 Thread Bradbev
On Nov 17, 3:50 pm, Adam Jones <[EMAIL PROTECTED]> wrote: > On Nov 17, 3:26 pm, Robert Ewald <[EMAIL PROTECTED]> wrote: > > > Hello, > > > Doing some small experiments I stumbled over map returning a lazy seq > > instead > > of performing the function. I had to convert that to a doseq. Is there

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread John
+1 Clojury -oryNoun: place for, serves for Sounds best to me. On Nov 17, 5:23 pm, Dave Newton <[EMAIL PROTECTED]> wrote: > --- On Mon, 11/17/08, Drew Crampsie wrote: > > >  - projecture > > Nice, because Clojure "sticks out" beyond Java/JVM, besides the other obvious > meanings > > >  - pr

Re: Eager map?

2008-11-17 Thread Allen Rohner
>. If you really need strict evaluation, wrap the map with > doall. Another way to do that would be to use doseq. Allen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send e

Re: clojure.contrib.test-is changes

2008-11-17 Thread Meikel Brandmeyer
Hi, Am 18.11.2008 um 00:13 schrieb Frantisek Sodomka: B) What about 'throws' macro? Could this become a function returning true/false? Then we could stick it inside 'is' or 'all-true'. (I guess it doesn't matter that much, does it?) I have a is-like construct, which is build-up slightly dif

Re: Eager map?

2008-11-17 Thread Adam Jones
On Nov 17, 3:26 pm, Robert Ewald <[EMAIL PROTECTED]> wrote: > Hello, > > Doing some small experiments I stumbled over map returning a lazy seq instead > of performing the function. I had to convert that to a doseq. Is there any > rationale for not having an eager map. Or was I just not reading t

Re: Eager map?

2008-11-17 Thread Jarkko Oranen
On Nov 18, 1:26 am, Robert Ewald <[EMAIL PROTECTED]> wrote: > Hello, > > Doing some small experiments I stumbled over map returning a lazy seq instead > of performing the function. I had to convert that to a doseq. Is there any > rationale for not having an eager map. Or was I just not reading t

Eager map?

2008-11-17 Thread Robert Ewald
Hello, Doing some small experiments I stumbled over map returning a lazy seq instead of performing the function. I had to convert that to a doseq. Is there any rationale for not having an eager map. Or was I just not reading the docs properly? -- Robert Ewald --~--~-~--~~---

Re: clojure.contrib.test-is changes

2008-11-17 Thread Frantisek Sodomka
Thinking about test-is little more... Lets look at this test for minus: (deftest test-minus (all-true (number? (- 1 2)) (integer? (- 1 2)) (float? (- 1.0 2)) (ratio? (- 2/3 1)) (float? (- 2/3 (/ 1.0 3 (throws IllegalArgumentException (-)) (each= (- 1) -

Re: Newbie: Default map parameters

2008-11-17 Thread Mark McGranaghan
Mark, You can read some about destructuring in the documentation for the special form "let": http://clojure.org/special_forms#let You can also explore the functionality at the repl: user=> (destructure '[{x :x, y :y, :or {y 3}} given]) [map__59 given y (clojure.core/get map__59 :y 3) x (clojure

Re: Newbie: Default map parameters

2008-11-17 Thread Rich Hickey
On Nov 17, 5:16 pm, "Mark Volkmann" <[EMAIL PROTECTED]> wrote: > On Mon, Nov 17, 2008 at 3:48 PM, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > On Nov 17, 4:22 pm, samppi <[EMAIL PROTECTED]> wrote: > >> Inhttp://groups.google.com/group/clojure/browse_thread/thread/62140a28b..., > >> the following

Re: clojure.contrib.test-is changes

2008-11-17 Thread Frantisek Sodomka
Hello Stuart! Few more ideas for you :) each= could be extended to allow more freedom. The first parameter could say what operation we want to perform: each = each not= each < each > ... (each = a b c d) => (all-true (= a b) (= c d)) (each not= a b c d) => (all-true (n

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Dave Newton
--- On Mon, 11/17/08, Drew Crampsie wrote: > - projecture Nice, because Clojure "sticks out" beyond Java/JVM, besides the other obvious meanings > - proj4cloj Too hard to say. > - clojforge, cloforj, sourceforj? > - forj > - clojects Source code coming out of the cloject; me likey. >

Re: Newbie: Default map parameters

2008-11-17 Thread samppi
Ah! Thank you. On Nov 17, 2:48 pm, Rich Hickey <[EMAIL PROTECTED]> wrote: > On Nov 17, 4:22 pm, samppi <[EMAIL PROTECTED]> wrote: > > > Inhttp://groups.google.com/group/clojure/browse_thread/thread/62140a28b..., > > the following example was given: > > > (defn test1 [{x :x, y :y, :or {:y 3}}] > >

Re: Newbie: Default map parameters

2008-11-17 Thread Mark Volkmann
On Mon, Nov 17, 2008 at 3:48 PM, Rich Hickey <[EMAIL PROTECTED]> wrote: > > On Nov 17, 4:22 pm, samppi <[EMAIL PROTECTED]> wrote: >> Inhttp://groups.google.com/group/clojure/browse_thread/thread/62140a28b..., >> the following example was given: >> >> (defn test1 [{x :x, y :y, :or {:y 3}}] >>

Re: Newbie: Default map parameters

2008-11-17 Thread Rich Hickey
On Nov 17, 4:22 pm, samppi <[EMAIL PROTECTED]> wrote: > Inhttp://groups.google.com/group/clojure/browse_thread/thread/62140a28b..., > the following example was given: > > (defn test1 [{x :x, y :y, :or {:y 3}}] > [x y]) > (test1 {:x 2}) => [2 3] > > But this doesn't work on the latest Clo

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Paul Stadig
I'm in favor of something with clojure in it (like clojureforge). Something simple to spell and pronounce. I'm also in favor of not forcing code hosting, but providing it as an option. Paul On Mon, Nov 17, 2008 at 4:18 PM, Drew Crampsie <[EMAIL PROTECTED]> wrote: > > > 2008/11/17 Matt Revelle <

Newbie: Default map parameters

2008-11-17 Thread samppi
In http://groups.google.com/group/clojure/browse_thread/thread/62140a28b8d4ef36, the following example was given: (defn test1 [{x :x, y :y, :or {:y 3}}] [x y]) (test1 {:x 2}) => [2 3] But this doesn't work on the latest Clojure from Subversion I just got: (test1 {:x 2}) => [2 nil] Was

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Drew Crampsie
2008/11/17 Matt Revelle <[EMAIL PROTECTED]>: > > Is the project site going to be more similar to the Python package > index and CLiki or Sourceforge? The closest analog is common-lisp.net.. which is like sourceforge. However, I like the idea of an index as well, and building the backend seems li

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Brian Carper
On Nov 17, 11:52 am, Drew Crampsie <[EMAIL PROTECTED]> wrote: > Here are some suggestions so far, but please feel free to chime in > with your own as well. What about something made of whole words, like clojureforge? It has the benefit of discoverability and being pronounceable by the human tong

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Vincent Foley
+1 for projecture Vincent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED]

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Aaron Brooks
Other options: - creatjure? - featjure? - cultjure? All three have low Google search hit counts. I think cultjure is better suited for discussion forums. Creatjure seems a good place for our Clojure creatures. On Nov 17, 2:52 pm, Drew Crampsie <[EMAIL PROTECTED]> wrote: > Hey All, > > I've f

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Adam Jones
On Nov 17, 11:52 am, Drew Crampsie <[EMAIL PROTECTED]> wrote: > Hey All, > > I've finally found some time to start getting the project hosting site > together, and i need a name.. so lets put it to a vote. > > Here are some suggestions so far, but please feel free to chime in > with your own as

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Matt Moriarity
my vote is for projecture or clojects --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Matt Revelle
On Nov 17, 2008, at 3:08 PM, "J. McConnell" <[EMAIL PROTECTED]> wrote: > > I'm liking projecture +1, at least from those options. Is the project site going to be more similar to the Python package index and CLiki or Sourceforge? I still think keeping the site focused on providing an index of

Re: slime fu

2008-11-17 Thread Bill Clementson
Oops, yes, that's definitely better. On Mon, Nov 17, 2008 at 12:03 PM, <[EMAIL PROTECTED]> wrote: > > Maybe it was just my setup, but that didn't work for me. What did > work was: > > (add-hook 'slime-connected-hook 'slime-redirect-inferior-output) > > --Darren > > > On Nov 17, 11:42 am, "Bill

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Craig Andera
Despite the fact that I suggested clojury and openjure in the first place, I think I like clojr, forj, projecture, and clojects, in that order. Decisive - that's me! > On Mon, Nov 17, 2008 at 3:08 PM, J. McConnell <[EMAIL PROTECTED]> wrote: >> >> I'm liking projecture >> >> On Mon, Nov 17, 2008

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Stephen C. Gilardi
On Nov 17, 2008, at 3:08 PM, J. McConnell wrote: > I'm liking projecture And its evil twin anti-site... conjecture --Steve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread J. McConnell
I'm liking projecture On Mon, Nov 17, 2008 at 2:52 PM, Drew Crampsie <[EMAIL PROTECTED]> wrote: > > Hey All, > > I've finally found some time to start getting the project hosting site > together, and i need a name.. so lets put it to a vote. > > Here are some suggestions so far, but please feel f

Re: Patch: standalone compiler (almost)

2008-11-17 Thread Matt Revelle
I like it and Obj-C inspired syntax on the JVM is cosmic justice. On Nov 17, 2008, at 2:37 PM, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote: > > On Nov 17, 2008, at 9:51 AM, Rich Hickey wrote: >> main now needs to be called -main, as all methods will be defined >> with leading -. > > Seei

Re: slime fu

2008-11-17 Thread darren . austin
Maybe it was just my setup, but that didn't work for me. What did work was: (add-hook 'slime-connected-hook 'slime-redirect-inferior-output) --Darren On Nov 17, 11:42 am, "Bill Clementson" <[EMAIL PROTECTED]> wrote: > You could add the following to your .emacs file: > > (add-hook 'slime-mode-

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread David Hilton
On Mon, Nov 17, 2008 at 12:52 PM, Drew Crampsie <[EMAIL PROTECTED]>wrote: > > Hey All, > > I've finally found some time to start getting the project hosting site > together, and i need a name.. so lets put it to a vote. > > Here are some suggestions so far, but please feel free to chime in > with

POLL: Domain name for project hosting site.

2008-11-17 Thread Drew Crampsie
Hey All, I've finally found some time to start getting the project hosting site together, and i need a name.. so lets put it to a vote. Here are some suggestions so far, but please feel free to chime in with your own as well. - projecture - clojr - proj4cloj - clojforge, cloforj, - forj -

Re: slime fu

2008-11-17 Thread Bill Clementson
You could add the following to your .emacs file: (add-hook 'slime-mode-hook 'slime-redirect-inferior-output) -- Bill Clementson On Mon, Nov 17, 2008 at 11:31 AM, Stuart Halloway <[EMAIL PROTECTED]> wrote: > > Is there are way to make (slime-redirect-inferior-output) happen by > default? > > Stu

Re: Patch: standalone compiler (almost)

2008-11-17 Thread Stephen C. Gilardi
On Nov 17, 2008, at 9:51 AM, Rich Hickey wrote: > main now needs to be called -main, as all methods will be defined > with leading -. Seeing that makes me think of Objective-C where instance methods have a leading - and static methods (class methods) having a leading +. I think a conventio

Re: Clojure for LISP programmers....

2008-11-17 Thread notallama
the vector syntax seems nice to me. you get the whole "() means function", "[] means sequential binding", "{} means associative binding", and it makes code easier to read/skim over. you could have lists for seq binding, but i think using a different syntax gets you out of that "everything is a lis

slime fu

2008-11-17 Thread Stuart Halloway
Is there are way to make (slime-redirect-inferior-output) happen by default? Stuart --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To

Re: offtopic - where are you come from? (poll)

2008-11-17 Thread [EMAIL PROTECTED]
+1 for Baltimore. On Oct 17, 8:12 am, Paul Barry <[EMAIL PROTECTED]> wrote: > Baltimore, Maryland, US > > On Oct 17, 5:27 am, "Rastislav Kassak" <[EMAIL PROTECTED]> wrote: > > > Hello Clojurians, > > > I think after 1st year of Clojure life it's good to check how far has > > Clojure spread all ov

Daily Build

2008-11-17 Thread Robert Winslow
Is there a server that tests every day if Clojure builds correctly? I pulled the latest a few days ago and couldn't get it to build (whereas the 2008-09-16 "release" does build for me). Having this server would assist in determining if such problems are the user's fault (likely) or not (unlikely).

Re: add-classpath erroring out, post r1100...

2008-11-17 Thread Phil Jordan
Rich Hickey wrote: > I'm going to deprecate add-classpath because people consistently use > it to avoid the standard classpath-setting mechanisms, at least until > I can figure out a way to coordinate it with the standard classloader. You could make it a thread-local binding within the repl and u

Re: add-classpath erroring out, post r1100...

2008-11-17 Thread Scott Fleckenstein
Thanks Rich, While I understand the desire to stick with java conventions when it comes to adding to the classpath, it is too bad because it takes away from the 'explorability' you get with a Repl. I've gotten into the habit of just dumping jars into my scratch folder and tooling away on my runn

Re: add-classpath erroring out, post r1100...

2008-11-17 Thread Rich Hickey
On Nov 17, 1:00 pm, Scott Fleckenstein <[EMAIL PROTECTED]> wrote: > Hi All, > > I've run into a bug since upgrading past revision 1100, specifically > around adding to the classpath at runtime using add-classpath. I've > attached a test case > here:http://s3.amazonaws.com/nullstyle/precompile-

add-classpath erroring out, post r1100...

2008-11-17 Thread Scott Fleckenstein
Hi All, I've run into a bug since upgrading past revision 1100, specifically around adding to the classpath at runtime using add-classpath. I've attached a test case here: http://s3.amazonaws.com/nullstyle/precompile-bug.tar.gz That file has three versions of clojure (r1100, r1101, r1106) and

Patch: standalone compiler (2nd try)

2008-11-17 Thread Stuart Sierra
Patch attached. This uses clojure.core/compile. But it still doesn't work. I get the same error Stephen reported: [java] java.lang.IllegalStateException: Var null/null is unbound. (core.clj:21) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)

Re: Strange behaviour

2008-11-17 Thread Konrad Hinsen
On Nov 17, 2008, at 14:30, Rich Hickey wrote: > It's best to do this as generally as possible, building on something > like this: > > (defn map-same [f coll] > (let [ret (into (empty coll) (map f coll))] > (if (seq? coll) > (reverse ret) > ret))) OK, so I have as a minimal set

Re: thanks, errata, and one gaffe

2008-11-17 Thread Stuart Halloway
It's harder than that. :-) In general, to coordinate two transactional systems, you need a transaction coordinator, like Microsoft's DTC or the ones baked into various JEE containers. And that is what you are talking about here: the Tx system in Clojure + the Tx system in a database. Good

"Parallel Programming with Transactional Memory" (ACM Queue Article)

2008-11-17 Thread Randall R Schulz
Hi, Clojure users might find this ACM Queue article interesting: -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==- "Parallel Programming with Transactional Memory" While still primarily a research project, transactional memory shows promise for

Re: Clojure for LISP programmers....

2008-11-17 Thread Luc Prefontaine
I fully agree with you Konrad. If Clojure eases up code reading for non-Lispers while not changing the principles behind then what's the problem ? As far as breaking the s-expr esthetics... bof, I could not care less. Easier here means easier to understand for non-Lispers. They are the ones we nee

Re: thanks, errata, and one gaffe

2008-11-17 Thread Howard Lewis Ship
I'm really interested in how you would coordinate a database transaction with an STM transaction. Do you message an agent to do the database update? On Mon, Nov 17, 2008 at 6:13 AM, Stuart Halloway <[EMAIL PROTECTED]> wrote: > > Hi Brian, > > The libraries chapter will cover a bunch of different

Re: Patch: standalone compiler (almost)

2008-11-17 Thread Stephen C. Gilardi
> I think you've got some of the interim work I've done integrating gen- > class. main now needs to be called -main, as all methods will be > defined with leading -. I'm at SVN 1106 which doesn't appear to have any changes relative to 1104 in this area. My compiled "hello.clj" works with its f

Re: clojure.contrib.test-is changes

2008-11-17 Thread Stuart Sierra
Hi Paul, Thanks, glad you like it. I hadn't seen your earlier post -- wasn't following the group for a couple weeks there. My first inclination is not to catch any Error subclasses, as Sun says, http://java.sun.com/javase/6/docs/api/java/lang/Error.html But, StackOverflowError might be an excep

Re: Patch: standalone compiler (almost)

2008-11-17 Thread Stuart Sierra
On Nov 17, 8:50 am, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote: > In working through this, I also found that a compiler driver written   > in Java may be preferable for use via build.xml because of a bootstrap   > problem. Yes, that's why I wanted to implement it in Java. -S --~--~-~-

Re: Clojure for LISP programmers....

2008-11-17 Thread Dave Newton
--- On Mon, 11/17/08, Rich Hickey wrote: > I've presented Clojure to many of the people who wrote > CL and Scheme, and no one can deny it is a Lisp. I'd also add that at Lisp50 Clojure was very well received by many Lisperati, and many, if not most, of the folks there were *way* into Scheme and

Re: Patch: standalone compiler (almost)

2008-11-17 Thread Rich Hickey
On Nov 17, 8:50 am, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote: > On Nov 16, 2008, at 10:34 PM, Rich Hickey wrote: > > > Since it only requires main, might I suggest you write this in > > Clojure instead? > > I gave that a try. > > Here's a simple version of a driver for the compiler, stored

Re: Clojure for LISP programmers....

2008-11-17 Thread Michael Wood
On Mon, Nov 17, 2008 at 4:18 PM, Stuart Halloway <[EMAIL PROTECTED]> wrote: > > Hi Simon, > > I have converted a bunch of the examples from Practical Common Lisp > into Clojure [1]. You might find this helpful in seeing things from a > Clojure perspective. > > Cheers, > Stuart > > [1] http://blog

Re: Clojure for LISP programmers....

2008-11-17 Thread Rich Hickey
You contend that Lisp is regular, without defining regular. I contend that as soon as you have ' it is not regular, and no one writes Lisp without '. You keep using the term 'syntax' for Clojure's non-list data structures. If list literals are not syntax, neither are vector or map literals. You

Re: Clojure for LISP programmers....

2008-11-17 Thread Stuart Halloway
Hi Simon, I have converted a bunch of the examples from Practical Common Lisp into Clojure [1]. You might find this helpful in seeing things from a Clojure perspective. Cheers, Stuart [1] http://blog.thinkrelevance.com/2008/9/16/pcl-clojure > Has anyone written a very simple introduction

Re: thanks, errata, and one gaffe

2008-11-17 Thread Stuart Halloway
Hi Brian, The libraries chapter will cover a bunch of different libraries in Clojure-Contrib and elsewhere. Obviously, being only one chapter, it won't go terribly deep. I'd love to hear what folks want to see. I am planning on at least: * db * web apps * testing/BDD * zipper > > Stuart:

Re: Patch: standalone compiler (almost)

2008-11-17 Thread Stephen C. Gilardi
On Nov 16, 2008, at 10:34 PM, Rich Hickey wrote: > Since it only requires main, might I suggest you write this in > Clojure instead? I gave that a try. Here's a simple version of a driver for the compiler, stored in src/ clj/clojure/compile.clj: (ns clojure.compile) (defn

Re: Clojure for LISP programmers....

2008-11-17 Thread mac
On Nov 17, 4:52 am, Luc Prefontaine <[EMAIL PROTECTED]> wrote: > I never read anywhere in the documentation or in the user group that > Clojure is a Common LISP implementation. > > Since it's existence, LISP has not gained a large acceptance in the > commercial market compared to other "conventi

Re: recur in catch and finally?

2008-11-17 Thread Rich Hickey
On Nov 17, 2:06 am, mb <[EMAIL PROTECTED]> wrote: > Hi, > > On 17 Nov., 02:09, Chouser <[EMAIL PROTECTED]> wrote: > > > You could of course work around this by putting your loop in some > > other function and calling it from inside catch. > > In this specific case I used: > (last (take-while #(n

Re: Strange behaviour

2008-11-17 Thread Rich Hickey
On Nov 17, 7:56 am, Konrad Hinsen <[EMAIL PROTECTED]> wrote: > On Nov 17, 2008, at 13:33, mb wrote: > > > vals returns a clojure.lang.APersistentMap$ValSeq, which > > is not a list. Hence list? returns false and you get the true > > branch, ie. the thing itself. > > A. It looks like a li

Re: Clojure for LISP programmers....

2008-11-17 Thread Konrad Hinsen
On Nov 17, 2008, at 13:56, Simon Brooke wrote: > However, you're dead wrong about Lots of Irritating Stupid > Parentheses. They are the heart of the language: the fact that it does > not need any irregular syntax, because everything is regular. For me, the heart of Lisp is that code is expressed

Re: Clojure for LISP programmers....

2008-11-17 Thread Simon Brooke
On Nov 17, 3:52 am, Luc Prefontaine <[EMAIL PROTECTED]> wrote: > Since it's existence, LISP has not gained a large acceptance in the > commercial market compared to other "conventional" programming > languages. This is true; I think, though, it's largely a fashion thing. In the days when you and

Re: Strange behaviour

2008-11-17 Thread Konrad Hinsen
On Nov 17, 2008, at 13:33, mb wrote: > vals returns a clojure.lang.APersistentMap$ValSeq, which > is not a list. Hence list? returns false and you get the true > branch, ie. the thing itself. A. It looks like a list, but it isn't a list. > I know. It doesn't help much, but it shows, tha

Re: clojure.contrib.test-is changes

2008-11-17 Thread Frantisek Sodomka
Thanks Stuart! It will certainly make writing tests more enjoyable :-) Inspiration for :equal-pairs/each= came from the test framework I wrote for newLISP: http://newlisp-on-noodles.org/wiki/index.php/Function_Testing Tests there are written as each= with 2 exceptions: '->' evaluates the next

Re: Strange behaviour

2008-11-17 Thread mb
Hi, On 17 Nov., 13:05, Konrad Hinsen <[EMAIL PROTECTED]> wrote: >         (defn replace-syms >            [sym-map expr] >            (let [replace #(replace-syms sym-map %)] >               (cond (contains? sym-map expr) (get sym-map expr) >                     (list? expr) (map #(replace-syms s

Strange behaviour

2008-11-17 Thread Konrad Hinsen
Given the function (defn replace-syms [sym-map expr] (let [replace #(replace-syms sym-map %)] (cond (contains? sym-map expr) (get sym-map expr) (list? expr) (map #(replace-syms sym-map %) expr) (vector? expr) (int

Re: Clojure for LISP programmers....

2008-11-17 Thread Dave Newton
--- On Mon, 11/17/08, Simon Brooke wrote: > I admit I started without reading the documentation, but having got > stuck I then read the documentation - both that at Clojure.org and > that in the Wikibook - carefully. It didn't help. I just don't see how that's possible, since somehow I've managed

newbie swank problem

2008-11-17 Thread brus
Hope that someone will help me or clarify this problem: - when I run example 2dplot.clj from command line it is compiled and run - but in emacs it never end with compiling Here is my swank-clojure-cmd from emacs: ("java" "-server" "-classpath" "d:/tools/clojure/target/clojure- lang-1.0-SNAPSHOT.

Re: thanks, errata, and one gaffe

2008-11-17 Thread Brian Adkins
Stuart: I read through the table of contents. Are you planning on addressing interacting with a database (preferably postgres or mysql) in Clojure? Maybe the "Working with Java" chapter will be sufficient, but one of the benefits of Clojure is "batteries included", so helping folks get up to spe

Re: clojure.contrib.test-is changes

2008-11-17 Thread Paul Drummond
Hi Stuart, Cool additions - I will certainly use them. Regarding test-is additions, did you ever get a chance to check out the patch I submitted a while back? http://groups.google.com/group/clojure/browse_thread/thread/c509d589e181df1e/4319c02c9930d12e?lnk=gst&q=PATCH+test-is#4319c02c9930d12e I

Re: Clojure for LISP programmers....

2008-11-17 Thread Simon Brooke
On Nov 17, 7:43 am, "Howard Lewis Ship" <[EMAIL PROTECTED]> wrote: > I generally like that Clojure dispenses with parens that exist for the > benefit of the evaluator rather than the developer; thus far fewer > parens when using (cond).  Still, my old Lisp habits (20 years without > use) succumbed

Re: Clojure for LISP programmers....

2008-11-17 Thread Simon Brooke
On Nov 16, 11:01 pm, Brian W <[EMAIL PROTECTED]> wrote: > I'm going to assume this is serious and not a joke, but you do realize > Clojure is already quite well documented at clojure.org? I admit I started without reading the documentation, but having got stuck I then read the documentation - bot

Re: Clojure for LISP programmers....

2008-11-17 Thread Jeff Rose
I hope you are either 14 years old, or joking. Rather than sitting down and attempting to conjure up perfect lines of a new programming language you have never used before, it might be good to spend some time reading! Learning new things is good for your brain, and I can promise you Clojure

Re: Running Clojure scripts at the command line

2008-11-17 Thread mb
Hi, On 17 Nov., 09:07, "Michael Wood" <[EMAIL PROTECTED]> wrote: > #!/usr/bin/env java -cp /sq/ext/clojure/clojure.jar clojure.lang.Script Most systems only allow one argument to the command. scsh solved this issue with the special \ argument and block comment #! ... !# #! /usr/bin/scsh \ -m or

Re: Running Clojure scripts at the command line

2008-11-17 Thread Michael Wood
Hi On Sun, Nov 16, 2008 at 11:46 PM, Stephen C. Gilardi <[EMAIL PROTECTED]> wrote: > > On Nov 16, 2008, at 1:21 PM, Stuart Sierra wrote: > > I would like both the REPL and Script to be callable from the same main > (), i.e. you should just be able to call java -jar clojure.jar without > naming a