Re: Problems with Kevin O'Neills Clojure GitHub Mirror

2009-05-07 Thread Rick Moynihan
Awesome!! Thanks a bunch! R. 2009/5/7 Kevin O'Neill ke...@oneill.id.au: Branches and tags are now being mirrored. -k. On Thu, May 7, 2009 at 1:41 PM, Kevin O'Neill ke...@oneill.id.au wrote: I'll look into it. I mirror branches for other projects and i'm sure this will be fairly

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Stefan Hübner
Laurent PETIT laurent.pe...@gmail.com writes: I also think it makes sense to deposit the whole battery : clojureXX.jar clojure-slimXX.jar OK, I would bundle clojure-slim.jar too. I'm not familiar with it, though curious. Would you enlighten me by throwing some light on it's purpose?

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Laurent PETIT
2009/5/7 Stefan Hübner sthueb...@googlemail.com: Laurent PETIT laurent.pe...@gmail.com writes: I also think it makes sense to deposit the whole battery : clojureXX.jar clojure-slimXX.jar OK, I would bundle clojure-slim.jar too. I'm not familiar with it, though curious. Would you

Re: Got a Clojure library?

2009-05-07 Thread Konrad Hinsen
On May 5, 2009, at 2:11, liebke wrote: Name: Incanter URL: http://github.com/liebke/incanter/tree/master Author: David Edgar Liebke Tags: statistics, numerical computing, plotting License: EPL Dependencies: Parallel Colt, JFreeChart, OpenCSV Description: Incanter is a collection

clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread stephaner
Hi everyone, I've upgrade to the lastest release, i'm trying under Emacs to run- tests and now I receive the following error: We evaluating: (run-tests 'konato.ode.tests.test-ode) I receive: java.lang.RuntimeException: java.lang.IllegalArgumentException: Wrong number of args passed to:

Re: Writer turned programmer seeks string processing advice

2009-05-07 Thread dhs827
Thanks, everybody. The buzz at Hacker News is that the Clojure community is awesome, and the buzz is right. Now, to me, it follows from the advice you gave that I should do two projects: 1. Learn Clojure by implementing (some of) AIML (about half of the language is of no interest to me) 2.

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Stefan Hübner
OK, I've got it. Thanks, Laurent! I would bundle clojure-slim.jar as a classified clojure, like Maven calls it. So the final filename would be clojure-lang-1.0.0-slim.jar. To use this one instead of clojure-lang-1.0.0.jar, the following dependency needs to be declared: dependency

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Laurent PETIT
Seems fine to me. One question, though: I see that you want to name the artifact clojure-lang and not just clojure. Why not just clojure as is the case for the ant build script ? I guess this could just confuse people ? 2009/5/7 Stefan Hübner sthueb...@googlemail.com: OK, I've got it.

Re: Writer turned programmer seeks string processing advice

2009-05-07 Thread Laurent PETIT
2009/5/7 dhs827 scheur...@gmail.com: Thanks, everybody. The buzz at Hacker News is that the Clojure community is awesome, and the buzz is right. Now, to me, it follows from the advice you gave that I should do two projects: 1. Learn Clojure by implementing (some of) AIML (about half of

Re: clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread Stuart Sierra
Hi Stephane, Sorry about this; it was my fault. Should be fixed now, contrib SVN rev. 773. -Stuart Sierra On May 7, 8:27 am, stephaner stepha...@gmail.com wrote: Hi everyone, I've upgrade to the lastest release, i'm trying under Emacs to run- tests and now I receive the following error:

Re: HTTP clients in clojure

2009-05-07 Thread Stuart Sierra
On May 6, 8:34 pm, Eric Tschetter eched...@gmail.com wrote:  I'm wonder if such a thing exists, or has everyone basically just rolled their own wrapper on top of their favorite Java HTTP client library? I just use the Apache Commons HTTP client. -SS

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Stefan Hübner
Laurent PETIT laurent.pe...@gmail.com writes: Seems fine to me. One question, though: I see that you want to name the artifact clojure-lang and not just clojure. Why not just clojure as is the case for the ant build script ? I guess this could just confuse people ? Very good point!

Re: Enlive questions

2009-05-07 Thread rzeze...@gmail.com
On May 6, 1:36 am, Christophe Grand christo...@cgrand.net wrote: Hello Ryan, rzeze...@gmail.com a écrit : Either I've missed something, orEnlive*appears* to have problems handling comment tags. Indeed. I pushed a fix, please tell me whether it works for you now. Thanks for the

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Laurent PETIT
2009/5/7 Stefan Hübner sthueb...@googlemail.com: Laurent PETIT laurent.pe...@gmail.com writes: Seems fine to me. One question, though: I see that you want to name the artifact clojure-lang and not just clojure. Why not just clojure as is the case for the ant build script ? I guess this

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread J. McConnell
I guess only Rich can make the choice: statu quo, clojure (breaks maven artifact id), clojure-lang (breaks build.xml). Not that I have a strong stake in this, but I'd vote for going with clojure and getting it right for 1.0. - J. --~--~-~--~~~---~--~~ You

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Stefan Hübner
Laurent PETIT laurent.pe...@gmail.com writes: You're right, so from the beginning the ant script creates clojure... while the maven script creates clojure-lang To be precise here, there's no such maven script that creates clojure-lang, neither does Maven do anything during Clojure's build

Re: clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread stephaner
Hi Mr. Sierra, I still have the same error after rebuild. Here is my clj-build script: #!/bin/sh -e CLJ_ROOT=/home/stephane/src export CLJ_ROOT cd $CLJ_ROOT rm -dfr clojure rm -dfr clojure-contrib rm -dfr clojure-mode rm -dfr swank-clojure rm -dfr slime svn checkout

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Laurent PETIT
2009/5/7 Stefan Hübner sthueb...@googlemail.com: Laurent PETIT laurent.pe...@gmail.com writes: You're right, so from the beginning the ant script creates clojure... while the maven script creates clojure-lang To be precise here, there's no such maven script that creates clojure-lang,

Overlapping IO with processing

2009-05-07 Thread Bradbev
I have a 25Mb CSV text file that I want to process. Simply running (time (dorun (read-lines file))) gives me about 1 second of read time, which is about as fast as you'll get (on my machine) I think. I believe that it should be possible to overlap the IO cost of reading from a file with

Re: clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread stephaner
Now I'm on revision 774 of clojure-contrib but still have the error: java.lang.IllegalArgumentException: Wrong number of args passed to: test-is$report [Thrown class java.lang.RuntimeException] Restarts: 0: [ABORT] Return to SLIME's top level. 1: [CAUSE] Throw cause of this exception

Re: Overlapping IO with processing

2009-05-07 Thread Laurent PETIT
2009/5/7 Bradbev brad.beveri...@gmail.com: I have a 25Mb CSV text file that I want to process.  Simply running (time (dorun (read-lines file))) gives me about 1 second of read time, which is about as fast as you'll get (on my machine) I think. I believe that it should be possible to overlap

Re: clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread stephaner
Current finding, run-tests works in a shell with a REPL and in vim- clojure: Testing konato.ode.tests.test-ode Ran 9 tests containing 21 assertions. 0 failures, 0 errors. nil But still doesn't work on Emacs. Thank you, Stephane On May 7, 11:20 am, stephaner stepha...@gmail.com wrote:  Now

Re: clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread Phil Hagelberg
stephaner stepha...@gmail.com writes: Current finding, run-tests works in a shell with a REPL and in vim- clojure: Testing konato.ode.tests.test-ode Ran 9 tests containing 21 assertions. 0 failures, 0 errors. nil But still doesn't work on Emacs. It sounds like you're using an old

gen-class :exposes-methods

2009-05-07 Thread gun43
I am having trouble calling a superclass implementation from an overridden method. I have read the documentation for gen- class :exposes-methods and looked at the examples on github. When I examine the class file, I find no local method for the exposed method. Here are the relevant code fragments

Re: Overlapping IO with processing

2009-05-07 Thread Meikel Brandmeyer
Hi, Am 07.05.2009 um 17:19 schrieb Bradbev: This also leads me to think that it would be useful to have a function that precached a lazy seq, ie (pre-cache-seq 5 (range 1000)); returns a new lazy-seq that will keep 5 elements ahead by precaching on another thread. Maybe clojure.core/seque

Re: clojure.contrib.test-is/run-tests throws Wrong number of args passed to: test-is$report

2009-05-07 Thread stephaner
Hi Phil, It does work now: user= user= (load-file /home/stephane/prjode/src/konato/ode/tests/ test_ode.clj) (load-file /home/stephane/prjode/src/konato/ode/tests/test_ode.clj) nil user= (run-tests 'konato.ode.tests.test-ode) (run-tests 'konato.ode.tests.test-ode) Testing

Re: Overlapping IO with processing

2009-05-07 Thread Bradbev
On May 7, 9:26 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 07.05.2009 um 17:19 schrieb Bradbev: This also leads me to think that it would be useful to have a function that precached a lazy seq, ie (pre-cache-seq 5 (range 1000)); returns a new lazy-seq that will keep 5 elements

Re: Writer turned programmer seeks string processing advice

2009-05-07 Thread dhs827
Laurent PETIT wrote: For 2., you could even consider, rather than manually doing the conversion, write (in clojure of course, with the help of the xml parsing tools already available) a AIML to clojure-AIML converter :-) Most of the work will be about figuring out how to map the functional

Re: Getting slime-edit-definition to work with Clojure

2009-05-07 Thread Phil Hagelberg
Baishampayan Ghose b.gh...@ocricket.com writes: It looks like you're using a wrapper script rather than letting swank-clojure construct a java command-line invocation. I'm not sure why you're doing this; working with the defaults might fix it. Many thanks. Just using the conf generated by

[PATCH] contrib: Several namespaces are left uncompiled for seemingly no reason

2009-05-07 Thread Jarkko Oranen
As stated in the subject, the clojure-contrib build process doesn't compile all namespaces. Some of them of course must not be compiled (like macro-apply, due to its evilness), but as far as I can tell, some were simply missing from the build file. I have a patch here:

Re: Getting slime-edit-definition to work with Clojure

2009-05-07 Thread Baishampayan Ghose
Phil Hagelberg wrote: But it still doesn't work for Clojure's internal functions in, say, core.clj Not sure, but it could be due to your Clojure copy being AOT compiled without having the original .clj file around? That'd be my guess. Take a look inside your jar or classes directory and

Re: Getting slime-edit-definition to work with Clojure

2009-05-07 Thread Stephen C. Gilardi
On May 7, 2009, at 2:37 PM, Baishampayan Ghose wrote: That's right. The clojure.jar that I am using contains only the AOT compiled .class files. The default ant build includes both compiled files and sources in the clojure.jar it produces. Should I use the slim jar instead? The

Re: gen-class :exposes-methods

2009-05-07 Thread Stuart Sierra
Hi Bruce, It looks like your namespace only implements an interface, rather than extending a class. You need an :extends... line in your (:gen- class...) to set the concrete base class. -Stuart Sierra On May 7, 12:26 pm, gun43 bg-561...@versanet.de wrote: I am having trouble calling a

Re: Getting slime-edit-definition to work with Clojure

2009-05-07 Thread Baishampayan Ghose
Steve, I tested with a new jar with the clj files, even then it doesn't work :( My ~/.emacs is thus - ;;; (defvar clj-root (concat (expand-file-name ~) /src/clj/)) (setq load-path (append (list (concat clj-root clojure-mode)) load-path)) (require

Re: HTTP clients in clojure

2009-05-07 Thread Richard Newman
I wrote my own wrapper around the Apache Commons HTTP client, approximately mirroring AllegroServe's HTTP client. I often find myself wanting to react to the HTTP response code and response without the burden of exception handling… after all, a non-200 response is hardly exceptional, if an

Can for be enhanced to not have to take a binding?

2009-05-07 Thread CuppoJava
I'm trying to accomplish the following: Create a lazy sequence of calls to f() while pred() is true. And an elegant way to do this seems to be: (for [:while (pred)] (f)) which doesn't work because (for) requires a binding. This can be worked around with: (for [i (constantly 0) :while (pred)]

Re: Can for be enhanced to not have to take a binding?

2009-05-07 Thread Kevin Downey
user= (doc take-while) - clojure.core/take-while ([pred coll]) Returns a lazy sequence of successive items from coll while (pred item) returns true. pred must be free of side-effects. nil user= On Thu, May 7, 2009 at 2:11 PM, CuppoJava patrickli_2...@hotmail.com

Re: Can for be enhanced to not have to take a binding?

2009-05-07 Thread Meikel Brandmeyer
Hi, together with repeatedly: (take-while pred (repeatedly f))) Sincerely Meikel Am 07.05.2009 um 23:14 schrieb Kevin Downey: user= (doc take-while) - clojure.core/take-while ([pred coll]) Returns a lazy sequence of successive items from coll while (pred item)

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Christian Vest Hansen
On Thu, May 7, 2009 at 4:47 PM, J. McConnell jdo...@gmail.com wrote: I guess only Rich can make the choice: statu quo, clojure (breaks maven artifact id), clojure-lang (breaks build.xml). Not that I have a strong stake in this, but I'd vote for going with clojure and getting it right for

Re: Can for be enhanced to not have to take a binding?

2009-05-07 Thread Christophe Grand
CuppoJava a écrit : I'm trying to accomplish the following: Create a lazy sequence of calls to f() while pred() is true. And an elegant way to do this seems to be: (for [:while (pred)] (f)) which doesn't work because (for) requires a binding. This can be worked around with: (for [i

Re: Can for be enhanced to not have to take a binding?

2009-05-07 Thread CuppoJava
Yeah (pred) is not supposed to depend on any items inside f. This is why (take-while pred (repeatedly f))) won't work in this situation. (take-while) will always take an element out of f, so that it can be tested using (pred). I don't want any elements of (f) to be looked at if (pred) is false.

Re: Getting slime-edit-definition to work with Clojure

2009-05-07 Thread Stephen C. Gilardi
On May 7, 2009, at 3:39 PM, Baishampayan Ghose wrote: I tested with a new jar with the clj files, even then it doesn't work :( Need help :) Hi BG, I've simplified my .emacs file and clojure launch script to only what's required for my slime setup to work with swank-clojure. With

Re: Can for be enhanced to not have to take a binding?

2009-05-07 Thread Meikel Brandmeyer
Hi, lazy-seq to the rescue: (defn mouse-seq [] (lazy-seq (when (Mouse/hasEvent) (cons (Mouse/getEvent) (mouse-seq) Sincerely Meikel Am 07.05.2009 um 23:40 schrieb CuppoJava: Yeah (pred) is not supposed to depend on any items inside f. This is why (take-while pred

Re: Can for be enhanced to not have to take a binding?

2009-05-07 Thread CuppoJava
Thanks Meikel. That certainly works. But don't you find: (for [:while (Mouse/hasEvent)] (Mouse/getEvent)) much shorter and easier to understand? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Feedback on new persistentmatrix datatype

2009-05-07 Thread maxsu
Can't wait to try this out! --~--~-~--~~~---~--~~ 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

Re: Can for be enhanced to not have to take a binding?

2009-05-07 Thread Meikel Brandmeyer
Hi, Am 07.05.2009 um 23:54 schrieb CuppoJava: But don't you find: (for [:while (Mouse/hasEvent)] (Mouse/getEvent)) much shorter and easier to understand? Actually: no. I think of for as a way to transform a sequence, not constructing a completely new one. There are constructs like iterate

Re: Can for be enhanced to not have to take a binding?

2009-05-07 Thread Jarkko Oranen
On May 8, 12:54 am, CuppoJava patrickli_2...@hotmail.com wrote: Thanks Meikel. That certainly works. But don't you find: (for [:while (Mouse/hasEvent)] (Mouse/getEvent)) much shorter and easier to understand? I don't, really. for is a list comprehension, and so it needs bindings...

Re: Can for be enhanced to not have to take a binding?

2009-05-07 Thread CuppoJava
Thanks for your replies. I've always thought of for as a generator. Basically just a loop that produces a lazy collection. So it actually seems very natural to me. But anyway, I think I shall just write my own generator function using lazy-seq and be done with it then. Again, thanks for

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Stefan Hübner
Christian Vest Hansen karmazi...@gmail.com writes: On Thu, May 7, 2009 at 4:47 PM, J. McConnell jdo...@gmail.com wrote: I guess only Rich can make the choice: statu quo, clojure (breaks maven artifact id), clojure-lang (breaks build.xml). Not that I have a strong stake in this, but I'd

Clojure Community Geography (The Clojure Map)

2009-05-07 Thread Stephen C. Gilardi
A self-selected group of about 110 Clojure users have noted their locations on this google map: http://tinyurl.com/clojure-map ( to preview the full URL before visiting: http://preview.tinyurl.com/clojure-map ) Map Info: Clojure 17,533 views - Public

Re: anyone else think (take) is backwards?

2009-05-07 Thread Tom Faulhaber
take, drop, take-while and drop-while, exactly mirror the definitions in the Haskell Prelude, FWIW (except for the non-camel-case names) This order makes sense if you're into currying: user= (let [f (partial take 3)] (f (range 2))) (0 1 2) Tom On May 6, 7:09 pm, e evier...@gmail.com

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Stefan Hübner
Laurent PETIT laurent.pe...@gmail.com writes: I also think it makes sense to deposit the whole battery : clojureXX.jar clojure-slimXX.jar clojure-sourcesXX.jar Since clojure-slim is not bundled in the distributed ZIP for 1.0.0, I'm going the build all three libraries from SVN tag 1.0

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-07 Thread Laurent PETIT
2009/5/8 Stefan Hübner sthueb...@googlemail.com Laurent PETIT laurent.pe...@gmail.com writes: I also think it makes sense to deposit the whole battery : clojureXX.jar clojure-slimXX.jar clojure-sourcesXX.jar Since clojure-slim is not bundled in the distributed ZIP for 1.0.0, I'm

Re: Can for be enhanced to not have to take a binding?

2009-05-07 Thread Mark Reid
Hi, This `lazy-seq` over a `when` and `cons` idiom seems fairly common. Is there any reason there is not a function for it? For example: (defn cons-while Lazily creates a sequence by repeatedly calling f until pred is false [pred f] (lazy-seq (when pred (cons f (cons-while pred

Re: Clojure Community Geography (The Clojure Map)

2009-05-07 Thread Mark Derricutt
Added to the map ;-) On Fri, May 8, 2009 at 10:22 AM, Stephen C. Gilardi squee...@mac.comwrote: A self-selected group of about 110 Clojure users have noted their locations on this google map: http://tinyurl.com/clojure-map --~--~-~--~~~---~--~~ You

Yet Another Swing Example

2009-05-07 Thread Curran Kelleher
Hello, I've posted an example of a simple model-view-controller GUI skeleton in Clojure here: http://lifeofaprogrammergeek.blogspot.com/2009/05/model-view-controller-gui-in-clojure.html The GUI has a text box and a panel which draws what you type. It's not much, but I learned a lot doing it,

Re: The Santa Claus Problem

2009-05-07 Thread Mark Engelberg
On Wed, May 6, 2009 at 12:38 AM, bOR_ boris.sch...@gmail.com wrote: If i remember correctly, any agents send (or send-off?) within a dosync are only send off after the dosync completed. Yes, that's the kind of semantics I want, but it would be rather clunky to have to set up an agent and fake