Re: loneclojurian at ICFP programming contest

2009-07-01 Thread fft1976
On Jun 30, 3:02 pm, igorrumiha wrote: > Some people claim > that the JVM can give you C-like performance, but I would be more than > happy if I got my VM to be 10x slower than the C ones :) I like your honesty! You can come to my house and * my sister! I wonder if Jon Harrop is still plannin

RE: Problem with clojure code on .net.

2009-07-01 Thread Ted Neward
Be careful with assumptions about the two platforms--extension methods, for example, are purely a fiction of the C# compiler. No CLR support was added to provide anything that shipped as part of C# 3.0--just compiler and libraries. Ditto (AFAICT) for .NET 4.0. The new "dynamic" keyword is just sy

how does clojure's reader determine encoding when reading source from file?

2009-07-01 Thread B Smith-Mannschott
When clojure loads a source file, how does it know what encoding to use? Does it just assume Latin-1? Does it just use platform encoding (not the same on all platforms!)? Is there a way to tell it the source is UTF-8 encoded? If not, perhaps following the Python/Emacs convention might be sensible:

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 wrote: >  accounting software in Clojure? > Which area of accounting will it cover? > > Emeka > > On Thu, Jun 25, 2009 at 3:41 AM, fft1976 wrote: > > > I know some of you are sea

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

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

2009-07-01 Thread Eric Willigers
On Jul 1, 1:02 am, Chouser wrote: > On Tue, Jun 30, 2009 at 8:37 AM, Rowdy Rednose 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 provided by > > Clojure. I'm not sur

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 n

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") wi

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

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 J

Re: Emacs clojure-mode home?

2009-07-01 Thread Phil Hagelberg
Jeff Valk 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), now that > cloj

Re: Emacs clojure-mode home?

2009-07-01 Thread Phil Hagelberg
Chris Dean 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. -Phil --~--~-

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

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 cl

Re: Emacs clojure-mode home?

2009-07-01 Thread Phil Hagelberg
Chris Dean 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 is at http://gith

Re: Enlive questions

2009-07-01 Thread Christophe Grand
On Wed, Jul 1, 2009 at 11:42 PM, cody wrote: > > On Jul 1, 3:45 pm, cody 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 t

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

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

Re: Enlive questions

2009-07-01 Thread cody
On Jul 1, 3:45 pm, cody 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 again for the f

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread igorrumiha
On Jul 1, 10:24 pm, fft1976 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 allow typ

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread Mark Engelberg
On Wed, Jul 1, 2009 at 2:08 PM, Daniel Lyons 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 does not exac

Re: pprint

2009-07-01 Thread Laurent PETIT
Hi Philip, 2009/7/1 philip.hazel...@gmail.com : > > On Jul 1, 9:52 am, Laurent PETIT 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 performan

Re: pprint

2009-07-01 Thread Laurent PETIT
Hi Tom, 2009/7/1 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 rea

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 implemen

Re: pprint

2009-07-01 Thread philip.hazel...@gmail.com
On Jul 1, 9:52 am, Laurent PETIT 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 it). For performance

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread fft1976
On Jul 1, 1:10 pm, igorrumiha wrote: > On Jul 1, 8:25 pm, fft1976 wrote: > > > On Jun 30, 3:02 pm, igorrumiha 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,

Re: Enlive questions

2009-07-01 Thread cody
On Jun 27, 3:16 am, Christophe Grand wrote: > Indeed. Fixed. > > user=> (html-resource (java.io.StringReader. "th")) > ({:type :comment, :data " o noes a comment "} {:tag :html, :attrs nil, > :content [{:tag :head, :attrs nil, :content [{:tag :title, :attrs nil, > :content ["t"]}]} {:tag :body,

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread igorrumiha
On Jul 1, 8:55 am, Nicolas Oury 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) (once only) at ru

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread igorrumiha
On Jul 1, 8:25 pm, fft1976 wrote: > On Jun 30, 3:02 pm, igorrumiha 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 rang

Re: Clojure in Issue 1 of Pragmatic Publishings Magazine

2009-07-01 Thread Laurent PETIT
2009/7/1 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. One general solution could be to have a hidden

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 wrote: > > Has anyone out there written an Apache POI wrapper yet? > > I started to (for Excel processing), only to abandon it in disgust.   > POI is j

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread fft1976
On Jun 30, 3:02 pm, igorrumiha 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 Python. On Jun 30,

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 PO

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 wrote: > > Hi, thanks for the pointe

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: 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 fu

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 del

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 clojure@g

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: 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 wrote: > > I looked at the ICFP Contest too. I didn't even get as far as solving > the first problem, but I did implement a virtual mach

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 ashame

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 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 wrote: > > For anyone that's interested check out http://www.pragprog.com/magazines > > It looks like pragmatic p

Clojure in Issue 1 of Pragmatic Publishings Magazine

2009-07-01 Thread nrub
For anyone that's interested check out http://www.pragprog.com/magazines It looks like pragmatic publishing is going to start pushing out monthly magazines. I just checked out issue #1 which seems to have some good stuff, including an interview with Rich Hickey & An article by Stuart Halloway on

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 clojure@goo

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: 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 > Hinsen 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 switching to low-

Re: Clojure for Scientific and other CPU-intensive Computing

2009-07-01 Thread Daniel E. Renfer
Mark Engelberg writes: > On Tue, Jun 30, 2009 at 12:29 AM, Konrad > Hinsen 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 switching to low-level data structures >>

Re: agents + repl?

2009-07-01 Thread Michał Kwiatkowski
On Wed, Jul 1, 2009 at 9:43 AM, Raoul Duke 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 console. 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 nov

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 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 wanted to see > wha

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread igorrumiha
On Jul 1, 8:55 am, Nicolas Oury 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 were possible ways of

Re: ants.clj and render thread starvation

2009-07-01 Thread Krukow
On Jul 1, 3:09 pm, Rich Hickey 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 and adapt, in this

Re: ants.clj and render thread starvation

2009-07-01 Thread Krukow
On Jul 1, 8:43 am, Daniel Lyons 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 - happy Clojure user her

Re: ants.clj and render thread starvation

2009-07-01 Thread Rich Hickey
On Wed, Jul 1, 2009 at 1:50 AM, Krukow wrote: > > > On Jun 30, 6:01 pm, Rich Hickey 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 transaction is unable to satisfy its s

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: Displaying Clojure code on a Website

2009-07-01 Thread Chouser
On Fri, Jun 26, 2009 at 5:12 PM, Kai 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 generates

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

2009-07-01 Thread Matt Culbreth
On Jul 1, 8:02 am, Rowdy Rednose 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 later - if I choose

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

2009-07-01 Thread Rowdy Rednose
On Jul 1, 12:02 am, Chouser 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 don't need tha

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 wrote: > > 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 to understand.

Re: agents + repl?

2009-07-01 Thread Timothy Pratley
You just didn't (flush) Regards, Tim. On Jul 1, 5:43 pm, Raoul Duke 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, > i don't see

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 da

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 t

Re: Problem with clojure code on .net.

2009-07-01 Thread Michael Wood
Hi 2009/7/1 mmwaikar : > 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 filename)) First, d