Re: ants.clj and render thread starvation

2009-07-01 Thread Daniel Lyons
On Jun 30, 2009, at 11:50 PM, Krukow wrote: I like the pragmatics of :min-history, and I believe it would be sufficient for many scenarios. However, I suspect we are now moving closer to the situation that Cliff Click was predicting [1] where as a programmer you need more precise knowledge

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread Nicolas Oury
Hello, That is an interesting blog post. I am not a clojure specialist, but if I was to try to change your program to get towards C-like speed (or better), I would : - Use java arrays for memory. You don't seem to use the vectors in a persistent way, and there does not seem to be easy

Re: Problem with clojure code on .net.

2009-07-01 Thread Michael Wood
Hi 2009/7/1 mmwaikar mmwai...@gmail.com: Hi, I am learning clojure these days, but on .Net. I have the following code - I only have a tiny bit to add to what Daniel's already said. [...] (defn GetSubfolderName [filename]        ((def name-wo-extn (Path/GetFileNameWithoutExtension

agents + repl?

2009-07-01 Thread Raoul Duke
(i googled but didn't find anything about this yet...) while trying to understand the graphics animation code from ants.clj, i tried this simpler code, but when i run the code below in the repl, i don't see the .s until i evaluate something afterwards; then they get flushed to the console. is

Re: pprint

2009-07-01 Thread Laurent PETIT
Hi Tom, Thanks for the answer. I already have some embryonic antlr grammar for clojure, but I'm willing to give pprint a thourough try. I'll play with your code. Do you have a first pass over the clojure reader to attach other meta information as you go, or do you directly consume the clojure

Re: agents + repl?

2009-07-01 Thread Timothy Pratley
You just didn't (flush) Regards, Tim. On Jul 1, 5:43 pm, Raoul Duke rao...@gmail.com wrote: (i googled but didn't find anything about this yet...) while trying to understand the graphics animation code from ants.clj, i tried this simpler code, but when i run the code below in the repl,

Re: Article on Dispatch

2009-07-01 Thread Emeka
Thanks, more of it. Emeka On Mon, Jun 29, 2009 at 12:31 AM, Daniel Jomphe danieljom...@gmail.comwrote: I think the following article I wrote may help properly understanding dispatch. I submit here for your pleasure/review. First paragraph: I believe multiple dispatch is known to be hard

Re: Clojure only (in-memory) database / locking granularity

2009-07-01 Thread Rowdy Rednose
On Jul 1, 12:02 am, Chouser chou...@gmail.com wrote: You could wrap a Ref around every value, if you chose, to allow independent changes to different rows at the same time -- though this would not help when inserting rows. I guess having millions of Refs would not perform too well. Plus you

Re: Clojure only (in-memory) database / locking granularity

2009-07-01 Thread Matt Culbreth
On Jul 1, 8:02 am, Rowdy Rednose rowdy.redn...@gmx.net wrote: But it looks like I have to implement that myself - which is not a complaint, but I'm trying to estimate the amount of work necessary. But I guess I could just start with one Ref per relation and then make it more concurrent

Re: Displaying Clojure code on a Website

2009-07-01 Thread Chouser
On Fri, Jun 26, 2009 at 5:12 PM, Kaipoki...@gmail.com wrote: I'm new to this discussion group and Clojure. Welcome! I'm sharing the first bigger-than-REPL script that I've written because I haven't seen anything else like it for Clojure. It's a script that takes Clojure code as input and

Re: Clojure only (in-memory) database / locking granularity

2009-07-01 Thread Rowdy Rednose
I'm just trying to once and for all find or implement a clojure solution for the simple problem that most companies (that make heaps of money developing super boring software) have: There's relational data like Persons and Companies, that needs to be accessed and manipulated by multiple client

Re: ants.clj and render thread starvation

2009-07-01 Thread Rich Hickey
On Wed, Jul 1, 2009 at 1:50 AM, Krukowkarl.kru...@gmail.com wrote: On Jun 30, 6:01 pm, Rich Hickey richhic...@gmail.com wrote: MVCC history in Clojure's STM is dynamic, created by need. There is no read tracking, and more important for this case, no transaction tracking. So, if a read

Re: ants.clj and render thread starvation

2009-07-01 Thread Krukow
On Jul 1, 8:43 am, Daniel Lyons fus...@storytotell.org wrote: While that may be true for the time being I think that Rich's original   response still holds water: that usually, correctness is more   important than performance and correctness is the real win with STM.   [snip...] Agreed -

Re: ants.clj and render thread starvation

2009-07-01 Thread Krukow
On Jul 1, 3:09 pm, Rich Hickey richhic...@gmail.com wrote: [snip] lock architecture that is woven throughout. In fact, I think the possibility for knobs is a key strength of an STM. Furthermore, such knobs can be dynamic, allowing for applications that analyze their own runtime situation

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread igorrumiha
On Jul 1, 8:55 am, Nicolas Oury nicolas.o...@gmail.com wrote: - Use java arrays for memory. You don't seem to use the vectors in a persistent way, and there does not seem to be easy parallelization of the vm. That's less elegant but probably quicker. I wouldn't say the same thing if there

Re: Interest in creating a NYC Clojure user group?

2009-07-01 Thread cridal
I would definitely be interested... Marcin. On Jun 4, 12:09 pm, Eric Thorsen ethor...@enclojure.org wrote: I went to the Bay Area Clojure group meeting last night which was great.  People demoed some very interesting stuff and it was great having face time with more people using Clojure.   I

Penumbra, a new set of OpenGL bindings

2009-07-01 Thread ztellman
Most of the OpenGL code I've seen has been a fairly literal translation of the corresponding Java, so as a way of getting my feet wet in Clojure I've written something that tries to be a little more idiomatic. It can be found at http://github.com/ztellman/penumbra/tree/master The only really

Re: agents + repl?

2009-07-01 Thread Michał Kwiatkowski
On Wed, Jul 1, 2009 at 9:43 AM, Raoul Duke rao...@gmail.com wrote: while trying to understand the graphics animation code from ants.clj, i tried this simpler code, but when i run the code below in the repl, i don't see the .s until i evaluate something afterwards; then they get flushed to the

Re: Clojure for Scientific and other CPU-intensive Computing

2009-07-01 Thread Daniel E. Renfer
Mark Engelberg mark.engelb...@gmail.com writes: On Tue, Jun 30, 2009 at 12:29 AM, Konrad Hinsenkonrad.hin...@laposte.net wrote: What is particularly nice about Clojure is that in most situations you don't need to switch to Java for speed. You can optimize your code by adding type hints and

Re: Clojure for Scientific and other CPU-intensive Computing

2009-07-01 Thread Konrad Hinsen
On Jun 30, 2009, at 19:07, Mark Engelberg wrote: On Tue, Jun 30, 2009 at 12:29 AM, Konrad Hinsenkonrad.hin...@laposte.net wrote: What is particularly nice about Clojure is that in most situations you don't need to switch to Java for speed. You can optimize your code by adding type hints and

Apache POI wrapper????

2009-07-01 Thread Sean Devlin
Hey, Has anyone out there written an Apache POI wrapper yet? Sean --~--~-~--~~~---~--~~ 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

Re: send versus send-off

2009-07-01 Thread Kai
Thanks Meikel and Steve it is quite clear now! I will redirect questions here should anybody ask. ~ Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Clojure in Issue 1 of Pragmatic Publishings Magazine

2009-07-01 Thread richard claxton
Thanks for the heads up. Michael Swaine used to be the editor of dr dobbs journal which I enjoyed reading for years. so it should be a good read. On Wed, Jul 1, 2009 at 3:40 PM, nrub p...@typosfrompaul.com wrote: For anyone that's interested check out http://www.pragprog.com/magazines It

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread Maurice Codik
I did icfp09 on my own using a mix of clojure+java. I'd sitll call myself a clojure newbie, but have been writting java for a few years now. my code is here: http://github.com/mcodik/icfp2009-momo/tree/master I wrote the vm in java since I figured that most of the code would be really imperative

Re: Clojure in Issue 1 of Pragmatic Publishings Magazine

2009-07-01 Thread Laurent PETIT
Hi, thanks for the pointer ! By the way, I was wondering whether error-kit can be leveraged seamlessly with concurrent programming ? For example I guess that using (vec (pmap ...) instead of (vec (map ...) will not work because the binding of the handlers will be lost. I have always been

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread Shawn Hoover
Another one: http://bitbucket.org/shoover/icfp. Like Jeff we had fun on the VM but didn't get to post a solution :) On Wed, Jul 1, 2009 at 1:34 AM, Jeff Foster dr.jeff.fos...@gmail.comwrote: I looked at the ICFP Contest too. I didn't even get as far as solving the first problem, but I did

Re: pprint

2009-07-01 Thread Tom Faulhaber
Laurent, Sounds like a good plan. To answer your questions: I'll play with your code. Do you have a first pass over the clojure reader to attach other meta information as you go, or do you directly consume the clojure data structures the reader passes to you ? pprint operates on clojure

Re: agents + repl?

2009-07-01 Thread Raoul Duke
i don't see the .s until i evaluate something afterwards; then they many thanks to all for the help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Videos from the Rich Hickey special Bay Area Clojure Group meeting now online

2009-07-01 Thread Tom Faulhaber
Hi all, I've posted the videos we took at the Bay Area Clojure Group meeting at http://tomfaulhaber.blip.tv. The production values leave a great deal to be desired and we didn't have enough tape to catch everything, but most of the stuff is there and we edited out most of the long projector

Re: Displaying Clojure code on a Website

2009-07-01 Thread Kai
Hey Chouser, I did copy from clojure.contrib.duck-streams and originally had a comment in there as regards to that. It got removed over clean-up iterations, I'll put it back on there. I must learn to be more formal when I publicly release code :) Thanks for the tips on sets! Originally those

Re: Videos from the Rich Hickey special Bay Area Clojure Group meeting now online

2009-07-01 Thread Raoul Duke
that is terrific. many thanks! --~--~-~--~~~---~--~~ 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

Re: Clojure in Issue 1 of Pragmatic Publishings Magazine

2009-07-01 Thread Howard Lewis Ship
I wonder if there's a solution based on some universal meta-data to identify what is lazily evaluated, and provide hooks (functions in the meta-data) to insert handlers, such as error-kit, into the lazy evaluation. On Wed, Jul 1, 2009 at 9:29 AM, Laurent PETIT laurent.pe...@gmail.comwrote: Hi,

Re: Apache POI wrapper????

2009-07-01 Thread Richard Newman
Has anyone out there written an Apache POI wrapper yet? I started to (for Excel processing), only to abandon it in disgust. POI is just too incomplete: I have to choose between loading everything into memory (impossible), or essentially parsing XLSX myself (so what's the point of using

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread fft1976
On Jun 30, 3:02 pm, igorrumiha igorrum...@gmail.com wrote: According to some of the people on the #icfp-contest channel my VM implementation is 500x to 1000x slower than a typical implementation written in C. It is, on the other hand, in the same performance range as some VMs written in

Re: Apache POI wrapper????

2009-07-01 Thread Sean Devlin
Hmmm... good to know POI still needs work. I guess I'll just stick with CSV tab delimited for now. Thanks! On Jul 1, 1:56 pm, Richard Newman holyg...@gmail.com wrote: Has anyone out there written an Apache POI wrapper yet? I started to (for Excel processing), only to abandon it in

Re: Clojure in Issue 1 of Pragmatic Publishings Magazine

2009-07-01 Thread Laurent PETIT
2009/7/1 Howard Lewis Ship hls...@gmail.com: I wonder if there's a solution based on some universal meta-data to identify what is lazily evaluated, and provide hooks (functions in the meta-data) to insert handlers, such as error-kit, into the lazy evaluation. One general solution could be to

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread igorrumiha
On Jul 1, 8:25 pm, fft1976 fft1...@gmail.com wrote: On Jun 30, 3:02 pm, igorrumiha igorrum...@gmail.com wrote: According to some of the people on the #icfp-contest channel my VM implementation is 500x to 1000x slower than a typical implementation written in C. It is, on the other hand, in

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread igorrumiha
On Jul 1, 8:55 am, Nicolas Oury nicolas.o...@gmail.com wrote: [SNIP] And instead of reading the instruction and storing them in a vector you create a term: program-term =    `(fn [input-array output-array memory]           (do ~...@list-of-instructions) Then you (eval program-term)

Re: Enlive questions

2009-07-01 Thread cody
On Jun 27, 3:16 am, Christophe Grand christo...@cgrand.net wrote: Indeed. Fixed. user= (html-resource (java.io.StringReader. !-- o noes a comment --htmlheadtitlet/title/headbodyh1h/h1/body/html)) ({:type :comment, :data o noes a comment } {:tag :html, :attrs nil, :content [{:tag :head,

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread fft1976
On Jul 1, 1:10 pm, igorrumiha igorrum...@gmail.com wrote: On Jul 1, 8:25 pm, fft1976 fft1...@gmail.com wrote: On Jun 30, 3:02 pm, igorrumiha igorrum...@gmail.com wrote: According to some of the people on the #icfp-contest channel my VM implementation is 500x to 1000x slower than a

Re: pprint

2009-07-01 Thread philip.hazel...@gmail.com
On Jul 1, 9:52 am, Laurent PETIT laurent.pe...@gmail.com wrote: As far as IDE integration is concerned, i would not bother (at first) about incremental thing. I rather intend to always parse the entire edited file content (of course if this causes a performance problem, I might rethink about

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread Daniel Lyons
On Jul 1, 2009, at 2:24 PM, fft1976 wrote: Isn't it strange that Clojure with type declarations (that some people say should be as fast as Java) was only as fast as Python (which does not allow type declarations and does not exactly have a reputation for speed)? Unless the two

Re: pprint

2009-07-01 Thread Laurent PETIT
Hi Tom, 2009/7/1 Tom Faulhaber tomfaulha...@gmail.com: Laurent, Sounds like a good plan. To answer your questions: I'll play with your code. Do you have a first pass over the clojure reader to attach other meta information as you go, or do you directly consume the clojure data

Re: pprint

2009-07-01 Thread Laurent PETIT
Hi Philip, 2009/7/1 philip.hazel...@gmail.com philip.hazel...@gmail.com: On Jul 1, 9:52 am, Laurent PETIT laurent.pe...@gmail.com wrote: As far as IDE integration is concerned, i would not bother (at first) about incremental thing. I rather intend to always parse the entire edited file

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread Mark Engelberg
On Wed, Jul 1, 2009 at 2:08 PM, Daniel Lyonsfus...@storytotell.org wrote: On Jul 1, 2009, at 2:24 PM, fft1976 wrote: Isn't it strange that Clojure with type declarations (that some people say should be as fast as Java) was only as fast as Python (which does not allow type declarations and

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread igorrumiha
On Jul 1, 10:24 pm, fft1976 fft1...@gmail.com wrote: Has either one of you tried adding type declarations? Yes, I had them from the start. Isn't it strange that Clojure with type declarations (that some people say should be as fast as Java) was only as fast as Python (which does not

Re: Enlive questions

2009-07-01 Thread cody
On Jul 1, 3:45 pm, cody c...@koeninger.org wrote: The use case for this is inserting sub-templates, e.g. site-wide common sidebars, footer, etc.  Or do you see an alternate way to accomplish that goal? Eh, looks like I need to read earlier in the thread, apologies for the noise, and thanks

Re: Displaying Clojure code on a Website

2009-07-01 Thread Laurent PETIT
Hi, Did you place the code somewhere in a public repo on github, google code, svn, bitbucket or whatever ? (so that it is easy to track changes ?). Anyhow, is it possible to reuse your code ? I'm evaluating several ways of starting code for doing formatting for the clojure plugin for eclipse,

Emacs clojure-mode home?

2009-07-01 Thread Chris Dean
Where's the current home for the Emacs clojure-mode source? I have a one line patch I'd like to make, but don't know where to send it! Is it http://github.com/technomancy/clojure-mode/tree/master ? Anyway I'll include the patch to add a local-abbrev-table here since it is so small. Cheers,

Re: Enlive questions

2009-07-01 Thread Christophe Grand
On Wed, Jul 1, 2009 at 11:42 PM, cody c...@koeninger.org wrote: On Jul 1, 3:45 pm, cody c...@koeninger.org wrote: The use case for this is inserting sub-templates, e.g. site-wide common sidebars, footer, etc. Or do you see an alternate way to accomplish that goal? Eh, looks like I

Re: Emacs clojure-mode home?

2009-07-01 Thread Phil Hagelberg
Chris Dean ctd...@sokitomi.com writes: Where's the current home for the Emacs clojure-mode source? I have a one line patch I'd like to make, but don't know where to send it! Is it http://github.com/technomancy/clojure-mode/tree/master ? That's my repository. Technically the canonical one

Re: pprint

2009-07-01 Thread Tom Faulhaber
Are you suggesting that clojure reader parsed code could be first translated back to String and reinjected to the source code reader ? Indeed that could simplify final implementation. I don't know what the impact on performance would be, though. No, that wouldn't work because the clojure

Re: Emacs clojure-mode home?

2009-07-01 Thread Chris Dean
It looks like your patch might be incomplete; I get a void-variable: clojure-mode-abbrev-table when I run that. So it is. Looks like I had the defs in my private startup file for some reason. Here's a corrected patch. Cheers, Chris Dean diff --git a/clojure-mode.el b/clojure-mode.el index

Re: Emacs clojure-mode home?

2009-07-01 Thread Jeff Valk
As a side note on the topic of clojure-mode, I noticed the function clojure-install still clones Kevin O'Neill's svn mirror (git://github.com/kevinoneill/clojure.git). Shouldn't this point to Rich's repository (git://github.com/richhickey/clojure.git), now that clojure has moved to github? -

Re: Emacs clojure-mode home?

2009-07-01 Thread Phil Hagelberg
Chris Dean ctd...@sokitomi.com writes: It looks like your patch might be incomplete; I get a void-variable: clojure-mode-abbrev-table when I run that. So it is. Looks like I had the defs in my private startup file for some reason. Here's a corrected patch. Thanks; I've committed this.

Re: Emacs clojure-mode home?

2009-07-01 Thread Phil Hagelberg
Jeff Valk jv-li...@tx.rr.com writes: As a side note on the topic of clojure-mode, I noticed the function clojure-install still clones Kevin O'Neill's svn mirror (git://github.com/kevinoneill/clojure.git). Shouldn't this point to Rich's repository (git://github.com/richhickey/clojure.git),

Re: Problem with clojure code on .net.

2009-07-01 Thread mmwaikar
Thanks a lot Daniel for your suggestions. As per my understanding Clojure for Java and .Net are two implementations of the same language, but they have to support different things because the underlying platforms support different things - e.g. extension methods (are in C# but most likely not in

Re: Problem with clojure code on .net.

2009-07-01 Thread mmwaikar
Thanks Michael, and you are spot on about your observation on parentheses :) but when I wasn't putting (def name-wo-extn something) in another (), I was getting some error like - too many arguments to def, hence I put one more. I am still getting used to this syntax. On Jul 1, 3:03 am, Michael

Awkward Booleans from contrib.sql

2009-07-01 Thread Vagif Verdi
Here's some warts, when working with boolean fields from sql databases. (if (with-db (sql-val [select convert(bit, 0)])) Yes, no) will return Yes. This is because contrib.sql returns java Booleans, not clojure tru/false. (if (= false (with-db (sql-val [select null]))) Yes, no) will return no.

Re: Awkward Booleans from contrib.sql

2009-07-01 Thread Vagif Verdi
I just got an advise from IRC to use (boolean x). Problem solved :) --~--~-~--~~~---~--~~ 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

Re: Clojure only (in-memory) database / locking granularity

2009-07-01 Thread Eric Willigers
On Jul 1, 1:02 am, Chouser chou...@gmail.com wrote: On Tue, Jun 30, 2009 at 8:37 AM, Rowdy Rednoserowdy.redn...@gmx.net wrote: Would it be easy to implement an in-memory database in clojure that allows concurrent access? It sounds pretty easy, as most of the features are already

Re: Clojure in Issue 1 of Pragmatic Publishings Magazine

2009-07-01 Thread Robert Fischer
You're now reinventing JavaScript's object system, BTW. ~~ Robert. Laurent PETIT wrote: 2009/7/1 Howard Lewis Ship hls...@gmail.com: I wonder if there's a solution based on some universal meta-data to identify what is lazily evaluated, and provide hooks (functions in the meta-data) to

Re: Foreclojure

2009-07-01 Thread fft1976
I just changed my mind about releasing this. If anyone wants to use the name, it's yours! On Jun 25, 12:17 am, Emeka emekami...@gmail.com wrote:  accounting software in Clojure? Which area of accounting will it cover? Emeka On Thu, Jun 25, 2009 at 3:41 AM, fft1976 fft1...@gmail.com wrote: