Re: When I use Agents for logging I have a different behavior in the REPL as in the program

2012-04-26 Thread Marcus Lindner
I tried it with doseq many times, but the behvior is the same. In the REPL I got a full map of information, but when I use the program the map with the agent logs is empty. Am 22.04.2012 19:51, schrieb Moritz Ulrich: Just a quick guess after a quick glimpse at the code you linked: (map #(se

Re: When I use Agents for logging I have a different behavior in the REPL as in the program

2012-04-22 Thread Marcus Lindner
I had made some changes on the code I posted. Here is the actual usedcode with the logging functions included. (ns evolution.genalg (:use [util.time]) (:use [util.profile])) ;; Implementation of a genetic algorithm based on the code given ;; in the book "Clojure" by Stefan Kamphausen and Tim

Re: When I use Agents for logging I have a different behavior in the REPL as in the program

2012-04-22 Thread Moritz Ulrich
Just a quick guess after a quick glimpse at the code you linked: (map #(send % a-day-in-the-life-agent-fn) domiciles) map is lazy. It doesn't execute anything until you request the result. (do ... (map ...) (foo)) discards the result of map, making it a no-op. This also explains why it works in

When I use Agents for logging I have a different behavior in the REPL as in the program

2012-04-22 Thread Goldritter
I wanted to log some information during the execution of the genetic algorithm I posted earlier here. So I chnaged the code and changed the function 'track-evolution' so, that it now accept a maximal runtime and returns a m