[Fluxus] osc-related core dump, and other things

Martin Ahnelöv operagasten at gmail.com
Tue Dec 18 07:39:53 PST 2007


Hi! I've gotten a couple of core dumps by playing around with osc. Turns
out that if you use "(osc 1)" on a message with only one value, fluxus
crashes. Not so nice =)


Few other things. 

Tried this code with my joystick. It's so slow! Much much slower than
the script we talked about some time ago. Why's that? I mean, I can't
see anything that would make my version so much slower than yours. does
the fact that you are compiling it into a class that much difference?

(osc-source "4444")
(define axis (make-vector 6 0))
(define (joystick-update n)
    (if (osc-msg (string-append 
                "/oscjoy.0.axis."
                (number->string n)))
        (vector-set! axis n (osc 0)))
    (if (zero? n) 0
        (joystick-update (- n 1))))


(define (render)
    (joystick-update 6)
    (with-state
        (translate (vector 
            (vector-ref axis 0)
            (* (vector-ref axis 1) -1)
            (vector-ref axis 2)))
        (draw-cube)))

(every-frame (render))


Also, could you possible put a command-line option to save your script
to like.. "flxtmp.scm" every time one executes the/some code, so one can
recover quickly from a crash? It's a real pain in the ass to start all
over again just because you got carried away and forgot to save.
especially at performances (writing n instead of (- n 1) when tail
recursing, anyone?). 

Last, do scheme have a function to round to an arbitrary decimal? ie:
(round 3.14137 3) => 3.141, or similar.

Thanks, 
Gasten




More information about the Fluxus mailing list