Re: Setting up Clojure on OS X

2009-03-30 Thread Telman Yusupov
I have similar series posts, hopefully they might be useful to you: http://yusupov.com/blog/2009/basic-clojure-setup-part-1/ - Basic environment/Java setup somewhat tailored towards OS X http://yusupov.com/blog/2009/basic-clojure-setup-part-2/ - Setting up Emacs/Slime http://yusupov.com/blog/2

Re: CLOJURE_HOME (was Re: Waterfront - The Clojure-based editor for Clojure)

2009-02-25 Thread Telman Yusupov
+1 on setting a sane CLASSPATH and not depending on other environment variables. Then there is no need to specify a custom -cp for every Clojure/Java program/script either... Cheers, Telman P.S. My very simple CLASSPATH setup detailed here: http://yusupov.com/blog/2009/basic-clojure-setup-part

Re: Macro madness

2009-02-23 Thread Telman Yusupov
Try this syntax: ~'link Cheers, Telman On Feb 23, 3:25 pm, max3000 wrote: > Hi, > > I'm new to lisp and clojure, so what follows may be a very easy (i.e. > stupid) question... > > I want a macro to generate multi-methods. Here is the macro I crafted: > > (defmacro mcf [type class set-expr & fo

Re: SLIME and clojure problem

2009-02-22 Thread Telman Yusupov
Hi Jan, I'm not familiar with Weld, but based on the error message shown the cause might be the recent changes in making sequences fully lazy. Which version of clojure.contrib are you using? If it works for Mark, you might want to make sure that you're running the same version of Clojure and clo

Re: Newbie: Where is clojure.jar?

2009-02-19 Thread Telman Yusupov
A little bit of shameless plug here: I wrote a small article on my Clojure setup - it could be useful: http://telmanyusupov.wordpress.com/2009/02/16/basic-clojure-setup-part-1/ Parts 2 & 3 are coming very soon. Cheers, Telman On Feb 19, 5:37 pm, samppi wrote: > Oh, of course. Thanks for the

Re: Idiomatic Way to Write the Following:

2009-02-18 Thread Telman Yusupov
On Wednesday 18 February 2009 12:07, Chouser  wrote: > > > > > On Wed, Feb 18, 2009 at 12:30 PM, Telman Yusupov wrote: > > > No prettier, but a bit faster: > > > (defn remove-at42 [coll & indexes] > >   (let [iset (set indexes)] > >     (loop [i (int

Re: Questions about a Clojure Datalog

2009-02-18 Thread Telman Yusupov
Could this be of any help for your development? There is now a version of Datalog for PLT Scheme: Software: http://planet.plt-scheme.org/display.ss?package=datalog.plt&owner=jaymccarthy Documentation: http://planet.plt-scheme.org/package-source/jaymccarthy/datalog.plt/1/0/planet-docs/datalog/ind

Re: Idiomatic Way to Write the Following:

2009-02-18 Thread Telman Yusupov
I tried to get the results using some clever one liner but couldn't come up with it. It looks like rolling your own function is the way to go (but I would love to see this proven wrong). It would be very helpful if there were a function that does vector difference, like the one for sets. For exam

Re: More Swing Examples

2009-02-14 Thread Telman Yusupov
You need to download clojure-contrib library: http://code.google.com/p/clojure-contrib/ On Feb 14, 11:07 am, Sean wrote: > Hi, > I was trying to run this snake program, written by Mark Volkmann > > http://www.ociweb.com/mark/programming/ClojureSnake.html > > I'm getting the following error: > >

Re: special forms vs. functions and macros

2009-02-03 Thread Telman Yusupov
Jason, thanks a lot for the tip on "source" macro in clojure.contrib.repl-utils, it is indeed very nifty! Resolution for the day: get to know the contrib library! On Feb 2, 9:48 pm, Jason Wolfe wrote: > I believe that any non-special-form has a clojure implementation in > some .clj file, althou

Re: Simple Examples of Concurrency?

2009-01-29 Thread Telman Yusupov
of the program so I don't know how it's set. > > -sun > > On Jan 29, 7:44 pm, Telman Yusupov wrote: > > > Hi Sun, > > > *file* seems to be one of the built-in global vars (there is more - > > vars like *command-line-args*, *compile-path* and others in c

Re: Simple Examples of Concurrency?

2009-01-29 Thread Telman Yusupov
ctory. Cheers, Telman On Jan 29, 1:00 pm, wubbie wrote: > again I don't know how *file* gets current dir value. Maybe some > magic? > > -sun > > On Jan 29, 12:30 pm, Telman Yusupov wrote: > > > I had the same question, that was answered by typing this into REPL: &

Re: Simple Examples of Concurrency?

2009-01-29 Thread Telman Yusupov
I had the same question, that was answered by typing this into REPL: user=> (doc *file*) Output: - clojure.core/*file* nil The path of the file being evaluated, as a String. Evaluates to nil when there is no file, eg. in the REPL. On Jan 29, 7:03 am, wubbie wrote

Re: Programming Clojure sample code: fixes for breaking changes

2009-01-16 Thread Telman Yusupov
Thank you very much, Stuart! I think it's a good idea for me to start reading Clojure source code and keep track of the changes, as the language changes so quickly... On Jan 16, 10:02 am, Stuart Halloway wrote: > Hi Telman, > > The signature for agent has changed. Use: > >        (def counter

Re: Programming Clojure sample code: fixes for breaking changes

2009-01-16 Thread Telman Yusupov
I keep running into the following problem trying to supply agent validation function. Here is sample code from page 135 (from book version beta 5) (use '[clojure.contrib.except :only (throw-if)]) (def counter (agent 0 #(throw-if (not (number? %)) "not a number"))) triggers the following exceptio

Re: offtopic - where are you come from? (poll)

2008-11-21 Thread Telman Yusupov
Toronto, Canada --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more