Dear list,

Gabor asked me to report on stuff I found odd, so;

I just wrote this;

(define (pick1 in)
    (list-ref in (random (length in))))

(define zep-skins
    (let ((dir "fluxus/twintowers/zeppelins/"))
        (map
            (lambda (x)
                (load-texture (string-append dir (path->string x))))
            (directory-list dir))))

This is used to set a different texture for a Zeppelin model each time, and
pre-load all. I like it; it's compact and expressive... but I don't like the
conversion up&down between "path" and "string". Previously (before I had a
need to load whole directories at once) I was unaware of "path" being a
type.

IMHO something is going wrong here (quite possibly me); I'm getting a "path"
that's just a file name (and not a actual path) and "(load-texture t)" which
expects a actual path takes a string. This might be a Racket issue, it could
be Fluxus one or it could be me trying something new, but something tells me
this could be both more compact and more logical.

Yours,
Kas.

Reply via email to