Dear list,<div><br></div><div>Gabor asked me to report on stuff I found odd, so;</div><div><br></div><div>I just wrote this;</div><div><br></div><div><div>(define (pick1 in)</div><div>    (list-ref in (random (length in))))</div>
<div><br></div><div>(define zep-skins</div><div>    (let ((dir "fluxus/twintowers/zeppelins/"))</div><div>        (map </div><div>            (lambda (x)</div><div>                (load-texture (string-append dir (path->string x))))</div>
<div>            (directory-list dir))))</div></div><div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Yours,</div><div>Kas.</div>