Re: Kwargs vs explicit parameter map for APIs?

2015-03-13 Thread Dylan Butman
or a macro (defmacro defkargs [name destrt body] `(clojure.core/defn ~name ([] (~name {})) ([a# b# {:as r#}] (~name (clojure.core/assoc r# a# b#))) ([~destrt] ~@body))) (defkargs kargs-test {:keys [some me]} (when (and some me) (+ some me))) (and (=

Re: Kwargs vs explicit parameter map for APIs?

2015-03-13 Thread Dylan Butman
Late chime in...how about both? (defn kargs ([] (kargs {})) ([a b {:as r}] (kargs (assoc r a b))) ([a] a)) On Thursday, May 1, 2014 at 12:21:03 AM UTC-4, Jim Crossley wrote: Oh, right. (f m) instead of (apply f [m]). Duh. On Wed, Apr 30, 2014 at 11:15 PM, Colin Fleming

Re: Typed Clojure paper draft

2015-03-13 Thread Chris Ford
I like the paper. One small piece of feedback - I didn't understand what about the multimethods section justifies the claim of surprising synergy in the introduction. Perhaps you could elaborate on the novelty? Chris El 12/03/2015 02:50, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com

avian vm or robovm for desktop binary executables?..anyone has tried??

2015-03-13 Thread coco
Hi guys, I'm curiouss if its possible use avian or robovm for distribute binary desktop executables for linux,mac or windows...seems to be possible https://news.ycombinator.com/item?id=7579737 , http://labb.zafena.se/?p=673 but I've not found so much information about it :S.. I think than it

Re: Typed Clojure paper draft

2015-03-13 Thread Ambrose Bonnaire-Sergeant
Ah great catch. Here's the justification for our surprise. 1) Occurrence typing was not designed with multimethods in mind. 2) Multimethods are surprisingly easy to formalise, and straightforward to understand (B-DefMulti, B-DefMethod, B-BetaMulti in figure 9 model the core semantics for

Re: Better outputs produced by the REPL

2015-03-13 Thread Hildeberto Mendonça
This function is attending my needs for the moment: (defn print-feedback [text] (loop [out (split text #\n)] (if (empty? out) (let [to-print (first out)] (println to-print) (recur (rest out)) The question now is: how to test it :D On Thu, Mar 12, 2015 at

Re: Clojure web framework

2015-03-13 Thread zhujinxian
(defn render-test [ret tmt] (- (resp/response --rendertest--) (#(resp/content-type %1 text/plain (defn foo I don't do a whole lot. [x] (str 来自源码目录的参数: x)) (defn handler [^Integer x] {:$r render-test :text (str hello world, road goes sucess! (foo x))}) (defn

Re: [ANN] trapperkeeper-jetty9 v1.2.0

2015-03-13 Thread Max Penet
HI, You might want to use an even more recent version of jetty9 see: https://github.com/eclipse/jetty.project/blob/cfca172dd68846b2c7f30a9a6b855f08da7e7946/advisories/2015-02-24-httpparser-error-buffer-bleed.md On Thursday, March 12, 2015 at 6:52:09 PM UTC+1, Chris Price wrote: Hi! Just

defmacro help

2015-03-13 Thread Colin Yates
Hi, I am wiring up a bunch of CRUD command handlers for different aggregates using prismatic schema to validate and it is screaming out for a macro, but my ignorance is screaming even louder :). The form I want to emit is something like (for a 'Location' for example): (s/defn

Re: [ClojureScript] [ANN] thi.ng collection update (CLJ/CLJS)

2015-03-13 Thread Karsten Schmidt
Hi Kovas, so far the mesh types (GMesh BasicMesh) were mainly used for 3d printing rather than viz purposes and have not yet support for vertex or face attributes. It is something I still need to port over from the previous version of the lib. I held off on that so far to first let the WebGL

Re: defmacro help

2015-03-13 Thread Colin Yates
Nope, never mind - it was a dirty REPL. It works fine-ish. My next problem is that it works fine, but only if I call it in the namespace it is defined in. If I call it in another namespace I get the following error: Error refreshing environment: java.lang.RuntimeException: Can't refer to

Packaging JNI extensions

2015-03-13 Thread Jason Felice
I would like to break the JNI part out of Avi and make it a dependency and - hopefully - use it via maven and leiningen like any other dependency. I've come across a bunch of ways of doing this, but they all seem somewhat ... desperate. Does anyone have an example of something that works -

Re: defmacro help

2015-03-13 Thread Tobias Kortkamp
then the error is on the (schema.core/defn) call. But notice the fully qualified 'create' - I want 'create' to be a literal in the namespace of the caller, not the namespace the macro is defined in. Any ideas? Quote-unquote the symbol: ~'create Example: `(defn create []) =

Re: defmacro help

2015-03-13 Thread Colin Yates
OK, so ~(symbol create) was what I needed to do but that now loses the ^:always-validate meta :).. On Friday, 13 March 2015 12:42:36 UTC, Colin Yates wrote: Nope, never mind - it was a dirty REPL. It works fine-ish. My next problem is that it works fine, but only if I call it in the

Re: defmacro help

2015-03-13 Thread Colin Yates
Thanks Tobias. The complete macro body is now: (let [{:keys [hierarchy-key cascade-keys define-command-schema defined-event-schema define-command-key defined-event-key]} (default-options aggregate)] `(do

Clojure web framework

2015-03-13 Thread Alex Wang
+1. Now is 2015 :) -- 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. To unsubscribe from this group,

[ANN] EuroClojure 2015

2015-03-13 Thread Alex Miller
We’re pleased to announce that EuroClojure 2015 will be held June 25-26 in Barcelona, Spain. Thanks again to Marco and the Clojure community, and we’re looking forward to seeing you all there. Details including registration, sponsorship, and the call for presentations are forthcoming; you can

Reporting ClojureScript issues

2015-03-13 Thread David Nolen
ClojureScript, downstream tooling, and the interactions between have become sufficiently complex enough that we no longer have time to consider anything that may originate downstream. Please be sure read and understand the following before reporting ClojureScript issues moving forward: