Re: Changes for AOT compilation

2008-11-13 Thread walterc
does this mean that writing android application in clojure is possible? if not, what else needs to be done to make it happen? On Nov 14, 2:43 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > We're coming around the other side of the few breaking changes I > wanted to get done before release 1.0. > >

Re: Simple Namespace Question

2008-11-13 Thread Michael Wood
On Thu, Nov 13, 2008 at 10:58 PM, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote: > Hi, > > Am 13.11.2008 um 20:40 schrieb Chris Bunch: >> >> Hmm, that didn't work for me. That gives the same output as before: > > http://groups.google.com/group/clojure/browse_thread/thread/1b47e5c7598f1375/8f69db0a0a

Re: Standard Error to the REPL under Slime?

2008-11-13 Thread darren . austin
Awesome. Not sure how I missed that. Thanks. --Darren On Nov 13, 5:37 pm, Brian Carper <[EMAIL PROTECTED]> wrote: > On Nov 13, 5:07 pm, Allen Rohner <[EMAIL PROTECTED]> wrote: > > > On Nov 7, 3:00 am, [EMAIL PROTECTED] wrote: > > > > Hey folks, > > > > Is there a way to get the System.err dir

Re: clojure.zip: replace error

2008-11-13 Thread Rich Hickey
On Nov 13, 11:20 pm, Parth Malwankar <[EMAIL PROTECTED]> wrote: > Hello, > > While setting ns to clojure.zip, I get the following error: > > user=> (ns clojure.zip) > java.lang.IllegalStateException: replace already refers to: > #'clojure.zip/replace in namespace: clojure.zip (NO_SOURCE_FILE:0)

clojure.zip: replace error

2008-11-13 Thread Parth Malwankar
Hello, While setting ns to clojure.zip, I get the following error: user=> (ns clojure.zip) java.lang.IllegalStateException: replace already refers to: #'clojure.zip/replace in namespace: clojure.zip (NO_SOURCE_FILE:0) clojure.zip=> Is this expected? Thanks. Parth --~--~-~--~~-

Re: Clojure Spec

2008-11-13 Thread Randall R Schulz
On Thursday 13 November 2008 18:15, Chris Turner wrote: > Hi all, > > I created a new framework for defining specifications on functions... > > ... > > http://www.bitbucket.org/BestFriendChris/clojure-spec/wiki/Home > > ... > > Thoughts? What you've done starts to remind me, however tangentially,

Clojure Spec

2008-11-13 Thread Chris Turner
Hi all, I created a new framework for defining specifications on functions... http://www.bitbucket.org/BestFriendChris/clojure-spec/wiki/Home An example spec (taken from the main wiki page): (defspec + ; Shows we are defining a specification for the + function ([] (= value

Re: Standard Error to the REPL under Slime?

2008-11-13 Thread Brian Carper
On Nov 13, 5:07 pm, Allen Rohner <[EMAIL PROTECTED]> wrote: > On Nov 7, 3:00 am, [EMAIL PROTECTED] wrote: > > > Hey folks, > > > Is there a way to get the System.err directed to the slime-repl > > clojure buffer instead of (or in addition to) inferior-lisp buffer?  I > > looked through the docs, b

Re: Standard Error to the REPL under Slime?

2008-11-13 Thread Allen Rohner
On Nov 7, 3:00 am, [EMAIL PROTECTED] wrote: > Hey folks, > > Is there a way to get the System.err directed to the slime-repl > clojure buffer instead of (or in addition to) inferior-lisp buffer?  I > looked through the docs, but I didn't see anything obvious. > > Thanks! > --Darren I'd also lik

Re: Changes for AOT compilation

2008-11-13 Thread Stuart Sierra
On Nov 13, 1:43 pm, Rich Hickey <[EMAIL PROTECTED]> wrote: > We're coming around the other side of the few breaking changes I > wanted to get done before release 1.0. > New regex format: > Uniform binding syntax using vectors: > And ahead-of-time (AOT) compilation (SVN 1094+) Wow, cool! I haven'

Re: Simple Namespace Question

2008-11-13 Thread Meikel Brandmeyer
Hi, Am 13.11.2008 um 20:40 schrieb Chris Bunch: Hmm, that didn't work for me. That gives the same output as before: http://groups.google.com/group/clojure/browse_thread/thread/1b47e5c7598f1375/8f69db0a0a7e0564?lnk=gst&q=java+prohibited+namespace#8f69db0a0a7e0564 See also this thread. Sincere

Re: Has search path just changed?

2008-11-13 Thread Michael Wood
On Thu, Nov 13, 2008 at 7:35 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: > > I just built Clojure and clojure-contrib from source. > > I'm getting something odd: [...] Try "svn up -r1088". If you run "svn log -r1087:" you will see that there have been some changes that might cause certain t

Re: Simple Namespace Question

2008-11-13 Thread Chris Bunch
Ah, I see. Thanks guys! Rich Hickey wrote: On Nov 13, 2:31 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote: (clojure.core/ns clojure) or if you are on an old build I think it would be (clojure/ns clojure) This is coming in my book notes, I promise :), but ns should

Re: Simple Namespace Question

2008-11-13 Thread Chris Bunch
Hmm, that didn't work for me. That gives the same output as before: java=> (clojure/ns clojure) java.lang.RuntimeException: java.lang.SecurityException: Prohibited package name: java (NO_SOURCE_FILE:0) The only way I can get the REPL to return a different message is in the case of syntax error

Re: Simple Namespace Question

2008-11-13 Thread Rich Hickey
On Nov 13, 2:31 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote: > (clojure.core/ns clojure) > > or if you are on an old build I think it would be > > (clojure/ns clojure) > This is coming in my book notes, I promise :), but ns should not be used to change namespaces in the repl, only in-ns shoul

Re: Changes for AOT compilation

2008-11-13 Thread Wilkes Joiner
On Nov 13, 12:43 pm, Rich Hickey <[EMAIL PROTECTED]> wrote: > We're coming around the other side of the few breaking changes I > wanted to get done before release 1.0. > Is there a roadmap published anywhere? Thanks, Wilkes --~--~-~--~~~---~--~~ You received this

Re: Simple Namespace Question

2008-11-13 Thread Stuart Halloway
(clojure.core/ns clojure) or if you are on an old build I think it would be (clojure/ns clojure) > > Hi all, >While playing with the Clojure REPL I changed my namespace to be > "java" (since I was testing out Java interop stuff) and now when I try > any commands, I see the following: > > ja

Simple Namespace Question

2008-11-13 Thread Chris Bunch
Hi all, While playing with the Clojure REPL I changed my namespace to be "java" (since I was testing out Java interop stuff) and now when I try any commands, I see the following: java.lang.RuntimeException: java.lang.SecurityException: Prohibited package name: java (NO_SOURCE_FILE:0) Sinc

Re: Changes for AOT compilation

2008-11-13 Thread Stephen C. Gilardi
On Nov 13, 2008, at 1:43 PM, Rich Hickey wrote: > The clojure.contrib and tools folks are working on getting in sync > with these changes. For minimal disruption, please stick with the SVN > rev they support (say, 1088), or lend a hand in testing their patches. I've updated my contribs and other

Re: agents: producer consumer example

2008-11-13 Thread Drew Raines
Parth Malwankar wrote: > So for example is it possible to do something like this at > the end of file: > > (when (running-as-script) > (doseq x (repeatedly #(Thread/sleep 100 I do it with this idiom: (when *command-line-args* ...) Check out Script.java for more info. -Drew --~-

Changes for AOT compilation

2008-11-13 Thread Rich Hickey
We're coming around the other side of the few breaking changes I wanted to get done before release 1.0. The changes are: New regex format: http://groups.google.com/group/clojure/msg/eddd7f0d292da683 Uniform binding syntax using vectors: http://groups.google.com/group/clojure/browse_frm/thread

Re: test syntax recommendations

2008-11-13 Thread James Reeves
On Nov 13, 5:49 pm, Larrytheliquid <[EMAIL PROTECTED]> wrote: > I'm porting RSpec to Clojure and would appreciate any syntax > recommendations:http://paste.lisp.org/display/70313 This expression is not very 'lispy': (=> (conj my-vec 1) should = [1]) Perhaps it should be: (should = (conj my

Re: Has search path just changed?

2008-11-13 Thread Meikel Brandmeyer
Hi, the latest check-ins introduced breaking changes. Please refer to the commit messages for more information. Sincerely Meikel smime.p7s Description: S/MIME cryptographic signature

Re: Java API vs. Special Forms, was Re: "Can't create defs outside of current namespace"

2008-11-13 Thread MikeM
> When (if ever) is it good form to call the underlying Java APIs used   > by Clojure's special forms? I was thinking Rich might reply and weigh in on my suggestion to use an RT method. I'd also like to know if this should be avoided. It seems like it might be ok, since the var method is publi

test syntax recommendations

2008-11-13 Thread Larrytheliquid
I'm porting RSpec to Clojure and would appreciate any syntax recommendations: http://paste.lisp.org/display/70313 -- Respectfully, Larry Diehl www.larrytheliquid.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: Has search path just changed?

2008-11-13 Thread Howard Lewis Ship
Yep, definitely. When I back down to the latest download version it works correctly. $ sudo cp ~/Downloads/clojure_20080916/clojure.jar . Password: /usr/local/clojure $ java -cp clojure-contrib.jar:clojure.jar clojure.lang.Repl Clojure user=> (use 'clojure.contrib.str-utils) nil user=> (str-join

Has search path just changed?

2008-11-13 Thread Howard Lewis Ship
I just built Clojure and clojure-contrib from source. I'm getting something odd: $ ls total 1288 drwxr-xr-x 8 root wheel 272B Nov 12 12:15 . drwxr-xr-x 24 root wheel 816B Nov 11 11:53 .. -rw-r--r-- 1 root wheel 226B Nov 11 11:53 clojure-auto.el -rw-r--r-- 1 root wheel51K Nov

Donations

2008-11-13 Thread Rich Hickey
Some people have asked how to donate to Clojure, so I've turned donations on in SF: https://sourceforge.net/project/project_donations.php?group_id=137961 Thanks to all for your support! Rich --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: Testing Clojure (was Re: Bug? Strange set equality (r1075))

2008-11-13 Thread Frantisek Sodomka
On Thu, 13 Nov 2008 16:35:52 +0100, Dave Newton <[EMAIL PROTECTED]> wrote: > > --- On Thu, 11/13/08, Frantisek Sodomka wrote: >> [...] >> becomes: >> >> (deftest t-Symbols >>(check >> (:equal >>'abc (symbol "abc") >>'*+!-_? (symbol "*+!-_?") >>'abc:def:ghi (symb

Re: Testing Clojure (was Re: Bug? Strange set equality (r1075))

2008-11-13 Thread Dave Newton
--- On Thu, 11/13/08, Frantisek Sodomka wrote: > [...] > becomes: > > (deftest t-Symbols >(check > (:equal >'abc (symbol "abc") >'*+!-_? (symbol "*+!-_?") >'abc:def:ghi (symbol "abc:def:ghi") >'abc/def (symbol "abc" "def") >'abc.def/ghi (symbol "ab

Re: Testing Clojure (was Re: Bug? Strange set equality (r1075))

2008-11-13 Thread Frantisek Sodomka
Using this, test t-Symbols (deftest t-Symbols (is (= 'abc (symbol "abc"))) (is (= '*+!-_? (symbol "*+!-_?"))) (is (= 'abc:def:ghi (symbol "abc:def:ghi"))) (is (= 'abc/def (symbol "abc" "def"))) (is (= 'abc.def/ghi (symbol "abc.def" "ghi"))) (is (= 'abc/def.ghi (symbol "abc" "def

Re: let accepting a vector

2008-11-13 Thread Rich Hickey
On Nov 13, 8:36 am, Stuart Halloway <[EMAIL PROTECTED]> wrote: > Hi Meikel, > > I spent a few minutes trying to write a macro to do this that doesn't > use eval. So far no good. Is it truly impossible, though? I have never > seen a good discussion of "things that can be done only with eval". > A

Re: let accepting a vector

2008-11-13 Thread mb
Hi Stuart, > I spent a few minutes trying to write a macro to do this that doesn't   > use eval. So far no good. Is it truly impossible, though? I have never   > seen a good discussion of "things that can be done only with eval".   > Any pointers? The problem is, that macros happen at compile ti

Re: let accepting a vector

2008-11-13 Thread Stuart Halloway
Hi Meikel, I spent a few minutes trying to write a macro to do this that doesn't use eval. So far no good. Is it truly impossible, though? I have never seen a good discussion of "things that can be done only with eval". Any pointers? Cheers, Stuart > Hi, > > On 13 Nov., 07:27, Larrytheliq

Re: let accepting a vector

2008-11-13 Thread mb
Hi, On 13 Nov., 07:27, Larrytheliquid <[EMAIL PROTECTED]> wrote: > Is there a way to pass a vector to a function like let, rather than manually > typing in the brackets? let is not a function, but a special form (see: http://clojure.org/special_forms). It is only possible via eval to achieve th

let accepting a vector

2008-11-13 Thread Larrytheliquid
Is there a way to pass a vector to a function like let, rather than manually typing in the brackets? ;;; normal let (let [one 1] one) ;;; list let (def bindings-list '[one 1]) (list-let bindings-list one) -- Respectfully, Larry Diehl www.larrytheliquid.com --~--~-~--~~~

Re: iterate

2008-11-13 Thread Parth Malwankar
On Nov 13, 12:25 pm, notallama <[EMAIL PROTECTED]> wrote: > i put this at the end of my boot.clj for added fun: > > (defn iterate >   "returns a lazy seq of arg1, arg2 ... argn, (f arg1 ... argn), (f > arg2 ... argn (f arg1 ... argn)), etc." >   [f & [x & rest :as all]] >   (lazy-cons x (apply i

Re: Where are the tests?

2008-11-13 Thread Paul Drummond
2008/11/12 Howard Lewis Ship <[EMAIL PROTECTED]> > > I'm looking at the Clojure SVN and I'm wondering, where are the unit > tests? > There is test-clojure in clojure-contrib - see the following thread for details: http://groups.google.com/group/clojure/browse_thread/thread/697d59883a273795/bb057