Re: Deep deref

2009-11-24 Thread Christophe Grand
On Mon, Nov 23, 2009 at 11:56 PM, John Harrop jharrop...@gmail.com 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

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

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 cloj...@davidb.org 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.

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 +

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

Re: Datatypes and Protocols - early experience program

2009-11-24 Thread Chouser
On Tue, Nov 24, 2009 at 1:19 AM, Krukow karl.kru...@gmail.com wrote: On Nov 24, 4:55 am, Allen Rohner aroh...@gmail.com 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

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 rao...@gmail.com 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

Re: Clojure Scoping Rules

2009-11-24 Thread Mark Engelberg
On Mon, Nov 23, 2009 at 11:39 PM, Garth Sheldon-Coulson g...@mit.edu 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

Re: Datatypes and Protocols - early experience program

2009-11-24 Thread Meikel Brandmeyer
Hi, On Nov 23, 3:29 pm, Krukow karl.kru...@gmail.com 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

Re: roll call of production use?

2009-11-24 Thread Meikel Brandmeyer
Hi, On Nov 24, 6:06 am, John Harrop jharrop...@gmail.com 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

Re: Clojure User Survey, preparation for 1.1

2009-11-24 Thread Meikel Brandmeyer
Hi, On Nov 24, 9:44 am, bOR_ boris.sch...@gmail.com 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,

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

Re: roll call of production use?

2009-11-24 Thread John Harrop
On Tue, Nov 24, 2009 at 1:04 AM, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Nov 24, 6:06 am, John Harrop jharrop...@gmail.com 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

Re: problem with resolve

2009-11-24 Thread Christophe Grand
On Tue, Nov 24, 2009 at 12:01 PM, kony kulakow...@gmail.com 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

Re: problem with resolve

2009-11-24 Thread John Harrop
On Tue, Nov 24, 2009 at 6:01 AM, kony kulakow...@gmail.com 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

Re: problem with resolve

2009-11-24 Thread Krukow
On Nov 24, 12:01 pm, kony kulakow...@gmail.com 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

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

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

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

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!

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 holyg...@gmail.com 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

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 thread

Re: Deep deref

2009-11-24 Thread Krukow
On Nov 14, 5:42 pm, André Thieme splendidl...@googlemail.com 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

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 the

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 cdpjenk...@gmail.com 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

Re: Deep deref

2009-11-24 Thread Krukow
On Nov 24, 7:50 pm, Krukow karl.kru...@gmail.com wrote: On Nov 14, 5:42 pm, André Thieme splendidl...@googlemail.com 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

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

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_ boris.sch...@gmail.com 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

Re: N00B Java Question

2009-11-24 Thread Christophe Grand
Hi, On Tue, Nov 24, 2009 at 10:39 PM, Peter Wolf opus...@gmail.com 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

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 24,

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 christo...@cgrand.net Hi, On Tue, Nov 24, 2009 at 6:38 PM, Chris Jenkins cdpjenk...@gmail.comwrote: Is it possible to set *warn-on-reflection* such that it can be seen by multiple threads? I

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

Re: problem with resolve

2009-11-24 Thread kony
On 24 Lis, 18:07, Krukow karl.kru...@gmail.com 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

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. *

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.

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...

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

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,

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

Re: AOT'd namespaces lose their metadata

2009-11-24 Thread Phil Hagelberg
Tom Faulhaber tomfaulha...@gmail.com 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

Re: Datatypes and Protocols - early experience program

2009-11-24 Thread Allen Rohner
On Nov 12, 6:10 am, Rich Hickey richhic...@gmail.com 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

Re: problem with resolve

2009-11-24 Thread Krukow
On Nov 24, 9:45 pm, kony kulakow...@gmail.com wrote: On 24 Lis, 18:07, Krukow karl.kru...@gmail.com 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

Re: roll call of production use?

2009-11-24 Thread Daniel Simms
-- Daniel Simms dsi...@dsimms.com On Nov 24, 2009, at 22:23, Adrian Cuthbertson adrian.cuthbert...@gmail.com 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

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 explanation