Re: Response

2010-07-18 Thread Carson
Hi Per, woh, take it easy. I don't claim to be an expert. Thanks for showing me that though. It certainly didn't seem right at first, but I had trouble figuring out the laziness in clojure, me being new to it. Anyway, have a good weekend! Carson On Jul 17, 10:02 pm, Per Vognsen

Re: A functional, efficient, convolution function. Is imperitive-style the answer?

2010-07-18 Thread Carson
I should add, oops, ignore what I wrote. :) see: https://groups.google.com/group/clojure/tree/browse_frm/thread/33366bccc6df7756/415072576d83b757?rnum=11_done=%2Fgroup%2Fclojure%2Fbrowse_frm%2Fthread%2F33366bccc6df7756%3F#doc_0d0a3759a0a10328 Carson On Jul 17, 3:58 pm, Carson

Re: Typed Racket

2010-07-18 Thread Tomi Neste
On Fri, Jul 16, 2010 at 1:23 AM, ntu...@googlemail.com ntu...@googlemail.com wrote: On Jul 15, 8:16 pm, Tomi Neste tomi.ne...@gmail.com wrote: But I don't think it would be easy to make it work with Clojure, given how polymorphic and dynamic the language is (IMHO Scheme is not too far

Re: Why does using a dynamic binding make a function impure?

2010-07-18 Thread Moritz Ulrich
Whoops. My fault. Of course 24 is the correct result. I shouldn't do math at 3 in the morning. On Sun, Jul 18, 2010 at 6:40 AM, Brisance cru...@gmail.com wrote: Interestingly, the results are different for me. ; SLIME 2010-05-01 user (def *forty-two* 42) #'user/*forty-two* user (defn

Re: persistent LRU cache (request for input)

2010-07-18 Thread Paul Stadig
I think what you are doing is analogous to the peek and pop operations in core. To get and remove and item you would peek to get the first item, and then alter your ref with a pop, which returns the structure minus with the first item removed. If you do all of this within a dosync, including the

Re: Response

2010-07-18 Thread Isaac Hodes
First: sorry for splitting the conversation. That was my fault: don't know how it happened. For those following along: the thread this started with is here: http://groups.google.com/group/clojure/browse_thread/thread/ee4169bc292ab572 Second, I don't think I expressed myself well in the original

Re: persistent LRU cache (request for input)

2010-07-18 Thread Steven E. Harris
Peter Schuller peter.schul...@infidyne.com writes: I can turn 'get' into 'peek' and have another function that more specifically advertises, by its name, that it produces both a value and a new cache. That only helps naming though, and not usability of said function. Yes, and though it does

Re: Response

2010-07-18 Thread Michael Gardner
On Jul 17, 2010, at 9:46 PM, Isaac Hodes wrote: I did check out your response: it's rather fast on my machine. it's not really functional, though, as you use the `let` macro as a way of procedurally executing a lot of functions. This isn't bad at all, but you're not composing functions.

Re: Function called from macro loses record structure

2010-07-18 Thread Kyle Schaffrick
On Sat, 17 Jul 2010 00:59:35 -0700 (PDT) Quzanti quza...@googlemail.com wrote: Thanks Michał I suppose this raises a deeper question - should an expression and what it evaluates to always be interchangeable in source code? This is essentially what I was trying to say, stated much more

Re: clojure.string namespace missing from API page?

2010-07-18 Thread Tom Faulhaber
The official doc for clojure and clojure-contrib have moved as well. They are now at: http://clojure.github.com/clojure/ and http://clojure.github.com/clojure-contrib/ I have not got them completely up-to-date with the 1.2 beta split, so for the moment just look at the master branch. I expect

Re: Response

2010-07-18 Thread Jeffrey Schwab
On 7/17/10 4:43 PM, Isaac Hodes wrote: Apologies in advance if this is somewhat OT in a Clojure group. double convolve(double *xs, double *is, double *ys){ int i,j; for(i=0; ilen(xs); i++){ for(j=0; jlen(is); j++){ How are you getting the size of the collections from the pointers,

Re: ClojureDocs.org week 1

2010-07-18 Thread Tom Faulhaber
What I've noticed is that conventions on doc string indentation is all over the place. Combine that with the fact that folks build tables and columns by hand, and a really simplistic rule doesn't work so much. I recommend you just grab the remove-leading-whitespace function from the autodoc

Re: ClojureDocs.org week 1

2010-07-18 Thread zkim
Tom- Definitely helps, I'll add this on the next var update cycle. Thanks, Zack. On Jul 18, 12:17 pm, Tom Faulhaber tomfaulha...@gmail.com wrote: What I've noticed is that conventions on doc string indentation is all over the place. Combine that with the fact that folks build tables and

Re: A functional, efficient, convolution function. Is imperitive-style the answer?

2010-07-18 Thread Mark Engelberg
I have found Clojure to be consistently faster than Python, so I thought it would be instructive to compare the Python code to the closest Clojure equivalent. Here's the originally posted Python code: from itertools import repeat def convolve(ns, ms): y = [i for i in repeat(0,

Leiningen 1.2.0 released!

2010-07-18 Thread Phil Hagelberg
I just pushed out a new release of Leiningen, a Clojure build tool, with lots of help from many contributors. This fixes the longstanding repl version bug, expands the flexibility of plugins, adds support for working on multiple projects in parallel, and greatly improves the documentation. Users

Re: Leiningen 1.2.0 released!

2010-07-18 Thread defn
I think I speak for everyone when I say: thank you. Devin On Jul 18, 4:40 pm, Phil Hagelberg p...@hagelb.org wrote: I just pushed out a new release of Leiningen, a Clojure build tool, with lots of help from many contributors. This fixes the longstanding repl version bug, expands the

Re: clojure.string namespace missing from API page?

2010-07-18 Thread Tom Faulhaber
clojure.string is now in for the master branch doc at http://clojure.github.com/clojure/ Separate 1.2 doc coming RSN. Tom On Jul 18, 11:10 am, Tom Faulhaber tomfaulha...@gmail.com wrote: The official doc for clojure and clojure-contrib have moved as well. They are now at: