[sugar] Education?

Eben Eliason eben.eliason
Tue Mar 13 17:31:41 EDT 2007


>  The idea wasn't to invent a new visual language, just to implement a
> faithful visual representation of how the language really is, with a direct
> manipulation interface for editing data and executing code. (With drag and
> drop, pie menus, tabbed windows, direct stack manipulation, scaled outlines,
> embedded editors, etc!)

>  Python AST trees might be a good way to translate back and forth between
> editable structures and Python code.
>  Although (since Python ASTs weren't designed to be human editable) it might
> benefit from another layer of translation to pretty them up and digest them,
> so they can be easily edited.

ASTs are certainly an interesting way to navigate code, though perhaps
not a manageable one, as you mentioned.  Simplifying various
oft-repeated branches of the trees might be a good idea, since they
become large quite fast.

> I think it would be wonderful to have a visual interface that faithfully
> represented the full power and semantics of Python (without trying to put a
> "kid friendly" facade over it), so you could use it to examine and debug any
> running Python program.

I think this is truly the right direction.  A lot of effort has been
put into wrappers and simplifications of languages, and they certainly
have their place.  They even have their place on the laptops.  But
when it comes down to writing the core activities, with full network
support and all of the other bells and whistles, it's going to be near
impossible to create a wrapper that simplifies such complexity.
Coming up with a really good visual representation for such complexity
should be the goal instead, and this representation should be
applicable to any arbitrary chunk of python code.

An entry point to this visualization should include solid support for
code-collapsing based on scope.  Even better, different scopes can
have different color formatting options.  When collapsed, these blocks
actually become colored nodes, which in a way provides a first step
into the visual AST representation of the source.

- Eben


More information about the Sugar-devel mailing list