Re: Entwined STM V1.0

2013-08-21 Thread Ivan Koblik
I have done the benchmarks and optimized the implementation. On my PC with the new changes TransactionalMap is up to 5 times slower than ConcurrentHashMap. You can find the benchmarks here: https://github.com/CERN-BE/Entwined-STM/blob/master/src/test/java/cern/entwined/demo/clojure_benchmarks.cl

Re: Entwined STM V1.0

2013-08-18 Thread Ivan Koblik
> java.util.concurrent.ConcurrentHashMap? When should i use these > collections instead of java.util.concurrent.* collections? > > > > > 2013/8/18 Ivan Koblik > > >> Hi All, >> >> Almost 4 years ago I developed STM with semantic concurrency control for

Re: Entwined STM V1.0

2013-08-18 Thread Ivan Koblik
M UTC+2, Hussein B. wrote: > > Great ! Congratulations! > > How it does compare with Clojure's builtin STM? > > Thanks. > > On Sunday, August 18, 2013 10:24:48 AM UTC+2, Ivan Koblik wrote: >> >> Hi All, >> >> Almost 4 years ago I developed STM with

Entwined STM V1.0

2013-08-18 Thread Ivan Koblik
Hi All, Almost 4 years ago I developed STM with semantic concurrency control for my project at CERN. Main feature of this STM is the TransactionalMap that lets you merge concurrent changes. Library is heavily tested and is very stable. It has been used in production for the past 2 years. Recently

Re: Experiences developing a crowdfunding site for open source projects in Clojure (from a Python background)

2012-08-01 Thread Ivan Koblik
Hi Aaron, Thank you for such an interesting post. You wrote that you could not setup Emacs on Windows. I decided to show you an easy way to do it. 1. Download vanilla Emacs from here: http://ftp.gnu.org/pub/gnu/emacs/windows/ Latest version at the moment is here: http://ftp.gnu.org/pub/gnu/emac

Re: Problem with Korma and clj-soap

2011-11-26 Thread Ivan Koblik
I'm pretty sure this is because of log4j.xml [1] in src directory of Korma. I think it's take from here [2]. If you take a look at it, it sets root debug level to "debug". Try creating your own configuration and pointing to it with command line argument: -Dlog4j.configuration=your_log4j.xml What

Re: Clojure 1.3 treatment of integers and longs

2011-10-23 Thread Ivan Koblik
Hello Luc, In all fairness I don't see how converting ints to Integers returned by class methods would break the abstraction. If you start talking about portability of Clojure code, then Long is as portable as Integer is. (In general they are not.) Could you explain your position on the fact that

Re: Array type hints in 1.3

2011-10-21 Thread Ivan Koblik
I reread your original post, sorry I saw that you managed to declare type constrained methods. Then, what was your question about? Type hinting for arguments works as well: (definterface Name (^"[S" method [^"[S" short-arg])) (def p (proxy [Name] [] (method [^"[S" short-arg] short-arg)))

Re: Array type hints in 1.3

2011-10-21 Thread Ivan Koblik
Hello Herwig, I checked the patch you linked to in your original post, and it doesn't seem that type hinting for native arrays of Objects is supported, that is the [L type. Native arrays of native types work quite well. (definterface Name (^"[S" method [])) ;;returns array of shorts (def p (proxy

Re: Spread work onto multiple threads (in pure Clojure)

2011-10-13 Thread Ivan Koblik
Sorry I meant "Fair enough ..." Cheers, Ivan. On 13 October 2011 12:41, Ivan Koblik wrote: > Fail enough. I guess, to allow nested spawning and avoid deadlocks, tasks > should finish without waiting for the result but spawn a new task similar to > itself that would check fo

Re: Spread work onto multiple threads (in pure Clojure)

2011-10-13 Thread Ivan Koblik
Fail enough. I guess, to allow nested spawning and avoid deadlocks, tasks should finish without waiting for the result but spawn a new task similar to itself that would check for the completion of the child tasks, repeating the cycle if necessary. Imagine that task t1 is monitored through a future

Re: Exception handling changes in Clojure 1.3.0

2011-10-12 Thread Ivan Koblik
I wonder, would it be possible to throw a custom exception (something like DoNotUse_InternalRuntimeException) in Reflector.java, and update try/catch code to always unwrap it? Cheers, Ivan. On 12 October 2011 03:44, pmbauer wrote: > I don't know what the right solution is either, but here is a

Re: Libraries supporting 1.3&1.2 and bignums

2011-10-12 Thread Ivan Koblik
I feel myself silly, but could you explain how does this work? (def +M (first [+' 1])) Is it some kind of reader level trick? Cheers, Ivan. On 11 October 2011 04:25, Alan Malloy wrote: > (def +M (first [+' 1])) seems like it should work in both versions? > > On Oct 10, 4:28 pm, Brian Marick

Re: ordered map in Clojure?

2011-06-25 Thread Ivan Koblik
Hi Ken, Having a mutable stm-map would be awesome. I actually had to implement one for my project at work. Sorry can't publish it due to licensing issues, but anyway my implementation is dead simple and won't perform well on big data sets. I was trying to understand how to implement detection of n

Re: Using slurp to read changing JSON string

2011-06-10 Thread Ivan Koblik
Hi Thomas, You need to execute this line: (dosync (ref-set location (read-json (slurp url every time you want to re-query the string. To do this periodically you could do something like this [1]: (import '(java.util TimerTask Timer)) (let [task (proxy [TimerTask] [] (run [] (dosync (ref

Re: Future of clojure.contrib.core/-?> macro

2011-04-21 Thread Ivan Koblik
ss here: > > http://clojure.org/contributing > http://clojure.org/patches > > Cheers, > pm > > On Apr 20, 1:44 am, Ivan Koblik wrote: > > Hello Konrad, > > > > Git workflow is a little bit different. You don't really need commit > rights > > to c

Re: Future of clojure.contrib.core/-?> macro

2011-04-20 Thread Ivan Koblik
Hello Konrad, Git workflow is a little bit different. You don't really need commit rights to contribute. I found a rather nice explanation of Git workflow here: http://www.eqqon.com/index.php/Collaborative_Github_Workflow Hope it helps. Cheers, Ivan. On 19 April 2011 16:40, Konrad Hinsen wrot

Re: Agent action queuing is asynchronous.

2011-04-15 Thread Ivan Koblik
Hello André, Just wanted to mention that Java 7 is feature complete. You can see the list of approved features here: http://openjdk.java.net/projects/jdk7/features/ It seems that JSR203 was selected for the release, although I remember reading that Clojure won't support Java 7 for awhile. Cheers

Re: eval'ing records

2011-04-14 Thread Ivan Koblik
David, Sorry, I misunderstood your question at first. There was actually a discussion on it a couple of days ago: http://groups.google.com/group/clojure/browse_thread/thread/abb87a73330fdc01 Cheers, Ivan. On 14 April 2011 22:07, David McNeil wrote: > > I remember reading about it in the Joy o

Re: Clojure interest in Zurich

2011-04-14 Thread Ivan Koblik
Hello, I'll be the third guy from Switzerland :) I live in Geneva... Any Clojurians from Suisse romande? Cheers, Ivan. On 14 April 2011 18:39, Nick Zbinden wrote: > Hi im not from zurich but I life near enough. There is no clojure user > group (sadly). I acctualy don't know of anybody else us

Re: Clojure syntax highlight for web sites

2010-03-01 Thread Ivan Koblik
Hello Saul, Thank you for the suggestion, I was looking for something that would work on blogspot (I should had been more specific in my original post.) ... And now I see that these snippets can be embedded! Thanks it looks great! Also, yesterday, Mike Meyer recommended me to check how wordpress