Re: cool compiler-project?

2010-08-19 Thread Nicolas Oury
There is a size limit on methods on the jVM. partial-evaluator would be a cool project, I think. On Thu, Aug 19, 2010 at 6:38 AM, Tim Daly d...@axiom-developer.org wrote: Could the compiler insert phantom method bodies around classes? Or does the JVM insist that you can't lie about the code

Re: What is the reason Lisp code is not written with closing parenthesis on new lines?

2010-08-19 Thread Shantanu Kumar
In any Lisp, I think parens are for the compiler and indentation is for humans. Regards, Shantanu On Aug 19, 10:20 am, Rayne disciplera...@gmail.com wrote: It isn't helpful at all to me. My eyes bleed when I see code written like that. It may be helpful to some people, but I don't see the

Impedance mismatch

2010-08-19 Thread Tim Daly
I'm not trying to start a language war, especially since Clojure is trying to be both a Java and a Lisp. This is more of a user experience report. I'd be more interested in hearing about your experiences and where you find an impedance mismatch than having a Lisp vs Java discussion. Where do you

Re: cool compiler-project?

2010-08-19 Thread yvan
+1Dalvik compiler On 19 août, 02:52, Mark Derricutt m...@talios.com wrote: Or a native dalvik compiler! -- Pull me down under... On Thu, Aug 19, 2010 at 10:37 AM, Jules julesjac...@gmail.com wrote: Or a Clojure to Javascript compiler. So many interesting projects! -- You received

Re: Impedance mismatch

2010-08-19 Thread Nicolas Oury
In which situation nil is not treated as false in Clojure? If I understand well, Clojure separates nil/false from (). In particular, if you use next and not rest, your iteration example will work if translated into Clojure. empty? works in all case and is not ugly either. For the java typing

Re: Impedance mismatch

2010-08-19 Thread Sean Corfield
On Thu, Aug 19, 2010 at 12:36 AM, Tim Daly d...@axiom-developer.org wrote: I am trying to understand why lisp is more productive (for me) than java. Let me go off at a bit of a tangent and then I'll answer some of your questions. First off, I currently do mostly web application development and

Compile works with 1.1, fails with 1.2.0-RC3

2010-08-19 Thread timc
I'm trying to compile a program, with source files as follows. com/minibar/PmsSimulator.clj -- containing these lines: (ns com.minibar.PmsSimulator (:require [com.minibar :as mb] ...etc) (:load pmssim/util ...etc) (:gen-class)) ...etc where the file com/minibar/pmssim/util.clj contains

Re: Compile works with 1.1, fails with 1.2.0-RC3

2010-08-19 Thread Meikel Brandmeyer
Hi, On 19 Aug., 13:05, timc timgcl...@gmail.com wrote: com/minibar/PmsSimulator.clj -- containing these lines: (ns com.minibar.PmsSimulator   (:require  [com.minibar :as mb] ...etc)   (:load  pmssim/util  ...etc)   (:gen-class)) ...etc where the file com/minibar/pmssim/util.clj contains

Re: Today's clojure trick question

2010-08-19 Thread Matt Fowles
Armando~ Libraries that target JRE 1.2 compatibility, will not call `Boolean.valueOf(var)` internally. Instead they will call `new Boolean(var)`. If they return those results to modern java code, it will unbox correctly into either true or false and thus work as expected in constructs of the

Re: Bug: contains? doesn't work on transient maps or sets

2010-08-19 Thread Jeff Palmucci
Just came across this problem on RC3. Here is a fix: diff --git a/src/jvm/clojure/lang/RT.java b/src/jvm/clojure/lang/RT.java index 9aea629..5e67449 100644 --- a/src/jvm/clojure/lang/RT.java +++ b/src/jvm/clojure/lang/RT.java @@ -678,7 +678,11 @@ static public Object contains(Object coll, Object

Re: What is the reason Lisp code is not written with closing parenthesis on new lines?

2010-08-19 Thread michele
Thanks everyone for the your answers (and the internal debates). I will not put closing parenthesis on new lines. Even though the editor helps me with the parenthesis, there have been situations - while editing inside functions - that I had to count them. Here is an idea (by Harold A.), I will

Re: ANN: Emacs auto-complete plugin for slime users

2010-08-19 Thread doug
Great plugin- thanks steve i applied your patch but still throws on clojure.main and on some (import '(java.util.concurrent MHOOO's code above seems to resolve my errors. thanks -doug On Aug 18, 1:44 pm, MHOOO thomas.karol...@googlemail.com wrote: I can get rid of those errors by evaling

Re: Program design

2010-08-19 Thread Patrick Moriarty
You should look at Clojure 1.2 protocols and records which provides an easy way to do polymorphism on types. See http://clojure.org/protocols. On 18 August 2010 08:25, Mark Engelberg mark.engelb...@gmail.com wrote: I think the easiest way to port OO code would be to use Clojure's

Re: Feedback on idiomatic clojure

2010-08-19 Thread Nicolas Oury
A few remarks: ## begin (defn f-to-seq[file]  (with-open [rdr (java.io.BufferedReader.                    (java.io.FileReader. file))]    (doall (line-seq rdr Do you need the doall? (defn str-sort[str]  (if (nil? str)    str  (String. (into-array (. Character TYPE) (sort str)

Re: Impedance mismatch

2010-08-19 Thread David Nolen
On Thu, Aug 19, 2010 at 3:36 AM, Tim Daly d...@axiom-developer.org wrote: Televisions vs Monitors. This is the whole point of deftype/defrecord and protocols. To get the absolute best performance of the platform without having the pollute your code with type information. For example prior

Re: Feedback on idiomatic clojure

2010-08-19 Thread Meikel Brandmeyer
Hi, here my turn. Comments inline. Hope this helps. Sincerely Meikel (defn f-to-seq [file] (with-open [rdr (java.io.BufferedReader. (java.io.FileReader. file))] (doall (line-seq rdr ; Yes. doall is required here. Alternatively you can wrap the whole thing ; in

Re: Impedance mismatch

2010-08-19 Thread Tim Daly
David Nolen wrote: On Thu, Aug 19, 2010 at 3:36 AM, Tim Daly d...@axiom-developer.org mailto:d...@axiom-developer.org wrote: Televisions vs Monitors. This is the whole point of deftype/defrecord and protocols. To get the absolute best performance of the platform without having the

Re: cool compiler-project?

2010-08-19 Thread Allen Johnson
+1 on Dalvik compiler :) -- 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 post. To unsubscribe from this

Re: Feedback on idiomatic clojure

2010-08-19 Thread Justin Kramer
Meikel's suggestions are all good and I would follow them. There are a number of built-in functions you can take advantage of if you're using 1.2 (they're also available in contrib for 1.1): clojure.string/lower-case clojure.java.io/reader -- obviates java.io.BufferedReader and friends: (reader

Re: ANN: Emacs auto-complete plugin for slime users

2010-08-19 Thread Phil Hagelberg
On Thu, Aug 19, 2010 at 6:21 AM, Steve Purcell st...@sanityinc.com wrote: I guess Phil's very busy, but if he can apply this patch, then the regular swank-clojure 1.3.0-SNAPSHOT on clojars should end up containing the fix. Just applied this patch and pushed to github and clojars. Thanks!

Re: cool compiler-project?

2010-08-19 Thread Phil Hagelberg
On Thu, Aug 19, 2010 at 6:44 AM, Allen Johnson akjohnso...@gmail.com wrote: +1 on Dalvik compiler :) This might be kind of boring--I suspect you'd just have to port the asm library that Clojure depends on to Dalvik. I wonder if there's not already an effort started to do this, since Clojure's

Re: What is the reason Lisp code is not written with closing parenthesis on new lines?

2010-08-19 Thread Adam Burry
On Aug 18, 3:26 pm, Nicolas Oury nicolas.o...@gmail.com wrote: There is no law. Do what is best for you. But there OUGHT to be a law. Adam -- 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

ANN: Clojure User Group Meeting Today (Thurs)

2010-08-19 Thread russolsen
The National Capital Area Clojure User Group (CAP CLUG) is meeting tonight (Thurs) at: FGM 12021 Sunset Hills Road Suite 400 Reston, VA Pizza and other refreshments will be served at 6:15 PM, and the presentations will begin at about 6:30 PM. We would love to have any and all who can make it,

Re: FSM

2010-08-19 Thread Saul Hazledine
On Aug 16, 3:55 am, ngocdaothanh ngocdaoth...@gmail.com wrote: I have used Erlang's gen_fsm and like it very much:http://erlang.org/doc/design_principles/fsm.html I want to write a game in Clojure and I need a FSM library (best if it supports timeout event). I would like to ask if there is

Clojure Conj Questions

2010-08-19 Thread Sean Devlin
Well, courtesy of HN the cat's out of the bag: http://first.clojure-conj.org/ What is the ballpark price? I think this would help a lot of people determine if they can go. Also, will there be cake? If this is Clojure's birthday party, there had better be cake. Just sayin' -- You received

Clojure 1.2 Release

2010-08-19 Thread Rich Hickey
I'm pleased to announce today the release of Clojure 1.2. http://clojure.org/downloads For maven/leiningen users, your settings to get the beta from build.clojure.org/releases are: :dependencies [[org.clojure/clojure 1.2.0] [org.clojure/clojure-contrib 1.2.0] This

Re: Clojure 1.2 Release

2010-08-19 Thread Rayne
Congratulations! Thanks to everybody who worked on this masterpiece. Best. Language. Ever. On Aug 19, 10:25 am, Rich Hickey richhic...@gmail.com wrote: I'm pleased to announce today the release of Clojure 1.2. http://clojure.org/downloads For maven/leiningen users, your settings to get the

Re: Clojure Conj Questions

2010-08-19 Thread Stuart Halloway
Well, courtesy of HN the cat's out of the bag: http://first.clojure-conj.org/ What is the ballpark price? I think this would help a lot of people determine if they can go. Attendee pricing will be designed to cover attendee costs for running the event, plus a little margin for error. So

REPL

2010-08-19 Thread Abraham Varghese
How to exit from REPL? -- 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 post. To unsubscribe from this

Re: Clojure 1.2 Release

2010-08-19 Thread Baishampayan Ghose
I'm pleased to announce today the release of Clojure 1.2. Woohoo! Time to party and then port all the 13k lines of Clojure code that we have written so far to 1.2. Awesome work, Rich co. Clojure rocks! Regards, BG -- Baishampayan Ghose b.ghose at gmail.com -- You received this message

built in forms

2010-08-19 Thread Abraham Varghese
How to know which are built in forms available ie functions available and its syntax? -- 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

Re: Clojure 1.2 Release

2010-08-19 Thread Stefan Kamphausen
Hi, On 19 Aug., 17:25, Rich Hickey richhic...@gmail.com wrote: I'm pleased to announce today the release of Clojure 1.2. this is a great achievement. Congratulations to all involved and thank you! For us it the release is just on time. We will finish our book / tomorrow/ and I had been

Re: Clojure 1.2 Release

2010-08-19 Thread Greg
Congrats! :-D BTW, the link to clojure-contrib-1.2 seems to be broken (currently returning 404): http://github.com/downloads/clojure/clojure/clojure-contrib-1.2.0.zip Was RC3 the final build? I couldn't find the answer in the release notes. Cheers, Greg On Aug 19, 2010, at 8:25 AM, Rich

Re: built in forms

2010-08-19 Thread Meikel Brandmeyer
http://clojure.github.com/clojure http://clojure.github.com/clojure-contrib On 19 Aug., 17:29, Abraham Varghese abev...@gmail.com wrote: How to know which are built in forms available ie functions available and its syntax? -- You received this message because you are subscribed to the Google

Re: Clojure 1.2 Release

2010-08-19 Thread limux
Congrats and Cheers, :-) 2010/8/19 Greg g...@kinostudios.com: Congrats! :-D BTW, the link to clojure-contrib-1.2 seems to be broken (currently returning 404): http://github.com/downloads/clojure/clojure/clojure-contrib-1.2.0.zip Was RC3 the final build? I couldn't find the answer in the

Re: Clojure 1.2 Release

2010-08-19 Thread Meikel Brandmeyer
Hi, On 19 Aug., 17:56, Greg g...@kinostudios.com wrote: http://github.com/downloads/clojure/clojure/clojure-contrib-1.2.0.zip I would expect this to be: http://github.com/downloads/clojure/clojure-contrib/clojure-contrib-1.2.0.zip Sincerely Meikel -- You received this message because you

Re: Clojure 1.2 Release

2010-08-19 Thread Nicolas Oury
Congratulations!! I am very happy with 1.2, as everybody I think. Great improvements to my favorite language. Your announcement got me curious: what are the future call linkage improvements? Thanks to all of you, it's great. Best, Nicolas. -- You received this message because you are

Re: REPL

2010-08-19 Thread Nicolas Oury
I use Ctrl+D. But I am on Linux. On Thu, Aug 19, 2010 at 4:28 PM, Abraham Varghese abev...@gmail.com wrote: How to exit from REPL? -- 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

Re: Clojure 1.2 Release

2010-08-19 Thread Btsai
Congratulations! Just as a heads-up, the download link for Clojure Contrib on http://clojure.org/downloads is currently broken. It's pointing to: http://github.com/downloads/clojure/clojure/clojure-contrib-1.2.0.zip .. when I'm guessing it should be:

Re: Clojure 1.2 Release

2010-08-19 Thread Stuart Halloway
Link fixed, thanks. Clojure 1.2 is RC3, but for the metadata change to remove the RC3 part. The changes.txt notes this, but for some reason my git branch tracking 1.2.x isn't pushing. I just pushed it explicitly. Stu Congrats! :-D BTW, the link to clojure-contrib-1.2 seems to be broken

Re: Today's clojure trick question

2010-08-19 Thread Armando Blancas
I copy that. Thanks for the explanation. On Aug 18, 1:22 pm, Matt Fowles matt.fow...@gmail.com wrote: Armando~ Libraries that target JRE 1.2 compatibility, will not call `Boolean.valueOf(var)` internally.  Instead they will call `new Boolean(var)`.  If they return those results to modern

Re: Clojure 1.2 Release

2010-08-19 Thread Chas Emerick
On Aug 19, 2010, at 11:25 AM, Rich Hickey wrote: I'm pleased to announce today the release of Clojure 1.2. A huge milestone. Thanks, Rich, and to everyone else that has helped, fretted, argued, and worked to make Clojure and its community what it is today. I can't wait to see what

Re: Clojure 1.2 Release

2010-08-19 Thread Justin Kramer
Woohoo, congrats! Can't wait to see all the new goodies that are in store for the next version. Justin On Aug 19, 11:25 am, Rich Hickey richhic...@gmail.com wrote: I'm pleased to announce today the release of Clojure 1.2. http://clojure.org/downloads For maven/leiningen users, your settings

Re: What is the reason Lisp code is not written with closing parenthesis on new lines?

2010-08-19 Thread Greg
Again, that's quite a straw man--the attached code uses tabs for indentation, (ick!) and you're viewing it with a different tab-stop setting Whoops, you're right, it was an honest mistake on my part. I use tabs of size 4 and the tab-stop used there was 8 I believe. This issue is making me

Re: What is the reason Lisp code is not written with closing parenthesis on new lines?

2010-08-19 Thread Jim Wise
Brian Goslinga quickbasicg...@gmail.com writes: Here is another trick that works for me in Emacs: delete most of the stack of closing parens, and then spam the ) key until the Emacs matches it to the desired opening paren. I can't remember a time that I had to manually count the parens when

Re: Clojure 1.2 Release

2010-08-19 Thread Fogus
What a day for Clojure! If anyone wants more information than what's available in Rich's links, then you can view the slides for a talk I'm giving tonight: http://fogus.me/static/preso/clj1.2+/ -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Clojure 1.2 Release

2010-08-19 Thread MarkSwanson
Excellent news. -- 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 post. To unsubscribe from this group, send

Re: What is the reason Lisp code is not written with closing parenthesis on new lines?

2010-08-19 Thread Btsai
Yet another one for Emacs users that don't use paredit: I have Paren Match Highlighting enabled and set to highlight the entire expression within matching parens (the highlighting kicks in when the cursor is before the opening paren or after the closing paren): (show-paren-mode 1) (setq

Re: Clojure 1.2 Release

2010-08-19 Thread Jeff Brown
On Thu, Aug 19, 2010 at 10:25 AM, Rich Hickey richhic...@gmail.com wrote: I'm pleased to announce today the release of Clojure 1.2. http://clojure.org/downloads For maven/leiningen users, your settings to get the beta from build.clojure.org/releases are:         :dependencies

Re: Program design

2010-08-19 Thread Mark Engelberg
On Wed, Aug 18, 2010 at 5:20 PM, Patrick Moriarty pmoria...@annadaletech.com wrote: You should look at Clojure 1.2 protocols and records which provides an easy way to do polymorphism on types. See http://clojure.org/protocols. Protocols don't offer inheritance. The original poster

Re: Program design

2010-08-19 Thread Nicolas Oury
A big part of inheritance can be done by using defrecord, keywords and functions instead of method, and getting read of the abstract class. (defrecord Orange [:mass :energy :juice]) (defrecord Apple [:mass :energy :juice : family]) (defn get-juice [fruit] (:juice fruit)) -- You received this

Re: Clojure 1.2 Release

2010-08-19 Thread Stuart Sierra
On Aug 19, 1:12 pm, Jeff Brown j...@jeffandbetsy.net wrote: When should 1.2.0 be available athttp://repo2.maven.org/maven2/org/clojure/clojure/? We don't have a direct sync to Maven central. They don't seem to be giving those out anymore. So someone with the authority will have to upload it

First Clojure Conj October 22-23

2010-08-19 Thread Stuart Sierra
In case you haven't heard, here's the official story: http://first.clojure-conj.org/ Clojure Conj 2010 will be held in Durham, North Carolina on October 22 and 23. We are currently collecting emails of people interested in attending. If you plan on attending, please submit your email at the

Fwd: Feedback on idiomatic clojure

2010-08-19 Thread Nicolas Oury
Damon reply to me and not the list, so I forward. On Thu, Aug 19, 2010 at 9:09 PM, Damon Snyder drsny...@gmail.com wrote: Hi Nicolas, Thanks for the suggestions. Regarding the first one: ah, I see. That is a nice compact way to test to see if the str is nil. I added that I reckon that

Re: Clojure 1.2 Release

2010-08-19 Thread Mark Derricutt
I think I can do that - or at least push that along. Will check into it when I get to the office in about 30 minutes. PS: Direct sync to central is easy via oss.sonatype.org repositories. -- Pull me down under... On Fri, Aug 20, 2010 at 6:42 AM, Stuart Sierra the.stuart.sie...@gmail.comwrote:

Re: Feedback on idiomatic clojure

2010-08-19 Thread Meikel Brandmeyer
Hi. Am 19.08.2010 um 22:14 schrieb Nicolas Oury: in because I was getting null pointer exceptions when the string was null. What is the difference between {:count 1 :words (list words)} and a hash-map? I was under the impression that {} created a hash. I just find it easier to read because

Docstrings in Clojure?

2010-08-19 Thread Paddy3118
Hi, Does clojure have docstrings: http://en.wikipedia.org/wiki/Docstring and, if so, do you have a link to the feature in the Clojure documentation? Thanks. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Docstrings in Clojure?

2010-08-19 Thread Joop Kiefte
(defn function-name Your docstring goes here [your argument list more] (call some functions)) 2010/8/19 Paddy3118 paddy3...@googlemail.com: Hi, Does clojure have docstrings: http://en.wikipedia.org/wiki/Docstring and, if so, do you have a link to the feature in the Clojure

Re: REPL

2010-08-19 Thread Alan
I use Ctrl-D on linux, but Ctrl-C works too, and is what I would try first on Windows. (System/exit 0) won't work if you're using leiningen to get your repl, because it passes I/O through JLine and System.exit terminates the clojure process without notifying the JLine process: $ lein repl user=

multiplying lists

2010-08-19 Thread Glen Rubin
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)) -- You received this message because you are subscribed to the Google Groups

Re: multiplying lists

2010-08-19 Thread David Nolen
On Thu, Aug 19, 2010 at 7:56 PM, Glen Rubin rubing...@gmail.com 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))

Re: multiplying lists

2010-08-19 Thread wwmorgan
user= (def a [1 2 3]) #'user/a user= (def b [[4 5 6] [7 8 9]]) #'user/b user= (map #(map * a %) b) ((4 10 18) (7 16 27)) - Will Morgan On Aug 19, 7:56 pm, Glen Rubin rubing...@gmail.com 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'

Re: multiplying lists

2010-08-19 Thread Alan
Or if you want to avoid the #(...%...) syntax: user= (def a (list 1 2 3)) #'user/a user= (def b (list '(4 5 6) '(7 8 9))) #'user/b user= (map (partial map * a) b) ((4 10 18) (7 16 27)) On Aug 19, 4:56 pm, Glen Rubin rubing...@gmail.com wrote: I want to multiply a list of n items by h lists of n

Re: Docstrings in Clojure?

2010-08-19 Thread Grayswx
On Aug 19, 4:37 pm, Joop Kiefte iko...@gmail.com wrote: (defn function-name Your docstring goes here [your argument list more] (call some functions)) And then you can access it with (doc function-name). (find-doc #regexp) or (find-doc string) searches all doc strings. There is

Lazy reading from subprocess stdout?

2010-08-19 Thread Michael Ashton
Hello! -- Here's a how-to question for subprocess and threading experts. What's the right way to obtain an output stream for stdout from a subprocess, and read it lazily? At the moment, there's the sh function, but this collects all the output from the stdout and stderr streams into arrays, and

Unexpected FileNotFoundException

2010-08-19 Thread Tim McIver
Hello everyone. Clojure noob here. I apologize in advance for what may turn out to be a dumb question. When trying to (use '[clojure.contrib.seq]) I get the following error: java.io.FileNotFoundException: Could not locate clojure/contrib/ seq__init.class or clojure/contrib/seq.clj on

Re: Docstrings in Clojure?

2010-08-19 Thread Ameen
So it is before arguments. What is the motivation behind that opposition to other lisps and python ? On 19 août, 22:37, Joop Kiefte iko...@gmail.com wrote: (defn function-name     Your docstring goes here     [your argument list more]    (call some functions)) 2010/8/19 Paddy3118

Re: First Clojure Conj October 22-23

2010-08-19 Thread tcrayford
Are you guys interested in me presenting/speaking about my clojure refactoring tool at this conference? -- 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

Re: multiplying lists

2010-08-19 Thread Btsai
This should work: (defn mult-list-by-lists [a b] (let [mult-lists (fn [x y] (map * x y))] (map #(mult-lists a %) b))) On Aug 19, 5:56 pm, Glen Rubin rubing...@gmail.com 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'

Re: Docstrings in Clojure?

2010-08-19 Thread David Nolen
On Thu, Aug 19, 2010 at 10:09 PM, Ameen amy...@gmail.com wrote: So it is before arguments. What is the motivation behind that opposition to other lisps and python ? Functions support mutiple arity. (defn foo ... ([a] ...) ([a b] ...)) -- You received this message because you are

Re: Unexpected FileNotFoundException

2010-08-19 Thread Stuart Campbell
On 20 August 2010 11:52, Tim McIver tmci...@verizon.net wrote: Hello everyone. Clojure noob here. I apologize in advance for what may turn out to be a dumb question. When trying to (use '[clojure.contrib.seq]) I get the following error: java.io.FileNotFoundException: Could not locate

Adding seajure to Clojure.org

2010-08-19 Thread Phil Hagelberg
Hello. I noticed we have a list of user groups at http://clojure.org/community Could we add Seajure (Seattle Clojure Group) at http://seajure.technomancy.us? Thanks, Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

[ANN] Leiningen 1.2.0 released

2010-08-19 Thread Phil Hagelberg
I just pushed out a new release of Leiningen, a Clojure build tool, with lots of help from many contributors. This adds a couple new tasks (test! and interactive) and the ability to chain tasks. It also allows for user-level init scripts and user-level plugins, so you don't have to declare things

Re: [ANN] Leiningen 1.3.0 released

2010-08-19 Thread Baishampayan Ghose
I just pushed out a new release of Leiningen, a Clojure build tool, with lots of help from many contributors. In the subject, I am sure you meant [ANN] Leiningen 1.3.0 released :) Nevertheless, great work! Regards, BG -- Baishampayan Ghose b.ghose at gmail.com -- You received this message

Re: cool compiler-project?

2010-08-19 Thread patrickdlogan
You might consider some kind of whole-program optimizations along the lines of the Stalin compiler for Scheme. Stalin compiles Scheme to C and makes a lot of representation decisions, unboxing, as well as a lot of call-stack-aware memory allocations/deallocations. Not all of these would be

Re: [ANN] Leiningen 1.2.0 released

2010-08-19 Thread David Nolen
On Fri, Aug 20, 2010 at 12:39 AM, Phil Hagelberg p...@hagelb.org 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 start a REPL w/o a project.clj

Re: Docstrings in Clojure?

2010-08-19 Thread ngocdaothanh
(defn foo    ...    ([a] ...)    ([a b] ...)) Is there any way to add docstring for each case? (One for summary, one for [a], and one for [a b].) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Today's clojure trick question

2010-08-19 Thread Mark Shroyer
Sean Corfield seancorfi...@gmail.com writes: On Wed, Aug 18, 2010 at 10:28 AM, Shantanu Kumar kumar.shant...@gmail.com wrote: Would suggest to consider this: (let [ x (true? (new java.lang.Boolean false)) ] (if x trouble ok)) Ah, but that wouldn't work for a new Boolean set to true:

Re: Feedback on idiomatic clojure

2010-08-19 Thread Damon Snyder
Hi Meikel, Nicolas, and Justin, Thank you for the great feedback! I learned a lot. I was puzzled about (update-in (update-in)) and after doing that the - operator makes a lot of sense. The reduce is clever and fits nicely as well. I dropped the function that read in the lines of the file and used

Re: Docstrings in Clojure?

2010-08-19 Thread Meikel Brandmeyer
Hi, On 20 Aug., 07:18, ngocdaothanh ngocdaoth...@gmail.com wrote: (defn foo    ...    ([a] ...)    ([a b] ...)) Is there any way to add docstring for each case? (One for summary, one for [a], and one for [a b].) No. (And honestly: I don't see any use for this. Why is one docstring not

Re: multiplying lists

2010-08-19 Thread Meikel Brandmeyer
Hi, On 20 Aug., 01:56, Glen Rubin rubing...@gmail.com 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)) And just to

Re: REPL

2010-08-19 Thread Meikel Brandmeyer
Hi, On 19 Aug., 23:43, Alan a...@malloys.org wrote: Ctrl-C works too, and is what I would try first on Windows. Ctrl-C is a rather hard way to shutdown things. Compare to turning off the computer without flushing the disk caches. With JLine Ctrl-D also works on Windows. Sincerely Meikel --