Re: Deep deref

2009-11-24 Thread Christophe Grand
On Mon, Nov 23, 2009 at 11:56 PM, John Harrop wrote: > I'm starting to think that for some tasks Clojure could use a concept of > "row locking" with maps. It would mean having a map-of-refs type that was > integrated with the STM, so multiple updates whose keys didn't collide could > occur concu

Re: Monad problems: finding an m-zero

2009-11-24 Thread Konrad Hinsen
On 21 Nov 2009, at 06:31, samppi wrote: > And no matter what I do, I can't fulfill that second axiom. Has anyone > created this type of monad before? It seems like it should be a common > pattern: exactly like (state-t maybe-m), only failures are vector > pairs too. One problem I see in your ques

Re: Clojure User Survey, preparation for 1.1

2009-11-24 Thread bOR_
Can we get an option 'leiningen' at "how do you get clojure"? On Nov 24, 8:27 am, David Brown wrote: > On Mon, Nov 23, 2009 at 09:55:46PM +, the.stuart.sie...@gmail.com wrote: > > Since the form only lets me answer one answer for each, but reality is > much more complicated. > > >How do you g

Re: roll call of production use?

2009-11-24 Thread Robert Campbell
I've deployed two small mashup apps which combine OpenCalais and our content repository to annotate documents with metadata (named entities, relationships, etc) and expose the results over the web. Good experiences all around, including with the clojure-http-client and saxon wrapper libs + Compojur

Re: "Oh, yeah, transients are fast!"

2009-11-24 Thread sross
I believe that this is most likely a symptom of the Apple JVM and not that of transients as the change from persistents to transients is far more substantial on one of our linux servers than it is on my macbook pro (6x vs 2x speedup) I'm not entirely sure as to why this is the case but I suspect t

Re: Datatypes and Protocols - early experience program

2009-11-24 Thread Chouser
On Tue, Nov 24, 2009 at 1:19 AM, Krukow wrote: > > > On Nov 24, 4:55 am, Allen Rohner wrote: >> The first stumbling point I reached is that deftypes provide an >> automatic implementation for IPersistentMap, but not IFn. I attempted >> to write (instance key), which exploded, but (key instance) w

Re: roll call of production use?

2009-11-24 Thread Jay Fields
DRW (http://drw.com) uses Clojure for several production applications. Cheers, Jay On 23 Nov, 17:00, Raoul Duke wrote: > hi, > > i'd be interested to hear who has successfully used clojure in > production. i know of some, as some folks have been vocal; any other > interesting-but-so-far-silent u

Re: Clojure Scoping Rules

2009-11-24 Thread Mark Engelberg
On Mon, Nov 23, 2009 at 11:39 PM, Garth Sheldon-Coulson wrote: > Hi Mark, > > In Clojuratica I make what I think is "good, clean, compelling use" of > dynamic vars. I rewrote the code to use dynamic vars after I found that > doing it the other way became unwieldy and inelegant. OK this makes sens

Re: Datatypes and Protocols - early experience program

2009-11-24 Thread Meikel Brandmeyer
Hi, On Nov 23, 3:29 pm, Krukow wrote: > Two comments. > > First is a bug. > Using newest commit of new: 75cd05080f7260c54007d7728fb280ae53b56f63 Same here: http://groups.google.com/group/clojure-dev/browse_thread/thread/6d5cf269b18c4540 but no feedback so far. :( Sincerely Meikel -- You rec

Re: roll call of production use?

2009-11-24 Thread Meikel Brandmeyer
Hi, On Nov 24, 6:06 am, John Harrop wrote: > Oh, I have no problem with making money by using open source software, when > it's done in the manner that companies like Red Hat do it. It's the use to > lock down some piece of proprietary software even more than it already is > that seems, at the v

Re: Clojure User Survey, preparation for 1.1

2009-11-24 Thread Meikel Brandmeyer
Hi, On Nov 24, 9:44 am, bOR_ wrote: > Can we get an option 'leiningen' at "how do you get clojure"? I think this is basically Maven/Ivy, no? Sincerely Meikel -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clo

problem with resolve

2009-11-24 Thread kony
Hi, I found that resolve does not work correctly (I guess) when it is called from other thread than main: e.g. let define (def zz 123) and afterwords call: (.start (new Thread #(println (resolve 'zz for me it does not work (it returns nil) Workaround is to write a kind of "super-resolve

Re: Monad problems: finding an m-zero

2009-11-24 Thread samppi
The original reason is that I need to be able to transfer certain certain metadata such as memoization tables between failure results in m-plus. I'm writing a PEG-type parser that hopefully can support left- recursion without any conversion to right-recursive rules. I'm using metadata because I don

Re: roll call of production use?

2009-11-24 Thread John Harrop
On Tue, Nov 24, 2009 at 1:04 AM, Meikel Brandmeyer wrote: > Hi, > > On Nov 24, 6:06 am, John Harrop wrote: > > > Oh, I have no problem with making money by using open source software, > when > > it's done in the manner that companies like Red Hat do it. It's the use > to > > lock down some piece

Re: problem with resolve

2009-11-24 Thread Christophe Grand
On Tue, Nov 24, 2009 at 12:01 PM, kony wrote: > Hi, > > I found that resolve does not work correctly (I guess) when it is > called from other thread than main: > > e.g. > > let define > > (def zz 123) > > and afterwords call: > > (.start (new Thread #(println (resolve 'zz > > for me it does n

Re: problem with resolve

2009-11-24 Thread John Harrop
On Tue, Nov 24, 2009 at 6:01 AM, kony wrote: > Hi, > > I found that resolve does not work correctly (I guess) when it is > called from other thread than main: > > e.g. > > let define > > (def zz 123) > > and afterwords call: > > (.start (new Thread #(println (resolve 'zz > > for me it does no

Re: problem with resolve

2009-11-24 Thread Krukow
On Nov 24, 12:01 pm, kony wrote: > Hi, > > I found that resolve does not work correctly (I guess) when it is > called from other thread than main: I guess your new thread also has the root binding for *ns* the current namespace, which apparently is core user=> (.start (new Thread #(println *ns*

Re: problem with resolve

2009-11-24 Thread Krukow
Three concurrent replies. We'd be better off using locks :-) -- 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 f

Re: Clojure Scoping Rules

2009-11-24 Thread Garth Sheldon-Coulson
Happy it helped. I should mention that I used Meikel's docs as a guide, but my code don't actually push or pop all the thread bindings every time I return a lazy seq or a fn. It felt a little ugly to me to bind *all* the dynamic vars in the namespace when I knew there were only two I needed to ca

performance issues with multi-dimensional array

2009-11-24 Thread Amnon
I hope it's not the billion time you get the question. I wanted to use clojure for image processing. I have a 3 dimensional array I'm passing to clojure from java. I then loop on the array to manipulate it. Even the simplest task takes about half a minutes (I expected it to be over in less than a s

Setting *warn-on-reflection* such that multiple threads can see it

2009-11-24 Thread Chris Jenkins
Hi, Is it possible to set *warn-on-reflection* such that it can be seen by multiple threads? I can't use def to define *warn-on-reflection* because it is defined in another namespace. I can use set! to change the value of the binding for one thread but this is not seen by other threads: (set! *wa

Re: performance issues with multi-dimensional array

2009-11-24 Thread Konrad Hinsen
On 24 Nov 2009, at 17:30, Amnon wrote: > I hope it's not the billion time you get the question. > I wanted to use clojure for image processing. I have a 3 dimensional > array I'm passing to clojure from java. > I then loop on the array to manipulate it. > Even the simplest task takes about half a

Re: roll call of production use?

2009-11-24 Thread Rich Hickey
On Nov 23, 9:47 pm, Richard Newman wrote: > Anyway, apologies for possibly starting a "closed-source is evil"   > debate. Let's hope it fizzles. Yes, please, let's end this here. Any further non-Clojure content on this thread might be moderated. Thanks, Rich -- You received this message be

Re: "Oh, yeah, transients are fast!"

2009-11-24 Thread Raoul Duke
> I believe that this is most likely a symptom of the Apple JVM and not yeah, given Apple's wonderful treatment of Java over the years, i could believe your theory. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: "Oh, yeah, transients are fast!"

2009-11-24 Thread Richard Newman
> I believe that this is most likely a symptom of the Apple JVM and not > that of transients as the change from persistents to transients is > far more substantial > on one of our linux servers than it is on my macbook pro (6x vs 2x > speedup) Not necessarily so. My times earlier in this threa

Re: "Oh, yeah, transients are fast!"

2009-11-24 Thread Raoul Duke
> Most likely it's related to the JVM version (1.5 by default), the > amount of memory allocated (I use -Xmx512m), the amount of L2 cache, a > HotSpot tuning parameter, or something else along those lines. > > There are far too many possibilities to consider, and too little > evidence, to support a

Re: Deep deref

2009-11-24 Thread Krukow
On Nov 14, 5:42 pm, André Thieme wrote: > But in real programs things are not so easy. We have refs in refs. This is just a thought experiment. But what about actually having refs in refs? I'm not sure if I am reinventing mutable object here, so please shoot me down ;-) Clojure 1.1.0-alpha-SNA

Re: "Oh, yeah, transients are fast!"

2009-11-24 Thread Richard Newman
> (i love how supposedly we've come so far with our systems, only to > have them become overly complex. it is to sigh. on the other hand i > guess it is 'job security'.) Heh, true. Reading articles about JVM tuning reminds me what the "M" stands for -- it's as complicated a topic as optimizing t

Re: performance issues with multi-dimensional array

2009-11-24 Thread Christophe Grand
On Tue, Nov 24, 2009 at 5:30 PM, Amnon wrote: > I hope it's not the billion time you get the question. > I wanted to use clojure for image processing. I have a 3 dimensional > array I'm passing to clojure from java. > I then loop on the array to manipulate it. > Even the simplest task takes about

Re: Setting *warn-on-reflection* such that multiple threads can see it

2009-11-24 Thread Christophe Grand
Hi, On Tue, Nov 24, 2009 at 6:38 PM, Chris Jenkins wrote: > Is it possible to set *warn-on-reflection* such that it can be seen by > multiple threads? I can't use def to define *warn-on-reflection* because it > is defined in another namespace. I can use set! to change the value of the > binding

Re: Deep deref

2009-11-24 Thread Krukow
On Nov 24, 7:50 pm, Krukow wrote: > On Nov 14, 5:42 pm, André Thieme wrote: > > > But in real programs things are not so easy. We have refs in refs. > > This is just a thought experiment. But what about actually having refs > in refs? I'm not sure if I am reinventing mutable object here, so > p

N00B Java Question

2009-11-24 Thread Peter Wolf
Hi all, Here is a N00B question, but I can not find the answer by Googling, or reading Stuart's book. So, I assume that others will want to find this FAQ in the future. I am calling legacy code, and I need to set the level on the Java Logger. In Java it would look like this import java.ut

Re: Clojure User Survey, preparation for 1.1

2009-11-24 Thread David Brown
On Tue, Nov 24, 2009 at 01:04:57AM -0800, Meikel Brandmeyer wrote: >Hi, > >On Nov 24, 9:44 am, bOR_ wrote: > >> Can we get an option 'leiningen' at "how do you get clojure"? > >I think this is basically Maven/Ivy, no? Leiningen includes, within it's own Jar, a particular version of the clojure sn

Re: N00B Java Question

2009-11-24 Thread Christophe Grand
Hi, On Tue, Nov 24, 2009 at 10:39 PM, Peter Wolf wrote: > Here is a N00B question, but I can not find the answer by Googling, or > reading Stuart's book. So, I assume that others will want to find this > FAQ in the future. > > I am calling legacy code, and I need to set the level on the Java Lo

Re: N00B Java Question

2009-11-24 Thread Sean Devlin
Static field are accessed with the / operator user=>(import (java.util.logging Logger Level)) user=>(let [a-logger (Logger/getLogger "")] (.setLevel a-logger Level/WARNING)) Or, this could be chained as user=>(.setLevel (Logger/getLogger "") Level/WARNING) Hope this helps, Sean On Nov

Re: N00B Java Question

2009-11-24 Thread David Brown
On Tue, Nov 24, 2009 at 04:39:38PM -0500, Peter Wolf wrote: >Here is a N00B question, but I can not find the answer by Googling, or >reading Stuart's book. So, I assume that others will want to find this >FAQ in the future. I think it's also change a bit since the book. >I am calling legacy cod

Re: roll call of production use?

2009-11-24 Thread RandyHudson
On Nov 24, 11:30 am, John Harrop wrote: > There's a Clojure or a Java library for generating pdf? Apache FOP is an XSL-FO processor than can generate PDF documents. I've heard good things about iText, a Java library for generating or modifying PDF docs. -- You received this message because y

Re: Setting *warn-on-reflection* such that multiple threads can see it

2009-11-24 Thread Chris Jenkins
That's great - now why didn't I realise that :-) Thanks, Chris 2009/11/24 Christophe Grand > Hi, > > > On Tue, Nov 24, 2009 at 6:38 PM, Chris Jenkins wrote: > >> Is it possible to set *warn-on-reflection* such that it can be seen by >> multiple threads? I can't use def to define *warn-on-re

Re: Clojure Scoping Rules

2009-11-24 Thread Meikel Brandmeyer
Hi, Am 24.11.2009 um 18:47 schrieb Garth Sheldon-Coulson: I'd be really interested in hearing others' views on the propriety of binding all the dynamic vars every time using bound-fn or equivalent. I asked whether it should to take a map or not in the assembla thread of the ticket. But ther

Re: roll call of production use?

2009-11-24 Thread Meikel Brandmeyer
Hi, Am 24.11.2009 um 17:30 schrieb John Harrop: There's a Clojure or a Java library for generating pdf? I use enlive to generate a HTML version with CSS of the report. This is turned by virtue of flying saucer and iText into PDF. At least that is the plan. Whether it will work satisfactor

Re: problem with resolve

2009-11-24 Thread kony
On 24 Lis, 18:07, Krukow wrote: > Three concurrent replies. We'd be better off using locks :-) Three concurrent replies but each of them brings something new ;) Thank you very much for all of them! ... what is the use case,... I am just working on some kind of process algebra simulator written

Re: N00B Java Question

2009-11-24 Thread Meikel Brandmeyer
Hi, Am 24.11.2009 um 22:39 schrieb Peter Wolf: Logger.getLogger("").setLevel(Level.WARNING) (.setLevel (Logger/getLogger "") Level/WARNING) Methods: obj.method(args) => (.method obj args) Static methods: Class.method(args) => (Class/method args) Static members: Class.MEMBER => Class/MEMBER

clojuresque 1.1.0 released (formerly known as clj-gradle)

2009-11-24 Thread Meikel Brandmeyer
Dear fellow Clojurians, I'd like to announce a new release of Clojuresque formerly known as clj-gradle. There not many changes, but some fixes. Namely: * compileClojure now fails, when compilation fails * compileClojure does not depend on compileJava anymore. The user can decide now. * one

Re: roll call of production use?

2009-11-24 Thread Anniepoo
At my workplace (University of Houston, dept. of Health and Human Performance) Clojure is our primary language for interacting with our virtual world presence in Second Life. We have an automated lesson path building system currently in production, and several other projects in various states. aut

Re: ANN: Clojure API for AllegroGraph

2009-11-24 Thread patrickdlogan
Hi Mike - thanks for this. I am fairly new to git, but from what I can tell, I have the agraph32 branch as current. The clojure code on the agraph32 branch still seems to be using the AG 4.0 API. For example... http://github.com/franzinc/agraph-java-client/blob/agraph32/clojure/test/com/franz/agr

Re: ANN: Clojure API for AllegroGraph

2009-11-24 Thread Mike Hinchey
You're right, the tests have not been converted to 3.2, so they are not running at this time. The best thing to look at is the tutorial.clj - most of these work properly, but example6 doesn't return correct results. The ones that don't work is where the clj code is incomplete, so I still have som

Re: AOT'd namespaces lose their metadata

2009-11-24 Thread Tom Faulhaber
I did take a little bit of a look at it and it is both simple and complex. When you're not AOT compiling code, the symbol that's creating the namespace gets wrapped with metadata when the ns macro is evaluated. This metadata is then explicitly moved on to the namespace. When the compiler runs, it

Re: N00B Java Question

2009-11-24 Thread dannyo152
Peter: I recommend pages 60-62 in Stuart's book for demonstrating how to do this. The notes about (. Math PI) or Math/PI (equivalent notations) are very much to point. To demonstrate: ;first the import user=> (import '(java.util.logging Logger Level)) nil ;create a logger user=> (def our-logger

Sneak Peek

2009-11-24 Thread jim
Evening all, I've been working on a library for writing web applications for compojure. I've got it written and (I think) working. First thing tomorrow is to write a sample app and post it along with the library. But in the meantime, I thought I'd let you all read about it if you're having troubl

Re: AOT'd namespaces lose their metadata

2009-11-24 Thread Phil Hagelberg
Tom Faulhaber writes: > So, Phil, if you want to take it from there, it would be great. If you > don't, I'll keep it on my list. Thanks for the notes; nice to see someone has done some detective work already. I'll probably try to take a look at this once I get Leiningen 1.0 out. It looks like ti

Re: Datatypes and Protocols - early experience program

2009-11-24 Thread Allen Rohner
On Nov 12, 6:10 am, Rich Hickey wrote: > An early version of the code for a few important new language > features, datatypes[1] and protocols[2] is now available in the 'new' > branch[3]. Note also that the build system[4] has builds of the new > branch, and that the new branch works with curren

Re: problem with resolve

2009-11-24 Thread Krukow
On Nov 24, 9:45 pm, kony wrote: > On 24 Lis, 18:07, Krukow wrote: > > > Three concurrent replies. We'd be better off using locks :-) > > Three concurrent replies but each of them brings something new ;) > Thank you very much for all of them! > > ... what is the use case,... I am just working on

Re: roll call of production use?

2009-11-24 Thread Adrian Cuthbertson
For a data analysis/reporting application, I use colt for some matrix processing, joda time for period calculations, jfreechart to generate charts, an adaptation clj-html to create some dynamic html, also now some StringTemplate templates to bring in and manipulate static content and finally all th

Re: roll call of production use?

2009-11-24 Thread eyeris
I used clojure to write an application that interpolates SQL results (from clojureql) into Excel spreadsheets (using Java interop to Apache's POI lib). I have a two users putting this to use for their project progress reporting. On Nov 23, 5:00 pm, Raoul Duke wrote: > hi, > > i'd be interested t

Re: roll call of production use?

2009-11-24 Thread Daniel Simms
-- Daniel Simms On Nov 24, 2009, at 22:23, Adrian Cuthbertson wrote: > The other spin-off of this is that using the repl, one is able to > really explore the api's of these big libraries dynamically and get to > know them much more intimately than when doing static compilation/run > cycles as

Re: "arithmetic" change between 1.0.0 and 1.1. 0

2009-11-24 Thread Stephen C. Gilardi
On Nov 16, 2009, at 5:56 AM, prhlava wrote: > No big deal, the fix is simple - this is heads up if more people find > their code broke with over-flow to infinity with the new version of > clojure. > > It looks that float type "propagates" into arithmetics (and it did not > before) - better expla