<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
PSIBER (PostScript Interactive Bug Eradication Routines) was an
experimental approach I took to making a visual programming interface
and interactive debugger for the PostScript interpreter in NeWS. <br>
<br>
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!) <br>
<br>
PostScript is a lot like Lisp (in some ways more so than Python),
because PostScript programs are simply executable arrays containing
names, literals, primitive operators, nested arrays, etc. <br>
So a general purpose PostScript structure editor can explore and edit
any PostScript program, or even a NeWS thread's state, dictionary
stack, operand stack and execution stack, so it's a useful component of
an interactive debugger. <br>
<br>
Python AST trees might be a good way to translate back and forth
between editable structures and Python code. <br>
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. <br>
<br>
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. <br>
<br>
Of course there's still a need for many different simple
application-specific "kid friendly" visual languages, but when you
drill down to real code, it's best to get the real thing (full access
to everything Python can do, visually) instead of some annoying
watered-down half-baked ersatz Python (like "safe python" in Zope, or
smarty templates in PHP). <br>
<br>
-Don<br>
<br>
The Shape of PSIBER Space - October 1989<br>
<a class="moz-txt-link-freetext" href="http://www.donhopkins.com/drupal/node/97">http://www.donhopkins.com/drupal/node/97</a><br>
<br>
The Shape of PSIBER Space:<br>
PostScript Interactive Bug Eradication Routines<br>
<br>
Written by Don Hopkins, October 1989.<br>
University of Maryland<br>
Human-Computer Interaction Lab<br>
Computer Science Department<br>
College Park, Maryland 20742 <br>
<br>
The PSIBER Space Deck is an interactive visual user interface to
a graphical programming environment, the NeWS window system.
It lets you display, manipulate, and navigate
the data structures, programs, and processes living in the virtual
memory space of NeWS.
It is useful as a debugging tool, and as a hands on way to learn about
programming in PostScript and NeWS.<br>
<br>
Introduction<br>
<br>
[Gratuitous Gibson quote omitted]<br>
<p>The PSIBER Space Deck is a programming tool
that lets you graphically display, manipulate, and navigate
the many PostScript data structures, programs, and processes living in
the virtual memory space of NeWS.
</p>
<p>
The Network extensible Window System (NeWS) is a multitasking object
oriented PostScript programming environment.
NeWS programs and data structures make up the window system kernel, the
user interface toolkit,
and even entire applications.
</p>
<p>
The PSIBER Space Deck is one such application, written entirely in
PostScript,
the result of an experiment in using a graphical programming
environment
to construct an interactive visual user interface to itself.
</p>
<p>
It displays views of structured data objects in overlapping windows
that can be moved around on the screen, and manipulated with the mouse:
you can copy and paste data structures from place to place, execute
them, edit them,
open up compound objects to see their internal structure,
adjust the scale to shrink or magnify parts of the display, and pop up
menus of other useful commands.
Deep or complex data structures can be more easily grasped
by applying various views to them.
</p>
<p>
There is a text window onto a NeWS process, a PostScript interpreter
with which you can interact (as with an "<code>executive</code>").
PostScript is a stack based language,
so the window has a spike sticking up out of it,
representing the process's operand stack.
Objects on the process's stack are displayed in windows
with their tabs pinned on the spike.
(See figure 1)
You can feed PostScript expressions to the interpreter
by typing them with the keyboard,
or pointing and clicking at them with the mouse,
and the stack display will be dynamically updated to show the results.<br>
</p>
<p>More:<br>
<a class="moz-txt-link-freetext" href="http://www.donhopkins.com/drupal/node/97">http://www.donhopkins.com/drupal/node/97</a></p>
<br>
<br>
Guido van Rossum wrote:
<blockquote
cite="midca471dc20703111250p48bfdc29v106ee526cf5963f7@mail.gmail.com"
type="cite">On 3/11/07, Andrew Clunis <a class="moz-txt-link-rfc2396E" href="mailto:orospakr@linux.ca"><orospakr@linux.ca></a> wrote:
<br>
<blockquote type="cite">Antoine van Gelder wrote:
<br>
> Don Hopkins wrote:
<br>
>> Of course it might just be more powerful and efficient to
re-implement
<br>
>> something like Klik-and-Play from scratch in Python, as a
plug-in
<br>
>> visual scripting component, which can be used to script a
<br>
>> HyperCard-like gui environment, and games built on top of it
like
<br>
>> SimCity and Robot Odyssey.
<br>
>
<br>
> Anyone know the current status of being able to turn an AST tree
emitted
<br>
> by the Python compiler module back into code after it has been
modified ?
<br>
<br>
I've been looking into this for Develop activity, but it seems that
path
<br>
has never been explored. Best approach seems to be to write a
<br>
pretty-printer to walk the tree.
<br>
</blockquote>
<br>
I'm curious about the focus on ASTs that seems apparent in this
<br>
subthread (though I may easily be misreading between the lines :-).
<br>
I've always been more inclined to edit the text and re-parse from
<br>
there, as it puts the author in control of formatting, comments etc.,
<br>
and this is how most "real-world" environments work. (Not that that
<br>
necessarily makes it better, but neither is the opposite true.) Is
<br>
someone willing to write up a brief comparison between the two
<br>
approaches?
<br>
<br>
</blockquote>
<br>
</body>
</html>