Page 1 of 1

Live coding

PostPosted: Sat Sep 25, 2010 11:26 pm
by harry666t
This isn't something directly related to COSA, but since most (all?) of us here are programmers, this might be interesting to you anyway.

Live coding...

Well, I came across the term a few weeks ago. In short, it is a practice of changing programs as they run. This is the "next logical step" on the way to shorten the "edit-compile-rerun" cycle. As the so-called scripting languages eliminated the "compile" step, live coders have eliminated "rerun". The moment you save the file is the moment the changes are brought to life.

The most common use-case for LC is creating music, live. Believe it or not, but there actually are people who hack on stage in clubs, where other people are dancing to the music they've programmed. Most of the performances are completely improvised. As a programmer and an improvising musician, I can only say: wow!

There are programming environments specifically created for live coding (Fluxus, SuperCollider, Al-Jazari). However, almost any existing language can be retrofitted to support LC, most often all you need is some facility to dynamically reload executable code (dynamic languages like Python, Ruby or Perl shine here). The tricky part is to preserve other state while reloading a part of the program. I guess everything depends on what you're trying to achieve (live coding music is simple in principle: you just fire off a certain function every X milliseconds to provide a "beat"), but generally languages that weren't made with live coding in mind (which means: everything that is mainstream enough to be of any value for a real-world project) are rarely suited to ease implementing the practice.

By the way, and a little back to the topic of the forum - I guess this is where COSA would rock. Man, it WILL rock, literally! The basic principles give the programmer/musician an excellent tool for a performance. Development would be very rapid, things are event-based and stay synchronous, you could literally see what's going on or what's going wrong, you would have simple access to rich libraries of ready-to-use code, and most importantly: the "live coding" feature is baked right into the development environment.

BTW2, you should take a look at This site seems to be a sort of a hub for live coders. Many links are outdated, but there's still a lot of cool info, and videos of live performances.