[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re : [Chicken-users] idiomatic/usual way of file-based configuration in
Re : [Chicken-users] idiomatic/usual way of file-based configuration in Scheme
Tue, 6 Feb 2007 19:47:48 +0100
2007/2/6, Kon Lovett <address@hidden>:
On Feb 6, 2007, at 2:49 AM, Mario Domenech Goulart wrote:
> Hello Thu,
> On Tue, 6 Feb 2007 10:52:36 +0100 "minh thu" <address@hidden> wrote:
>> I was wondering if there was something like Java's properties files
>> that is commonly used in Scheme. (The reference to Java is because I
>> learned it, not because I like it :)
>> It would just amount to read a list of key/value pairs in Scheme
>> syntax. Or maybe a triple if the type is given.
>> What do you use ?
> A simple approach would be dumping the representation of scheme
> objects (e.g., lists) to a file:
> csi> (define my-list '((1 2 3) (4 5 6) ("a" "b" "c")))
> csi> (with-output-to-file "my-file" (lambda () (pp my-list)))
> csi> (with-input-from-file "my-file" read)
> ((1 2 3) (4 5 6) ("a" "b" "c"))
> There is also the s11n egg:
> PS: I don't know what Java's properties files are, I considered the
> second paragraph from your message.
> Best wishes,
Take a look at the SRFI-29 egg.
Although I was not asking about for l10n issue, it might become handy.