[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] md5 egg documentation wrong
From: |
obscuroloconato |
Subject: |
Re: [Chicken-users] md5 egg documentation wrong |
Date: |
Fri, 16 Dec 2011 11:55:12 +0100 |
2011/12/15 Kon Lovett <address@hidden>:
>
> So:
>
> (message-digest-chunk-converter (lambda (obj) (call-with-output-string
> (cut serialize obj <>))))
>
> should be enough.
serialize from s11n has its own limitations.
I tried to write an exception to a file in order to be able to analyze
it later. For the file name I tried to create a MD5 hash. So my first
try was this:
(with-output-to-file (md5-digest (cons (random 10000) exn))
(lambda () (serialize exn)))
It failed miserably ;-)
I end up with this:
(with-output-to-file (md5-digest (number->string (random 10000)))
(lambda () (write (condition->list exn))))
This is probably the best approximation one can get.