Re: ANN: a Clojure docs site, and github organization

2012-10-07 Thread nchurch
Just to keep in touch with our marvelous legal systems in North America, read this: ... how much I am frustrated by this shattered world Indeed! The law is nothing but an overly complex, haphazardly designed, historically encrufted programming language for morals. Its compiler is

Re: Some Friend documentation and regarding documentation in general

2012-10-07 Thread Dave Della Costa
Hi Chas, Great, I'm glad you think this is a useful contribution, and thanks for the encouraging words! To address some specific points: I know that Friend's docs are particularly dense, especially for anyone that just wants to use the stuff. That's probably due to my using the docs to

Preferred business rules engines in or used by Clojure?

2012-10-07 Thread Grant Rettke
Hi, May you please share your experience or preferences for rules engines written in or used from Clojure? My goal is to: 1. Allow rule definitions separate from the code (though I view rule definitions as programming to be performed by the programmer). 2. Allow rules to be defined in modules.

Re: [CFP] October Amsterdam Clojure -- Saturday October 27

2012-10-07 Thread skuro
Hi all, The final schedule is finally online and registrations are open (the event is completely FREE to attend, but seating is limited). A full day of Clojure fun, with speakers coming from all over Europe. Check out the details at: http://amsclj.nl/october.html

Re: Preferred business rules engines in or used by Clojure?

2012-10-07 Thread Marc Dzaebel
http://www.jboss.org/drools is a suite of tools. ~100 man years were necessary for this open source tool. I would not try to reimplement it in Clojure, but it's Java :-) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

apply: increase performance by 60% for fixed length

2012-10-07 Thread Marc Dzaebel
*apply *is slow. However you can increase performance by 60% with the following macro, if you have a fixed length in S. (defmacro *applyn *[n f s] (loop [curr `(list* ~@s), n n, vars[] vals[]] (if(pos? n) (let[v(gensym)] (recur v (dec n) (conj(conj vars v)

How do ClojureScript protocol functions work?

2012-10-07 Thread Timothy Baldridge
While digging through the CLJS sources I've seen that protocols use some sort of odd bitmask optimization. Is this documented anywhere? Or as a more general question, is the way protocols are implemented in CLJS documented at all? Thanks, Timothy -- You received this message because you are

Re: apply: increase performance by 60% for fixed length

2012-10-07 Thread Alan Malloy
This is nonsense. If s is fixed-size at compile-time, you would never use apply to begin with. Why bother with (applyn 10 + [1 2 3 4 5 6 7 8 9 10]) when you could just write (+ 1 2 3 4 5 6 7 8 9 10)? On Sunday, October 7, 2012 2:15:28 PM UTC-7, Marc Dzaebel wrote: *apply *is slow. However you

Re: optimized clojurescript-js file throws exception but debug version does not?

2012-10-07 Thread David Nolen
On Sat, Oct 6, 2012 at 11:14 PM, Andrew ache...@gmail.com wrote: What about the --output_wrapper part? My clojurescript js never calls the minified foreign library directly: What I have is [1] some plain non-optimized javascript that calls [2] CodeMirror for the code and position, then calls

mysql unix domain connection

2012-10-07 Thread Brian Craft
I'm trying to use clojure.java.jdbc to connect to a mysql server. So far it only gives me connection errors. I suspect it's trying to connect over tcp/ip instead of unix domain sockets (which are preferred by mysql for local connections). Can it make a unix domain connection? -- You received

cli latency

2012-10-07 Thread Brian Craft
The two second delay to... do anything... is making... me crazy. I should probably be asking this on a java forum. I'm evaluating clojure for a project that needs some number of cli tools (as well as server and browser code) to be delivered to customers. Are there any good solutions to

compiler: throw Error instead of a string?

2012-10-07 Thread Michal Gornisiewicz
Hello, I found an issue with the compiler and/or repl code. Here, the compiler emits code which throws a string if there's a call with incorrect arity: https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/compiler.clj#L468 Shouldn't this be throwing Error (or a subclass instead)?

Re: Smarter code reloading with tools.namespace 0.2.0

2012-10-07 Thread Mika Raento
Hi Looks great! I'd just finished writing my own ns declaration parser when I found that you'd already put it all together :-) What I'd like to use this for is re-running affected tests. A straightforward way to make this possible would be to make (refresh) return the list of reloaded

Re: Smarter code reloading with tools.namespace 0.2.0

2012-10-07 Thread Stuart Sierra
Hi Mika, Due to the current governing process of the Clojure contributor agreement, I cannot accept GitHub pull requests, only patches submitted via http://dev.clojure.org/jira My intent is for the functions in clojure.tools.namespace.repl to be a high-level API for direct invocation by

Re: compiler: throw Error instead of a string?

2012-10-07 Thread David Nolen
On Sat, Oct 6, 2012 at 4:32 PM, Michal Gornisiewicz mic...@mrg.id.auwrote: Hello, I found an issue with the compiler and/or repl code. Here, the compiler emits code which throws a string if there's a call with incorrect arity:

Re: compiler: throw Error instead of a string?

2012-10-07 Thread Herwig Hochleitner
Javascript native try-catch is available as the compiler builtin try* form. cljs.core/try desugars into try* + a type dispatch in catch blocks. So to catch Strings you would write (try ... (catch js/String e ...)) and to catch everything (try* ... (catch e ...)) -- You received this message

Re: cli latency

2012-10-07 Thread Stuart Sierra
JVM startup time has always been issue. Various tricks help: client mode, smaller heaps, tiered compilation (available in Java 7). Clojure adds another layer, which can be partially mitigated with AOT-compilation. But you'll never get the kind of instant command-line response that C can give

Re: Preferred business rules engines in or used by Clojure?

2012-10-07 Thread Stuart Sierra
Hi Grant, I am not aware of a rules engine written in Clojure, unless you are willing to consider a logic language like Datalog (Datomic) or Prolog (core.logic). Various rule-based systems exist for Java, but I would expect them to be very Java-centric. -S -- You received this message

File endings proposal for easier cross-compiling

2012-10-07 Thread Jonathan Fischer Friberg
Hi, In my opinion, cross-compiler projects is way too complicated to pull off. When they really shouldn't be. Therefore, I'm proposing the following file ending scheme: .clj - detected by all compilers. In a cross-compiler project, .clj files contains code not specific to the compiler. .cljj -

Re: cli latency

2012-10-07 Thread Alex Miller
There are a few people that have worked on this problem for Java and other JVM projects by basically NOT starting a new JVM or pre-starting the JVM. Some places to start: - Drip - https://github.com/flatland/drip (targeting Clojure specifically) - Nailgun -

Re: cli latency

2012-10-07 Thread Grant Rettke
On Sun, Oct 7, 2012 at 11:50 AM, Brian Craft craft.br...@gmail.com wrote: The two second delay to... do anything... is making... me crazy. Although JRebel is for JEE, it seems like an interesting thing for a fast REPL. -- You received this message because you are subscribed to the

Re: File endings proposal for easier cross-compiling

2012-10-07 Thread Joseph Smith
I like the idea of a scheme like this. On Oct 8, 2012, at 1:44 AM, Jonathan Fischer Friberg odysso...@gmail.com wrote: Hi, In my opinion, cross-compiler projects is way too complicated to pull off. When they really shouldn't be. Therefore, I'm proposing the following file ending

Re: ANN Ritz 0.5.0

2012-10-07 Thread bruce li
2012/10/6 Hugo Duncan duncan.h...@gmail.com bruce li leilmy...@gmail.com writes: I'm trying ritz and having some issues with SLDB that really confused me. When I switch on the slime-break-on-exception, it seems it sometimes doesn't work. The SLDB buffer won't pop up and I sometimes can

Re: ANN: a Clojure docs site, and github organization

2012-10-07 Thread gaz jones
While on this topic, is it possible for someone with admin privileges to disable the Issues tabs in the contrib projects? There is a consistent drip of people sending pull requests or opening bugs which have to be redirected to JIRA. All of the contrib projects now point to JIRA in the README for

Re: ANN: a Clojure docs site, and github organization

2012-10-07 Thread John Gabriele
On Sunday, October 7, 2012 9:32:45 PM UTC-4, Gaz wrote: While on this topic, is it possible for someone with admin privileges to disable the Issues tabs in the contrib projects? There is a consistent drip of people sending pull requests or opening bugs which have to be redirected to JIRA.

Re: apply: increase performance by 60% for fixed length

2012-10-07 Thread Ben Wolfson
On Sun, Oct 7, 2012 at 3:53 PM, Alan Malloy a...@malloys.org wrote: This is nonsense. If s is fixed-size at compile-time, you would never use apply to begin with. Why bother with (applyn 10 + [1 2 3 4 5 6 7 8 9 10]) when you could just write (+ 1 2 3 4 5 6 7 8 9 10)? Why bother to write (+ 1 2

Re: apply: increase performance by 60% for fixed length

2012-10-07 Thread Wes Freeman
What version of clojure are you guys using, just to understand this a little better? I think apply was given a boost in 1.3 or 1.4--I'm a relative newbie, myself. Wes On Sun, Oct 7, 2012 at 10:56 PM, Ben Wolfson wolf...@gmail.com wrote: On Sun, Oct 7, 2012 at 3:53 PM, Alan Malloy

Re: Preferred business rules engines in or used by Clojure?

2012-10-07 Thread Leandro Oliveira
https://github.com/hraberg/mimir The author call it experimenta, but seems nice. [ ]s Leandro. On Sun, Oct 7, 2012 at 8:33 PM, Stuart Sierra the.stuart.sie...@gmail.comwrote: Hi Grant, I am not aware of a rules engine written in Clojure, unless you are willing to consider a logic language

Re: Question on mandatory arguments for - and - macros

2012-10-07 Thread Shantanu Kumar
On Monday, 8 October 2012 04:57:06 UTC+5:30, Stuart Sierra wrote: From the look of the source, there's no reason why - couldn't have arity-1. I guess it just doesn't come up much. Arity-1 for - would be useful to let somebody comment out forms as follows: (- foo #_(bar baz) #_quux)

Re: apply: increase performance by 60% for fixed length

2012-10-07 Thread Ben Wolfson
On Sun, Oct 7, 2012 at 10:02 PM, Alan Malloy a...@malloys.org wrote: On Sunday, October 7, 2012 7:56:53 PM UTC-7, Ben wrote: On Sun, Oct 7, 2012 at 3:53 PM, Alan Malloy al...@malloys.org wrote: This is nonsense. If s is fixed-size at compile-time, you would never use apply to begin with.

Re: apply: increase performance by 60% for fixed length

2012-10-07 Thread Ben Wolfson
On Sun, Oct 7, 2012 at 8:01 PM, Wes Freeman freeman@gmail.com wrote: What version of clojure are you guys using, just to understand this a little better? I think apply was given a boost in 1.3 or 1.4--I'm a relative newbie, myself. Ah using 1.4 I do see a speedup: clojure-test.core

Re: cli latency

2012-10-07 Thread Shantanu Kumar
Another option is Avian if it works for you: http://oss.readytalk.com/avian/ On Monday, 8 October 2012 05:22:53 UTC+5:30, Alex Miller wrote: There are a few people that have worked on this problem for Java and other JVM projects by basically NOT starting a new JVM or pre-starting the JVM.

Re: apply: increase performance by 60% for fixed length

2012-10-07 Thread Jean Niklas L'orange
On Sunday, October 7, 2012 11:15:28 PM UTC+2, Marc Dzaebel wrote: *apply *is slow. However you can increase performance by 60% with the following macro, if you have a fixed length in S. [...] (let[t(fn[](*apply *+ '(1 2 3 4 5 6 7 8 9 10)))] (time(dotimes [_ 100] (t ;