Monday, January 14, 2013

Riches and Roses

I'm at the point now with the user interface I'm working on (playing with!) where I am confronted with an embarrassment of riches in terms of wonderful design choices.

I'm finding the separation of (graphical, dynamic) user interface from the underlying virtual machine (the xerblin not-quite-language runtime) to be extremely useful and gratifying.

Because the Flask server does not reload the Python interpreter state when I change a template file I can adjust the SVG rendering code and refresh the browser to see the same state rendered with the new code!

Right now I have come to the point where I am creating dictionaries (in xerblin these are sorted binary trees made of tuples, too much to get into here, persistent data structures) to represent SVG elements, as one possibility for "internal" authoring.

Because the dictionaries arrive from the server as JSON arrays, and because the display code is already written to recursively display array contents, the  contents of the dictionaries are already automatically rendered.

Only it doesn't look great.

The array code was written (last night, at 2am) to display linear stacks, but the dictionaries are binary trees, so they sort of pile onto themselves when rendered.

It makes for lovely fractal patterns that are really beautiful to look at, but they could be more useful...

Now I can leave a dictionary on the stack and edit the rendering code to try out different tweaks for displaying arrays, and when I refresh the page I'll see the same dictionary rendered with the new code I just tweaked.

"Roses, just roses..."

No comments: