Re: New ns function

2008-09-02 Thread Stephen C. Gilardi
On Sep 2, 2008, at 7:32 PM, Rich Hickey wrote: >> I suggest adding (:load-resources ...) as a supported reference >> argument for 'ns. > > I wonder. It seems in many cases the loaded resources will need > definitions made by the parent/loadee, in which case you'd want to > load them at the end of

Re: New ns function

2008-09-02 Thread Rich Hickey
On Sep 1, 11:42 pm, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote: > On Aug 30, 2008, at 11:23 AM, Rich Hickey wrote: > > > Yup, coincidence, please use as documented. Tools, for instance, > > might analyze ns forms looking for :use etc and not find them. > > I suggest adding (:load-resources .

Re: Using a Timer in Clojure

2008-09-02 Thread Mathias Dahl
> > For regular tasks of the sort you describe, especially things like > > sending out regular emails, backing up systems, and other maintenance > > tasks, you may want to consider using cron on a unix machine instead. > > Yup, lots of CRON-style functionality already exists, so no reason to > inv

clojure/ns and gen-and-save-class

2008-09-02 Thread Stuart Sierra
I think there's a problem with the new clojure/ns and gen-and-save- class. Suppose you define: (clojure/ns com.example (:use clojure.contrib.pred)) (defn MyClass-close [this] (println "Hello, World!")) And you generate a .class file with: (gen-and-save-class

Re: Using a Timer in Clojure

2008-09-02 Thread .Bill Smith
> For regular tasks of the sort you describe, especially things like > sending out regular emails, backing up systems, and other maintenance > tasks, you may want to consider using cron on a unix machine instead. Yup, lots of CRON-style functionality already exists, so no reason to invent your ow

Re: Using a Timer in Clojure

2008-09-02 Thread J. McConnell
On Tue, Sep 2, 2008 at 11:06 AM, Josh Daghlian <[EMAIL PROTECTED]> wrote: > > For regular tasks of the sort you describe, especially things like > sending out regular emails, backing up systems, and other maintenance > tasks, you may want to consider using cron on a unix machine instead. I'll se

Re: Using a Timer in Clojure

2008-09-02 Thread Josh Daghlian
For regular tasks of the sort you describe, especially things like sending out regular emails, backing up systems, and other maintenance tasks, you may want to consider using cron on a unix machine instead. Cron is a super old (read, highly configurable and well-understood) piece of software (or f

Re: Using a Timer in Clojure

2008-09-02 Thread .Bill Smith
The following code creates a timer that runs after a delay of three seconds. (import '(java.util TimerTask Timer)) (let [task (proxy [TimerTask] [] (run [] (println "Running")))] (. (new Timer) (schedule task (long 3000 I'll let someone else comment on the concurrency issues.