Re: exposing specific functions via namespace

2009-03-26 Thread Parth
On Mar 26, 8:35 am, John D. Hume duelin.mark...@gmail.com wrote: On Wed, Mar 25, 2009 at 12:05 PM, Parth parth.malwan...@gmail.com wrote: I have split up the foo namespace across multiple files. So, I have the following now: src/org/ppm/foo.clj - org.ppm.foo src/org/ppm/bar.clj -

Book erratum (was: Clojure + Java compilation and IntelliJ IDEA plugin)

2009-03-26 Thread Stuart Halloway
Ilya, I have checked in a unit test for the tasklist example that demonstrates it working correctly locally. Can you try it and see what's different for you? Git repos: http://github.com/stuarthalloway/programming-clojure/tree/master Then bin/runtests.sh or bin\runtests.bat depending on

Re: oo

2009-03-26 Thread Konrad Hinsen
On 26.03.2009, at 14:59, Rich Hickey wrote: Plus the inability to dispatch on other than class or eql, the inability to superimpose another taxonomy without redefining the class, the inability to have multiple independent taxonomies... The ability to have multiple taxonomies is indeed very

Re: Trying to get a list of random numbers using repeat

2009-03-26 Thread Jon
You probably figured this out, but what you want is something like: (map rand-int (repeat SIZE MAX)) On Mar 23, 7:43 pm, Paul Drummond paul.drumm...@iode.co.uk wrote: Hi all, user= (repeat 10 (rand-int 49)) (4 4 4 4 4 4 4 4 4 4) Can someone please tell me why this doesn't work? It must

Re: Trying to get a list of random numbers using repeat

2009-03-26 Thread Paul Drummond
2009/3/26 Jon jon.na...@gmail.com: You probably figured this out, but what you want is something like: (map rand-int (repeat SIZE MAX)) In fact - I didn't think of this - thanks! This is what I used: (map rand-int (repeat Integer/MAX_VALUE)) I have been around since the beginning of Clojure

Re: z/OS and codepage issues?

2009-03-26 Thread Rich Hickey
On Mar 10, 1:03 pm, David Andrews dammi...@gmail.com wrote: I'm having difficulty running Clojure underz/OS. If I download a current Clojure onto my Gentoo Linux system and build it so: svn checkouthttp://clojure.googlecode.com/svn/trunk/clojure-read- only cd clojure-read-only

Re: z/OS and codepage issues?

2009-03-26 Thread Stephen C. Gilardi
On Mar 10, 2009, at 1:03 PM, David Andrews wrote: One person suggested to me that The code is probably doing something odd with how it reads input, making bad assumptions about the codepage being ASCII. Running with ISO8859-1 as the file encoding usually fixes this, but apparently not in this

Re: file io

2009-03-26 Thread Victor Rodriguez
On Tue, Mar 24, 2009 at 11:05 PM, Korny Sietsma ko...@sietsma.com wrote: It'd be nice to have a macro that worked more like the first example - spit is great for one-liners, but the fact that it opens and closes the file each time you call it seems a bit painful for anything more complex.

Re: z/OS and codepage issues?

2009-03-26 Thread David Andrews
Great catch, Steve. Thanks! My z/OS system now tells me: $ java -Dfile.encoding=ISO8859-1 -Dconsole.encoding=IBM-1047 -cp clojure.jar clojure.lang.Repl Clojure user= (+ 1 1) 2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Slime integration

2009-03-26 Thread vseguip
Hi I tried your code but still no luck with errors. This is what I get from the*slime events* buffer: (:emacs-rex (swank:compile-file-for-emacs /home/vseguip/uoc/IA2/practica/ main.clj t 'nil) practica-main t 5) (:indentation-update ((rec-seq . 1))) (:return (:ok (:compilation-result

Re: z/OS and codepage issues?

2009-03-26 Thread Stephen C. Gilardi
On Mar 26, 2009, at 2:44 PM, David Andrews wrote: Great catch, Steve. Thanks! My z/OS system now tells me: $ java -Dfile.encoding=ISO8859-1 -Dconsole.encoding=IBM-1047 -cp clojure.jar clojure.lang.Repl Clojure user= (+ 1 1) 2 You're quite welcome, David. I gather (via Google search) that

Re: z/OS and codepage issues?

2009-03-26 Thread Laurent PETIT
Hello Stephen, Well, it seems that javac (java compilation tool) accepts this option : *-encoding* *encoding* Set the source file encoding name, such as EUCJIS/SJIS. If *-encoding* is not specified, the platform default converter is used.So maybe something along those lines for everything that

Re: Slime integration

2009-03-26 Thread Tassilo Horn
vseguip vseg...@gmail.com writes: Hi I tried your code but still no luck with errors. Then I don't know. I use ut-to-date versions of swank-clojure, clojure-mode, SLIME and clojure all from their version control systems. Maybe that makes the difference. Bye, Tassilo

Re: oo

2009-03-26 Thread mikel
On Mar 26, 8:59 am, Rich Hickey richhic...@gmail.com wrote: On Mar 25, 6:47 am, mikel mev...@mac.com wrote: [...my misgivings snipped...] I wonder about the generality of this concern. Defining new methods that break existing code implies both defining new methods on existing super-types

Re: oo

2009-03-26 Thread Laurent PETIT
2009/3/26 Konrad Hinsen konrad.hin...@laposte.net On 26.03.2009, at 14:59, Rich Hickey wrote: Plus the inability to dispatch on other than class or eql, the inability to superimpose another taxonomy without redefining the class, the inability to have multiple independent taxonomies...

bound?

2009-03-26 Thread mikel
How would you write bound? (or alternatively, what is the name of the function that serves the same purpose)? This hypothetical function would return true if and only if its argument refers to a Var with a binding in the namespace where the reference appears. Such a function is useful for

Re: bound?

2009-03-26 Thread Stephen C. Gilardi
On Mar 26, 2009, at 7:24 PM, mikel wrote: How would you write bound? (or alternatively, what is the name of the function that serves the same purpose)? This hypothetical function would return true if and only if its argument refers to a Var with a binding in the namespace where the

Re: bound?

2009-03-26 Thread mikel
On Mar 26, 7:59 pm, Stephen C. Gilardi squee...@mac.com wrote: On Mar 26, 2009, at 7:24 PM, mikel wrote: How would you write bound? (or alternatively, what is the name of   the function that serves the same purpose)? This hypothetical function would return true if and only if its