zipmap different ordering in 1.7

2015-07-01 Thread Jo Geraerts
Hey, I when i tried to run my program with the shiny new 1.7, it broke. I have traced it down to the fact that zipmap ( https://github.com/clojure/clojure/blame/master/src/clj/clojure/core.clj#L2940) does returns the keys in a different order than i'm used to. e.g clojure 1.6: nREPL server sta

Re: zipmap different ordering in 1.7

2015-07-01 Thread Jo Geraerts
03 PM UTC-4, Jo Geraerts wrote: >> >> Hey, >> >> I when i tried to run my program with the shiny new 1.7, it broke. I have >> traced it down to the fact that zipmap ( >> https://github.com/clojure/clojure/blame/master/src/clj/clojure/core.clj#L2940) >> &

java method overloading and clojure interop

2015-07-07 Thread Jo Geraerts
Hello, I'm trying to create a small wrapper for the java money api. The api uses method overloading. For example: https://github.com/JavaMoney/jsr354-api/blob/master/src/main/java/javax/money/MonetaryAmount.java has methods * multiply(long x) * multiply(double x) * multiply(Number x) In cl

Re: zipmap different ordering in 1.7

2015-07-07 Thread Jo Geraerts
Op maandag 6 juli 2015 10:42:43 UTC+2 schreef dmic...@gmail.com: > > The semantics of a set doesn't guarantee an order either (even though it's > implementation might), I'd sort over the keys and use the resulting > collection as hash-map key so you are independent of any clojure-intrinsic > be

Re: http-kit and context root?

2015-07-07 Thread Jo Geraerts
I think you don't. But you can make a small piece of middleware that dispatches to a different handler based on the 'context root'. You can also strip off the context root as u dispatch the request to the correct handler. I'm doing something similar with virtual hosts. (ns net.umask.imagere

Re: java method overloading and clojure interop

2015-07-08 Thread Jo Geraerts
Herwig Hochleitner schreef op 2015-07-08 05:20: 2015-07-07 15:04 GMT+02:00 Jo Geraerts : * multiply(long x) * multiply(double x) * multiply(Number x) In clojure i want to do something like (defn multiply[^MonetaryAmount amount multiplicant]   (.multiply amount multiplicant)) Function

Re: java method overloading and clojure interop

2015-07-09 Thread Jo Geraerts
Op woensdag 8 juli 2015 05:20:51 UTC+2 schreef Herwig Hochleitner: > > The way I would do it: Define multiply as a function calling (.multiply > amount ^Number x), for higher order usage, and then add an :inline function > to its metadata, which returns `(.multiply ~amount ~x). > That acts as a

Re: [ANN] Clojure infrastructure SSL

2017-04-24 Thread Jo Geraerts
Hello, Op vrijdag 21 april 2017 23:08:22 UTC+2 schreef Alex Miller: > > The following bits of Clojure infrastructure are now https-only and > redirect all traffic from http to https: > > https://build.clojure.org - Jenkins > https://dev.clojure.org/jira - JIRA > https://dev.clojure.org - Confluen

Re: Using a dynamic var for my database connection for implicit connections+transactions

2015-07-31 Thread Jo Geraerts
Hello, I think you are coming to a point where you might want to consider Stuart Sierra's component library. https://github.com/stuartsierra/component A dynamic var is kind of thread-bounded global state, which is to be avoided. There is a nice talk to go with it https://www.youtube.com/watc

Re: How do I access components of a system map

2016-01-26 Thread Jo Geraerts
Hey Collin, Op zondag 15 maart 2015 17:26:10 UTC+1 schreef Colin Yates: > > > How do the worker fns actually get called - the dispatching is up to > you - I tend to have a bus (or channel) which is the glue underneath > the gateway. > > For example, I might have: > - a command bus which needs