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

Dave Griffiths dave at pawfal.org
Fri Dec 21 15:53:09 PST 2007


On Tue, 2007-12-18 at 16:39 +0100, Martin Ahnelöv wrote:
> 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 =)

The fluxus osc interface is rubbish. 

I'm interested in switching to a more standard version written in
Scheme, but lacking that, I'll put a spring clean on the todo list (and
make it do bounds checking)

> 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?

It's not slow, it's just laggy - you need to call osc-msg on each
message multiple times per frame until it returns #f to indicate that
there are no messages left. Fluxus keeps a queue of messages (there is
nothing to say that you will get exactly one per frame or less) so you
need to drain these queues every frame to keep it up to date. This is
especially true with oscjoy, as moving a joystick results in hundreds of
messages.

> 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?). 

Yes, fluxus is a little bit maverick in it's regard for these things, no
undo history either... for me the fix has to be things like:

* running the interpreter in another thread and having a key to stop it
* getting rid of all crashes (bounds checking everything)
* undo

but seeing as these will be slow in getting done, an auto periodic
ctrl-s seems sensible - the standard approach seems to append the
current filename with a "~" - would this do the job for the moment?

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

Move the decimal point, round and move it back? I expect there is a
better way...

cheers,

dave




More information about the Fluxus mailing list