Re: Clojure Conj Questions

2010-08-25 Thread Meikel Brandmeyer
Hi, On 19 Aug., 17:19, Sean Devlin francoisdev...@gmail.com wrote: http://first.clojure-conj.org/ Will the talks be recorded? Put on blip.tv? For those on the other side of the Big Pond? Sincerely Meikel -- You received this message because you are subscribed to the Google Groups Clojure

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Alex Ott
Yes, this is very important problem with current implementation of Clojure. Many of beginners complain, that they couldn't understand where error happened, especially during compilation of code. Phil Hagelberg at Tue, 24 Aug 2010 21:55:52 -0700 wrote: PH One of the most common complaints about

Re: Clojure Conj Questions

2010-08-25 Thread nickikt
It would be fantastic if the talkes would be record. We have seen the effects a couple of videos of rich had on the world and how many people it led to clojure (including me). On Aug 25, 9:36 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, On 19 Aug., 17:19, Sean Devlin francoisdev...@gmail.com

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Shantanu Kumar
+1 Good idea. On Aug 25, 12:45 pm, Alex Ott alex...@gmail.com wrote: Yes, this is very important problem with current implementation of Clojure.  Many of beginners complain, that they couldn't understand where error happened, especially during compilation of code. Phil Hagelberg  at Tue, 24

help with native-jar files..

2010-08-25 Thread Sunil S Nandihalli
Hello everybody, I wanted to package jreality along with its native dependencies and upload it to my clojars since there were none already there.. I followed the procedure on http://nakkaya.com/2010/04/05/managing-native-dependencies-with-leiningen/ the resultant was the following ...

Re: Removed Clojure binaries from contrib 'complete' jar

2010-08-25 Thread abhinav sarkar
I think what Stuart meant is that the class files compiled from the core clojure library will not be incide the clojure contrib uberjar. Only the class files compiled from the clojure contrib libs will be in there. On Wed, Aug 25, 2010 at 8:20 AM, ataggart alex.tagg...@gmail.com wrote: Pardon

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Don Jackson
On Aug 24, 2010, at 9:55 PM, Phil Hagelberg wrote: Thoughts? +1. The existing stack traces are pretty horrible. Phil's proposal, or something similar, would be a huge improvement. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Alf Kristian Støyle
I am a newcomer to the language, and to lisps in general, and having to interpret Clojure's stacktraces is really hard. It is one of those things that made me not want to use the language at all. It also makes it hard for me to recommend the language to others. It is not just the stacktraces, but

Re: Bug report: function metadata is broken

2010-08-25 Thread afranke
On 13 Jul., 12:03, Meikel Brandmeyer m...@kotka.de wrote: I'm not sure, though, why the metadata gets moved to the function on redefinition. Does anyone know why this is so? (defn foo [x] x) (defn foo [x y] (+ x y)) (:arglists (meta (var foo))) == ([x y]) (:arglists (meta foo)) == ([x])

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Peter Schuller
+1 on improving stack traces (though I haven't had experience with clj-stacktrace, other than what I have read on this list). -- / Peter Schuller -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Nicolas Oury
I haven't had a lot of problems with stack-traces. I would be happy to have more information on the context, though. And maybe better reporting of exception occuring in a delayed context. (when forcing a seq and the excpetion occurs under a lazy.) In this situation I have sometimes fonud that

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Shantanu Kumar
I agree with the point in discussion that the error messages in Clojure are more of a problem than stack traces per se. Regards, Shantanu On Aug 25, 5:02 pm, Nicolas Oury nicolas.o...@gmail.com wrote: I haven't had a lot of problems with stack-traces. I would be happy to have more information

Re: trouble using nested map fn

2010-08-25 Thread Glen Rubin
I'm glad my question generated so much discussion! Thank you all for the suggestions...it's all good stuff trying to wrap my head around and improve my facility with clojure. On Aug 24, 1:27 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, On 24 Aug., 03:08, gary ng garyng2...@gmail.com wrote:

Re: Clojure 1.2 and the Computer Language Benchmarks Game

2010-08-25 Thread John Fingerhut
I will try submitting one or a few of my benchmark programs created 1 year ago. For anyone that wants to look at some timing results and/or my source code used to achieve them before then, they are available on github here: http://github.com/jafingerhut/clojure-benchmarks I just pushed a few

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Stuart Halloway
The error messages are often the easiest the thing in the world to improve, even if you are new to contributing to Clojure. Most of the bad error messages are in the context of macroexpansion, so it is almost free (in performance terms) to add rigorous checks and error messages. Take a look at

misunderstanding collection

2010-08-25 Thread Glen Rubin
After toying around at the REPL I realize that I have been working with a heretofore invalid understanding of collections. For example, working with the following collection(s): signal: (((1 2 3 4) (2 3 4 5) (3 4 5 6)) ((3 4 5 6) (4 5 6 7) (5 6 7 8))) I wanted to sum each individual list: e.g.

Re: Clojure 1.2 and the Computer Language Benchmarks Game

2010-08-25 Thread Nicolas Oury
You can probably boost n-body on 1.2 by replacing arrays with deftypes. (definterface BodyIsh (^double getMass []) (setMass [^double x]) (^double getPosX []) .) (deftype Body [^double ^{:unsynchronized-mutable true} mass ^double ^{:unsynchronized-mutable true} posX .] BodyIsh

Re: misunderstanding collection

2010-08-25 Thread nickikt
clojure sees 'signal' as 2 collections thats wrong signals is one collection with two items. These happen to be collection but only the function that gets called by map carres what it gets. How can this (map #(map reduce + %) signal) work? (map ) does take 1 function and some collections

Re: misunderstanding collection

2010-08-25 Thread Meikel Brandmeyer
Hi, On 25 Aug., 16:06, Glen Rubin rubing...@gmail.com wrote: (map #(map reduce + %) signal) The error you got here is probably related to the inner map. It should probably read (map #(map (partial reduce +) %) signal) or (map (partial map #(reduce + %)) signal) Sincerely Meikel -- You

Re: misunderstanding collection

2010-08-25 Thread Joost
On Aug 25, 4:06 pm, Glen Rubin rubing...@gmail.com wrote: After toying around at the REPL I realize that I have been working with a heretofore invalid understanding of collections.  For example, working with the following collection(s): signal: (((1 2 3 4) (2 3 4 5) (3 4 5 6)) ((3 4 5 6) (4

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread David Jagoe
Ahoy, On 25 August 2010 15:46, Stuart Halloway stuart.hallo...@gmail.com wrote: *Specific* documentation of pain points also welcome. In general I haven't found the stack traces to be too much of a problem, but the lack of full paths in the trace has bitten me. Since all of my namespaces have

Re: misunderstanding collection

2010-08-25 Thread Luka Stojanovic
On Wed, 25 Aug 2010 16:06:15 +0200, Glen Rubin rubing...@gmail.com wrote: After toying around at the REPL I realize that I have been working with a heretofore invalid understanding of collections. For example, working with the following collection(s): signal: (((1 2 3 4) (2 3 4 5) (3 4 5 6))

Re: misunderstanding collection

2010-08-25 Thread David Jagoe
Ahoy, On 25 August 2010 16:06, Glen Rubin rubing...@gmail.com wrote: After toying around at the REPL I realize that I have been working with a heretofore invalid understanding of collections.  For example, working with the following collection(s): signal: (((1 2 3 4) (2 3 4 5) (3 4 5 6))

Re: misunderstanding collection

2010-08-25 Thread Meikel Brandmeyer
Hi, and again the for solution if nested anonymous functions are too hard to read. (for [signals signals-list] (map #(reduce + %) signals)) Sincerely Meikel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: misunderstanding collection

2010-08-25 Thread James Reeves
I think you're getting confused. (map reduce + %) won't work, because the signature of the map function is (map func colls). In other words, the second argument is expected to be a collection, but you've put in +, which is a function. When dealing with nested collections, you may want to work

Re: misunderstanding collection

2010-08-25 Thread David Sletten
Hi Glen, You have two separate problems here. The question of understanding collections isn't really that tricky. Your variable 'signals' is simply a 2-element list. Conceptually it's no different than: (a b). But in your case each element is itself a 3-element list. An equivalent would be:

Re: misunderstanding collection

2010-08-25 Thread nickikt
To bad we don't have a voting system like on stackoverflow would be nice to see witch answer got the most points. -- 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 Note that posts from new

Re: misunderstanding collection

2010-08-25 Thread Meikel Brandmeyer
I vote for James'. On 25 Aug., 16:42, nickikt nick...@gmail.com wrote: To bad we don't have a voting system like on stackoverflow would be nice to see witch answer got the most points. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: misunderstanding collection

2010-08-25 Thread gary ng
On Wed, Aug 25, 2010 at 7:06 AM, Glen Rubin rubing...@gmail.com wrote: After toying around at the REPL I realize that I have been working with a heretofore invalid understanding of collections.  For example, working with the following collection(s): signal: (((1 2 3 4) (2 3 4 5) (3 4 5 6))

Re: date serialization in clojure-contrib json

2010-08-25 Thread Dmitri
I added the *deserializers* atom, converted read-json-object to a macro (def *deserializers* (atom {})) (defn add-deserializer [k deserializer] (swap! *deserializers* #(assoc % k deserializer))) (defn remove-deserializer [k] (swap! *deserializers* #(dissoc % k))) (defmacro

Re: date serialization in clojure-contrib json

2010-08-25 Thread Dmitri
I posted the complete file on github here http://gist.github.com/549771 -- 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 Note that posts from new members are moderated - please be patient

Re: date serialization in clojure-contrib json

2010-08-25 Thread Stuart Sierra
Thanks, I'll give it a try. On Aug 25, 12:00 pm, Dmitri dmitri.sotni...@gmail.com wrote: I posted the complete file on github herehttp://gist.github.com/549771 -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Alan
I have the same problem, but you can usually figure that out by looking at the function to which the backtrace refers, as well as the filename: 4: clojure.lang.RT.nth(RT.java:722) 5: ddsolve.core$play_deal_strategically.invoke(core.clj:177) 6: ddsolve.core$eval2129.invoke(NO_SOURCE_FILE:1)

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Anders Rune Jensen
+1 the default stacktraces in clojure are one of the most off-putting things for new people (Besides the ) :-)). On Wed, Aug 25, 2010 at 6:55 AM, Phil Hagelberg p...@hagelb.org wrote: One of the most common complaints about the current implementation of Clojure is that the stack traces are

Re: help with native-jar files..

2010-08-25 Thread Saul Hazledine
On Aug 24, 4:43 pm, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Could not locate de/jreality/plugin/JRViewer__init.class or de/jreality/plugin/JRViewer.clj on classpath:   [Thrown class java.io.FileNotFoundException] I verified that the final jar that I created had JRViewer file it

bug?? extend Object compilation order dependency?

2010-08-25 Thread DeverLite
So if I do this in a clean REPL Clojure 1.2.0 user= (defprotocol Foo (bar [this x])) Foo user= (defrecord fooed [] Foo (bar [this x] (* 2 x))) user.fooed user= (defprotocol Foo (bar [this x])) Foo user= (extend-type Object Foo (bar [this x] (/ 2 x))) nil user= (def fooey (fooed.)) #'user/fooey

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread nchubrich
problem, but the lack of full paths in the trace has bitten me. Since all of my namespaces have a core.clj this can mean a bit of detective work to find which core.clj is being reported. +1 for that. -- You received this message because you are subscribed to the Google Groups Clojure group.

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread David Jagoe
On 25 August 2010 20:16, Alan a...@malloys.org wrote: I have the same problem, but you can usually figure that out by looking at the function to which the backtrace refers, as well as the filename:  4: clojure.lang.RT.nth(RT.java:722)  5:

Re: Clojure 1.3: Integrating clj-stacktrace?

2010-08-25 Thread Sreeraj a
+1 need to improve the present stacktrace, and error messages if clojure is to attract more noobs. On Wed, Aug 25, 2010 at 6:16 PM, Alan a...@malloys.org wrote: I have the same problem, but you can usually figure that out by looking at the function to which the backtrace refers, as well as the

Leiningen 1.3.0 - compile task problem

2010-08-25 Thread lprefontaine
Hi all, We are completing the migration to clojure and contrib 1.2. I am working on the packaging this week using leinigen 1.3 for acceptance tests. I download artifacts from Clojars and other maven repos using our archiva server here. I have a problem that I do not understand yet (slowly

Re: Leiningen 1.3.0 - compile task problem

2010-08-25 Thread Phil Hagelberg
On Wed, Aug 25, 2010 at 5:59 PM, lprefonta...@softaddicts.ca wrote: We are completing the migration to clojure and contrib 1.2. I am working on the packaging this week using leinigen 1.3 for acceptance tests. I download artifacts from Clojars and other maven repos using our archiva server

Please correct me if I'm wrong about the proxy macro

2010-08-25 Thread HB
Hey, I just want to be sure that I understand the proxy macro correctly. proxy macro is used to create a block of code that implements/extends Java interface/class , so we don't have to create Java object explicitly. Please correct me if I'm wrong. Thanks. -- You received this message because

Does Clojure has a compiler

2010-08-25 Thread HB
Hey, Both Groovy and Scala have a compiler to produce class files. Does Clojure has a compiler? Do Clojure files are compiled usually? Thanks. -- 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

Re: Does Clojure has a compiler

2010-08-25 Thread Sean Corfield
On Wed, Aug 25, 2010 at 7:17 PM, HB hubaghd...@gmail.com wrote: Both Groovy and Scala have a compiler to produce class files. Does Clojure has a compiler? Yup. See the recent thread called AOT compilation newbie mistakes for both the way to do it and some of the issues you may run into.

Re: Does Clojure has a compiler

2010-08-25 Thread Robert McIntyre
Yes, clojure has a compiler that can compile directly to class files. There's more information here: http://clojure.org/compilation and a short demo that you can try here: http://www.rlmcintyre.com/iassac-gouy.tar.bz2 or http://www.bortreb.com/iassac-gouy.tar.bz2 --Robert McIntyre On Wed, Aug

Re: bug?? extend Object compilation order dependency?

2010-08-25 Thread Stuart Halloway
I think the current behavior follows the principle of least surprise: (1) bar is a function, in whatever namespace the protocol Foo is defined in (2) you redefine bar (perhaps by reloading the file Foo is in) (3) you call bar and get the new behavior Remember that bar lives in Foo's namespace,

Re: Please correct me if I'm wrong about the proxy macro

2010-08-25 Thread ataggart
Yes, proxy returns an instance of whatever classes/interfaces you're extending/implementing. On Aug 25, 7:15 pm, HB hubaghd...@gmail.com wrote: Hey, I just want to be sure that I understand the proxy macro correctly. proxy macro is used to create a block of code that implements/extends Java

Re: Clojure 1.2 and the Computer Language Benchmarks Game

2010-08-25 Thread Isaac Gouy
On Aug 25, 6:17 am, John Fingerhut andy.finger...@gmail.com wrote: I will try submitting one or a few of my benchmark programs created 1 year ago. For anyone that wants to look at some timing results and/or my source code used to achieve them before then, they are available on github here:

Re: Clojure 1.2 and the Computer Language Benchmarks Game

2010-08-25 Thread Isaac Gouy
On Aug 25, 10:31 pm, Meikel Brandmeyer m...@kotka.de wrote: Hi, On 26 Aug., 05:37, Isaac Gouy igo...@yahoo.com wrote: 1) The command line requested for these first programs doesn't AOT compile so the measured time includes compiling the program. Which makes the comparison of languages