Re: Can't defalias a macro in clojure 1.2?

2010-05-07 Thread Joost
On May 7, 12:14 am, Stuart Halloway stuart.hallo...@gmail.com wrote: Just pushed a fix for this. (An ugly hack, really.) Let me know if it works for you. Thanks Stuart, that seems to have done the trick. Regards, Joost. -- You received this message because you are subscribed to the Google

Re: labrepl updated

2010-05-07 Thread Stuart Halloway
Changed my mind and fixed this on the Clojure side [1]. Now you should be able to bind *err* to any old Writer you like. Stu [1] http://github.com/richhickey/clojure/tree/c4eb5719b0f30ea4c113e6e98a1c171c43a01abe So if someone produces a fork of incanter that doesn't have the warning (or

gen-interface issues

2010-05-07 Thread Michael Jaaka
Hi! I'm trying to generate interface then implement it. Here is a source code: (ns dede) (gen-interface :name me.IBar :methods [[bar [String] ]]) (compile 'dede) (import '(me IBar)) (let [z (proxy [ IBar ] [] (bar [a] (println a) ))] (.bar z)) The output is user=

Re: gen-interface issues

2010-05-07 Thread Michael Jaaka
Oh and Clojure version is 1.1.0 On 7 Maj, 15:37, Michael Jaaka michael.ja...@googlemail.com wrote: Hi! I'm trying to generate interface then implement it. Here is a source code: (ns dede) (gen-interface  :name me.IBar  :methods [[bar [String] ]]) (compile 'dede) (import '(me IBar))

Re: gen-interface issues

2010-05-07 Thread Michael Jaaka
Thanks it compiles now but proxy is missing something... Here is a dede.clj (ns dede) (gen-interface :name me.IBar :methods [[bar [] String]]) And here is code run in REPL (compile 'dede) (import '(me IBar)) (let [z (proxy [ IBar ] [] (bar [] abc ))] (.bar z)) The output is:

Re: gen-interface issues

2010-05-07 Thread Michael Jaaka
Hmmm, restart of REPL have helped. However in case of any farther issues with gen-interface I will post here. Thanks, bye! On 7 Maj, 16:22, Michael Jaaka michael.ja...@googlemail.com wrote: Thanks it compiles now but proxy is missing something... Here is a dede.clj (ns dede)

Pack and unpack

2010-05-07 Thread Michael Jaaka
Hi! I was searching for function which converts to and back all clojure structures like maps, vectors and sequences to serializable java objects. But couldn't find any. Is there anyone who already done this? Note that with maps keywords must be converted to strings (with some special marker

Re: Pack and unpack

2010-05-07 Thread Michael Jaaka
To clarify serializable objects clojure vectors would become ArrayList, clojure sequences would become LinkedList, clojure sets would become HashMap, clojure maps would become HashTree. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: labrepl updated

2010-05-07 Thread Phil Hagelberg
On Thu, May 6, 2010 at 6:49 AM, Stuart Halloway stuart.hallo...@gmail.com wrote: If there is not a principled reason swank works the way it does, let's fix it. I'll get to it eventually myself if nobody else does, but it isn't near the top of my list. It looks like labrepl is still using swank

divide-n-conquer collections

2010-05-07 Thread Fabio Kaminski
im really a newcomer, and since i couldnt find this information anywhere.. there we go :) how can i split a collection and later join a collection in clojure.. to apply concurrent transversal patterns in collections, like a divide and conquer one? Thanks all! Fabio Kaminski -- You received

Re: divide-n-conquer collections

2010-05-07 Thread Fabio Kaminski
i know answering myself could sound like crazy, but: http://clojure.org/sequences Create nested seqs: split-athttp://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/split-at split-withhttp://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/split-with

Error on master with OS X

2010-05-07 Thread Sam Aaron
Hey there, I'm running with the latest version of overtone with Fabian's new OS X SC binaries (yey). However, I'm getting some strange errors on boot. Can somebody help me work out what's going wrong? Sam Clojure 1.1.0 user= (use 'overtone.live) (boot)

Re: Error on master with OS X

2010-05-07 Thread Sam Aaron
oops, I fired this off too quickly to the wrong group :-) Sorry! Sam --- http://sam.aaron.name On 6 May 2010, at 6.04 pm, Sam Aaron wrote: Hey there, I'm running with the latest version of overtone with Fabian's new OS X SC binaries (yey). However, I'm getting some strange errors on

Re: History Question

2010-05-07 Thread Razvan
I think it returns :a rather than just a so that you can print stuff, then read it back in and it would be the same. You can use it to dump configuration data to a file for example then load it later easily. Razvan On Thu, May 6, 2010 at 10:21 PM, Meikel Brandmeyer m...@kotka.de wrote: Hi,

Re: divide-n-conquer collections

2010-05-07 Thread Fabio Kaminski
another question over the same topic.. why is parallel library deprecated? theres another library wrapping doug lea's fork-join? or clojure has its own solution for that.. sorry about been pervertly curious.. hehehe On Wed, May 5, 2010 at 9:29 PM, Fabio Kaminski fabiokamin...@gmail.comwrote:

macro help

2010-05-07 Thread Micah Martin
Hey all, I'm having trouble writing a macro and I hoping some one here can help. My desired result is the following: (defroutes all-routes (GET /one (foo one)) (GET /two (foo two)) (GET /three (foo three))) But I'd like to write it like so: (defroutes all-routes (make-foos one

Re: History Question

2010-05-07 Thread Heinz N. Gies
usualy pr and pr-str is for that, since str/print does not guarantee you that you can read the stuff back, think of str'ing a str, it looses it's . On May 6, 2010, at 23:49 , Razvan wrote: I think it returns :a rather than just a so that you can print stuff, then read it back in and it would

Re: macro help

2010-05-07 Thread Laurent PETIT
Hello, Maybe defroutes is not the right building-block to build upon if you want to make things more supple for you. Look up the building blocks defroutes is built upon,and if they are part of the public API, then maybe it's better (and easier) to build on them. And note that a macro can only

Re: labrepl updated

2010-05-07 Thread Stuart Halloway
I have fixed it on the clojure side, so it should work with swank 1.1.0 now anyway. On Thu, May 6, 2010 at 6:49 AM, Stuart Halloway stuart.hallo...@gmail.com wrote: If there is not a principled reason swank works the way it does, let's fix it. I'll get to it eventually myself if nobody

Re: divide-n-conquer collections

2010-05-07 Thread David Nolen
On Wed, May 5, 2010 at 8:08 PM, Fabio Kaminski fabiokamin...@gmail.comwrote: im really a newcomer, and since i couldnt find this information anywhere.. there we go :) how can i split a collection and later join a collection in clojure.. to apply concurrent transversal patterns in

Using swank-clojure with clojure-1.2.0-master-SNAPSHOT

2010-05-07 Thread Benjamin Teuber
Hi, I think many people (including me) have the problem that ELPA-swank uses clojure's old ^-syntax and therefore breaks with clojure-1.2.0- master-SNAPSHOT Does anyone have a plan what I can do assuming I want to keep both the new clojure version and swank? I'm using Maven, if that matters.

Re: Pack and unpack

2010-05-07 Thread Matt
You could try str and read-string functions. Though I'm not sure if that is the safest way to do that. (str my-structure) (read-string my-string) -Matt Courtney On May 7, 11:55 am, Michael Jaaka michael.ja...@googlemail.com wrote: Hi! I was searching for function which converts to and back

Re: History Question

2010-05-07 Thread Mark Hamstra
On May 6, 10:46 pm, MarkSwanson mark.swanson...@gmail.com wrote: or as-str from c.c.java-utils (I think) Good one. It's in string.clj in the latest git. It looks like identical code for as-str is in both java_utils.clj and string.clj Is there a good reason for this duplication? -- You

Re: divide-n-conquer collections

2010-05-07 Thread B Smith-Mannschott
On Thu, May 6, 2010 at 02:08, Fabio Kaminski fabiokamin...@gmail.com wrote: im really a newcomer, and since i couldnt find this information anywhere.. there we go :) how can i split a collection and later join a collection in clojure.. to apply concurrent transversal patterns in collections,

Re: History Question

2010-05-07 Thread Stuart Halloway
Avoid breaking people working in the edge. Things will be deprecated and removed over time. On May 6, 10:46 pm, MarkSwanson mark.swanson...@gmail.com wrote: or as-str from c.c.java-utils (I think) Good one. It's in string.clj in the latest git. It looks like identical code for as-str is

Re: Pack and unpack

2010-05-07 Thread Stuart Sierra
On May 7, 11:55 am, Michael Jaaka michael.ja...@googlemail.com wrote: I was searching for function which converts to and back all clojure structures like maps, vectors and sequences to serializable java objects. In Clojure 1.2 the core Clojure data structures will all be Serializable. You can

Re: Dumbest test Q you ever heard

2010-05-07 Thread Stuart Sierra
On May 6, 12:40 pm, Quzanti quza...@googlemail.com wrote: If you do anything outside an assertion you get an error saying you were outside an assertion. No, clojure.test permits any arbitrary code inside deftest. If you get an error saying Uncaught exception, not in assertion it means that

Re: Defining a namespace inside a let

2010-05-07 Thread Stuart Sierra
On May 2, 3:09 pm, alux alu...@googlemail.com wrote: Hm. Can you point me to some documentation about these special rules then? Some on http://clojure.org/namespaces But the best rule of thumb is: never use ns or in-ns anywhere except at the top of a source file. -S -- You received this

Re: Pack and unpack

2010-05-07 Thread Mark Engelberg
On Fri, May 7, 2010 at 1:32 PM, Stuart Sierra the.stuart.sie...@gmail.com wrote: In Clojure 1.2 the core Clojure data structures will all be Serializable.  You can test this in the current development master branch. So is binding *print-dup* still the recommended way to serialize, or is there