Re: When arithmetic on a computer bite back

2012-06-02 Thread Tassilo Horn
kawas laurent.joi...@gmail.com writes: I've checked with a python repl, the correct value seems to be the one using BigDecs from decimal import * Decimal('1.4411518807585587E17') / Decimal(2) Decimal('72057594037927935') I've submitted a bug and commented on it about BigDecimal

Re: When arithmetic on a computer bite back

2012-06-02 Thread Mark Engelberg
1.4411518807585587E17 ends in 0, and therefore when you divide by 2, it should end in 5. It's not a power of 2, it is a merely an inexact approximation of one. On Sat, Jun 2, 2012 at 2:31 AM, Tassilo Horn tass...@member.fsf.org wrote: Yes, you did. How can a power of two divided by two be

Re: [ANN] Leiningen 2.0.0-preview5 released

2012-06-02 Thread nick rothwell
I seem to not be getting an upgrade. :-( (I then followed the re-download instructions, and got preview4 again.) bash-3.2$ ~/lein2 upgrade The script at /Users/nick/lein2 will be upgraded to the latest preview version. Do you want to continue [Y/n]? Y Upgrading... % Total% Received %

Re: [ANN] Leiningen 2.0.0-preview5 released

2012-06-02 Thread Jim - FooBar();
Exactly the same thing happened to me! so I went in and changed manually the preview number in the lein script to get 5 again...However preview5 still ahs the JLine class issue at which point I gave up...I've got a local build of preview5 (from borkerdude on github) which works just fine so

Hooking up Postal to Amazon SES

2012-06-02 Thread rossputin
Hi Guys. Has anyone hooked Postal up to SES ? If so how ? 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 Note that posts from new members are moderated - please be patient with

Clojure code explanation tool?

2012-06-02 Thread Rich Morin
The received wisdom in most programming circles is that comments should explain intent, rather then simply transliterating the code into a human language (eg, English). For example, comments like this are discouraged: (def a 42);; Define a to be 42. However, as a Clojure noob, I would

clojure.java.jdbc byte[] result type question

2012-06-02 Thread rossputin
Hi. I've got a clojure.java.jdbc result coming back as a byte[]. Its from a GROUP_CONCAT on an int(10) field. In the mysql client the result is: '1,2,4,6,7,19,24,32,54,152'. I am unsure how to extract this result properly in clojure… (println (seq (somevar))) gives me an unexpected result: (49

lazy-cat infinite realization on empty seq

2012-06-02 Thread michaelr524
Hi, This has probably been asked a million times but I couldn't find anything. Why the following triggers infinite realization of the infinite lazy seq and how I can work around it and make it stop when f1 returns an empty seq, (defn f1 [] (println hello) []) (defn f2 [] (lazy-cat (f1) (f2)))

Re: Clojurians in Austria

2012-06-02 Thread gas
hi, i'm located in Vienna too and very much interested in meeting austrian clojurians as well. regards, gerhard Am Dienstag, 29. Mai 2012 19:20:02 UTC+2 schrieb bsmith.occs: I too am in Vienna. I use Clojure at work for a few small internal tools, but not in production. I'd be glad to meet

Using Clojure internal libraries in another project

2012-06-02 Thread Edward Yang
Hello all, We're interested in using some of Clojure's internal libraries (in particular, it's STM implementation), in the runtime for another programming language. We were wondering if anyone had attempted this before, and if there are any things to keep in mind along the way. Cheers, Edward

Re: Suggestions for using MPI in Clojure

2012-06-02 Thread Guillermo López
On Thursday, February 9, 2012 4:52:15 AM UTC+1, Brent Millare wrote: From what I've seen, MPI in java is not good performance wise. You take a huge hit due to all the copying. To get good cluster performance in java, you need to use something like Java Fast Sockets.

Using Clojure internal libraries in another project

2012-06-02 Thread ezy...@streambase.com
Hello all, We're interested in using some of Clojure's internal libraries (in particular, it's STM implementation), in the runtime for another programming language. We were wondering if anyone had attempted this before, and if there are any things to keep in mind along the way. Cheers, Edward

Re: Clojure code explanation tool?

2012-06-02 Thread Alex Baranosky
It's not what you are asking for, but it is a nice resource, with examples and such: clojuredocs.org On Sat, Jun 2, 2012 at 12:12 AM, Rich Morin r...@cfcl.com wrote: The received wisdom in most programming circles is that comments should explain intent, rather then simply transliterating the

Re: Can we use Clojure like a general library in Java?

2012-06-02 Thread Sean Corfield
On Fri, Jun 1, 2012 at 5:53 PM, Qihui Sun qihui@gmail.com wrote: So I am interested,if Clojure can be used like a general library in Java,it will beat above libraries and be awesome ! Yes, you can instantiate clojure.lang.RT inside your Java code and load, compile and invoke Clojure code,

Re: Can we use Clojure like a general library in Java?

2012-06-02 Thread Philip Potter
Yes it can! It's just a jar file after all, so you can use the classes in your java program if you like. However, clojure data structures typically do not use static typing as java uses it. For example, PersistentVector is a collection of Objects and not genericized. Getting things out of such a

Future milestones of ClojurescriptOne ?

2012-06-02 Thread Murtaza Husain
Hi, Are there any plans to release further milestones of ClojureScriptOne, its an awesome project, and a great learning tool. I see the current milestone of M003 has also not been released. Thanks, Murtaza -- You received this message because you are subscribed to the Google Groups Clojure

Re: Learning clojure: debugging?

2012-06-02 Thread Sean Corfield
On Fri, Jun 1, 2012 at 11:18 AM, Abraham Egnor abe.eg...@gmail.com wrote: I'm early in the process of learning clojure, and am hoping that the community has suggestions for a frustration I've run into. ... I eventually tracked it down by evaluating each subexpression of line - the root bug is

Re: clojure.java.jdbc byte[] result type question

2012-06-02 Thread Sean Corfield
On Fri, Jun 1, 2012 at 5:26 AM, rossputin rossaj...@gmail.com wrote: I've got a clojure.java.jdbc result coming back as a byte[].  Its from a GROUP_CONCAT on an int(10) field. In the mysql client the result is: '1,2,4,6,7,19,24,32,54,152'. Looks like a string? (coming back as a byte array)

Re: Learning clojure: debugging?

2012-06-02 Thread Moritz Ulrich
On Fri, Jun 1, 2012 at 8:18 PM, Abraham Egnor abe.eg...@gmail.com wrote: Is there some technique I'm not seeing to make this kind of simple typo-based error less of a hassle to track down?  Or is this simply a matter of getting better at deciphering the stack traces? I think one important

Re: Learning clojure: debugging?

2012-06-02 Thread Sean Corfield
On Sat, Jun 2, 2012 at 2:34 PM, Moritz Ulrich ulrich.mor...@googlemail.com wrote: I think one important point here is that you use two different data structures to hold the same kind of data. Points and deltas are not the same kind of data. Yes, they both have x/y/z values but their meaning is

Re: Learning clojure: debugging?

2012-06-02 Thread Softaddicts
clojure.tools.trace beats println by far (biased advice, I maintain it:))) It's also easier to segregate between debug and normal output in the code. You can enable/disable fn tracing dynamically from the REPL for all fns in a given namespace. I seldom use a debugger. When I do it's to dive

Re: Learning clojure: debugging?

2012-06-02 Thread Vinzent
BTW, you may want to use clojure-contracts ( https://github.com/dnaumov/clojure-contracts) instead of asserts or :pre\:post in order to get much nicer and informative error reporting. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: Learning clojure: debugging?

2012-06-02 Thread Sean Corfield
On Sat, Jun 2, 2012 at 5:22 PM, Vinzent ru.vinz...@gmail.com wrote: BTW, you may want to use clojure-contracts (https://github.com/dnaumov/clojure-contracts) instead of asserts or :pre\:post in order to get much nicer and informative error reporting. Or keep an eye on

Re: Can we use Clojure like a general library in Java?

2012-06-02 Thread Qihui Sun
Thanks above two reply. As Sean Corfield said,it is a bit complex.If there is a command option,ONE TIME do this,it will more convenient. For example: java -jar clojure-1.5.0.jar -genclasses,will produce clojure-lib-1.5.0.jar,and it is genericized as Philip Potter mentioned! Maybe Clojure as a

Re: Can we use Clojure like a general library in Java?

2012-06-02 Thread Sean Corfield
On Sat, Jun 2, 2012 at 7:31 PM, Qihui Sun qihui@gmail.com wrote: For example: java -jar clojure-1.5.0.jar -genclasses,will produce clojure-lib-1.5.0.jar,and it is  genericized as Philip Potter mentioned! Sounds like what you want is Leiningen, to generate an uberjar, optionally with

[ANN] Leiningen 2.0.0-preview6 released

2012-06-02 Thread Phil Hagelberg
On Thu, May 31, 2012 at 10:11 PM, Phil Hagelberg p...@hagelb.org wrote: I'm happy to announce the release of Leiningen 2.0.0-preview5. I've just pushed out 2.0.0-preview6; sorry for the inconvenience. ## 2.0.0-preview6 / 2012-06-01 * Allow lookup of :repositories credentials from environment