Re: (doc)strings after param in defn

2008-12-04 Thread Meikel Brandmeyer
Hi, On 5 Dez., 00:38, Randall R Schulz <[EMAIL PROTECTED]> wrote: > Actually, I think each arity overload of a function deserves to be > independently documentable, just as each overload of a method name in a > Java class would be. I disagree. If the function of the function changes that much, t

Re: fix imports

2008-12-04 Thread Martin DeMello
On Dec 3, 11:59 pm, "Vijay Lakshminarayanan" <[EMAIL PROTECTED]> wrote: > > This is far from complete and should be expanded but I got this from a > few hours of hacking: Good stuff, thanks! martin --~--~-~--~~~---~--~~ You received this message because you are su

Re: Atoms

2008-12-04 Thread Krukow
On Dec 5, 7:51 am, Krukow <[EMAIL PROTECTED]> wrote: > Looks useful as a kind of high-level interface to > java.util.concurrent.AtomicReference. Am I correct to think of this as being (semantically) equivalent to combining send- off and await with agents? E.g., (defn memoize [f] (let [mem (a

Re: Atoms

2008-12-04 Thread Krukow
On Dec 5, 2:02 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > I've added a new reference type - atom. Looks useful as a kind of high-level interface to java.util.concurrent.AtomicReference. Am I correct --~--~-~--~~~---~--~~ You received this message because you are

PATCH: Fix in-case macro from clojure.contrib fcase library

2008-12-04 Thread Tchavdar Roussanov
The attached patch fixes the compile error when in-case macro is used in different name space. The expanded code contains a private function from clojure.contrib.fcase name space. --Tchavdar --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Atoms

2008-12-04 Thread Larrytheliquid
One difference would be if a ref is already inside of a bigger transaction that failed to commit for other reasons. With atoms it seems like the "transaction" is implicitly isolated to the atom (instead of explicitly wrapping around a ref.) On Thu, Dec 4, 2008 at 9:26 PM, Mark Engelberg <[EMAIL PR

Re: Atoms

2008-12-04 Thread Mark Engelberg
Didn't commute essentially give this behavior for refs? How is this different? On Thu, Dec 4, 2008 at 5:02 PM, Rich Hickey <[EMAIL PROTECTED]> wrote: > > I've added a new reference type - atom. > > --~--~-~--~~~---~--~~ You received this message because you are s

Re: DISCUSS: replace (rand)

2008-12-04 Thread Kyle Schaffrick
On Thu, 4 Dec 2008 00:07:56 -0800 (PST) "don.aman" <[EMAIL PROTECTED]> wrote: > > Since we're being all high-level, it'd be good for a random function > which allows us to specify the range of numbers, since % doesn't > promise an even spread of probabilities (especially for large ranges). If on

Re: Capabilities and Limits of (bean ...)?

2008-12-04 Thread Randall R Schulz
On Thursday 04 December 2008 17:01, Randall R Schulz wrote: > Hi, > > ... > > user=> (bean (new Boolean true)) > java.lang.NoClassDefFoundError: clojure/core$bean__4456$fn__4458 > > > In fact, I've yet to find an invocation of (bean ...) that produces > anything other than a NCDFE. > > ... OK. He

Re: Running out of memory when using filter?

2008-12-04 Thread Paul Mooser
Hi Stuart, On Dec 4, 4:09 pm, Stuart Sierra <[EMAIL PROTECTED]> wrote: > I think a lazy cons is cached only as long as you hold a pointer to > the head.  Are you sure you don't have any pointers to doc-seq hanging > around in another piece of code?  Or, alternately, pointers to the > filter outpu

Re: Capabilities and Limits of (bean ...)?

2008-12-04 Thread Rich Hickey
On Dec 4, 8:01 pm, Randall R Schulz <[EMAIL PROTECTED]> wrote: > Hi, > > I have a fairly elaborate library for representing roughly JSON-like > data. It has the ability to create JavaBean counterparts to any of its > values, whether atomic or structured. > > In order to see how this might intera

Atoms

2008-12-04 Thread Rich Hickey
I've added a new reference type - atom. Docs here: http://clojure.org/atoms Feedback welcome, Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goo

Capabilities and Limits of (bean ...)?

2008-12-04 Thread Randall R Schulz
Hi, I have a fairly elaborate library for representing roughly JSON-like data. It has the ability to create JavaBean counterparts to any of its values, whether atomic or structured. In order to see how this might interact with (bean ...), I tried this: user=> (bean (new Boolean true)) java.la

Re: (doc)strings after param in defn

2008-12-04 Thread J. McConnell
On Thu, Dec 4, 2008 at 6:45 PM, Mon Key <[EMAIL PROTECTED]> wrote: > > So, is it idiomatic Clojure to wrap docstring in a #^{}? > > e.g. is this considered bad form: > > (defn foo > "naked docstring is ok, but rather bad form while still nice for the > relative terseness of format" > [x] > (+ x 1)

Re: Bug (I think): Can't sort collection of vectors containing big integers

2008-12-04 Thread Rich Hickey
On Dec 4, 12:23 pm, "harrison clarke" <[EMAIL PROTECTED]> wrote: > the same issue is there for sorted-map and sorted-set. Fixed too, svn 1145 - thanks for the report. Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Elegant but very slow

2008-12-04 Thread Christian Vest Hansen
Ah, disregard that. I found the rules: http://shootout.alioth.debian.org/u32q/benchmark.php?test=binarytrees&lang=all#about On Fri, Dec 5, 2008 at 1:04 AM, Christian Vest Hansen <[EMAIL PROTECTED]> wrote: > Is it important that we build and deconstruct a complete tree in the > process, or is mere

Re: Running out of memory when using filter?

2008-12-04 Thread Stuart Sierra
On Dec 4, 6:20 pm, Paul Mooser <[EMAIL PROTECTED]> wrote: > However, I'm running out of heap space using the following function to > filter my sequences: ... > I know that filter is lazy, and I see that the documentation of lazy- > cons says that lazy-conses are cached. Cached for what duration ?

Re: Elegant but very slow

2008-12-04 Thread Christian Vest Hansen
Is it important that we build and deconstruct a complete tree in the process, or is merely getting the correct end result enough? (defn checkTree [item depth] (if (zero? depth) item (- (+ item (checkTree (- (* 2 item) 1) (dec depth))) (checkTree (* 2 item) (dec depth) (de

Re: (doc)strings after param in defn

2008-12-04 Thread Mon Key
> This doesn't work well with Clojure, because you can have > multiple argument vectors: > > (defn foo >"docstring here" >([x] (do-something-with-one-arg x)) >([x y] (we-can-also-do-two x y))) > > Behind which arglist should we put the docstring. ;) That makes perfect sense, this is

Re: (doc)strings after param in defn

2008-12-04 Thread Randall R Schulz
On Thursday 04 December 2008 14:41, Meikel Brandmeyer wrote: > Hi, > > Am 04.12.2008 um 18:30 schrieb Mon Key: > > It looks like I was getting turned around by the implicit do (and > > by my preconceptions coming from other Lisps where the docstring > > likes to sit behind the arglist) > > This do

Re: Elegant but very slow

2008-12-04 Thread Mark Engelberg
I already tried bOR's two suggestions (replace anonymous function with + and type hinting), but they made no difference on my machine. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Elegant but very slow

2008-12-04 Thread bOR_
using (int ..) should also help (type hinting) --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email

Re: Elegant but very slow

2008-12-04 Thread bOR_
>     (reduce #(+ %1 %2) 0 (map sum (range 1 (inc iterations can be replaced by (reduce + (map sum (range 1 (inc iterations There is at least some functions in clojure's api for doing unchecked calculations. That should speed up things. I'm not yet familiar enough with clojure or build

Running out of memory when using filter?

2008-12-04 Thread Paul Mooser
I've been writing a few different functions that return and operate on some very long sequences. Everything I've been doing has been written in terms of underlying operations that are described as lazy, so I assumed everything would be fine as long as I don't retain the head of any sequences. How

Re: Elegant but very slow

2008-12-04 Thread Mark Engelberg
A couple quick suggestions: On my machine, Peter's code runs in 120 seconds. Changing make-tree to return vectors rather than lists reduced time to 47 seconds. Taking out the nil? test (just (if tree branch1 branch2) shaved off a few more seconds. Removing the pattern-matching let in check-tree (

Re: Elegant but very slow

2008-12-04 Thread Meikel Brandmeyer
Hi, Am 04.12.2008 um 20:55 schrieb PeterB: However, there is a heavy price to be paid for this elegance: 'Elapsed time: 100730.161515 msecs' Ouch! That's rather disappointing :-( Any suggestions for improving the performance? http://groups.google.com/group/clojure/browse_thread/thread/f0303a9

Re: Elegant but very slow

2008-12-04 Thread Daniel Eklund
ahhh... to answer my own question (and if I had looked at the code and the API a bit closer), it turns out that "recur" can only be used in tail-position... and your code (as a tree-recursor) would not benefit from this. On Dec 4, 5:39 pm, Daniel Eklund <[EMAIL PROTECTED]> wrote: > oops... > >

Re: (doc)strings after param in defn

2008-12-04 Thread Meikel Brandmeyer
Hi, Am 04.12.2008 um 18:30 schrieb Mon Key: It looks like I was getting turned around by the implicit do (and by my preconceptions coming from other Lisps where the docstring likes to sit behind the arglist) This doesn't work well with Clojure, because you can have multiple argument vectors:

Re: Elegant but very slow

2008-12-04 Thread Daniel Eklund
oops... I am just learning the language right now and just quickly looked at what you did... Would the use of "recur" instead of self-calls potentially help consuming stack space? http://clojure.org/special_forms#toc10 On Dec 4, 5:37 pm, Daniel Eklund <[EMAIL PROTECTED]> wrote: > I > > On D

Re: Elegant but very slow

2008-12-04 Thread Daniel Eklund
I On Dec 4, 2:55 pm, PeterB <[EMAIL PROTECTED]> wrote: > Hi, > > I downloaded clojure_20080916.zip and had a go with a simple tree > benchmark (cut-down version of the one in the computer language > shootout  http://shootout.alioth.debian.org/). > > The Java version is pretty simple and runs in a

Elegant but very slow

2008-12-04 Thread PeterB
Hi, I downloaded clojure_20080916.zip and had a go with a simple tree benchmark (cut-down version of the one in the computer language shootout http://shootout.alioth.debian.org/). The Java version is pretty simple and runs in about 2s on my laptop: public class Main { public static void ma

Re: PATCH: fixed issue in doPrepared

2008-12-04 Thread Tom Emerson
On Thu, Dec 4, 2008 at 2:44 PM, Stephen C. Gilardi <[EMAIL PROTECTED]> wrote: > Thanks for the report. I had made an accidental checkin at svn258. > I've reverted to code identical to svn257 which I believe is correct. > Please give it a try. That did it, thanks! -tree -- Tom Emerson [EMAI

Re: PATCH: fixed issue in doPrepared

2008-12-04 Thread Stephen C. Gilardi
Hi Tom, Thanks for the report. I had made an accidental checkin at svn258. I've reverted to code identical to svn257 which I believe is correct. Please give it a try. --Steve On Dec 4, 2008, at 2:08 PM, Tom Emerson <[EMAIL PROTECTED]> wrote: > Here is a patch that appears to fix the issue

Re: Unary Application of (= ...)

2008-12-04 Thread Scott Fleckenstein
I'm a newbie, so feel free to bash me on the noggin if i'm missing something: Personally, I would love = to support null-ary case; being able to use apply with = seems very powerful, and would remove the need to check for an empty sequence. -Scott On Dec 3, 9:39 pm, Krukow <[EMAIL PROTECTED]>

PATCH: fixed issue in doPrepared

2008-12-04 Thread Tom Emerson
Here is a patch that appears to fix the issue I found in the sql library's doPrepared function, which I mentioned earlier. -- Tom Emerson [EMAIL PROTECTED] http://www.dreamersrealm.net/~tree --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: Improved Maven Build

2008-12-04 Thread Luke Amdor
As an avid Maven fan, I really don't think Clojure would really benefit much from having a Maven build. It really doesn't have any dependencies to speak of and is extremely easy to build. The main thing that I would like to be able to do is to easily get the newest Clojure snapshots and releases.

Question on do-prepared in the clojure.contrib.sql

2008-12-04 Thread Tom Emerson
Hello all, I'm attempting to use the SQL library (with the jTDS JDBC driver for SQL Server) and am running into problem. Specifically, something as innocuous as (with-connection db (insert-rows :my_table ["foo" "bar" "baz" "16" 0 10 0 "qux" ""])) throws an exception, java.s

Re: License of/permission for Clojure's logo

2008-12-04 Thread Howard Lewis Ship
+1 on the Logo. I wish Tapestry had one half as good. A few of us were debating whether the green ying represented Java or the blue yang. What's the official story? On Thu, Dec 4, 2008 at 9:04 AM, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > > On Dec 4, 11:46 am, samppi <[EMAIL PROTECTED]> wro

Re: (doc)strings after param in defn

2008-12-04 Thread Mon Key
> The part after the argument vector goes into the function body, which > is wrapped in a do. do evaluates the expressions and returns the > value of the last one. The results of evaluating the other expressions > are discarded. Ok. That provides the clarity I was after. Thank You. It looks li

Re: Bug (I think): Can't sort collection of vectors containing big integers

2008-12-04 Thread harrison clarke
the same issue is there for sorted-map and sorted-set. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, sen

Re: License of/permission for Clojure's logo

2008-12-04 Thread Rich Hickey
On Dec 4, 11:46 am, samppi <[EMAIL PROTECTED]> wrote: > Ah ha ha ha. Wow, my mistake. I'll make sure to spell it correctly. > > I totally agree with cogfun, though—it's a really nice logo. Did you > make it yourself? > No, it was designed by my brother, Tom Hickey. Rich --~--~-~--~---

Re: Extending Clojure's STM with external transactions

2008-12-04 Thread Dave Griffith
> Maybe if the external commit > can be delayed until the end of the transaction, when it is certain > that the in-memory operations succeeded, it could work. I think this > is the most promising way of implementing this. This was my plan. As near as I can tell, the current STM implementation co

Re: Clojure template library

2008-12-04 Thread blackdog
You can find a little demo I put together for lauofdk here: http://www.ipowerhouse.com/lau.zip It is exactly what ppierre mentioned, clojure servlets returning json with a jquery/pure client "hello world". the dl includes jetty, and can be fired up with ./run test.clj test.clj configures j

Re: Clojure Contrib's build.xml

2008-12-04 Thread Stefan Bodewig
On 2008-12-04, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote: > Pre-defining the property is difficult, since the clojure.jar > might be at arbitrary places on arbitrary systems. You can make life easier for people running the build by adding something like to build.xml. If the file doesn't ex

Re: License of/permission for Clojure's logo

2008-12-04 Thread samppi
Ah ha ha ha. Wow, my mistake. I'll make sure to spell it correctly. I totally agree with cogfun, though—it's a really nice logo. Did you make it yourself? On Dec 4, 5:23 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > On Dec 3, 11:30 pm, samppi <[EMAIL PROTECTED]> wrote: > > > I want to put the Clo

Re: Clojure Contrib's build.xml

2008-12-04 Thread Luc Prefontaine
_proper_ here means that the operating systemwas written in a bar on a napkin during a week end of heavy drinking . The following week suddenly it became popular :))) The authors lacked time to normalize uppercase and lowercase characters before the wave of implementations started to sprout so that

Re: Surprise effect

2008-12-04 Thread Dan Larkin
For what it's worth SBCL has this same behavior (although I don't like it). On Dec 4, 2008, at 5:45 AM, Konrad Hinsen wrote: > > On Dec 4, 2008, at 10:50, Meikel Brandmeyer wrote: > >> On 4 Dez., 10:08, Konrad Hinsen <[EMAIL PROTECTED]> wrote: >>> user=> a' >>> 2 >>> user=> a >>> a >> >> a' is

Re: Extending Clojure's STM with external transactions

2008-12-04 Thread Razvan Ludvig
Hi Dave. I think your proposal would be useful to have in Clojure, I have thought about something similar since I read about the STM. But I also think there are quite a few difficulties in implementing this in a "sane" way. Actually, the more I think about it, the more it seems that the goal of ST

Re: Clojure Contrib's build.xml

2008-12-04 Thread Meikel Brandmeyer
Hello, On 4 Dez., 16:51, walterc <[EMAIL PROTECTED]> wrote: > and the property "clojure.jar" should be defined somewhere for the > library files to compile. It's not a bug, it's a feature. In case the property is not defined, they sources are only jar'd. To compile the files specify the property

Re: Clojure Contrib's build.xml

2008-12-04 Thread walterc
and the property "clojure.jar" should be defined somewhere for the library files to compile. On Dec 4, 11:05 pm, Stuart Sierra <[EMAIL PROTECTED]> wrote: > I just pushed a fix. > -Stuart Sierra > > On Dec 4, 9:33 am, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > > Hi, > > > This morning after I

Re: Clojure template library

2008-12-04 Thread ppierre
A nice solution is PURE : http://beebole.com/pure/ JavaScript templating engine converting Json to HTML. With a Clojure version you have identical code for HTML and AJAX : Server side : Clojure/PURE + HTML -> HTML Client side : Clojure/JSON -> JavaScript/PURE + AJAX pierre --~--~-~--~

Re: Clojure template library

2008-12-04 Thread .Bill Smith
> StringTemplate http://www.stringtemplate.org/ In StringTemplate's case, the design was more than a stylistic issue; the author wanted a specific kind of separation between the template and the business logic. He wrote a short paper on the subject (see his website for details), which is worth r

Re: PATCH for clojure.contrib.javadoc: use any local/remote javadocs

2008-12-04 Thread Stuart Sierra
Yes, I realized what that reflector code was for after I sent the message. Thanks, -Stuart On Dec 4, 3:45 am, "Christophe Grand" <[EMAIL PROTECTED]> wrote: > Hi Stuart, > > That's very neat! Thanks! I'll apply your patch but I don't want to require > java 6 since there's the swing fallback for j

Re: Clojure Contrib's build.xml

2008-12-04 Thread Stuart Sierra
I just pushed a fix. -Stuart Sierra On Dec 4, 9:33 am, Randall R Schulz <[EMAIL PROTECTED]> wrote: > Hi, > > This morning after I "svn up" -ed Clojure Contrib, I could no longer > build. It turns out that was 'cause I was still using Ant 1.6.2. But I > looked at the line about which the old Ant c

Re: Clojure template library

2008-12-04 Thread Stuart Sierra
On Dec 4, 9:04 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > StringTemplate http://www.stringtemplate.org/ StringTemplate looks cool -- a functional, context-free template language, with a less annoying syntax than either ERB or Google XML Pages. From the author: "Just so you know, I've never bee

Re: Clojure template library

2008-12-04 Thread Randall R Schulz
On Thursday 04 December 2008 06:04, Rich Hickey wrote: > ... > > StringTemplate > http://www.stringtemplate.org/ StringTemplate, by the way, is how ANTLR generates its parser code (ANTLR is target-language-neutral, not Java-specific). > ... > > Rich Randall Schulz --~--~-~--~~--

Clojure Contrib's build.xml

2008-12-04 Thread Randall R Schulz
Hi, This morning after I "svn up" -ed Clojure Contrib, I could no longer build. It turns out that was 'cause I was still using Ant 1.6.2. But I looked at the line about which the old Ant complained, and it is: However, the name of the file in the SVN repository is "CPL.TXT". Now, on t

Re: delimited continuations for web development

2008-12-04 Thread Michael Reid
> with a delimited continuation, you're capturing it from the outside, so you > don't have that problem. > Yeah I'm pretty sure its possible. I've been intrigued by this continuations based web programming trend as well. Early on when I learned of Clojure I made a very poor attempt to port cl-cont

Re: delimited continuations for web development

2008-12-04 Thread Rich Hickey
On Dec 2, 12:52 pm, Jan Rychter <[EMAIL PROTECTED]> wrote: > Rich Hickey <[EMAIL PROTECTED]> writes: > > On Jun 20, 11:58 am, Jaime Barciela <[EMAIL PROTECTED]> wrote: > >> Hello Phil, > > >> My understanding is that Common Lisp doesn't have support for > >> continuations either and that's why W

Re: Clojure template library

2008-12-04 Thread Rich Hickey
On Dec 3, 1:04 pm, Jeff Rose <[EMAIL PROTECTED]> wrote: > I've just pushed a template library for Clojure up onto github for > public use. You can find it here: > > http://github.com/rosejn/clj-libs/tree/master > > This library is based loosely on erb from Ruby, which is the only other > templa

Re: mutability

2008-12-04 Thread Timothy Pratley
I've finished my MUD - 240 lines including blanks and comments http://clojure.googlegroups.com/web/funmud.clj http://clojure.googlegroups.com/web/funmud.PNG Obviously it is in no way comparable as mine is a PvP whereas the OP was a single player (not really a Multi User Dungeon you know!). Anywa

Re: Improved Maven Build

2008-12-04 Thread verec
+1 (avoid Maven, drop pom) I'm just out of a project that has used Maven for more than 18 month. The pain and frustration caused by the slowness and compexity of Maven's "download the whole internet" approach can be matched only bu the willingness of team astronauts to introduce Maven plugins in

Re: Bug (I think): Can't sort collection of vectors containing big integers

2008-12-04 Thread Rich Hickey
On Dec 4, 2:32 am, puzzler <[EMAIL PROTECTED]> wrote: > OK, after my last goof-up in reporting a bug, I'm reluctant to state > with certainty that this is a bug, but it sure seems that way: > > This works: > (sort [[5 2] [1 0] [3 4]]) > > This works: > (sort [324321432432413241324324324324324324

Re: License of/permission for Clojure's logo

2008-12-04 Thread Rich Hickey
On Dec 3, 11:30 pm, samppi <[EMAIL PROTECTED]> wrote: > I want to put the Clojure > logo:http://clojure.googlegroups.com/web/Clojure-logo.png?gda=y8lqvUIAAABo... > > ...on Wikipedia's article on Clojure. What is the license of Clojure's > logo--is it a free image? Or can Mr. Hickley give me per

Re: License of/permission for Clojure's logo

2008-12-04 Thread cogfun
This is of no relevance to your question, but I have always wanted to say that Clojure has one of the most beautiful logos among all the programming languages. On Dec 3, 11:30 pm, samppi <[EMAIL PROTECTED]> wrote: > I want to put the Clojure > logo:http://clojure.googlegroups.com/web/Clojure-log

Re: Surprise effect

2008-12-04 Thread Konrad Hinsen
On Dec 4, 2008, at 10:50, Meikel Brandmeyer wrote: > On 4 Dez., 10:08, Konrad Hinsen <[EMAIL PROTECTED]> wrote: >> user=> a' >> 2 >> user=> a >> a > > a' is parsed as: > a => symbol => evaluate => 2 => print prompt > ' => reader macro => wait for more > > Then you type the second a and it goes on

Re: Surprise effect

2008-12-04 Thread Ralf Bensmann
Just thought the same... But when I use quoting there is always a whitespace before the quote to seperate it from the preceding text. Is this a misleading behavior of the reader, or a feature? ;) -Ralf On Thu, Dec 4, 2008 at 10:50 AM, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote: > > Hi, > > On 4

Re: Surprise effect

2008-12-04 Thread Meikel Brandmeyer
Hi, On 4 Dez., 10:08, Konrad Hinsen <[EMAIL PROTECTED]> wrote: > user=> a' > 2 > user=> a > a a' is parsed as: a => symbol => evaluate => 2 => print prompt ' => reader macro => wait for more Then you type the second a and it goes on: a => translate 'a => (quote a) => a => print prompt So reade

Re: A try on condp (was: Re: proposal: match multimethod)

2008-12-04 Thread Meikel Brandmeyer
Hello Rich, On 4 Dez., 02:30, Rich Hickey <[EMAIL PROTECTED]> wrote: > needle is a strange name - what's the origin? expr is probably better. I thought of it as needle, which we search in the haystack. But this comparison is not very good after a second thought. Changed needle to expr. > I thin

Surprise effect

2008-12-04 Thread Konrad Hinsen
A typo made me discover a behaviour of Clojure for which I haven't found an explanation yet: user=> (def a 2) #'user/a user=> a 2 user=> a' 2 user=> a a user=> a' 2 user=> (+ a 1) (+ a 1) What does "a'" do to the symbol a to make it behave differently? Konrad. --~--~-~--~~--

Re: More Monads

2008-12-04 Thread Konrad Hinsen
On 02.12.2008, at 18:49, jim wrote: > One thing I saw is that 'replace-syms' could be simplified. I rewrote > it as: > > (defn- replace-syms [sym-map expr] > (cond > (seq? expr) (map #(replace-syms sym-map %) expr) > (coll? expr) (into (empty expr) >

Re: Clojure indentation conventions

2008-12-04 Thread Christian Vest Hansen
On Thu, Dec 4, 2008 at 8:09 AM, mac <[EMAIL PROTECTED]> wrote: > I am partial to a guideline for number of lines in a function because > that has a lot to do with program factoring, not just aesthetics. But > 80 characters for a line is a bit drastic. > Sure it prints well on paper but who prints

Munich Lisp User Group, SLIME and Swank-clojure backend

2008-12-04 Thread Geoffrey Teale
I was at the Munich LISP User Group meeting last night. We had a presentation from Tobias C. Rittweiler. Although it was mostly Common Lisp focused (and SBCL at that), it was very interesting. Tobias said he will put the detailed slides up on http://planet.lisp.org for anyone who is interested.

Re: PATCH for clojure.contrib.javadoc: use any local/remote javadocs

2008-12-04 Thread Christophe Grand
Hi Stuart, That's very neat! Thanks! I'll apply your patch but I don't want to require java 6 since there's the swing fallback for java 5: I'll keep the refelector-based open-url-in-browser. Christophe On Wed, Dec 3, 2008 at 7:28 PM, Stuart Sierra <[EMAIL PROTECTED]>wrote: > Hi Christophe, hi l

Re: DISCUSS: replace (rand)

2008-12-04 Thread don.aman
Since we're being all high-level, it'd be good for a random function which allows us to specify the range of numbers, since % doesn't promise an even spread of probabilities (especially for large ranges). --~--~-~--~~~---~--~~ You received this message because you