Re: Hierarchical logs

2012-02-15 Thread jweiss
custom indenting though On Tue, Feb 14, 2012 at 6:33 PM, jweiss jeffrey.m.we...@gmail.com wrote: It occurred to me that ultimately what I want is just a pretty-printed output that I can put on a webpage and apply syntaxhighlighter to. I should be able to use a custom pprint dispatch

Re: Hierarchical logs

2012-02-14 Thread jweiss
can just call first on the result). On Feb 11, 8:39 pm, jweiss jeffrey.m.we...@gmail.com wrote: I've been working on a tracing library, that works much like clojure.contrib.trace (based on it, actually).   One sticky problem I've found is, hierarchical logs are really crappy to try

Re: Hierarchical logs

2012-02-14 Thread jweiss
that is getting overly complex. -jeff On Feb 14, 10:14 am, jweiss jeffrey.m.we...@gmail.com wrote: Thanks, Alan, The solution I used looks exactly like yours: (defn mktree [vz [i out?]]   (if out?     (- vz (zip/append-child i) zip/up )     (- vz (zip/append-child [i]) zip/down zip

Hierarchical logs

2012-02-11 Thread jweiss
I've been working on a tracing library, that works much like clojure.contrib.trace (based on it, actually). One sticky problem I've found is, hierarchical logs are really crappy to try to stream to a file. You can't just keep writing to the end of the file - new data needs to be inserted before

Re: clojure.contrib.prxml broken in Clojure 1.3.0

2012-01-18 Thread jweiss
need CDATA - data.xml just automatically escapes XML special-characters if it sees them. On Jan 17, 4:12 pm, jweiss jeffrey.m.we...@gmail.com wrote: By the way, the reason I stuck with prxml is its handling of CDATA, which as far as I know, the newer lib doesn't do yet. On Jan 17, 8

Re: clojure.contrib.prxml broken in Clojure 1.3.0

2012-01-17 Thread jweiss
I fixed up clojure.contrib.prxml to work with 1.3, at least it's working fine for me. You can get the jar from clojars with [weissjeffm/clojure.prxml 1.3.0-SNAPSHOT] source is here: https://github.com/weissjeffm/clojure.prxml On Jan 17, 8:10 am, cassiel n...@cassiel.com wrote: This is

Re: clojure.contrib.prxml broken in Clojure 1.3.0

2012-01-17 Thread jweiss
By the way, the reason I stuck with prxml is its handling of CDATA, which as far as I know, the newer lib doesn't do yet. On Jan 17, 8:10 am, cassiel n...@cassiel.com wrote: This is straight from the doc string: (with-out-str (p/prxml [:p {:class greet} [:i Ladies gentlemen]])) Works in

Re: Really loving Clooj but..

2011-12-31 Thread jweiss
I use a modified version of tools.trace (or rather the old version called clojure.contrib.trace, but works with 1.3), you might be interested in some of the additions (sorry not well doc'd at the moment): 1) Don't blow up if a function throws an exception (return value shown in the trace will be

Re: Could be my favourite improvement in 1.4

2011-12-20 Thread jweiss
Even if they did, it's pretty easy to surround the paste with (read- json ... ). On Dec 20, 10:36 am, Alex Baranosky alexander.barano...@gmail.com wrote: For what it's worth, I think colon's as whitespace in maps adds confusion, without, imo adding a ton of power or readability.  In terms of

Concurrency design

2011-08-08 Thread jweiss
I'm having some trouble figuring out what clojure concurrency tools I can use to solve my problem. The application I'm trying to build is a functional test harness, like TestNG but for clojure. It takes an input a tree of tests to run (where child tests don't run unless the parent passed), and

Re: Concurrency design

2011-08-08 Thread jweiss
with a consume fn. The consume fn does the binding, polls the queue and exits when a done flag is set. The done flag is set to true when the report finishes. Jeff On Aug 8, 12:59 pm, jweiss jeffrey.m.we...@gmail.com wrote: I'm having some trouble figuring out what clojure concurrency tools I

Re: Concurrency design

2011-08-08 Thread jweiss
Ken, Thanks for your response! Those are some great suggestions. Some look quite promising, a few don't fit my purposes. For instance, I can't use pcalls because the user needs to be able to control the number of threads. Your method to skip tests using 'and' works, and is interesting, but I

Re: Anyone on Google+ yet?

2011-07-17 Thread jweiss
http://gplus.to/weissjeffm -- 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 patient with your first post. To unsubscribe from this

Re: Anyone on Google+ yet?

2011-07-17 Thread jweiss
This does bring up an interesting flaw in G+. If I add Clojure people who I don't know personally, how will they know to add me to a Clojure circle? G+ (rightfully) doesn't automatically tell them what circle I added them to. It doesn't appear to be optional to tell them, either. On Jul 14,

Re: another question on macros defining functions

2011-06-04 Thread jweiss
If you are connected to a swank server, have you tried C-c C-k to compile the file you're editing? On Jun 4, 1:15 am, nil ache...@gmail.com wrote: Mark, it turns out that everything I need is known and static at hack- time. (Sorry for making it sound otherwise) I know all the names, values,

Re: another question on macros defining functions

2011-06-03 Thread jweiss
As Ken said, you have to remember macros expand at compile time. Think of a macro call as folded up code that the compiler unfolds for you. A macro saves you from writing repetitive code. But if you are trying to define a function whose name isn't known until runtime, that's a whole different

Re: macro says Can't use qualified name as parameter

2011-05-28 Thread jweiss
On May 27, 1:46 pm, nil ache...@gmail.com wrote: I was looking athttp://saucelabs.com/blog/index.php/2009/12/running-your-selenium-tes... and in the comments, :Scott suggested that a macro could reduce some of the boilerplate that you see here: (def test-google   {    :name google    

Re: macro says Can't use qualified name as parameter

2011-05-28 Thread jweiss
. Jeff On May 28, 2:04 pm, jweiss jeffrey.m.we...@gmail.com wrote: On May 27, 1:46 pm, nil ache...@gmail.com wrote: I was looking athttp://saucelabs.com/blog/index.php/2009/12/running-your-selenium-tes... and in the comments, :Scott suggested that a macro could reduce some

Re: Weening myself off of global state - what's the idiomatic way to solve this?

2011-04-14 Thread jweiss
I'd start by making functions that take arguments. For instance (defn draw-ball [ball] ...) On Apr 13, 1:22 pm, Brandon Ferguson bnfergu...@gmail.com wrote: I'm not sure if this is the place to ask this but I've been struggling with a few things in the world of Clojure. I've been using

Re: Weird nested macro problem

2011-02-01 Thread jweiss
If I remember right from looking at clojure.contrib.condition's source (which I did because I wrote a similar error handling lib, which has a few extra features but isn't ready for prime time)... handle doesn't actually exist as a function or macro. It doesn't expand - the handler-case macro

Error handling implementation - looking for criticisms and suggestions

2010-12-17 Thread jweiss
I'd been shopping around for an error handling kit for Clojure. What I needed was: * The ability to specify error handlers at the caller's level, that are accessible all the way up the stack from them. * Ability to include more data in an error than just a message and stack trace. That data

Re: parameters destructuring sets?

2010-12-05 Thread jweiss
On Dec 5, 2:10 pm, Alex Ott alex...@gmail.com wrote: Re jweiss  at Sun, 5 Dec 2010 10:29:41 -0800 (PST) wrote:  j I'm no expert on this, but i'll take a crack at it.  j I think it's because sets don't (necessarily) impose any order, so  j there's no concept of first or nth.  So