Re: A Clojure Highlife

2009-11-16 Thread Jeff Heon
Hi there, Unfortunately, I was unable to get it working. >From what I gather, I'm using the wrong clojure.jar and or clojure- contrib.jar. Could you tell me which version of theses files you are using? Anyway, I was wondering about the memoizing of the function surrounding-neighbors-seq. It's m

Re: Remote REPL problem when connecting to RMI Client VM

2009-11-16 Thread John Harrop
On Mon, Nov 16, 2009 at 7:20 PM, Kent wrote: > Hi, > > I am trying to use clojure to implement a "plugin" for some vendor > supplied software. > > Here is a little background on the vendor supplied software. It > expects me to implement a particular interface and then put the jar > file containi

Remote REPL problem when connecting to RMI Client VM

2009-11-16 Thread Kent
Hi, I am trying to use clojure to implement a "plugin" for some vendor supplied software. Here is a little background on the vendor supplied software. It expects me to implement a particular interface and then put the jar file containing that implementation into a directory on its server. Then w

Re: SLIME REPL broken

2009-11-16 Thread Stefan Kamphausen
Hi, Phil Hagelberg wrote: > Unless there are some really great features added upstream in slime, > fixing swank-clojure to work with their latest changes is a low priority. this is a pity, at least for those of us, who also use Slime to do some CL hacking. For that setup it is quite common to al

Re: Clojure Web Libraries

2009-11-16 Thread ngocdaothanh
Could someone provide an example about using Clojure with Restlet? I found: http://github.com/stuartsierra/altlaw-clojure-restlet but don't understand how the code works as a web application. Thanks. On Nov 15, 11:06 pm, Stefan Tilkov wrote: > On Nov 15, 2009, at 4:58 AM, ngocdaothanh wrote: >

(range 1.0 10.0) versus (range 1 10) in clojure versions 1.0.0-snapshot 1.1.0-alpha

2009-11-16 Thread prhlava
Hello, ( this is related to http://groups.google.com/group/clojure/browse_thread/thread/d894a933dcb5d0f6 ) In Clojure 1.0.0-snapshot, the (range 1.0 10.0) ; 1) (range 1 10) ; 2) both yield integer numbers in result. In clojure 1.1.0-alpha-snapshot (recent), the 1) yield floats and 2) i

Re: A macro for flexible keyword argument handling

2009-11-16 Thread Chouser
On Mon, Nov 16, 2009 at 12:32 PM, Constantine Vetoshev wrote: > > 2. I tried it with the more let-like form, but I don't like the number > of opening braces required. For a full kw-spec, the form would end up > (let-kw [[[:kw default supplied?]] kw-args] ...). Clojure tends to err > on the side of

Re: Clojure & Terracotta - TIM

2009-11-16 Thread Sergey Didenko
Thanks for your answer, Paul! I'm certainly going to try this TIM. Another question: You say that "it requires runtime replacement of some Clojure classes" but the lines that include modified *TC.java files are commented ( see "ClojureTerracottaConfigurator.java" from "tim-clojure-1.0-snapshot"

Re: A Clojure Highlife

2009-11-16 Thread John Harrop
On Mon, Nov 16, 2009 at 12:42 AM, solussd wrote: > I just finished an implementation of the Conway's Game of Life > derivative, Highlife, in Clojure. It consists of a simple swing GUI > and makes good use of Refs for coordinating grid updates. A more > detailed description, source, and jars can b

Re: local constants in functions or static locals/Hilbert curve in clojure (no images:)

2009-11-16 Thread John Harrop
On Sun, Nov 15, 2009 at 8:28 PM, Rich Hickey wrote: > On Sun, Nov 15, 2009 at 4:49 AM, ajuc wrote: > > On 15 Lis, 00:21, John Harrop wrote: > >> On Sat, Nov 14, 2009 at 3:03 PM, ajuc wrote: > >> > I have to install java one more time, when I try to start java - > >> > server, I get: > >> > Err

Re: SLIME REPL broken

2009-11-16 Thread Phil Hagelberg
Stefan Kamphausen writes: > a short discussion on the SLIME mailinglist lead to the result that > the arglist of a backend function in swank did change. > > Current checkouts of SLIME do not work with Clojure, at least if you > use autodoc. > > http://common-lisp.net/pipermail/slime-devel/2009-No

Re: Clojure & Terracotta - TIM

2009-11-16 Thread Paul Stadig
Sorry! I forgot to say this, but the short answer is: No, I would not consider it to be production ready. It may be close, but it is not production ready. Paul On Sun, Nov 15, 2009 at 2:47 PM, Sergey Didenko wrote: > Hi from a Clojure newbie! > > I have read the april thread "Clojure + Terracot

Re: Clojure & Terracotta - TIM

2009-11-16 Thread Paul Stadig
Hey Sergey, I did the work on the Clojure TIM. I published a report of my findings at [1]. At least three of the roadblocks that I encountered were fixed in Terracotta 3.0.1 [2]. I believe the TIM works with Clojure 1.0, but it's been several months since I've looked at the code. There are still s

Re: A macro for flexible keyword argument handling

2009-11-16 Thread Constantine Vetoshev
1. Looks like everyone prefers the let-kw name. Sounds good to me. 2. I tried it with the more let-like form, but I don't like the number of opening braces required. For a full kw-spec, the form would end up (let-kw [[[:kw default supplied?]] kw-args] ...). Clojure tends to err on the side of fewe

Re: Datatypes and Protocols - early experience program

2009-11-16 Thread Jonas Enlund
On Mon, Nov 16, 2009 at 6:27 PM, Stuart Sierra wrote: > On Nov 14, 8:28 am, Jonas Enlund wrote: >> I have built a simple Matrix datatype with defprotocol and deftype. >> You can take a look at it athttp://gist.github.com/234535 >> (constructive criticism welcome!). > > Small thing: I would expect

Re: Datatypes and Protocols - early experience program

2009-11-16 Thread Stuart Sierra
On Nov 14, 8:28 am, Jonas Enlund wrote: > I have built a simple Matrix datatype with defprotocol and deftype. > You can take a look at it athttp://gist.github.com/234535 > (constructive criticism welcome!). Small thing: I would expect (count a-matrix) to return rows*columns, not the number of row

Re: Topological sort

2009-11-16 Thread Christophe Grand
Just for the fun of writing it: (defn topological-sort [x] (mapcat #(for [[k v] % :when (empty? v)] k) (take-while seq (iterate #(into {} (for [[k v] % :when (seq v)] [k (mapcat % v)])) x user=> (topological-sort {1 [2 3] 2 [3] 3 []}) (3 2 1) Note that it's not the same algor

Re: Topological sort

2009-11-16 Thread Nick Day
brilliant, this has been very helpful - thanks to both for taking the time to answer! On Nov 12, 6:06 am, John Harrop wrote: > On Wed, Nov 11, 2009 at 2:04 PM, Nick Day wrote: > > Hi, > > > I've been trying to implement a topological sort and have been > > struggling a bit. I have a map of sym

Re: Datatypes and Protocols - early experience program

2009-11-16 Thread Sean Devlin
Enclojure users: I was able to confirm John's problem in Enclojure. I found a work around. Read more here: http://groups.google.com/group/enclojure/browse_thread/thread/6bddd3153ece02f2 On Nov 16, 12:12 am, John Harrop wrote: > On Sun, Nov 15, 2009 at 8:17 PM, David Brown wrote: > > On Sun,

Re: Datatypes and Protocols - early experience program

2009-11-16 Thread Michael Wood
2009/11/16 John Harrop : > On Mon, Nov 16, 2009 at 2:16 AM, Michael Wood wrote: >> >> This is what I get with or without rlwrap from the command line.  No >> IDE or anything like that: >> >> Clojure 1.1.0-alpha-SNAPSHOT >> user=> ; some comment >> user=> #! something >> (println "blah") >> blah >>

Re: A macro for flexible keyword argument handling

2009-11-16 Thread Timothy Pratley
On Nov 16, 8:24 pm, Laurent PETIT wrote: > Really cool ! Yeah, neat :) > or (let-kw) for short ? I like that name better > This deserves to be placed in contrib, in my opinion. Yes please! Nice macro Constantine :) -- You received this message because you are subscribed to the Google Gr

Re: ExceptionInInitializerError in eval with user defined functions

2009-11-16 Thread gun43
r1366 was also known as Clojure 1.0.0 It turns out that these problems only occur with the clojure.jar distributed with clojuredev 0.0.37 (now Counterclockwise) which also claims to be Clojure 1.0.0 On Nov 14, 8:18 pm, Jarkko Oranen wrote: > On Nov 14, 8:08 pm, gun43 wrote:> Using r1366 under >

Re: A macro for flexible keyword argument handling

2009-11-16 Thread Meikel Brandmeyer
Hi, On Nov 16, 10:24 am, Laurent PETIT wrote: > This deserves to be placed in contrib, in my opinion. In fact it could be used to drive defnk. So defnk could be retained as a convenience (and for backward compatibility) expanding to (defn ... (fn-keyword ...)). +1 to some different name, thoug

A Clojure Highlife

2009-11-16 Thread solussd
I just finished an implementation of the Conway's Game of Life derivative, Highlife, in Clojure. It consists of a simple swing GUI and makes good use of Refs for coordinating grid updates. A more detailed description, source, and jars can be found here: http://www.solussd.com/2009/11/a-clojure-high

Re: local constants in functions or static locals/Hilbert curve in clojure (no images:)

2009-11-16 Thread Rich Hickey
On Sun, Nov 15, 2009 at 4:49 AM, ajuc wrote: > > > On 15 Lis, 00:21, John Harrop wrote: >> On Sat, Nov 14, 2009 at 3:03 PM, ajuc wrote: >> > I have to install java one more time, when I try to start java - >> > server, I get: >> > Error: no `server' JVM at `F:\Program Files\Java\jre6\bin\server

"arithmetic" change between 1.0.0 and 1.1. 0

2009-11-16 Thread prhlava
Hello, I was testing if my code works with Clojure 1.1.0-alpha-SNAPSHOT - the full code is attached to this group (in files section) as parallel- factorial*.clj . The code works in 1.0.0, but blows up in 1.1.0 for bigger numbers. After a bit of digging, I found that following function is the cul

Re: Datatypes and Protocols - early experience program

2009-11-16 Thread John Harrop
On Mon, Nov 16, 2009 at 2:16 AM, Michael Wood wrote: > This is what I get with or without rlwrap from the command line. No > IDE or anything like that: > > Clojure 1.1.0-alpha-SNAPSHOT > user=> ; some comment > user=> #! something > (println "blah") > blah > nil > user=> > > i.e. the same as Dav

Re: A macro for flexible keyword argument handling

2009-11-16 Thread Laurent PETIT
Really cool ! Some ideas which may (or may not ?) enhance it even further : Since it creates new local bindings, maybe make it look more like other binding forms : instead of (fn-keyword [kw spec] init-kw-val body) : (let-keywords [ [kw spec] init-kw-val ] body ) ? or (let-kw) for short ? Ind