[Fluxus] Fluxa notes

Kassen signal.automatique at gmail.com
Sun Apr 10 14:27:54 PDT 2011


Ok,

I think I have most of the checking done. It works quite well and it's now a
lot harder to make Fluxa spew out multiple errors per second that scroll by
too quickly to easily read while the sound stops. I'll commit tomorrow after
looking it all over once more. One thing that still bothers me is this;

(define (seq p)
    (cond
        ((not (procedure? p)) (raise-type-error 'seq "procedure" p))
        ((not (eq? (procedure-arity p) 2)) (error "seq function should take
2 arguments but takes" (procedure-arity p)))
          (else (set! proc p))))

That's what my take on (seq ) now looks like. I'd really like the arity
error to be more clear, for one thing I had no idea what to call the
function we have here. I'd also like to be able to get the names of the
arguments to the (likely) anonymous function p, but Racket seems to have no
way to do that. So, if the user types this;

(seq (lambda (time clock banana) .2))

I want the error to say;

"error; seq function should take 2 arguments but takes 3; time clock banana"

I might be looking at this the wrong way, but it seems to me that Racket
isn't prepared for checking some properties of p from the scope of (seq ),
even though sending a certain p into (seq ) might be a syntax error. That
seems a bit odd, as the features for checking and reporting errors more or
less similar to this are quite extensive.

Yours,
Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20110410/e5e82b24/attachment-0001.html>


More information about the Fluxus mailing list