[ANN] clj-peg

2009-07-03 Thread Richard Lyman
I'm a little apprehensive about sharing this project with others, but I thought I might as well try. I'm very interested in any feedback, but for now the license is a bit-non-open. There are modifications that I'm still wanting to make to the core before I fully open the license. Here's a bit of

Re: Lazy sequence blows starck. Why?

2009-07-03 Thread David Cabana
On Jul 3, 11:11 pm, Gert Verhoog wrote: > This seems to work: > > (def triangle-numbers (lazy-cat [1] (map + (iterate inc 2) triangle- > numbers))) > > cheers, > gert Gert, Your proposed change works very well. It's interesting that a (seemingly) small change makes a huge difference in perfo

Re: Lazy sequence blows starck. Why?

2009-07-03 Thread Gert Verhoog
On 4/07/2009, at 2:42 PM, David Cabana wrote: > (defn triangle-numbers [] > (lazy-cat [1] (map + (iterate inc 2) (triangle-numbers > > This second approach dies with a stack overflow. Can anyone shed some > light on why? The last (triangle-numbers) is recursive, but without loop/recur this

conversation with Corey Haines

2009-07-03 Thread Stuart Halloway
Corey Haines, the touring software journeyman, recently spent a few days at Relevance (including a day pairing on a Clojure project). At the end, he videoed a conversation with me [1]. In Part 2 of the video we talk about Clojure. The conversation does not go at all deep technically, but if

Lazy sequence blows starck. Why?

2009-07-03 Thread David Cabana
I'm working one of the Euler project problems, which asks for the first triangle number with more than 500 divisors. I thought it might be fun to use lazy sequences, and tried two approaches. One worked, the other blew the stack. I'm trying to understand why the second approach fails. Here's the

Re: loneclojurian at ICFP programming contest

2009-07-03 Thread Robert Fischer
Jon Harrop wrote: > Scala > feels like a minor departure from Java to me, and I am not a Java fan. In > fact, more like C# 3 than any real functional language Don't say that too loud unless you're ready for a drawn-out flame war. http://enfranchisedmind.com/blog/posts/scala-not-functional/ ~~

Re: parsing program for nested parens and square brackets

2009-07-03 Thread carlitos
Probably the following is much less efficient than the other solutions proposed, but I find it easier to understand (and if I didn't misunderstand the problem it gives the right answer). (defn simplify-1 "remove adjacent pairs of opening/closing brackets" ([string] (simplify-1 "" string))

Re: loneclojurian at ICFP programming contest

2009-07-03 Thread Jon Harrop
On Thursday 02 July 2009 07:58:11 you wrote: > I wonder if Jon Harrop is still planning to write Clojure for > Scientists or Scala for Scientists or both? I am certainly interested in writing both books. I reviewed Scala back in 2007 and decided that it was not ready to be advocated. Perhaps thi

Re: Displaying Clojure code on a Website

2009-07-03 Thread Rick Moynihan
Hi Kai, 2009/7/2 Kai : > @Rick > > I got fairly far into this before I had problems with stack overflows. > I found out later than I needed knowledge of trampoline and mutual > recursion to solve the issue. I think the approach still has potential > but the setback forced me to consider other opt

Re: loneclojurian at ICFP programming contest

2009-07-03 Thread Nicolas Oury
I suspect you are not using double arrays with direct array manipulation in CLojure. I wonder whether it is linked to the fact your arrays are not in local (let) variables. I will try to randomly change a few things in your implementation tomorrow. Best, Nicolas. On Fri, Jul 3, 2009 at 9:56 PM

OAuth libraries?

2009-07-03 Thread Michael Harrison (goodmike)
Howdy, The DC Clojure Study Group is working on a mashup tool, with Yahoo Pipes as an inspiration. I'm tasked with building a reader module to read from Twitter, which uses OAuth. This led me to consider the broader task of writing an OAuth library, and that led me immediately to the hope that so

Re: loneclojurian at ICFP programming contest

2009-07-03 Thread igorrumiha
On Jul 3, 4:30 pm, Shawn Hoover wrote: > Interesting. Maybe I'm crazy, but when running java -server, replacing > vectors/assoc with arrays/aset slowed my project down from 4000 > iterations/second to 100! Similarly, removing multimethods for each > instruction and loop/recur to churn through the

NYC Clojure Users Group

2009-07-03 Thread Eric Thorsen
I setup a Meetup Group http://www.meetup.com/Clojure-NYC It would be great if people who might be interested in attending join the group. It's free. I'm working on setting up our first meeting. Please send me any thoughts on topics of interest, possible presenters, etc. Looking forward to meeti

Hiring full-time work-at-home clojure devs

2009-07-03 Thread dysinger
I probably should have titled this thread better so people would see it... "Hiring full-time work-at-home clojure devs" :D On Jul 2, 9:39 am, dysinger wrote: > We need to hire some more devs full time to work on a clojure project > (distributed backend hardcore clojure - not web dev). > > I wou

Re: Clojure STM not serializable

2009-07-03 Thread Rich Hickey
On Jun 19, 2:44 pm, Rich Hickey wrote: > On Fri, Jun 19, 2009 at 9:35 AM, Eric Willigers wrote: > > > On Jun 18, 9:35 pm, Rich Hickey wrote: > >>http://clojure.org/refs > > >> point #8: > > >> "If a constraint on the validity of a value of a Ref that is being > >> changed depends upon the simu

Re: loneclojurian at ICFP programming contest

2009-07-03 Thread Shawn Hoover
On Fri, Jul 3, 2009 at 9:29 AM, igorrumiha wrote: > > On Jul 2, 7:13 pm, Nicolas Oury wrote: > > You can also try to replace the arithmetic by unchecked arithmetic. (Is it > > correct from the point of view of the semantic of the VM you are > > implementing?). > > I didn't get to that yet becaus

Re: parsing program for nested parens and square brackets

2009-07-03 Thread Laurent PETIT
2009/7/3 Christophe Grand : > Hi all! > > On Thu, Jul 2, 2009 at 11:09 PM, Laurent PETIT > wrote: >> >> (def push conj) >> (def closing-counterpart { \( \), \[ \] }) >> (def opening-char? closing-counterpart) >> (defn matching-pair? [left right] (= right (closing-counterpart left))) >> >> (defn c

Re: loneclojurian at ICFP programming contest

2009-07-03 Thread igorrumiha
On Jul 2, 7:13 pm, Nicolas Oury wrote: > Hello, > I just have a look at your code. I was wondering why reflect.Array/getDouble > was faster than aget? (aget arrayname) actually makes a call to java.lang.reflect.Array/get which looks at the type of data in the array and then does the right thing.

Re: NullPointerException in Compiler.java

2009-07-03 Thread Rich Hickey
On Jul 3, 5:27 am, jon wrote: > Hi, could Rich or someone knowledgeable look into this (reflection > related?) NullPointerException in Compiler.java. > I think it's either a bug or at least should provide a better error > message, but I don't have any time to look deeper into it.. > Thanks, Jon

Re: parsing program for nested parens and square brackets

2009-07-03 Thread Christophe Grand
Hi all! On Thu, Jul 2, 2009 at 11:09 PM, Laurent PETIT wrote: > (def push conj) > (def closing-counterpart { \( \), \[ \] }) > (def opening-char? closing-counterpart) > (defn matching-pair? [left right] (= right (closing-counterpart left))) > > (defn consume-one [stack c] > (if (or (opening-char

Re: print-base / print-radix?

2009-07-03 Thread Parth
On Jul 3, 11:25 am, Tom Faulhaber wrote: > Parth, > > I was thinking about this a little more today and I came up with a way > to extend the pretty printer easily to support *print-radix* with a > little wrapper. I'll try to get a chance to write it up for you > tomorrow. > > Tom > Sounds perf

NullPointerException in Compiler.java

2009-07-03 Thread jon
Hi, could Rich or someone knowledgeable look into this (reflection related?) NullPointerException in Compiler.java. I think it's either a bug or at least should provide a better error message, but I don't have any time to look deeper into it.. Thanks, Jon - I was using clojure-1.0 but looks l

Re: parsing program for nested parens and square brackets

2009-07-03 Thread B Smith-Mannschott
On Fri, Jul 3, 2009 at 00:50, Laurent PETIT wrote: > > Hey, how come we did not see this even more concise version sooner ? :-): > > ;; using just clojure 1.0.0 without any additional library :-) > ;; from command line: > ;; java -cp clojure.jar /path/to/challenge2.clj "()" "((([[]])))" ... ... >

Re: *command-line-args*

2009-07-03 Thread Emeka
Steve, Could this be done such that % java -cp /sq/ext/clojure/clojure.jar clojure.main demo.clj foo bar baz the highlighted part won't the there? But would be ''attached'' behind the scene . Regards, Emeka On Thu, Jul 2, 2009 at 6:17 PM, Stephen C. Gilardi wrote: > > On Jul 2, 2009, at 2:00