Friday, 14 August 2009

REPL in gschem

The existing scheme command entry box in gschem seemed a bit limiting, so I set out to build a proper evaluation environment. Here is the result:

My goal is to be able to evaluate arbitrary expressions and turn the result into a controller of the view: I want to have the main window's object selection to track the cursor in the GtkTreeView result.

Update (2010-07-09): selection tracking now works! Probably with some bugs due to the way objects and their attributes are commingled in the overall object list.

Where expressions evaluate to a lambda, it should be easy enough also to call that lambda when the row representing that lambda gets a double click (signal "activated"). I'm not sure if that's particularly useful for schematic capture, but it would certainly make Frank happy for REPL goodness.

The code for this is available as a git repository at, in branch "berndj/master-20081019".