Re: A bearded person, Clojure and JavaFX

2012-12-06 Thread Christian Sperandio
I thank you and Dave for your lights about JavaFX. You motivated me to continue testing JavaFX. I think my main error is to try write code in Java and then translate this code into clojure. Chris Le 6 déc. 2012 à 01:08, Stephen Compall stephen.comp...@gmail.com a écrit : On Dec 5, 2012 6:38

Re: A bearded person, Clojure and JavaFX

2012-12-06 Thread john
Hi Christian, I am kind of also writing a little GUI application. I also had to make the choice between swing and javafx . I am going with javaFX because I just love the transistion animations and styling with CSS. I actually think that actual APIs of the GUI Components and Event handling

list of list to argument list

2012-12-06 Thread Amir Wasim
I am trying to use insert-values with value-groups which works like the following (sql/with-connection (db-connection) (sql/insert-values table-name [id val] [2 B][3 C])) here [2 B][3 C] is with two value groups the problem is i have list of list [[2 B][3 C]] and i want to convert it

list of lists to list of arguments

2012-12-06 Thread Amir Wasim
I am trying to use insert-values with value-groups which works like the following (sql/with-connection (db-connection) (sql/insert-values table-name [id val] [2 B][3 C])) here [2 B][3 C] is with two value groups the problem is i have list of list [[2 B][3 C]] and i want to convert it

Re: list of lists to list of arguments

2012-12-06 Thread Baishampayan Ghose
How about using apply? For example - (sql/with-connection (db-connection) (apply sql/insert-values table-name [id val] [[2 B][3 C]])) Does that work? -BG On Thu, Dec 6, 2012 at 4:48 PM, Amir Wasim amir.wa...@gmail.com wrote: I am trying to use insert-values with value-groups which

Re: list of lists to list of arguments

2012-12-06 Thread Amir Wasim
On Thursday, December 6, 2012 12:18:05 PM UTC+1, Amir Wasim wrote: I am trying to use insert-values with value-groups which works like the following (sql/with-connection (db-connection) (sql/insert-values table-name [id val] [2 B][3 C])) here [2 B][3 C] is with two value groups

Re: list of lists to list of arguments

2012-12-06 Thread Amir Wasim
hey, thanks, it works. Did not know/think apply can be used in this situation. Regards, Amir On Thursday, December 6, 2012 12:19:28 PM UTC+1, Baishampayan Ghose wrote: How about using apply? For example - (sql/with-connection (db-connection) (apply sql/insert-values table-name

Re: Default random in Clojure doesn't seem to fit fp paradigm

2012-12-06 Thread Stuart Sierra
The data.generators library has versions of these functions that use a fixed seed and a rebindable Random instance. https://github.com/clojure/data.generators -S -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Default random in Clojure doesn't seem to fit fp paradigm

2012-12-06 Thread Asim Jalis
On Thu, Dec 6, 2012 at 5:40 AM, Stuart Sierra the.stuart.sie...@gmail.comwrote: The data.generators library has versions of these functions that use a fixed seed and a rebindable Random instance. https://github.com/clojure/data.generators Looking at

CCW: compile class static method call for a class that cannot be loaded

2012-12-06 Thread Vladimir Tsichevski
Hi, I'm using CCW to compile Clojure to java classes. I have to compile a static class method call like this: (MyClass/myMethod arg1 ...) To compile this the compiler needs to load the MyClass class. The problem is that in my case some classes can only be loaded in the running application.

Injecting new clojure.core functions into third-party libraries

2012-12-06 Thread Brian Marick
I want the next version of Midje to continue to support Clojure 1.3. I also want to use `leiningen.core.project`. `leiningen.core.project` uses `ex-info`, which was introduced in 1.4. I want to write my own version of `ex-info` and put it into `clojure.core` when we're running under 1.3 --- in

Re: Injecting new clojure.core functions into third-party libraries

2012-12-06 Thread Brian Marick
On Dec 6, 2012, at 10:41 AM, Brian Marick wrote: (ns midje.repl (:require ... midje.util.backwards-compatible-utils [leiningen.core.project :as project] It worked to remove the modification to core from `m.u.backwards-compatible-utils` to the body

Re: CCW: compile class static method call for a class that cannot be loaded

2012-12-06 Thread Herwig Hochleitner
In clojure, as in java, you can compile against a stub class and run against the real class with the same signature. 2012/12/6 Vladimir Tsichevski tsichev...@gmail.com Hi, I'm using CCW to compile Clojure to java classes. I have to compile a static class method call like this:

Re: Injecting new clojure.core functions into third-party libraries

2012-12-06 Thread Brian Marick
(Actually, previous was wrong. The `in-ns` calls seem to have to be at the top level, as in: (in-ns 'clojure.core) (if-not (resolve 'ex-info) (defn ex-info ...) (in-ns 'midje.repl) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional

Re: Injecting new clojure.core functions into third-party libraries

2012-12-06 Thread Meikel Brandmeyer (kotarak)
Hi, Am Donnerstag, 6. Dezember 2012 17:41:24 UTC+1 schrieb Brian Marick: (when (ecosystem/clojure-1-3?) (in-ns 'clojure.core) (defn ex-info ...) (in-ns 'midje.util.backwards-compatible-utils)) Why not? What should I do instead? Without having looked at the

Re: Docs on standard protocols

2012-12-06 Thread Dmitry Groshev
Thanks a lot! On Tuesday, November 27, 2012 4:15:55 PM UTC+4, Chas Emerick wrote: Having a good Java IDE around (e.g. Eclipse or IntelliJ) certainly helps, though not so much in developing a comprehensive mental model of how everything fits together. Some years ago, Chris Houser worked

Re: Default random in Clojure doesn't seem to fit fp paradigm

2012-12-06 Thread Stuart Halloway
Yes, that fix needs to be made, patch welcome. I also have considered making a protocol for random so that (1) other impls can be used and (2) easier to port to ClojureScript. Stu On Thu, Dec 6, 2012 at 9:15 AM, Asim Jalis asimja...@gmail.com wrote: On Thu, Dec 6, 2012 at 5:40 AM, Stuart

Is There An Upcoming Book On Clojure Macros?

2012-12-06 Thread octopusgrabbus
I have most of the Clojure text books available, and have found them all to be quite good. Each one seems to have a different focus, which, depending on the problem at the time, shines light on my particular problem du jour. IMHO, while the current crop of books is quite good, none that I've

Re: Is There An Upcoming Book On Clojure Macros?

2012-12-06 Thread Andy Fingerhut
Paul Graham's On Lisp is available for free here: http://www.paulgraham.com/onlisp.html It is definitely focused on Common Lisp, not Clojure, and there are differences between the way symbols and namespaces (Clojure) and packages (Common Lisp) are handled in those two languages that make some

Re: Is There An Upcoming Book On Clojure Macros?

2012-12-06 Thread ericClojure
Here's someone who's translating Paul Graham's On Lisp to Clojure: http://onbeyondlambda.blogspot.com/search?q=on+lisp Some of the authors of Clojure books have done translations as well, although the translations I saw stopped a few chapters in. On Thursday, December 6, 2012 1:44:46 PM UTC-5,

Re: CCW: compile class static method call for a class that cannot be loaded

2012-12-06 Thread Vladimir Tsichevski
Hi Herwig, thank you, you are probably right, but it writing new classes solely for that purpose seemes a bit too tedious task. I found another solution: pre-load problematic classes without initializing them, and explicitly register them in namespaces: (.importClass

Re: A bearded person, Clojure and JavaFX

2012-12-06 Thread Vladimir Tsichevski
Take a look at Eclipse RCP. It is much more than just a set of widgets. On Thursday, December 6, 2012 3:38:45 AM UTC+4, Christian Sperandio wrote: Hi, I'm one of those bearded (Lin)Unixians person who love the black screen. I'm closer to back-office than front-office (it's may be my (too)

[ANN] Immutant 0.7.0 released

2012-12-06 Thread Jim Crossley
We released Immutant 0.7.0 today, along with 0.14.0 of the lein-immutant plugin. It's mostly bug fixes and docs, but a couple of changes may break you: * We did away with the immutant.clj initialization file. Instead, we look on the classpath for an 'immutant.init' namespace. * We now

Re: How to log a precondition in clojure 1.3

2012-12-06 Thread Jason Bennett
I hate to resurrect a dead thread, but I've been dealing with the same problem. Pre/postconditions throw an Error, not an exception, meaning you have to catch Throwable instead. This would violate most all good practice in Java/JVM programming. Are pre/postconditions just not designed for

Re: [ANN] sublime-lispindent, clojure indenting for sublime text 2

2012-12-06 Thread Anton Holmberg
This is so awesome! You are my hero. Been searching for this for a while now. Den måndagen den 12:e november 2012 kl. 17:25:38 UTC+1 skrev Jonathan Fischer Friberg: Dear clojure mailing list, As the indenting for clojure (and lisp in general) was very lacking in sublime, I decided to make

Re: [lein-cljsbuild] exclude a cljs from compilation

2012-12-06 Thread Mimmo Cosenza
Hi Evan, just to let you that I submitted on clojurescript repo the patch to exclude a file and/or a directory of cljs from compilation. the new compiler option is :exclude and accepts both a name of a file or directory o a vector of files and/or directories. Hope it helps mimmo On Nov

Re: [ANN]First toy-project : CYASUS

2012-12-06 Thread Stephen Compall
On Tue, 2012-11-27 at 05:27 +0100, Fabien Bourgeois wrote: I think there are million of things wrong in CYASUS. If some of yourselves have a little time to spend, I will be very happy to have feedbacks or every advice about : Here are some things. ; Copyright (c) 2012 Fabien Bourgeois

Re: [ANN] vectorz-clj - high performance vector maths for Clojure

2012-12-06 Thread Mikera
Good question. I had a look at javax.vecmath, which is actually pretty good for a lot of purposes. Eventually I decided against using it (believe me, it would have been nice to re-use it so this was not a decision I took lightly!) Here were the main issues: - No support for large vectors /

Re: [ANN] vectorz-clj - high performance vector maths for Clojure

2012-12-06 Thread Mikera
Great, let me know how it goes! I just pushed matrix support today (v0.1.0), so hopefully that will make it usable for most game purposes. Though you might need to dip into the Java occasionally until I've build out the full Clojure API. Let me know if you run into any API issues, I'm keen to

Re: [lein-cljsbuild] exclude a cljs from compilation

2012-12-06 Thread Evan Mezeske
Yeah, I saw that. Very cool stuff! Glad you could contribute. On Thursday, December 6, 2012 7:14:21 PM UTC-8, Mimmo Cosenza wrote: Hi Evan, just to let you that I submitted on clojurescript repo the patch to exclude a file and/or a directory of cljs from compilation. the new compiler