Live VJ mixing for hackers …

Fluxus

Fluxus allows you to write Scheme scripts that create graphics live, interpreting audio and OSC input as a source of animation data. Fluxus also uses a fully featured physics library, which means you can script physical properties into objects and simulate them in realtime.
….
The built in scheme code editor runs on top of the renderer (see screenshots), which means you can edit the scripts while they are running.

What he said …

Generics considered harmful

My only commentary on this is that generics are an attempt to work around the restrictions of static-typing systems. C uses void, dynamics languages just don’t have the problem. Of course weak-typing/late-binding can introduce its own problems but there are ways around that.

Google Juice: Erlisp; erlang features ported to lisp

http://dirkgerrits.com/programming/erlisp/

I’ve been thinking about the need for this in lisp for a while, I’m glad somebody’s looking at it seriously.

Java events vs Signals

I had been using a pattern similar to the Java2 event model to abstract events in the jabber client. However this proved to be rather heavyweight for Python, requiring the implementing of whole interfaces where only one or two events are needed. I'm now moving to a model more like the Gtk/Glib signal model, that hooks a named signal to functions or object members, with optional keywork parameters. The base class is simple and looks like this:

PYTHON:
  1. class SignalEmitter(object):
  2.     def __init__(self, signals):
  3.         """Base class for linking named signals to functions.
  4.            Initialised with a list of signals this class will emit."""
  5.         self._signals = {}
  6.         for sig in signals:
  7.             self._signals[sig] = []
  8.  
  9.     def addReceiver(self, sig, receiver):       
  10.         """Add a signal receiver, throws KeyError if not available."""
  11.         self._signals[sig].append(receiver)
  12.  
  13.     def emit(self, signal, **kwargs):
  14.         """Emit a signal with keyword arguments.  Throws KeyError if
  15.            signal not registered."""
  16.         for func in self._signals[signal]:
  17.             func(**kwargs)

A child class just registers valid signals at initialisation and them may call them with:

self.emit('signalName', keyword=val)

Interested parties just register with:

emitter.addReceiver('signalName', self.sigRcv)

This allows for a finer-grained MVC model, and makes it easier to dynamically attach interested parties at runtime.

  1. Archives

  2. Categories

  3. Twitter

  4. RSS Google Reader Shared Items