Re: ANN: Full, continuously updated documentation for clojure.contrib

2009-05-03 Thread Christopher Taylor
Tom, thanks, that's great! I think it would be really useful if the overview appeared as a link on the contrib landing page. all the best, --Chris On 04.05.2009, at 08:41, Tom Faulhaber wrote: > > Hello everybody, > > As many of you know, I have been working on a "contrib autodoc robot" >

ANN: Full, continuously updated documentation for clojure.contrib

2009-05-03 Thread Tom Faulhaber
Hello everybody, As many of you know, I have been working on a "contrib autodoc robot" for the last little while. It is now up and running and you can use the results here: http://code.google.com/p/clojure-contrib/wiki/OverviewOfContrib It includes: * An overview of each namespace in contrib

Re: Unexpected behavior of 'if' with Boolean objects

2009-05-03 Thread Laurent PETIT
2009/5/4 Christophe Grand > > Janico Greifenberg a écrit : > > Hi, > > > > I encountered unexpected behavior of the 'if' form in clojure when using > > instances of java.lang.Boolean as the condition. I wanted to convert > > input strings to booleans and used the constructor of the Boolean class

Re: Unexpected behavior of 'if' with Boolean objects

2009-05-03 Thread Christophe Grand
Janico Greifenberg a écrit : > Hi, > > I encountered unexpected behavior of the 'if' form in clojure when using > instances of java.lang.Boolean as the condition. I wanted to convert > input strings to booleans and used the constructor of the Boolean class > with the string parameter. However,

Re: Unexpected behavior of 'if' with Boolean objects

2009-05-03 Thread Laurent PETIT
2009/5/3 Janico Greifenberg > > Hi, > > I encountered unexpected behavior of the 'if' form in clojure when using > instances of java.lang.Boolean as the condition. I wanted to convert > input strings to booleans and used the constructor of the Boolean class > with the string parameter. However, w

Re: Supply existing session for Postal message (was: Got a Clojure library?)

2009-05-03 Thread Mark Derricutt
Cheers! Look forward to giving this a good run through. -- Discouragement is a dissatisfaction with the past, a distaste for the present, and a distrust of the future - Maree De Jong, Life Church New Zealand. http://www.talios.com On Mon, May 4, 2009 at 11:01 AM, Drew Raines wrote: > I've ad

Re: Unexpected behavior of 'if' with Boolean objects

2009-05-03 Thread Nick Vogel
In Java, you're supposed to use Boolean.valueOf whenever converting a string to a Boolean. The constructors are useless unless you for some reason need separate identities for Boolean objects. On Sun, May 3, 2009 at 11:56 AM, Janico Greifenberg wrote: > > Hi, > > I encountered unexpected behavi

Unexpected behavior of 'if' with Boolean objects

2009-05-03 Thread Janico Greifenberg
Hi, I encountered unexpected behavior of the 'if' form in clojure when using instances of java.lang.Boolean as the condition. I wanted to convert input strings to booleans and used the constructor of the Boolean class with the string parameter. However, when I pass these values as a condition

Supply existing session for Postal message (was: Got a Clojure library?)

2009-05-03 Thread Drew Raines
Mark Derricutt wrote: > Is there support in this lib currently for reusing an existing > MailSession (or passing in say "java://comp/env/mail/Session" and > having it handle the lookup? > > Shouldn't be hard to add in if its not already there? I've added the ability to supply an existing Session

difference between vimclojure and slime

2009-05-03 Thread bOR_
Hi Meikel, I've tried running / developing both in vimclojure and slime, and one difference I noticed is that if I manually start a function in the buffer, vimclojure won't show me any output until the function that is completed. Slime would do fine. I could start a (simulation) of 1 years,

Re: Ant tasks for Clojure

2009-05-03 Thread Mark Volkmann
On Sat, May 2, 2009 at 10:50 AM, Howard Lewis Ship wrote: > > I'm beginning to do more work in Clojure (just a side project for now, > but an interesting one). > > A couple of things I'm missing from Clojure in terms of building & > deploying an application is built-in Ant tasks for common action

renamed "file" in duck-streams

2009-05-03 Thread Stuart Sierra
I renamed "file" in clojure.contrib.duck-streams to "file-str." Now duck-streams is compatible with java-utils. Here's the difference: - clojure.contrib.duck-streams/file-str ([& args]) Concatenates args as strings returns a java.io.File. Replaces all / and \ with F

Re: name of current function

2009-05-03 Thread André Thieme
On 3 Mai, 15:58, Mark Volkmann wrote: > Is there a special variable that holds the name of the currently > running function so it can be output in a logging message? > > I'm thinking of something like this: > > (defn my-function [] >   (println "entered" *current-function*) >   ... > ) One way t

Re: name of current function [corrected]

2009-05-03 Thread Stephen C. Gilardi
On May 3, 2009, at 11:29 AM, Stephen C. Gilardi wrote: #'user/my-cool-func user=> (my-cool-func) entered user/my_cool_func 5 But my_cool_func isn't my-cool-func... Corrected code in "unmangle" in case anybody wants to use it sometime: (ns debug-utils (:use

Re: name of current function

2009-05-03 Thread Stephen C. Gilardi
On May 3, 2009, at 9:58 AM, Mark Volkmann wrote: Is there a special variable that holds the name of the currently running function so it can be output in a logging message? I'm thinking of something like this: (defn my-function [] (println "entered" *current-function*) ... ) Maintaining s

Re: name of current function

2009-05-03 Thread e
you might already have this way ... but probably only during debug since it throws an exception and parses it. http://forums.sun.com/thread.jspa?threadID=548409&start=0 that page also mentions something that sounds better: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StackTraceElement.html

name of current function

2009-05-03 Thread Mark Volkmann
Is there a special variable that holds the name of the currently running function so it can be output in a logging message? I'm thinking of something like this: (defn my-function [] (println "entered" *current-function*) ... ) -- R. Mark Volkmann Object Computing, Inc. --~--~-~--~

Sudoku solver written in Clojure using Swing

2009-05-03 Thread Tzach
This the my first (mini) project in Clojure, and it sure was fun! Thanks to the people here which help me along the way, although some of my questions was pretty trivial. The code http://code.google.com/p/sudoku-solver/source/browse/trunk/sudoku.clj Download as executable jar: http://code.google