Re: Clojure for Cocoa

2012-01-28 Thread Matthias Benkard
Hi, On Jan 27, 4:20 am, Cedric Greevey cgree...@gmail.com wrote: One thing that must help there is that the functional nature of Clojure makes it pretty rare for Clojure code to produce a true reference circularity. That's probably true. Reference counting is a good fit for tree- shaped

Re: Literate programming in emacs - any experience?

2012-01-28 Thread Ulises
Here's a paper that might be interesting to folk discussing in this thread: http://www.jstatsoft.org/v46/i03/paper Cheers U -- 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

Re: New Version of ClojureScript One

2012-01-28 Thread Brenton
Christofer, This is a problem with the current version of Leiningen. There are a couple of ways to work around the problem. Here is one: Create a new Leiningen project. lein new delete-me cd delete-me Open project.clj and change :dependencies [[org.clojure/clojure 1.3.0]] to :dependencies

Re: Literate programming in emacs - any experience?

2012-01-28 Thread Folcon
Hi Tim, Personally if you have done or would be interested in doing a quick vid cast of how you progress through your workflow, I think that would be very interesting. Regards, Folcon -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: Literate programming in emacs - any experience?

2012-01-28 Thread daly
On Sat, 2012-01-28 at 06:51 -0800, Folcon wrote: Hi Tim, Personally if you have done or would be interested in doing a quick vid cast of how you progress through your workflow, I think that would be very interesting. Sort of extreme pair programming with everybody? :-) There is no such

Re: Literate programming in emacs - any experience?

2012-01-28 Thread Colin Yates
I know I would find it incredibly helpful, and would consider paying a token sum of money (£5?)... On 28 January 2012 15:04, daly d...@axiom-developer.org wrote: On Sat, 2012-01-28 at 06:51 -0800, Folcon wrote: Hi Tim, Personally if you have done or would be interested in doing a quick

Re: Literate programming in emacs - any experience?

2012-01-28 Thread daly
On Sat, 2012-01-28 at 15:27 +, Colin Yates wrote: I know I would find it incredibly helpful, and would consider paying a token sum of money (£5?)... An amusing thought but no thanks. Buy yourself a pint and swear you'll at least try to write your next program in some form of literate

Re: Literate programming in emacs - any experience?

2012-01-28 Thread Colin Yates
Fair enough :) - deal. Assuming I ever get to leave my pit of despair (trying to get a well-known javascript charting library to render properly...how hard can these things be!). On 28 January 2012 15:41, daly d...@axiom-developer.org wrote: On Sat, 2012-01-28 at 15:27 +, Colin Yates

Re: Literate programming in emacs - any experience?

2012-01-28 Thread Folcon
I think I could live with that :)... -- 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

Re: problems with if

2012-01-28 Thread raschedh
Unlike in Common Lisp, Clojure resolves symbols at compile time. Thank you, for stating this fact so precisely, thereby answering my question. I do have difficulties, though, to deduce this fact from the reference manual. But, well, there you go. Heinz. -- You received this message because

Looking for parser generator library

2012-01-28 Thread Roman Perepelitsa
I'm looking for a parser generator library. I stumbled upon fnparse, but unfortunately it doesn't work with clojure 1.3. Roman Perepelitsa. -- 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

Re: ClojureScript def, vars, and binding

2012-01-28 Thread Brandon Bloom
For anyone else stumbling across this thread, I found a lot more information about dynamic binding with respect to asynchronous code in the Clojure Confluence wiki: http://dev.clojure.org/display/design/State%2C+Concurrency%2C+and+Parallelism In particular, the Asynchronous Events, Blocking vs

got trouble when combine use condition-map and doc-string

2012-01-28 Thread z huang
Hi all: I got trouble when i combine use condition-map and doc-string in my function, the condition-map seems not work anymore: user= (defn f [x] {:pre [(pos? x)]} x) #'user/f user= (f -1) AssertionError Assert failed: (pos? x) user/f (NO_SOURCE_FILE:1) user= (defn

Re: Help coding Eller's maze algorithm.

2012-01-28 Thread Gabriele Carrettoni
Never heard about it, It seems very interesting. Thanks for the tip. -- 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

Re: New Version of ClojureScript One

2012-01-28 Thread Michael J. Forster
On Jan 27, 12:05 pm, Christofer Jennings boz.li...@gmail.com wrote: I get the error below when I run ClojureScript One's 'lein bootsrap'. Any ideas? I'm pretty new to Clojure. This is my first time using Leiningen and first attempt at using ClojureScript. ... pretty hopeless :-) Hi

Re: CLJS: Checked Arithmetic?

2012-01-28 Thread philip k
I'm not so sure about this, but is it possible to throw an exception when dividing by zero for example? I don't know if exceptions are the right way of dealing with this at all, but at least this would be bringing things more in line with Clojure. On Jan 27, 10:03 pm, David Nolen

Re: ClojureScript def, vars, and binding

2012-01-28 Thread Brandon Bloom
D'oh! That's what I get for assuming I remembered the Java Thread API from several years ago Thanks. -- 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

Re: Avoiding reflection in vector-of

2012-01-28 Thread Bryce
Unfortunately with that change I still show ~90% of CPU time being spent in Reflector.getMethods(). On Jan 27, 11:59 am, Michael Wood esiot...@gmail.com wrote: On 25 January 2012 23:30, Bryce fiat.mo...@gmail.com wrote: [...] ;All of these spend most of their time in reflection (apply

Re: How to add a new type of collection?

2012-01-28 Thread Joachim De Beule
Well, I also do not want to re-invent the wheel. Some of these libraries are really optimized for both memory and speed (yes, I will need both) and already provide a great deal of useful functionality that I would otherwise have to implement myself. I just want to make sure I am doing it right

Re: got trouble when combine use condition-map and doc-string

2012-01-28 Thread Jonas
The docstring goes before the argument list: (defn another-f doc string here [x] {:pre [(pos? x)]} x) user= (another-f -1) java.lang.AssertionError: Assert failed: (pos? x) (NO_SOURCE_FILE:0) user= (doc another-f) - user/another-f ([x])

Re: CLJS: Checked Arithmetic?

2012-01-28 Thread David Nolen
On Fri, Jan 27, 2012 at 5:38 PM, philip k trevo.pa...@gmail.com wrote: I'm not so sure about this, but is it possible to throw an exception when dividing by zero for example? I don't know if exceptions are the right way of dealing with this at all, but at least this would be bringing things

Re: Looking for parser generator library

2012-01-28 Thread Richard Lyman
Have you looked at amotoen? https://github.com/richard-lyman/amotoen I'm not sure what your needs are... -Rich On Sat, Jan 28, 2012 at 8:19 AM, Roman Perepelitsa roman.perepeli...@gmail.com wrote: I'm looking for a parser generator library. I stumbled upon fnparse, but unfortunately it

Re: CLJS: Checked Arithmetic?

2012-01-28 Thread Max Penet
Hello David, This is interesting! The JavaScript behavior is definitively not a good one, that said the only thing that I think could do more harm than good is the fact these checks are enabled by default. I am not sure the majority of cljs user will want to take a performance hit (or have to set

Re: CLJS: Checked Arithmetic?

2012-01-28 Thread Max Penet
Sorry about the horrible formatting, blame google groups interface. Max On Jan 28, 7:16 pm, Max Penet zcams...@gmail.com wrote: Hello David, This is interesting! The JavaScript behavior is definitively not a good one, that said the only thing that I think could do more harm than good is the

Re: CLJS: Checked Arithmetic?

2012-01-28 Thread David Nolen
On Sat, Jan 28, 2012 at 12:16 PM, Max Penet zcams...@gmail.com wrote: Hello David, This is interesting! The JavaScript behavior is definitively not a good one, that said the only thing that I think could do more harm than good is the fact these checks are enabled by default. I am not sure

Re: Looking for parser generator library

2012-01-28 Thread Chris Perkins
Here is one I wrote a while ago. https://github.com/grammati/imparsonate It's not finished (is open-source software ever really finished?), so I don't know whether it will do what need it to. - Chris -- You received this message because you are subscribed to the Google Groups Clojure group.

Re: Looking for parser generator library

2012-01-28 Thread Jack Moffitt
I'm looking for a parser generator library. I stumbled upon fnparse, but unfortunately it doesn't work with clojure 1.3. I ended up just using ANTLR and it works pretty well from Clojure. Most of my time was spent on the grammar and implementation, not the ANTLR integration bits. I started

Re: proxy with dynamic

2012-01-28 Thread Razvan Rotaru
Yes, it's more clear now. Thanks. -- 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

Re: Why don't these two functions produce equivalent results?

2012-01-28 Thread Andy Fingerhut
One way to think of it is that both assoc and assoc! create and return new maps that are different than the originals they were given as input. assoc never modifies the original map. assoc! might, or it might not. It depends on implementation details. A correct Clojure program will never rely

Last value from REPL

2012-01-28 Thread David Jacobs
Does the Clojure REPL provide a handle for getting the value returned by the last executed statement? In Ruby's REPL, the underscore gives you the last returned value. In Clojure, I'd love to do something like this: (some-expensive-or-rate-limited-call example.com) (def cache-after-the-fact _)

problems with meta

2012-01-28 Thread raschedh
Hi, I've got two questions regarding meta information. Question 1: I can say (def x1 (with-meta [] {:m 1})) or (def x2 ^{:m 1} []) and will get my map back with either (meta x1) or (meta x2). But when I do (def y1 (with-meta 'a {:m 1})) (def y2 ^{:m 1} 'a) only (meta y1) spits the map back at

Re: Looking for parser generator library

2012-01-28 Thread Roman Perepelitsa
Thanks, I didn't look at amotoen yet. Will do! A library based on parser combinators would be ideal, something like parsec in haskell. Although if in clojure world people usually take a different approach, I'm open to trying it. 2012/1/28 Richard Lyman richard.ly...@gmail.com Have you looked

Re: Last value from REPL

2012-01-28 Thread Stuart Sierra
Yes, the REPL binds *1, *2, and *3 to the three most recent returned values. *e is the most recent Exception. -S -- 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

[ANN] cljs-uuid 0.0.1 (micro cljs uuid lib)

2012-01-28 Thread Dave Sann
Tiny utility. if you need to 1. generate v4 (random) uuid's on your client 2. read/print uuid strings 3. read/print uuid string literals clojars - [cljs-uuid 0.0.1] git - https://github.com/davesann/cljs-uuid Cheers D -- You received this message because you are subscribed to the Google

Re: C-c C-x keybindings for swank-cdt don't work

2012-01-28 Thread Gregg Williams
George, I don't know why it works (my init.el file doesn't seem to mess with anything), but adding that code to the end of init.el makes things work. You're doing great things for the Clojure community--many thanks! On Jan 27, 7:27 pm, George Jahad cloj...@blackbirdsystems.net wrote: Sorry, the

Re: Looking for parser generator library

2012-01-28 Thread Lars Nilsson
On Sat, Jan 28, 2012 at 1:04 PM, Roman Perepelitsa roman.perepeli...@gmail.com wrote: A library based on parser combinators would be ideal, something like parsec in haskell. Although if in clojure world people usually take a different approach, I'm open to trying it. Two projects attempting to