Re: server-socket on exit event

2009-10-16 Thread Emeka
Ngo, I checked out your github , it is great. I have not used netty, it looks clean. However, what is the meaning of this, (def reshedule nil)? Regards, Emeka On Thu, Oct 15, 2009 at 3:02 AM, ngocdaothanh wrote: > > I created this (Netty is used instead of server-socket): > http://github.com/

Re: Clojure's 2nd Birthday!

2009-10-16 Thread John Harrop
On Fri, Oct 16, 2009 at 1:35 AM, Mark Engelberg wrote: > > Uh oh, time for the "terrible twos". Who wants to throw the first tantrum? > :) Didn't Wrexsoul already do that a few months ago? --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: Clojure's 2nd Birthday!

2009-10-16 Thread Mark Derricutt
Well we do have a maven plugin to give us all clojure/maven pain ;-) On Fri, Oct 16, 2009 at 6:35 PM, Mark Engelberg wrote: > Uh oh, time for the "terrible twos". Who wants to throw the first tantrum? > :) --~--~-~--~~~---~--~~ You received this message because y

Re: Circular dependencies (Clojure and Java)

2009-10-16 Thread jng27
On Oct 15, 11:48 am, Stuart Sierra wrote: > On Oct 15, 7:56 am, Laurent PETIT wrote: > > > if the clojure classes depend on the java classes in the implementation and > > not in their interfaces ( extends, implements, methods signatures ), then > > you can write your gen-class with a separate

clj-html - how to generate DOCTYPE

2009-10-16 Thread Amitava
Hello all, Does anyone know how to generate the html doctype using clj-html? I am trying out the conjure web framework. Thanks & Regards, Amitava Shee --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group.

Re: Circular dependencies (Clojure and Java)

2009-10-16 Thread jng27
To deal with the problem the ideal solution would be supporting something along these lines. It's probably inevitable that at some point the Clojure compiler would have be modified. On Oct 15, 12:17 pm, Manuel Woelker wrote: > On Thu, Oct 15, 2009 at 5:48 AM, jng27 wrote: > > > The following se

Re: Project Euler: Problem suggestions that show off clojure?

2009-10-16 Thread Meikel Brandmeyer
Hi, You can have a look here: http://clojure-euler.wikispaces.com. I chose the problems I solved because I found them interesting or because I had an idea how to solve them. I didn't look specifically for problems fitting to Clojure. (And in fact most of my solution look rather ugly when now loo

Bug: -main function corrupts applet

2009-10-16 Thread Andreas Wenger
When writing an applet with Clojure I discovered the following bug: Whenever a class with a -main function is loaded (e.g. by :use), the applet is broken (Java 6 with new plugin technology): java.lang.NullPointerException at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel (Plugin2Mana

is there a cannonical way to create executable jar files?

2009-10-16 Thread Folcon
Hello, Is there a cannonical way to create executable jar files? I'm having some success to make this a web start application but every time I compile I keep getting could not find main class. (I have tried compiling in both eclipse and netbeans with more luck in eclipse) my namespace contains

Help locating library for docstring, attr-map parsing in macros

2009-10-16 Thread Garth Sheldon-Coulson
Hi All, The other day when browsing the web I came across a library that I can't locate anymore. The library is an aid for macro-writing. It automates the simple but annoying task of parsing optional attr-maps and docstrings for passing to defn, etc. Could someone jog my memory as to who wrote i

Re: Help locating library for docstring, attr-map parsing in macros

2009-10-16 Thread James Reeves
Could you be thinking of clojure.contrib.def/name-with-attributes ? On Oct 16, 1:20 pm, Garth Sheldon-Coulson wrote: > Hi All, > > The other day when browsing the web I came across a library that I can't > locate anymore. > > The library is an aid for macro-writing. It automates the simple but >

Re: Help locating library for docstring, attr-map parsing in macros

2009-10-16 Thread Garth Sheldon-Coulson
Yes, thanks! On Fri, Oct 16, 2009 at 9:48 AM, James Reeves wrote: > > Could you be thinking of clojure.contrib.def/name-with-attributes ? > > On Oct 16, 1:20 pm, Garth Sheldon-Coulson wrote: > > Hi All, > > > > The other day when browsing the web I came across a library that I can't > > locate a

Re: is there a cannonical way to create executable jar files?

2009-10-16 Thread Stuart Sierra
On Oct 16, 8:12 am, Folcon wrote: > my namespace contains   (:gen-class :main true) with the main > function > I want to declare called -main. and I have tried telling my manifest > file to call my namespace and clojure.main and both fail. That should be the correct approach. Not sure what migh

function names ending with !

2009-10-16 Thread Mark Volkmann
What's the rule of thumb for deciding whether a function name should end with an exclamation point? I thought maybe it was when the function modifies its first argument, but it seems there are functions that do that and do not have such names. For example, set-validator! and add-watch. Why don't

clojurecheck?

2009-10-16 Thread Wilson MacGyver
A friend of mine showed me this. It's an effort to bring Haskell's Quickcheck to clojure. http://kotka.de/projects/clojure/clojurecheck.html Has anyone used it? What's your experience with it? Thanks -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--

Re: function names ending with !

2009-10-16 Thread Jarkko Oranen
On Oct 16, 5:44 pm, Mark Volkmann wrote: > What's the rule of thumb for deciding whether a function name should > end with an exclamation point? I thought maybe it was when the > function modifies its first argument, but it seems there are functions > that do that and do not have such names. > >

Clojure is two!

2009-10-16 Thread Rich Hickey
http://clojure.blogspot.com/2009/10/clojure-is-two.html Thanks again to all! Rich --~--~-~--~~~---~--~~ 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 th

Re: Clojure is two!

2009-10-16 Thread tmountain
Wow, congrats! I have to say that for only being two, Clojure has made a helluva stir as an up and comer. I think it's the most exciting language in serious development right now, and I'm thrilled to be a part of this community. Thanks to everyone for all the hard work! -Travis On Oct 16, 12:12 

Re: Clojure is two!

2009-10-16 Thread Wilson MacGyver
Congrats. I hadn't heard of clojure until the 1.0 release. So for me, the amount of progress and how it's taking off in the past few month has been amazing. On Fri, Oct 16, 2009 at 12:12 PM, Rich Hickey wrote: > > http://clojure.blogspot.com/2009/10/clojure-is-two.html > > Thanks again to all! >

Re: function names ending with !

2009-10-16 Thread Meikel Brandmeyer
Hi, Am 16.10.2009 um 18:09 schrieb Jarkko Oranen: > add-watch doesn't really affect the object itself, while set- > validator! certainly does, so I think the naming is consistent. > I think it might be a good rule of thumb to add the ! if the operation > either mutates the object (set!) or invali

Re: clojurecheck?

2009-10-16 Thread Meikel Brandmeyer
Hi, Am 16.10.2009 um 17:52 schrieb Wilson MacGyver: > A friend of mine showed me this. It's an effort to bring Haskell's > Quickcheck to clojure. > > http://kotka.de/projects/clojure/clojurecheck.html > > Has anyone used it? What's your experience with it? It is probably not very useful at the m

Re: function names ending with !

2009-10-16 Thread Laurent PETIT
2009/10/16 Meikel Brandmeyer > Hi, > > Am 16.10.2009 um 18:09 schrieb Jarkko Oranen: > > > add-watch doesn't really affect the object itself, while set- > > validator! certainly does, so I think the naming is consistent. > > I think it might be a good rule of thumb to add the ! if the operation >

Re: Clojure is two!

2009-10-16 Thread MarkSwanson
Grats. Clojure is amazing. --~--~-~--~~~---~--~~ 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 pat

Re: server-socket on exit event

2009-10-16 Thread ngocdaothanh
The snippet: --- (def reschedule nil) ; Forward declaration (defn broadcast [msg] (reschedule) (doall (map (fn [client] (send-msg client msg)) @clients))) --- (def

Re: function names ending with !

2009-10-16 Thread Mark Volkmann
On Fri, Oct 16, 2009 at 11:09 AM, Jarkko Oranen wrote: > > On Oct 16, 5:44 pm, Mark Volkmann wrote: >> What's the rule of thumb for deciding whether a function name should >> end with an exclamation point? I thought maybe it was when the >> function modifies its first argument, but it seems ther

Re: clojurecheck?

2009-10-16 Thread Wilson MacGyver
Thanks for the info. I understand. I'm sure vimclojure is taking up a lot of your time. On Fri, Oct 16, 2009 at 12:47 PM, Meikel Brandmeyer wrote: > Hi, > > Am 16.10.2009 um 17:52 schrieb Wilson MacGyver: > >> A friend of mine showed me this. It's an effort to bring Haskell's >> Quickcheck to cl

Re: is there a cannonical way to create executable jar files?

2009-10-16 Thread Folcon
Hi Stuart, Thanks for the help, I have tried running clojure.main and it doesn't error out(ie. I think it can find that). However it doesn't seem to do anything either. I've checked my task manager and I've got an instance of javaw.exe running, but it just runs. I have a bad feeling it's just loa

Re: Clojure is two!

2009-10-16 Thread rzeze...@gmail.com
On Oct 16, 12:12 pm, Rich Hickey wrote: > http://clojure.blogspot.com/2009/10/clojure-is-two.html > > Thanks again to all! > > Rich "Stu Halloway's terrific book, and more books on the way" Can anyone elaborate on this? --~--~-~--~~~---~--~~ You received this mes

Re: Clojure is two!

2009-10-16 Thread Wilson MacGyver
two more coming. one is clojure in action, published by manning, written by Amit Rathore the other is definitive guide to clojure by Luke VanderHart http://www.apress.com/book/view/1430272317 On Fri, Oct 16, 2009 at 3:51 PM, rzeze...@gmail.com wrote: > > On Oct 16, 12:12 pm, Rich Hickey wrote:

JVM Language Summit talk on state, identity, time

2009-10-16 Thread Garth Sheldon-Coulson
In his blog post Rich mentioned his JVM Language Summit talk http://wiki.jvmlangsummit.com/Clojure_Keynote on state, identity, value, time, etc. There are notes and slides on the site, but no audio or video. Does anyone know if audio or video was recorded, or (if Rich is reading this) if there ar

Re: Clojure is two!

2009-10-16 Thread Jeff Heon
Link for clojure in action green paper http://www.manning.com/free/green_rathore.html On Oct 16, 3:59 pm, Wilson MacGyver wrote: > one is clojure in action, published by manning, written by Amit Rathore --~--~-~--~~~---~--~~ You received this message because you

Re: clojurecheck?

2009-10-16 Thread Meikel Brandmeyer
Hi, Am 16.10.2009 um 20:53 schrieb Wilson MacGyver: > Thanks for the info. I understand. I'm sure vimclojure is taking up a > lot of your time. Even VC is lacking a bit at the moment. Buying a new apartment and moving there while having a 8-month old around is a task :) Sincerely Meikel

Re: clj-html - how to generate DOCTYPE

2009-10-16 Thread Mark McGranaghan
Hi Amitava, You can se clj-html.helpers/doctype, which is from the clj-html- helpers project: http://github.com/mmcgrana/clj-html-helpers I hope this helps, - Mark On Oct 15, 8:26 pm, Amitava wrote: > Hello all, > > Does anyone know how to generate the html doctype using clj-html? I am > tryi

Re: Clojure is two!

2009-10-16 Thread Robert Stehwien
On Fri, Oct 16, 2009 at 1:59 PM, Wilson MacGyver wrote: > > two more coming. > > one is clojure in action, published by manning, written by Amit Rathore > the other is definitive guide to clojure by Luke VanderHart > http://www.apress.com/book/view/1430272317 There are two manning books coming o

let-while

2009-10-16 Thread mbrodersen
Hi, I am new to Clojure and I am wondering if there is anything similar to the following macro already built in: (defmacro let-while "Makes it easy to continue processing an expression as long as it is true" [[name expr] & forms] `(loop [] (let [~name ~exp

Re: Clojure is two!

2009-10-16 Thread mbrodersen
Congratulations everybody. Clojure is the answer. On Oct 17, 3:12 am, Rich Hickey wrote: > http://clojure.blogspot.com/2009/10/clojure-is-two.html > > Thanks again to all! > > Rich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: let-while

2009-10-16 Thread John Harrop
On Fri, Oct 16, 2009 at 7:58 PM, mbrodersen wrote: > > Hi, > > I am new to Clojure and I am wondering if there is anything similar to > the following macro already built in: > > (defmacro let-while >"Makes it easy to continue processing an expression as long as it is > true" >[[nam

Re: let-while

2009-10-16 Thread John Harrop
On Fri, Oct 16, 2009 at 8:12 PM, John Harrop wrote: > (defmacro let-while > "Makes it easy to continue processing an expression as long as it > is true" > [[name expr] & forms] > (let [n# ~name] > `(loop [] >(let [~n# ~expr] > (when ~n# >~...@forms >

Re: Clojure is two!

2009-10-16 Thread Sean Devlin
Thanks Rich! Clojure has solved all sorts of crazy problems at work (i.e. saves money). It makes coding & problem solving fun! On Oct 16, 12:12 pm, Rich Hickey wrote: > http://clojure.blogspot.com/2009/10/clojure-is-two.html > > Thanks again to all! > > Rich --~--~-~--~~

Re: JVM Language Summit talk on state, identity, time

2009-10-16 Thread Alex Osborne
Garth Sheldon-Coulson wrote: > In his blog post Rich mentioned his JVM Language Summit talk > on state, identity, value, time, etc. > > Does anyone know if audio or video was recorded, or (if Rich is reading > this) if there are more comprehensive notes to be gotten? The conclusion of it is her

-> vs comp

2009-10-16 Thread Sean Devlin
I have an idea in my head, and I can't quite put all the details together. The intent with of this posting is to start a healthy debate of the merits of -> vs. comp. I know people on this list will think of something. After designing my own Clojure libraries for a while, I've come to a conclusi

Re: -> vs comp

2009-10-16 Thread samppi
Don't forget about the third piece of the puzzle, #() (and fn). Whenever I need to create a function using ->, I just do #(-> % ...). It's about as much typing as (comp ...). Personally, I can go either way—I just kind of wish that there was a consistent practice for the placement of the most imp

Re: -> vs comp

2009-10-16 Thread John Harrop
On Fri, Oct 16, 2009 at 11:55 PM, samppi wrote: > Don't forget about the third piece of the puzzle, #() (and fn). > Whenever I need to create a function using ->, I just do #(-> % ...). > It's about as much typing as (comp ...). > > Personally, I can go either way—I just kind of wish that there w

clojure.test hang testing agent

2009-10-16 Thread Robert Stehwien
I'm using the clojure-maven-plugin v1.1 (latest shapshots of clojure and clojure-contrib) to run a test for an agent that looks like this: -- (ns com.arcanearcade.clojure.utils.test-timer-agent (:require [com.arcanearcade.clojure.utils.timer-agent :as ta]) (:use clojure.test)) (deftes

Re: clojure.test hang testing agent

2009-10-16 Thread John Harrop
On Sat, Oct 17, 2009 at 12:51 AM, Robert Stehwien wrote: > I'm using the clojure-maven-plugin v1.1 (latest shapshots of clojure and > clojure-contrib) to run a test for an agent > ... > All the tests run, complete, and report back their status but then the > build freezes until I hit ctrl-c J

Re: is there a cannonical way to create executable jar files?

2009-10-16 Thread Stephen C. Gilardi
On Oct 16, 2009, at 8:12 AM, Folcon wrote: Is there a cannonical way to create executable jar files? I've uploaded a shell script that builds an example executable jar file to http://groups.google.com/group/clojure/web/build-executable-jar.sh Here's the program the executable jar runs

Re: JVM Language Summit talk on state, identity, time

2009-10-16 Thread Timothy Pratley
The slides match this: http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey [good recording - one of the best I've come across, gives a very persuasive reasoning of why Clojure 'has it right'] On Oct 17, 7:58 am, Garth Sheldon-Coulson wrote: > In his blog post Rich mentioned his