Re: heaps in clojure vs SML

2015-02-01 Thread Maris Orbidans
ote: >> >> You also might want to use Criterium >> <https://github.com/hugoduncan/criterium> rather than *time *for >> accurate benchmarking*.* >> >> On Friday, January 30, 2015 at 6:54:52 AM UTC-6, Maris wrote: >>> >>> >>> yes,

Re: heaps in clojure vs SML

2015-01-30 Thread Maris
he code like this: http://sprunge.us/ATiV makes your > example execute in 120ms on my machine. > > Maris writes: > > > I implemented leftist heap (from Purely Functional Data Structures book) > > in clojure. > > > > https://gist.github.com/maruks/135fef92455578b61

heaps in clojure vs SML

2015-01-30 Thread Maris
I implemented leftist heap (from Purely Functional Data Structures book) in clojure. https://gist.github.com/maruks/135fef92455578b61de2 It takes 32 seconds to insert 10 elements in heap: (time (peek (reduce conj (empty-heap) (range 1000 2000 100) ))) "Elapsed time: 32649.

leiningen and local maven repo

2014-01-23 Thread Maris
I added this to project.clj :repositories {"project" "file:/home/maris/.m2/repository"} Exception in thread "FileRepositoryConnector-1" java.lang.IllegalArgumentException: number of transferre

Re: calling overloaded methods on a hessian proxy

2013-12-05 Thread Maris
problem solved: HessianProxyFactory.setOverloadEnabled(true) -- -- 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 yo

calling overloaded methods on a hessian proxy

2013-12-05 Thread Maris
Has anyone tried to invoke overloaded methods on a hessian proxy? My hessian interface has two overloaded methods. *public Set getChanges(Session session)*; public Set getChanges(String session); I couldn't manage to call *getChanges(Session session).* user> (set! *warn-on-reflection* t

recursive mapcat over lazy seq

2013-10-18 Thread Maris
hi This function doesn't work properly. It doesn't call itself for all elements of tree-ids. For example, if tree-ids is '(1 2 3 4 *5 6*), then find-events gets called only on first 4 elements. (defn find-events [tree-id] (let [children (get-children tree-id) ;; returns la

leiningen dependencies plugin

2013-02-06 Thread Maris
Is there dependencies plugin for leiningen ? I need to download all dependencies so I can copy my project to a server. ( I can't run leiningen on server ). mvn dependency:copy-dependencies -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To p

Re: Two clojure with emacs questions

2012-12-20 Thread Maris
1) You simply need to save you'r code to see changes in browser (unless it is AOT compiled code). Alternatively (even better) you can start server from REPL and change you code on the fly. 2) Have you tried swank ? On Wednesday, December 19, 2012 2:12:45 PM UTC, Jonathon McKitrick wrote: >

compojure in production

2012-12-19 Thread Maris
How can I run my compojure app without leiningen ? I want to use dedicated jetty server (not war file). -- 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 a

Re: generate two defns in macro

2012-08-21 Thread Maris
at their children forms are > evaluated in sequence, as if you would have written them without the do. > > HTH, > > -- > Laurent > > 2012/8/21 Maris > > >> I want a macro that generates two defn's. >> >> (defn vote-suspend [this] (deref (

generate two defns in macro

2012-08-21 Thread Maris
I want a macro that generates two defn's. (defn vote-suspend [this] (deref (.state this))) (defn vote-resume [this state] (reset! (.state this) state)) I have written this: (defmacro suspendable [prefix] `(do (defn ~(symbol (str prefix "suspend")) [~'this] (deref (.state ~'this))) (def

class loading on startup

2012-06-30 Thread Maris
When debugging class loading issues I noticed that clojure tries to load many non-existing classes. For example this__5587__auto__, gf__x__8266 , f__5717__auto__. It happens on startup, in static init block of RT.java. Are those type hints generated by some macro ? protected Class findClass(S

Clojure in OSGi and *use-context-classloader*

2012-06-30 Thread Maris
I am using clojure in apache karaf which has Thread context class loader set to karaf jars. I changed use-context-classloader to false in RT.java: final static public Var USE_CONTEXT_CLASSLOADER = Var.intern(CLOJURE_NS, Symbol.intern("*use-context-classloader*"), F).setDynamic(); For some rea

function evaluation inside list literal

2012-05-28 Thread Maris
I have noticed that my functions don't get evaluated if they are inside a list: '({:regex (re-pattern (str root-topic "/price-change//")) :metadata (get-metadata :price-change) :subscribe nil}) (get-metadata :price-change) is just a list Whereas it works if I us

Re: Best IDE

2012-01-19 Thread Maris
Emacs + Paredit is probably the best IDE. Nothing improves productivity like paredit. On Jan 18, 9:31 pm, Jay Fields wrote: > I'm not running the community edition (and I'm not sure if you are > either). I've updated to the latest LaClojure (when I upgraded to > IntelliJ 11). I've evaluated expr