[Edu-sig] Visual Programming in Python?
Dethe Elza
delza at livingcode.org
Sun Apr 16 17:12:44 CEST 2006
On 4/15/06, kirby urner <kirby.urner at gmail.com> wrote:
> > [1] http://puredata.info/
>
> This one reminds me of HP VEE (no longer supported I'm thinking) and LabView
> http://www.ni.com/labview/
>
> > [2] http://www.processing.org/
> >
>
> Poking around here, I didn't see a GUI-based back end for programming
> (looked like a text based API) but maybe I just didn't look hard
> enough.
You're right, my bad. It's very visual, being focused on graphics,
but the coding is still in text.
> Some knowledge domains make GUI object based programming easier, as
> when there's an implied pipeline, i.e. signal or data.
Absolutely. One step towards a visual interface that I've
experimented with is to store changes in a program as Python commands
that could be run to recreate the current state of the program. I was
building a turtle-based environment for my kids (never completed)
where, instead of typing commands to the turtle, you could click where
you wanted the turtle to go and a little cartoon turtle would turn to
face that coordinate and walk over to it. Or you could pick up the
turtle and drag it where you wanted, or drag the turtle's leg to turn
it. The key for me is that all the commands were stored as Python and
the kids could *see* what they were doing, that making the turtle move
around and draw pictures was "programming," that they could change the
program to get a different result, and with some canned examples that
drew a house, a star, etc., to introduce looping and basic function
definition.
The animation program I'm working on now is a variation on the same
idea, and the documents can be saved as Python or as SVG and tweaked
by hand. The problem with exposing such graphical programs "as code"
is that the vast bulk of the code is just x,y coordinates, which don't
make it look particularly friendly.
> I suppose the *best* example of this using Python is ESRI's ArcView or
> whatever the latest version is called. Very graphical (drag and drop,
> point to data sources, string together objects), plus generates Python
> source code under the hood (one of the reasons I got to do a 3 hour
> training for ESRI/GIS types last year).
I'll have to check that out[1]. Seems to be a GIS mapping engine with
a scripting interface. Have you seen Frink[2]? It's a scripting
language that embeds WordNet and also has a lot of domain knowledge
about units and conversions, so it can handle numbers representing
amounts, while retaining the unit the amount is measured in, and also
handles basic language translation, parts of speech lookup, etc. It's
kind of interesting to imagine a language where this kind of domain
knowledge was built in and all the knobs turned to eleven. Even if
the mapping was just an API for calling Google Maps, the more things
like that you have access to, the more unexpected ways that you can
combine them to create something new.
--Dethe
[1] http://www.esri.com/software/arcgis/arcview/index.html
[2] http://futureboy.homeip.net/frinkdocs/
>
> Kirby
>
More information about the Edu-sig
mailing list