Re: Multimethods & derive

2009-06-07 Thread Konrad Hinsen
On 08.06.2009, at 04:26, Stuart Sierra wrote: >> If it is, it would be very useful to have something that is the >> ancestor of everything (like T in common lisp). > > This has been thought about, at least: http://clojure.org/todo > I think the question is... what should the universal ancestor be

Re: Threadring Benchmark

2009-06-07 Thread Parth
So I got a chance to do some tweaks to the clojure code and run the benchmark. I also used the "approved" (not alternative) version of java code for comparison. I must say I am impressed with the clojure agent performance. The previous implementation results for 20,000,000 hops was: java: 27.14 s

Re: VimClojure v2.1.1 is released

2009-06-07 Thread e
> I can try to do a "ClojureBall" MacVim. Hmm... > Never done that before. Anyone with experience > for Windows? > > That'd be awesome. assume the user doesn't even have vim. they just have jdk. ... and they only care about vim for clojure. Well, I'd want to eventually integrate with svn and git,

Re: What books have helped you wrap your brain around FP and Clojure?

2009-06-07 Thread Stuart Sierra
On Jun 6, 7:12 am, Robert Campbell wrote: > Going beyond the language-specific Programming Clojure book, what > other books have best helped you make the (sometimes mind-bending) > transition from OOP thinking to FP thinking? Practical Common Lisp, on the web at http://gigamonkeys.com/book/ Cloj

Re: Multimethods & derive

2009-06-07 Thread Stuart Sierra
On Jun 7, 7:46 pm, Peter Salvi wrote: > (defmethod foo [:bar :anything] [a b] ...) > (defmethod foo [:anything :baz] [a b] ...) > (defmethod foo [:bar :baz] [a b] ...) > > This seems to do the trick... but is this really the way to do it? This looks reasonable. > If it is, it would be very usef

Multimethods & derive

2009-06-07 Thread Peter Salvi
Hi, I would like to use multimethods by dispatching on keys of the variables (maps) in a way that I sometimes have constraints on only some of the arguments. In common lisp I would say (defgeneric foo (a b)) (defmethod foo ((a bar) b) ...) (defmethod foo (a (b baz)) ...) (defmethod foo ((a bar)

Re: VimClojure v2.1.1 is released

2009-06-07 Thread Meikel Brandmeyer
Hi, Am 07.06.2009 um 17:41 schrieb Emeka: And it took Meikel three weeks to make out time to talk to me. Huh? Did I miss something? Sincerely Meikel smime.p7s Description: S/MIME cryptographic signature

Re: VimClojure v2.1.1 is released

2009-06-07 Thread Meikel Brandmeyer
Hi, Am 07.06.2009 um 19:13 schrieb e: So I was pretty much out of steam after 8 hours just as I was seeing all the VimClojure instructions. You are all right that it is a bunch of whining on my part, but remember that it's not just me. I represent a demographic. The VimClojure instruct

Re: New and stuck ??

2009-06-07 Thread Kevin Downey
the new entry point is clojure.main java -cp clojure.jar clojure.main ;no slash, with the corrent jar name java -cp clojure.jar clojure.main --help will print a nice help message On Sun, Jun 7, 2009 at 8:20 AM, darrell wrote: > > OK, embarrassing > > Thanks, I was caught wishing to see a wow

Re: VimClojure v2.1.1 is released

2009-06-07 Thread e
thanks. I do grok, vim. the other point is less about what to do once it is all set up ... it's that setting up is a multi-step hurdle. That's what has been prohibitive for folks. The risk is sinking the time and ending up at some sort of dead end. For me, i had to hack like crazy, for example

Re: VimClojure v2.1.1 is released

2009-06-07 Thread Emeka
If you just want to get started with Clojure, use a simple text editor of your liking and a repl running in the shell/command prompt window. Well, that's what I have done. Now I am looking for something else. And because I have flirted with vi before, and I am somehow thinking that learning vim wo

Re: New and stuck ??

2009-06-07 Thread darrell
OK, embarrassing Thanks, I was caught wishing to see a wow fun demo, without thought on my part. -= Darrell On Jun 7, 10:13 am, "Kyle R. Burton" wrote: > I think your ls showed it, the jar name is clojure-1.0.0.jar, so the > java -cp argument should point to that instead: > >   java -cp clojur

Re: VimClojure v2.1.1 is released

2009-06-07 Thread Meikel Brandmeyer
Hi, Am 07.06.2009 um 14:26 schrieb e: if someone just has a vimclojure set up for mac/tiger (and one for Windows) that can somehow be bundled, I'd be interested. I still haven't settled into any sort of reliable/intuitive environment for developing in clojure -- it's by far the biggest hu

Re: ICFP 2009

2009-06-07 Thread Andrew Wagner
Just an update on this thread - it turns out my wife and I are out of town at a wedding the weekend of the contest this year, so if anyone wants to organize a clojure team, don't depend on me to organize it. Good luck! On Thu, Apr 23, 2009 at 1:34 PM, Jason Wolfe wrote: > > I'm interested, altho

Re: New and stuck ??

2009-06-07 Thread Kyle R. Burton
I think your ls showed it, the jar name is clojure-1.0.0.jar, so the java -cp argument should point to that instead: java -cp clojure-1.0.0.jar clojure.lang.Repl Kyle On Sat, Jun 6, 2009 at 6:17 PM, darrell wrote: > > Any ideas ? > Mac OS-X > > ~/Downloads/clojure_1.0.0$ java -cp clojure.ja

Re: timing for map

2009-06-07 Thread Kyle R. Burton
I map produces a lazy sequence, time doesn't force it, if you wrap it in either a dorun or doall, you should get what you expect: user> (time (map #(Thread/sleep %) '(1000 1000 1000))) "Elapsed time: 0.156 msecs" (nil nil nil) user> (time (doall (map #(Thread/sleep %) '(1000 1000 1000 "Elapse

timing for map

2009-06-07 Thread artg
user=> (time (map answer '(50 50))) "Elapsed time: 0.032826 msecs" (392330 392711) user=> (time (answer 50)) "Elapsed time: 6357.131423 msecs" 392849 When I try to time 'map' it seems to return right away. How do I time the full two executions of 'answer'? --~--~-~--~~--

New and stuck ??

2009-06-07 Thread darrell
Any ideas ? Mac OS-X ~/Downloads/clojure_1.0.0$ java -cp clojure.jar clojure.lang.Repl Exception in thread "main" java.lang.NoClassDefFoundError: clojure/ lang/Repl ~/Downloads/clojure_1.0.0$ java -cp clojure.jar /clojure.main Exception in thread "main" java.lang.NoClassDefFoundError: /clojure/

Re: What books have helped you wrap your brain around FP and Clojure?

2009-06-07 Thread Danny Woods
+1 for Higher Order Perl. The author, Mark Jason Dominus, has made the book available for free download at http://hop.perl.plover.com/book/. Cheers, Danny. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" g

Re: VimClojure v2.1.1 is released

2009-06-07 Thread e
if someone just has a vimclojure set up for mac/tiger (and one for Windows) that can somehow be bundled, I'd be interested. I still haven't settled into any sort of reliable/intuitive environment for developing in clojure -- it's by far the biggest hurdle to everyone I know trying to get into it.

Re: Slurping structs from file fails with string attributes containing whitespaces

2009-06-07 Thread Perttu
Thanks! Sorry about double-posting, the message took over 24 hours to appear here. -Perttu On May 29, 2:59 pm, Christophe Grand wrote: > On 29 mai, 05:55, Perttu wrote: > > > I use a store-function like this: > > > (defn store-customer-db [customer-db filename] > >   (spit filename (with-ou

Re: Slurping structs from file fails with whitespace string attributes

2009-06-07 Thread Perttu
Thanks! Sorry about double-posting, the message took over 24 hours to appear here. -Perttu On May 29, 2:56 pm, "J. McConnell" wrote: > On Thu, May 28, 2009 at 4:23 PM, Perttu wrote: > > > I use a store-function like this: > > > (defn store-customer-db [customer-db filename] > >  (spit filenam