Re: vislivecode slightly ot rambles (was Re: [livecode] another ramble)

From: Dave Griffiths <dave_at_pawfal.org>
Date: Fri, 21 May 2004 12:04:59 +0100

On Thu, 20 May 2004 23:06:04 +0100, alex wrote
> On Thu, 2004-05-20 at 22:40, Amy Alexander wrote:
> > 1) how do you go about telling the interpreter "execute now" when live
> > coding? dave, you're using highlighting? does it execute as soon as you
> > highlight? or you have to hit RETURN or something?
>
> I have Perl recompile the whole file I'm editing all the time.
> State is preserved - it's just interpreting it as an extra bit of
> code, except old versions of sub-routines get replaced with real ones.
>
> I have two modes... One is to have the interpreter run over the code
> every time I type any key, or every time the running program edits
> its own code. This mode is of course completely impractical as you
> have to think of the effect of every single keypress. It also uses
> a lot of CPU, so I can't keep many running at a time without getting
> audio drop-outs... This is because my programs tend to edit their
> code a lot, putting in comments to let me know what's going on.

whooo, your programs talk to you via they're own comments? that makes my head
hurt :]
 
> The other mode triggers a recompile every time I hit ctrl-x. This seems
> to work for me.
>
> > 2) validation - i make typos when livecoding, and then the illegal
> > commands generate a
> > nasty crash or at least an error in performance! i may just integrate
> > those into the performance, but, curious how others handling this problem?
> > are you having some code validation go on before execution, or... ???
>
> My code first tries to compile it into a scratch area first, so that
> if the program isn't syntactically correct it leaves the old version
> running.

I worried a lot about doing something like this, but in practise it hasn't
been much of a problem, if there is a syntax error in a script the interpreter
aborts the code there and it's quite easy to sort out. The only thing that
seems to go wrong is if the code generates a mismatching (push) or (pop)
trashing the renderer's state stack - but this often results in visually
interesting ;) results anyway...

cheers,

dave

................................. www.pawfal.org/nebogeo
Received on Fri May 21 2004 - 11:05:14 BST

This archive was generated by hypermail 2.4.0 : Sun Aug 20 2023 - 16:02:24 BST