Re: Avout: Distributed State in Clojure

2011-12-04 Thread David Edgar Liebke
> > A related question. If I wanted to do a once-off initialization of the value > (ie, the first VM to create the distributed ref will set the value) how would > I go about it? > I would just create the Ref without an initial value, and if the current value is non-nil, you know that it has

Re: Avout: Distributed State in Clojure

2011-12-02 Thread David Edgar Liebke
Hi Glen, > > The init-stm step is still referenced in the documentation as being required > BTW. > Thanks, I'll remove the reference. > I had a couple of questions. > > I noticed that when I create a reference (zk-ref) I need to provide an > initial value. For each VM I do this for - it en

Re: Avout: Distributed State in Clojure

2011-12-01 Thread liebke
Just released Avout 0.5.2, which now includes automatic STM initialization (no more pesky init-stm step). David On Dec 1, 12:44 pm, David Edgar Liebke wrote: > init-stm (and reset-stm) are only used for creating an STM that will be used > by every client. You only want to call it onc

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread David Edgar Liebke
strings for each fn but they were both nil :-( > > Sam > > --- > http://sam.aaron.name > > On 1 Dec 2011, at 17:21, David Edgar Liebke wrote: > >> Did you initialize the STM? >> >> (init-stm client) >> >> You only need to do it the first time, to s

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread David Edgar Liebke
to stop idiots like myself falling into that trap :-) > > Sam On Dec 1, 2011, at 12:27 PM, Edmund wrote: > That's the ticket! Thanks David, its working for me now. > > On 01/12/2011 17:21, David Edgar Liebke wrote: >> (init-stm client) > > -- > You received t

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread David Edgar Liebke
rImpl.invoke0(Native Method) > > >at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread David Edgar Liebke
Fn.java:512) > >at user$eval27$acc__3869__auto30$fn__32.invoke(NO_SOURCE_FILE:1) > >at clojure.lang.AFn.run(AFn.java:24)

Re: [ANN] Avout: Distributed State in Clojure

2011-12-01 Thread David Edgar Liebke
> > # > > user> @r0 >

Re: [ANN] Avout: Distributed State in Clojure

2011-11-29 Thread liebke
1) On the avout.io site, is the diagram of conflicting transactions > correct? It looks to me like the red arrow is in the wrong place (and it > doesn't match the description below it, points 5 and 6). > Great catch, I had intended to fix the figure before release but forgot. It's fixed now.

[ANN] Avout: Distributed State in Clojure

2011-11-29 Thread liebke
Today we are releasing Avout, which brings Clojure's in-memory model of state to distributed application development by providing a distributed implementation of Clojure's Multiversion Concurrency Control (MVCC) STM along with distributable, durable, and extendable versions of Clojure's Atom and Re

Re: Python like hash-map constructor (a.k.a. dict)

2010-10-14 Thread liebke
Here's one approach: (into {} [[:a 1] [:b 2] [:c 3]]) => {:a 1, :b 2, :c 3} On Oct 14, 11:54 am, Henk wrote: > Hi All, > > In Python I was used to be able to easily create dictionaries from > lists of key value 'pairs' (tuples or list), e.g. like this: > > dict([(10, 20), (30, 40)]) #using the

Re: Clojure meetup group listing

2010-09-21 Thread liebke
Information on the Washington D.C area Clojure Meetup can be found here http://www.meetup.com/Cap-Clug David -- 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 member

Clojure-conj speaker abstracts posted

2010-09-17 Thread liebke
The abstracts for the talks at the first Clojure-conj have been posted. http://first.clojure-conj.org/speakers Looking forward to seeing many of you there, David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Re: Cljr and user.clj

2010-07-16 Thread liebke
Rick, I think the problem is that additional classpaths are added, dynamically, after the user.clj file is evaluated. It does get evaluated if it's in ./ or ./src, which are added at launch in the cljr scripts. I have added ~/.cljr to the classpath defined in the launch scripts, so you can place

Re: labrepl updated

2010-05-05 Thread David Edgar Liebke
Let me know if you need me to make any changes. David On Wed, May 5, 2010 at 9:13 AM, Stuart Halloway wrote: > I'll have a fix up within a half hour that should require *no* changes to > incanter. > >> On 5 May 2010 14:26, Craig Andera wrote: >>> I have updated the labrepl [1] to use the l

Re: Using a macro to define a function - nested backquotes?

2010-05-04 Thread liebke
> When I copy the definition of drive-fn from your link above and then   > invoke macroexpand-1, I get: > user=> (macroexpand-1 '(deriv-fn [a b c] foo bar baz)) > (user/deriv-fn* (quote [a b c]) (quote foo) (quote bar) baz) > > First step is to find out why you aren't getting the same expansion. >

Re: seq fns promoted to clojure.core!

2010-04-28 Thread liebke
Unfortunately, group-by is a commonly used function name, used in both Incanter and swank-clojure. I've renamed Incanter's group-by to group- on, but the naming conflict of clojure.core/group-by and swank- clojure.util/group-by is preventing swank from starting up using either lein swank or the swa

Re: CSV Lib

2010-04-13 Thread liebke
OpenCSV is included with Incanter and used in the incanter.io/read- dataset function. On Apr 13, 10:30 am, Sean Devlin wrote: > I'll be greedy... is there a known Clojure wrapper? > > On Apr 13, 10:27 am, Meikel Brandmeyer wrote: > > > > > Hi, > > > On Apr 13, 4:25 pm, Sean Devlin wrote: > >

Re: Clojure Conference Poll

2010-03-26 Thread liebke
Are there any updates on the status of the planned Clojure conference? David On Jan 28, 8:40 pm, Amit Rathore wrote: > The JavaOne alignment will probably work. The last time, we had a > special Bay Area Clojure meetup following it, and it was our biggest > ever (around 80 people). Of course,

Re: Maven clojure:repl

2010-03-20 Thread liebke
. > > > (side remark, I read on about the plugin, and now I installed the > > needed swank file too) > > > Thanks and greetings, alux > > > liebke schrieb: > > > Ah, you're right, only the bin/swank script calls maven the clj and > > > clj

Re: Maven clojure:repl

2010-03-20 Thread liebke
Ah, you're right, only the bin/swank script calls maven the clj and clj.bat scripts are stand-alone, I thought I had changed them (but it's better that they're stand-alone). Was the following the actual error? > [ERROR] BUILD ERROR > [INFO] > --

Re: Maven clojure:repl

2010-03-20 Thread liebke
There are two solutions to your problem, 1) use the bin/clj script which calls mvn clojure:repl from the modules/incanter-app directory, or 2) just cd to the modules/incanter-app directory and then run mvn clojure:repl your self. That was described in the post you linked to, but it's easy to miss.

Re: Map with multiple keys?

2010-02-24 Thread liebke
> Alternatively, amalgamation works fine, though you probably want to > amalgamate with vector instead of str. That prevents inadvertent > collisions in cases where the elements in are similar (not a problem > for you). Again, assuming appropriate definitions for M and F: > > {[1 M] [ 1 2 3 4 5 6

Re: Clojure API doc updated with both master and 1.1 (finally)

2010-02-17 Thread liebke
Fantastic feature, thanks Tom! David > However, I have good news: the autodoc robot now supports > documentation in multiple branches. > Multi-branch versions of clojure-contrib and incanter coming up RSN. > > Tom -- You received this message because you are subscribed to the Google Groups "C

Re: Clojure Conference Poll

2010-01-28 Thread liebke
> Oracle just announced Java One in San Francisco from September 19-23, > 2010 Despite my preference for an east coast conference (and my limited interest in JavaOne), I think it makes a lot of sense to have the ClojureConj start on the Friday after JavaOne. David On Jan 28, 9:45 am, Rich Hicke

Re: Autodoc for the masses

2010-01-20 Thread liebke
That's fantastic news! I wholeheartedly recommend Autodoc, it has been great for the Incanter project. Here are examples of its output: Clojure: http://richhickey.github.com/clojure/ Clojure-contrib: http://richhickey.github.com/clojure-contrib/ Incanter: http://liebke.github.com/incanter/ David

Re: Renaming 1.1.0-alpha-SNAPSHOT is causing problems with projects on Clojars

2009-12-22 Thread liebke
I uploaded a version of Compojure to Clojars, that depends on the renamed clojure jar, as temporary fix. Use the following line to your project.clj file: [org.clojars.liebke/compojure "0.3.1-master"] I mention this problem here: http://incanter-blog.org/2009/11/29/incanter-webapp/ David On De

Re: Any interest in a Nova Clug?

2009-12-16 Thread liebke
I'd try to make it, even though Reston is on the wrong side of the river :-) It would be cool to try to also schedule something in March when Rich and Stu will be in Reston for the Prag Studio training. David On Dec 16, 1:14 pm, Matt wrote: > I'm looking into setting up a Northern Virginia Clo

Re: Clojure & Contrib "master" & "new" on build.clojure.org

2009-12-12 Thread liebke
Thanks Tim! I've put together an experimental build of Incanter using the new builds: http://groups.google.com/group/incanter/browse_thread/thread/94b30744fee1095e I ran into a minor issue with Clojure's new branch that I was able to work around but couldn't diagnose (more details in the linked p

Re: Renaming 1.1.0-alpha-SNAPSHOT is causing problems with projects on Clojars

2009-12-11 Thread liebke
x27; I'm getting this error: [null] java.lang.Error: Cannot load com.apple.laf.AquaLookAndFeel (hello.clj:1) The build works fine on Linux. David On Dec 11, 12:18 am, Phil Hagelberg wrote: > liebke writes: > > I like the new naming scheme, but would it be possible to ad

Renaming 1.1.0-alpha-SNAPSHOT is causing problems with projects on Clojars

2009-12-10 Thread liebke
It looks like renaming the version of Clojure in the build.clojure.org repository from 1.1.0-alpha-SNAPSHOT to 1.1.0-master-SNAPSHOT will require every project previously uploaded to Clojars, using the former name, to rewrite its pom and resubmit. I like the new naming scheme, but would it be poss

Re: leiningen javac plugin

2009-12-09 Thread liebke
This is exactly what I need! Unfortunately, I'm getting the following exception when I run the compile-java task. $ lein compile-java Exception in thread "main" java.lang.IllegalArgumentException: No method in multimethod 'as-file' for dispatch value: null at clojure.lang.MultiFn.getFn(Mu

Re: Leiningen in Python

2009-12-07 Thread liebke
That's great. Roland Sadowski has also written a Windows-friendly lein script in PowerShell: http://gist.github.com/239210 On Dec 7, 8:15 am, "Jonghyouk, Yun" wrote: > Hi, > > I've write some python script for leiningen for Windows machines > without wget/curl. > > I expect it is nicer than as-

Re: Flightcaster makes a couple big open source contributions

2009-12-03 Thread liebke
I just blogged about FlightCaster's new involvement with Incanter here: http://incanter-blog.org/2009/12/03/flightcaster/ David On Dec 3, 3:19 pm, bradford cross wrote: > Incanter:http://measuringmeasures.blogspot.com/2009/12/flightcaster-merges-sta... > > Crane:http://measuringmeasures.blogsp

Re: Scientific computing

2009-10-26 Thread liebke
I agree, use Clojure vectors whenever it's feasible. Even within Incanter, which uses Parallel Colt extensively, I try never to convert Clojure vectors into Colt vectors/matrices unless it's absolutely necessary. David On Oct 26, 2:23 pm, Konrad Hinsen wrote: > On 26 Oct 2009, at 17:14, Rock

Re: Linear Algebra Package

2009-10-07 Thread liebke
Hi Patrick, Unfortunately, Incanter doesn't have any convolution functions, and I'm not sure Parallel Colt does either. So I think you'll need to roll your own. You can find the Incanter API docs here: http://incanter.org/docs/api/ and the Parallel Colt API docs here: http://incanter.org/docs/pa

Re: I must be blind. No matching method found?

2009-06-24 Thread liebke
That's strange, both work for me. user=> (.substring (StringBuilder. "i must be blind") 4) "st be blind" user=> (.substring (StringBuilder. "i must be blind") (int 4)) "st be blind" On Jun 24, 9:59 pm, CuppoJava wrote: > Hi guys, > I'm having the hardest time figuring out why this won't run.

Re: Incanter classpath difficulties

2009-06-22 Thread liebke
thanks for trying. I'll let you know if I find a > > solution. > > Cheers > > Anand > > > On Mon, Jun 22, 2009 at 1:41 PM, liebke wrote: > > >> Anand, you've stumped me! You can import the class directly, but you > >> can't loa

Re: Incanter classpath difficulties

2009-06-22 Thread liebke
also try cloning incanter in a fresh directory and see it if has the same behavior. Sorry, I can't be more helpful. good luck, David On Jun 22, 4:43 am, Anand Patil wrote: > On Mon, Jun 22, 2009 at 2:41 AM, liebke wrote: > > > Hi Anand, > > > Try changing

Re: Incanter classpath difficulties

2009-06-21 Thread liebke
Hi Anand, Try changing the INCANTER_HOME variable in the clj script to the absolute path to the incanter directory, instead of a relative path, like ./ or ../ Let me know if that doesn't work. David On Jun 21, 1:19 pm, Anand Patil wrote: > On Sun, Jun 21, 2009 at 5:51 PM, carlitos wrote:

Re: Help: Newbie question get contributed libraries to work

2009-05-06 Thread liebke
use the icanter > library(http://wiki.github.com/liebke/incanter), where should i place the > icanter > files so that clojure can see them. > > Thanks a mill guys > > On Tue, May 5, 2009 at 9:54 AM, Sean Devlin wrote: > > > > > > > > > Okay, I'

Re: Clojure 1.0

2009-05-05 Thread liebke
Congratulations to Rich and all the contributors! It has been a joy to program in Clojure, it is the Lisp I've been waiting for. Thank you, David --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To p

Re: Got a Clojure library?

2009-05-04 Thread liebke
Name: Incanter URL: http://github.com/liebke/incanter/tree/master Author: David Edgar Liebke Tags: statistics, numerical computing, plotting License: EPL Dependencies: Parallel Colt, JFreeChart, OpenCSV Description: Incanter is a collection statistical computing and plotting libraries with R-like

Re: slightly off-topic: JDK 7 performance boost

2009-03-30 Thread liebke
That's great news for me, I'm doing lots of matrix manipulation/decomp (using the Colt library), but I wonder how long until jdk 7 is available on the mac. On Mar 30, 1:13 pm, Stuart Sierra wrote: > Thought some might be > interested:http://lingpipe-blog.com/2009/03/30/jdk-7-twice-as-fast-as-jd