Re: {ANN} Project Docs and Examples ... at the Alcove

2012-06-25 Thread Vinzent
One thing I forgot to mention: it'd be nice to have Marginalia support, since it can be used not only for annotated source code, but also for documentation with embedded tests (although, two-column layout doesn't fit very well for this purpose, but it's another question). That's true. The

Re: How to convert a python list to clojure?

2012-06-25 Thread hyPiRion
On Sunday, June 24, 2012 12:30:48 PM UTC+2, Vinzent wrote: I think versions with `for` is a hell more readable. I vote for this: (def cc (for [i (range 256)] (.GetColor ctf (/ i 255.0 Yeah, that's about as succinct as it gets. Just be aware that the list is immutable, so

Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-25 Thread mnicky
On Saturday, June 23, 2012 1:20:30 AM UTC+2, Niels van Klaveren wrote: I was thinking if an SQL generation DSL / library could be based on core.logic ? Something like revival of clojure.contrib.datalog would be great. -- You received this message because you are subscribed to the

verify that a fn throws an exception via testing?

2012-06-25 Thread Jim - FooBar();
Hey guys, the only thing I can think of in order to test whether a fn does indeed throw an exception when certain circumstances are met is something like this: (fact (try (fn-that-throws-exc bad-arg) (catch Exception e :works)) = :works) I thought I can also return the actual

Re: verify that a fn throws an exception via testing?

2012-06-25 Thread Ambrose Bonnaire-Sergeant
This comment outlines everything clojure.test can do. It's a quick read, see thrown? and thrown-with-msg?. https://github.com/clojure/clojure/blob/master/src/clj/clojure/test.clj#L22 Thanks, Ambrose On Mon, Jun 25, 2012 at 7:21 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: Hey guys, the

Re: verify that a fn throws an exception via testing?

2012-06-25 Thread Tassilo Horn
Jim - FooBar(); jimpil1...@gmail.com writes: Hi Jim, the only thing I can think of in order to test whether a fn does indeed throw an exception when certain circumstances are met is something like this: (fact (try (fn-that-throws-exc bad-arg) (catch Exception e :works)) = :works)

Re: verify that a fn throws an exception via testing?

2012-06-25 Thread Jim - FooBar();
On 25/06/12 12:31, Tassilo Horn wrote: Jim - FooBar(); jimpil1...@gmail.com writes: Hi Jim, the only thing I can think of in order to test whether a fn does indeed throw an exception when certain circumstances are met is something like this: (fact (try (fn-that-throws-exc bad-arg)

Re: [ANN] clojure.java.jdbc 0.2.3 available on Maven Central

2012-06-25 Thread Niels van Klaveren
You can use the Datomic datalog implementation to query Clojure collectionshttps://gist.github.com/2645453. I think this is the same use clojure.contrib.datalog had. On Monday, June 25, 2012 12:47:29 PM UTC+2, mnicky wrote: On Saturday, June 23, 2012 1:20:30 AM UTC+2, Niels van Klaveren

Re: verify that a fn throws an exception via testing?

2012-06-25 Thread Tassilo Horn
Jim - FooBar(); jimpil1...@gmail.com writes: Hi Jim, I'm using midje... Ah, ok. Midje seems to support that, too. See https://github.com/marick/Midje/wiki/Prerequisites-that-throw-exceptions Bye, Tassilo -- You received this message because you are subscribed to the Google Groups

Re: verify that a fn throws an exception via testing?

2012-06-25 Thread Jim - FooBar();
On 25/06/12 13:03, Tassilo Horn wrote: Jim - FooBar(); jimpil1...@gmail.com writes: Hi Jim, I'm using midje... Ah, ok. Midje seems to support that, too. See https://github.com/marick/Midje/wiki/Prerequisites-that-throw-exceptions Bye, Tassilo excellent! Thanks Tassilo :-) Jim

Re: Anyone using Sublime Text 2 + SumblimeREPL with Windows?

2012-06-25 Thread Jacobo Polavieja
Unfortunately, I'm not sure what else to suggest as far as SublimeREPL. But since you're new to Sublime, I'll assume you're not that heavily invested in it yet? If you simply can't get SublimeREPL up and running, there are other choices to look at. Counterclockwise

Re: Anyone using Sublime Text 2 + SumblimeREPL with Windows?

2012-06-25 Thread Jacobo Polavieja
Hi again! On the debate side, I'm pretty aware of the flames that usually develop and I've read lots of them: I'm not willing to initiate another one, hehe! The thing about sublime is that it's light enough and not so hard as emac or Vim. I've read several Chas Emerick opinions on the

Re: Anyone using Sublime Text 2 + SumblimeREPL with Windows?

2012-06-25 Thread Jacobo Polavieja
Well, I thought I had specified in the title my problem with sending commands to SublimeREPL, but as I did it badly and wasn't so specific, I guess I can put my las problem in this very thread. As we know, Sublime saves the session you're in and restores it everytime you open Sublime again.

Re: {ANN} Project Docs and Examples ... at the Alcove

2012-06-25 Thread John Gabriele
On Jun 25, 2:36 am, Vinzent ru.vinz...@gmail.com wrote: Honestly, what I'd really appreciate is a full-blown community site, kind of mix between clojure-toolbox, clojuredocs and emacswiki. I like clojure-toolbox. It's categorization of projects is quite useful, IMO. -- You received this

Re: How I can convert this python line to clojure?

2012-06-25 Thread Robert Levy
I haven't tried VTK, but you might find my clojure-python lib useful. It's something I spent a little bit of time on a couple years ago, and have been meaning to get back to it to improve it and turn it into a robust and respectable library ;), but I haven't had a need for Jython interop in

Re: How I can convert this python line to clojure?

2012-06-25 Thread Lars Nilsson
On Sun, Jun 24, 2012 at 4:07 PM, Antonio Recio amdx6...@gmail.com wrote: The python line that I have rote before is not the one that I want to convert. The correct python line is this, and the result is 0. How I can convert it to clojure? print vtkDataSetAttributes.SCALARS ;= 0 Not sure if

Re: How I can convert this python line to clojure?

2012-06-25 Thread Antonio Recio
@Lars Nilsson: I doesn't work. user= (println vtkDataSetAttributes$AttributeTypes/SCALARS) #CompilerException java.lang.RuntimeException: No such namespace: vtkDataSetAttributes$AttributeTypes, compiling:(REPL:4) user= (println vtk.vtkDataSetAttributes$AttributeTypes/SCALARS)

Re: [ANN] milieu - the environmentally friendly configuration tool (version 0.5.0)

2012-06-25 Thread Softaddicts
I think of Clojure configuration expressions as being human editable/readable, testable in a few seconds (cutpaste in the REPL) and concise, However, I do agree that anything is better than XML :) Bad choice of words maybe ? Luc It's a holiday here I have some time to tease you a bit :) Hi

ANN: lein-guzheng 0.3.1

2012-06-25 Thread David Greenberg
In this release, I've fixed the bugs related to midje, so that lein-guzheng should be usable with lazytest. It now works by hooking clojure.core/require, and providing an alternative loading mechanism for instrumented namespaces. It is compatible with lein1 lein2, and has a test suite on

Re: verify that a fn throws an exception via testing?

2012-06-25 Thread Brian Marick
On Jun 25, 2012, at 6:21 AM, Jim - FooBar(); wrote: (fact (try (fn-that-throws-exc bad-arg) (catch Exception e :works)) = :works) (fact (fn-that-throws-exc bad-arg) = (throws Exception)) You can also check the message, run a predicate over the exception, etc.

Re: [ANN] milieu - the environmentally friendly configuration tool (version 0.5.0)

2012-06-25 Thread Robert Levy
Yes, I think we can all agree on that. My point about editability/readability was specifically w/rt YAML vs JSON, but my argument for YAML vs reader is all about the decoupling of config from language specifics to make it so that not everyone who edits config needs to know what a REPL is. ;) On

What are people using for distributed workers?

2012-06-25 Thread mstump
I'm curious as to what people are using for workers/queues. We're currently using storm, but im interested in evaluating alternatives. Things I like about storm: * Upload a jar and it automatically distributes the code to all worker nodes. * Easy to write/reuse topologies without horribly

Re: How I can convert this python line to clojure?

2012-06-25 Thread Lars Nilsson
I didn't have Java vtk available so I just based it on EnumTest.java: public class EnumTest { public enum Attr { Foo, Bar, Baz } } javac EnumTest.java Clojure: = (import 'EnumTest) EnumTest = EnumTest$Attr/Foo #Attr Foo After having compiled VTK and extracted the content in vtk.jar, I see

Re: What are people using for distributed workers?

2012-06-25 Thread Phil Hagelberg
mstump mrevilgn...@gmail.com writes: I'm curious as to what people are using for workers/queues. We're currently using storm, but im interested in evaluating alternatives. If you can make your workflow fit, it's hard to beat the simplicity of sending expressions over a message queue like

Re: What are people using for distributed workers?

2012-06-25 Thread Softaddicts
Hi, our first release used ActiveMQ and a plethora of frameworks. We soon realize that it is was killing us. Our product runs on small clusters or should I say on clusters of small footprint nodes. For intra cluster stuff, external messaging softwares are to us an overkill so far. They come

Re: What are people using for distributed workers?

2012-06-25 Thread thenwithexpandedwingshesteershisflight
how about Lamina http://github.com/ztellman/lamina ? -- 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 your first post.

Re: [ANN] milieu - the environmentally friendly configuration tool (version 0.5.0)

2012-06-25 Thread Robert Levy
I actually hadn't thought of this use case, but I was asked if this was possible. In version 0.6.0 which I just pushed (clj-yaml emits seqs when it gets yaml vectors, which the change corrects for), you can access values in config like this: dev: fou: - barre: - mary: 8-)

Re: lein-daemon 0.3

2012-06-25 Thread Joao_Salcedo
On Thursday, May 12, 2011 2:18:57 PM UTC+10, Allen Rohner wrote: I've released a new version of lein-daemon. daemon is like 'lein run', only it runs the process in the background rather than blocking. 0.3 and up is a complete re-write, that no longer depends on apache commons daemon.

Re: {ANN} Project Docs and Examples ... at the Alcove

2012-06-25 Thread John Gabriele
On Jun 24, 11:32 pm, John Gabriele jmg3...@gmail.com wrote: Opinions? Concerns? Wild praise? Searing complaints? General disinterest? Hi all, Thanks to feeback --- both here and elsewhere. A handful of points are now clear: * It probably *is* too much trouble to ask folks to fork send a

Re: {ANN} Project Docs and Examples ... at the Alcove

2012-06-25 Thread Michael Klishin
John Gabriele: So, it now seems that the alcove --- in its current incarnation --- is not as useful as I'd originally thought. I'm going to remove it, and instead focus on helping make sure projects on Clojars have their :url and :description in order. John, Please don't get discouraged.

Buggy FP behavior with Clojure 1.3

2012-06-25 Thread Cedric Greevey
user= 1e308 1.0E308 user= (* 10.0 1e308) Infinity user= 1e309 Infinity Whuh? Double precision exponents should go up to 1023 and single precision shouldn't go above 127. There's no floating point format in commonplace use that maxes out its exponent at 308. What is going on here? -- You

Re: {ANN} Project Docs and Examples ... at the Alcove

2012-06-25 Thread John Gabriele
On Jun 25, 11:58 pm, Michael Klishin michael.s.klis...@gmail.com wrote: Please don't get discouraged. Thanks for the kind words, Michael! :) Not discouraged, but rather, I want to make best use of existing resources. There are similar services (readthedocs.org, rubydoc.info) and they took a

Re: {ANN} Project Docs and Examples ... at the Alcove

2012-06-25 Thread Phil Hagelberg
On Mon, Jun 25, 2012 at 9:52 PM, John Gabriele jmg3...@gmail.com wrote: I agree that great docs are a top priority, however, the way they're currently being provided for external Clojure projects seems to be pretty good for the time being. I mean, most Clojure projects are using github, and

Re: Buggy FP behavior with Clojure 1.3

2012-06-25 Thread Sean Corfield
On Mon, Jun 25, 2012 at 9:19 PM, Cedric Greevey cgree...@gmail.com wrote: user= 1e309 Infinity FWIW, on 1.4.0 I get: user= 1e309 CompilerException java.lang.RuntimeException: Unable to resolve symbol: Infinity in this context, compiling:(NO_SOURCE_PATH:1) -- Sean A Corfield -- (904) 302-SEAN

Re: Buggy FP behavior with Clojure 1.3

2012-06-25 Thread dennis zhuang
user= Double/MAX_VALUE 1.7976931348623157E308 2012/6/26 Sean Corfield seancorfi...@gmail.com On Mon, Jun 25, 2012 at 9:19 PM, Cedric Greevey cgree...@gmail.com wrote: user= 1e309 Infinity FWIW, on 1.4.0 I get: user= 1e309 CompilerException java.lang.RuntimeException: Unable to

Re: ANN: lambic v. 0.1.0

2012-06-25 Thread Tom Faulhaber
+1 I've always thought that this sort of thing should be more decorative and transparent with the tools we have in Clojure, core.match, and core.logic. This is a neat way to proceed. I'll be keeping my eyes on your progress! Tom On Thursday, June 14, 2012 4:44:10 PM UTC-7, rob wrote: This

Re: Buggy FP behavior with Clojure 1.3

2012-06-25 Thread Cedric Greevey
On Tue, Jun 26, 2012 at 1:11 AM, Sean Corfield seancorfi...@gmail.com wrote: On Mon, Jun 25, 2012 at 9:19 PM, Cedric Greevey cgree...@gmail.com wrote: user= 1e309 Infinity FWIW, on 1.4.0 I get: user= 1e309 CompilerException java.lang.RuntimeException: Unable to resolve symbol: Infinity in

Re: Buggy FP behavior with Clojure 1.3

2012-06-25 Thread Leif
user Double/MAX_VALUE 1.7976931348623157E308 From http://docs.oracle.com/javase/6/docs/api/java/lang/Double.html : A constant holding the largest positive finite value of type double, (2-2^ -52)·2^1023. It is equal to the hexadecimal floating-point literal 0x1.fP+1023 and also equal

Re: Buggy FP behavior with Clojure 1.3

2012-06-25 Thread dennis zhuang
Added a postfix M to make the number as BigDecimal or N as a BigInteger: user= 1e308M 1E+308M user= (class 1e308M) java.math.BigDecimal user= (* 10.0 1e108M) 1.0E109 2012/6/26 Cedric Greevey cgree...@gmail.com On Tue, Jun 26, 2012 at 1:11 AM, Sean Corfield seancorfi...@gmail.com wrote: On