Re: debugging, logging, ... and code sections

2008-09-01 Thread Frantisek Sodomka
Yes, the name and semantics of aspects fits for it more. I like that. I am going to sign up for contributing soon. I am low on time currently, so feel free to extend this idea further. As soon as Rich gets agreement, you can use it :-) Frantisek --~--~-~--~~~---~

Re: debugging, logging, ... and code sections

2008-08-31 Thread Stephen C. Gilardi
On Aug 31, 2008, at 4:34 AM, Frantisek Sodomka wrote: > To extend this idea little further, lets define "code sections": I like the idea a lot. I believe the "Aspect oriented programming" folks call these kinds of "outside the main flow" items "aspects". I think it would be good to have aspe

Re: debugging, logging, ... and code sections

2008-08-31 Thread Frantisek Sodomka
I found that Rich wrote a simple tracing facility: http://groups.google.com/group/clojure/browse_frm/thread/fd315d9dfdb8c32c/7479682cdf3a1b97 What I had in mind is to literally turn on and off parts of code. This way I can play with design by contract: (def *section-tags* {:require true}) (de

Instrumenting functions (was: Re: debugging, logging, ... and code sections)

2008-08-31 Thread Meikel Brandmeyer
Hello Parth, (defn print-decorate [f] (fn [& args] (println (:name (meta (var f))) "called with" args) (apply f args))) f is not a toplevel binding, but only a local variable. This is the issue here, I think. Please try the following. (defn print-decorate [f] (fn [& args] (pri

Re: debugging, logging, ... and code sections

2008-08-31 Thread Parth Malwankar
Frantisek Sodomka wrote: > Hello! > It is very common pattern to include parts of code which are used for > specific purposes - for example debugging, logging, etc. While these parts > can be used when developing code, they can be removed from finished > application. One way is to comment these

debugging, logging, ... and code sections

2008-08-31 Thread Frantisek Sodomka
Hello! It is very common pattern to include parts of code which are used for specific purposes - for example debugging, logging, etc. While these parts can be used when developing code, they can be removed from finished application. One way is to comment these parts out, when we are done.