Re: [ANN] Leiningen 1.2.0 released

2010-08-20 Thread limux
It's 1.3.0! 2010/8/20 David Nolen : > On Fri, Aug 20, 2010 at 12:39 AM, Phil Hagelberg wrote: >> >> I just pushed out a new release of Leiningen, a Clojure build tool, >> with lots of help from many contributors. > > Looks great. A couple early observations/issues, > 1) It's no longer possible to

Problem with Sandbar and Clojure 1.2

2010-08-20 Thread Nebojsa Stricevic
I'm building a Clojure web app that I would like to migrate to 1.2. I've tried to empty source files and then delete one by one :use and :require, and I think error is connected with Sandbar lib (0.2.4). REPL prints this error: java.lang.NoSuchMethodError: clojure.lang.RestFn.(I)V (core.clj: 1) G

Re: Problem with Sandbar and Clojure 1.2

2010-08-20 Thread Meikel Brandmeyer
Hi, On 20 Aug., 11:13, Nebojsa Stricevic wrote: > I'm building a Clojure web app that I would like to migrate to 1.2. > I've tried to empty source files and then delete one by one :use > and :require, and I think error is connected with Sandbar lib (0.2.4). > REPL prints this error: > > java.lan

Windows distribution for Leiningen 1.3.0

2010-08-20 Thread Shantanu Kumar
Hi, I have created a Windows distribution for Leiningen 1.3.0 (by pruning and modifying the lein.bat file a bit) that can be downloaded from here: http://github.com/downloads/kumarshantanu/leiningen/leiningen-1.3.0.zip To install, 1. Download the bundle and unzip into a folder of your choice 2.

International Lisp Conference 2010 - Update

2010-08-20 Thread aml
With the usual apologies to those who receive multiple copies of this... INTERNATIONAL LISP CONFERENCE 2010 - HIGHLIGHTS and CALL for PAPERS Important Dates: * Deadline for all submissions (FIRM): September 6, 2010 * Early registration: September 16, 2010 * Author notificati

Re: Windows distribution for Leiningen 1.3.0

2010-08-20 Thread Shawn Hoover
Works for me, thanks! On Fri, Aug 20, 2010 at 5:35 AM, Shantanu Kumar wrote: > Hi, > > I have created a Windows distribution for Leiningen 1.3.0 (by pruning > and modifying the lein.bat file a bit) that can be downloaded from > here: > > http://github.com/downloads/kumarshantanu/leiningen/leining

Re: Clojure Conj Questions

2010-08-20 Thread Brian Marick
On Aug 19, 2010, at 10:39 AM, Stuart Halloway wrote: >> >> Also, will there be cake? If this is Clojure's birthday party, there >> had better be cake. > > Yes. And tea. Not necessarily served at the same time. :-) I'd like to point out that the 23d is also my birthday. I like chocolate "mone

Re: clojure.string namespace missing from API page?

2010-08-20 Thread Alf Kristian Støyle
Hi guys. If you google "Clojure API", the first hit gets you the following page: http://clojure.org/api Which again leads to: http://richhickey.github.com/clojure/ http://richhickey.github.com/clojure-contrib/ As I understand these pages are not the correct ones. I have finally bookmarked the co

Re: Docstrings in Clojure?

2010-08-20 Thread Paddy3118
On Aug 19, 9:37 pm, Joop Kiefte wrote: > (defn function-name >     "Your docstring goes here" >     [your argument list & more] >    (call some functions)) > > 2010/8/19 Paddy3118 : > > > Hi, Does clojure have docstrings:http://en.wikipedia.org/wiki/Docstring > > and, if so, do you have a link t

[noob] Using dochars

2010-08-20 Thread probertm
Hi... New here to Clojure-land and loving what I am seeing, though I am not getting some of the forms yet. Can someone help me with contrib.str-utils2/dochars? I have a need to iterate over each character in a string and this seems to be a macro that will do that (I suppose I could create my own

Re: multiplying lists

2010-08-20 Thread Andrew Gwozdziewycz
On Thu, Aug 19, 2010 at 7:56 PM, Glen Rubin wrote: > > I want to multiply a list of n items by h lists of n items, so that > for example if i have list 'a' and 'b' > > (def a (list 1 2 3)) > (def b (list '(4 5 6) '(7 8 9))) > > when multiplied I will get: > > ((4 10 18) (7 16 27)) > Others have a

Re: Using dochars

2010-08-20 Thread Meikel Brandmeyer
Hi, On 20 Aug., 10:25, probertm wrote: > New here to Clojure-land and loving what I am seeing, though I am not > getting some of the forms yet. > > Can someone help me with contrib.str-utils2/dochars?  I have a need to > iterate over each character in a string and this seems to be a macro > that

Re: Docstrings in Clojure?

2010-08-20 Thread Meikel Brandmeyer
> Do you have a link to this in the official Clojure documentation? I > would like to add the link to the Wikipedia article. http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/defn -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

questions about float operations

2010-08-20 Thread bufo
I am currently learning clojure by reading The Joy of Clojure and I have 2 questions on float opertions: - why does (+ 4.2 8.4) return 12.601 and (+ 1.5 2.6) 4.1? Since 4.2, 8.4 and (+ 4.2 8.4) are java Doubles why does it not behave as expected? What does clojure do in the background?

Re: [noob] Using dochars

2010-08-20 Thread David Sletten
Hi Mark, What the documentation means is that you give dochars a "name" for a variable and a string to process. It then iterates over each character in the string using 'name' as a variable representing the character, so that each of the (0 or more) forms in the body can "do" something with the

Re: [ANN] Leiningen 1.3.0 released

2010-08-20 Thread Phil Hagelberg
As a few of you have noted, yes this is version 1.3.0, not 1.2.0. Oops. On Thu, Aug 19, 2010 at 10:03 PM, David Nolen wrote: > On Fri, Aug 20, 2010 at 12:39 AM, Phil Hagelberg wrote: >> I just pushed out a new release of Leiningen, a Clojure build tool, >> with lots of help from many contributor

Re: questions about float operations

2010-08-20 Thread David Sletten
This may help explain things: http://groups.google.com/group/clojure/msg/325228e8b66923ac Have all good days, David Sletten On Aug 20, 2010, at 8:26 AM, bufo wrote: > I am currently learning clojure by reading The Joy of Clojure and I > have 2 questions on float opertions: > > - why does (+ 4.

Re: Windows distribution for Leiningen 1.3.0

2010-08-20 Thread Phil Hagelberg
On Fri, Aug 20, 2010 at 2:35 AM, Shantanu Kumar wrote: > I have created a Windows distribution for Leiningen 1.3.0 (by pruning > and modifying the lein.bat file a bit) that can be downloaded from > here: > > http://github.com/downloads/kumarshantanu/leiningen/leiningen-1.3.0.zip > > To install, >

Re: questions about float operations

2010-08-20 Thread Nicolas Oury
> > - why does (+ 4.2 8.4) return 12.601 and (+ 1.5 2.6) 4.1? > Since 4.2, 8.4 and (+ 4.2 8.4) are java Doubles why does it not behave > as expected? What does clojure do in the background? That's not a bug. Doubles have a standard. Clojure implementation follows the standard. (as most

clojure-contrib master now in submodules

2010-08-20 Thread Stuart Sierra
Hello, all, As planned for some time, clojure-contrib has now been split into many submodules on the "master" branch. *** For users of clojure-contrib 1.2.0: nothing changes. *** For users of clojure-contrib snapshots: New builds of the master branch on github will be available as 1.3.0- SNAP

Re: questions about float operations

2010-08-20 Thread B Smith-Mannschott
On Fri, Aug 20, 2010 at 14:26, bufo wrote: > I am currently learning clojure by reading The Joy of Clojure and I > have 2 questions on float opertions: > > - why does (+ 4.2 8.4) return 12.601 and (+ 1.5 2.6) 4.1? > Since 4.2, 8.4 and (+ 4.2 8.4) are java Doubles why does it not behave

Re: Problem with Sandbar and Clojure 1.2

2010-08-20 Thread Brenton
Sandbar 0.2.4 depends on Clojure 1.1.0 and Clojure Contrib 1.1.0. If your project only depends on Clojure 1.2.0 and not Contrib 1.2.0 (and you are using an automated build tool) then you may end up with Contrib 1.1.0 in your classpath. This will cause the problem you are experiencing. To fix the pr

Re: Unexpected FileNotFoundException

2010-08-20 Thread Tim McIver
Hmm, yes that looks like it must be it. Strange, because when I view the API docs from the github page: http://richhickey.github.com/clojure-contrib/ there IS a seq library. I guess it was removed. Thanks, Tim On Aug 19, 11:47 pm, Stuart Campbell wrote: > On 20 August 2010 11:52, Tim McIver

Re: clojure.string namespace missing from API page?

2010-08-20 Thread Stuart Halloway
Those links are fixed, thanks. And we are aware that there are a ton of other links that still point to "richhickey" instead of "clojure", sprinkled throughout clojure.org. Anybody know how to do a bulk search/replace across wikispaces? There seems to be no facility... Stu > Hi guys. If you

Re: Feedback on idiomatic clojure

2010-08-20 Thread Btsai
I believe duck-streams is deprecated since clojure 1.2. You may want to consider bringing back f-to-seq, which can be simplified slightly using reader from clojure.java.io: (ns clojure.example.anagrams (:use [clojure.java.io :only (reader)]) (:gen-class)) (defn f-to-seq [file] (with-open [

Re: Game development in Clojure

2010-08-20 Thread Timo Mihaljov
On Mon, Aug 16, 2010 at 03:43:11AM -0700, Mike Anderson wrote: > 2. User interface comes last, which is good in general but makes it a > royal pain to pass notifications back to the UI. In Java I would > simply have e.g. units.clj call a simple notification function in > interface.clj, in Clojure I

take all

2010-08-20 Thread Glen Rubin
I am writing a fn to extract elements from a sequence using optional start and end values. I will do this by testing if 'end' or 'start' values are passed as parameters to the function. If the user does not specify a end value I would like the fn to return the entire sequence from 'start' to end

Re: take all

2010-08-20 Thread Glen Rubin
I just wrote a fn called takeall that seems to do what I want: (defn takeall [x & [y]] (if (and x y) (take x y) x)) On Aug 20, 1:44 pm, Glen Rubin wrote: > I am writing a fn to extract elements from a sequence using optional > start and end values.  I will do thi

date serialization in clojure-contrib json

2010-08-20 Thread Dmitri
I'm currently using Dan Larkin's clojure-json, and it provides a way to serialize and deserialize dates, it also provides the option to specify custom serializers, eg: (defn date-encoder [date writer pad current-indent start-token-indent indent- size] (.append writer (str start-tok

Re: Game development in Clojure

2010-08-20 Thread Alan
Thanks, I'll look into it. I know minimax ought to be easy to do but it's a bit of a weak spot of mine - I can never seem to get it right, and the poorish debug support in clojure, even with slime/swank, doesn't make it easier. I'm reasonably confident minimax/alpha-beta is right for me, since it'

Re: date serialization in clojure-contrib json

2010-08-20 Thread Dmitri
Extending the writer is pretty trivial (defn write-date [date] (.format (new java.text.SimpleDateFormat "MMM dd, hh:mm:ss a") date)) (extend Date Write-JSON {:write-json write-date}) but it seems like deserializing a date wouldn't be quite so trivial. -- You received this message beca

Re: date serialization in clojure-contrib json

2010-08-20 Thread Stuart Sierra
Since there is no standard for how to represent dates in JSON, it is unlikely to be built in. But you can extend the writer with application-specific date formats. -S On Aug 20, 2:15 pm, Dmitri wrote: > I'm currently using Dan Larkin's clojure-json, and it provides a way > to serialize and dese

Re: Windows distribution for Leiningen 1.3.0

2010-08-20 Thread Shantanu Kumar
Discovered a bug in the the bundle I uploaded, which I have fixed in update-1: http://github.com/downloads/kumarshantanu/leiningen/leiningen-1.3.0-update-1.zip The earlier lein.bat script uses wildcard in JAR filename in CLASSPATH, which is supported only in JDK 1.6. If you are using JDK 1.5 or c

JavaFX and Clojure

2010-08-20 Thread prishvin
Dear friends, The are talks about using JavaFX with Clojure, but I was unable to find a single example of such interaction. Have anyone really done the UI with JavaFX for a Clojure programm? Thanks in advance -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: date serialization in clojure-contrib json

2010-08-20 Thread Dmitri
My concern is more to do with the reader, I think extending writer works quite well, it would be nice if it was possible to do the same thing with the reader, so you could specify how to deserialize specific types of data. Right now it seems to be baked into read-json- reader and there's no easy wa

[ANN] MCLIDE 1.0b3 Mac IDE for Clojure 1.2

2010-08-20 Thread Terje Norderhaug
I just released a new version of MCLIDE, the free open source Macintosh lisp IDE: http://mclide.in-progress.com The new version makes it easier than ever to get going with Clojure. MCLIDE is like a clojure-in-a-box, with the only missing ingredient being the Clojure distribution. After sele

Re: Unexpected FileNotFoundException

2010-08-20 Thread Tim McIver
Can someone help clear up my confusion? My problem started while working through Stuart Halloway's book (p. 52) where he builds up his 'index-filter' function. This function uses an 'indexed' function which he states is in clojure-contrib. The API docs found on clujure-contrib's github page shows

Re: Game development in Clojure

2010-08-20 Thread Ben Mabey
On 8/20/10 12:21 PM, Alan wrote: Thanks, I'll look into it. I know minimax ought to be easy to do but it's a bit of a weak spot of mine - I can never seem to get it right, and the poorish debug support in clojure, even with slime/swank, doesn't make it easier. I'm reasonably confident minimax/a

Re: JavaFX and Clojure

2010-08-20 Thread polypus74
keep a close eye on these spaces: http://github.com/polypus74/cljfx http://github.com/polypus74/lein-javafx i should have something up within weeks. _c On Aug 20, 2:03 pm, prishvin wrote: > Dear friends, > > The are talks about using JavaFX with Clojure, but I was unable to > find a single exa

Re: Leiningen 1.2.0 released

2010-08-20 Thread polypus74
i'm trying to use the new shell script feature. in my project i have :shell-wrapper {:main user :bin "resources/bin/caj"} when i did a lein install it was copying my-project/resources/bin/caj to my-project/bin/caj, that is, until i manually added a ~/.lein directory and

Re: Implementing a protocol with using a base implementation?

2010-08-20 Thread Toni Batchelli
So it looks I made a young programmer mistake (and I am not that young anymore!) I *assumed* that creating a defrecord would result in faster code than extending an existing one and therefore was looking to perform an early (and thus unnecessary) optimization. According to the code and results belo

Re: JavaFX and Clojure

2010-08-20 Thread prishvin
Thats good news, thanks. I've put repositories at watch. -- 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 Note that posts from new members are moderated - please be patient with your first