Re: [Chicken-users] Facilities on top of SRFI 37: args-fold

2005-06-07 Thread Michele Simionato
On 6/6/05, Zbigniew <[EMAIL PROTECTED]> wrote: > I'm guessing you mean something on the order of > > '( (option (h help) #:none "Display help text") >(option (f file) #:required "Load file")) > > and then you would parse that and build both a usage string and a list > of options from it? Yes

Re: [Chicken-users] Facilities on top of SRFI 37: args-fold

2005-06-06 Thread Zbigniew
I'm guessing you mean something on the order of '( (option (h help) #:none "Display help text") (option (f file) #:required "Load file")) and then you would parse that and build both a usage string and a list of options from it? Currently I can create an options list like: (list (args:make-o

Re: [Chicken-users] Facilities on top of SRFI 37: args-fold

2005-06-06 Thread Michele Simionato
On 6/6/05, Zbigniew <[EMAIL PROTECTED]> wrote: > I like your recipe. Given a robust enough parser and perhaps some > very minimal markup to help it along, it would cover a lot of cases. Well, in Python I had to parse the usage string, in Scheme I would just write the usage message as an s-express

Re: [Chicken-users] Facilities on top of SRFI 37: args-fold

2005-06-06 Thread Zbigniew
I like your recipe. Given a robust enough parser and perhaps some very minimal markup to help it along, it would cover a lot of cases. The only problem is, it does not allow you to add a processor function for each option. In practice, though, I wonder how useful the processors are---the exampl

Re: [Chicken-users] Facilities on top of SRFI 37: args-fold

2005-06-06 Thread Michele Simionato
> On 6/6/05, Zbigniew <[EMAIL PROTECTED]> wrote: > > args-fold is a neat design, but it can be somewhat complicated (and > > tedious) to use. I figure most people will write support code to make > > it easier. Unfortunately I could not find any, so at the risk of > > reinventing the wheel I wrote

Re: [Chicken-users] Facilities on top of SRFI 37: args-fold

2005-06-05 Thread felix winkelmann
On 6/6/05, Zbigniew <[EMAIL PROTECTED]> wrote: > args-fold is a neat design, but it can be somewhat complicated (and > tedious) to use. I figure most people will write support code to make > it easier. Unfortunately I could not find any, so at the risk of > reinventing the wheel I wrote my own.

[Chicken-users] Facilities on top of SRFI 37: args-fold

2005-06-05 Thread Zbigniew
args-fold is a neat design, but it can be somewhat complicated (and tedious) to use. I figure most people will write support code to make it easier. Unfortunately I could not find any, so at the risk of reinventing the wheel I wrote my own. The main goals were: 1. Collate options and operands in