Bwise has arisen out of the desire to have a useable, interactive, GP block editor with simulation facilities for (semi-) parallel systems.
Tcl/tk was chosen as the implementation platform, because it is list-oriented, offers high-level and very portable user-interface components, and a graphical canvas with associative element addressing.
Even though, in the "C++" meaning of the word, the language is not object oriented, any reasonably equiped programming language can be used to implement the desirable properties of such a language (Java, Objective-C, smalltalk): messaging, 'inheritance', overloading, basically the organization of relatively independent units of code and data combined, with formalized communication between them.
Not every language has the desirable properties that Tcl/Tk has: interpreted constructs (with fast in-line compilation for seriously useable effective speed, without the hasle of compilation), a generally applicable implementation of lists and their implementation of functions, multi-dimensional data sets (through nested lists), very linear and constant command structure (command -options args), practical enough to act as replacement for a lot of unix-shell's capabilities, a transparent (inspectable) hierarchical graphical structure, and networking constructs that have proven to perform in practice.
Bwise utilizes all these properties, and proves that the result is compact and useable: the overall code size (except for the completely standard Tcl/Tk distribution, which is a few Megs including all libraries) of Bwise, some example blocks, a function editor window, the graphical editing facilities, and the semi-parallel simulator is about 50 (fifty) K(kilo) bytes. It may not be a finished product, it is a seriously useable prototype, and it runs on Macintosh, Windows, Unix (and Linux) alike, without changing a single line of code, either in the application, or in the programmed graphs.
The development turnaround cycle for developing graph-based programs is instantaneous: all UI-initiated interaction have immedeate effect, for instance a blocks function could be edited while the network is 'running' with immedeate impact. No compilation, no intermedeate files, no multiple representations of functions and data, no need even for complicated stream wrappers, everything is acted on 'as it is'.
The main window shows a graph with rectangular blocks of any size ad
number of inputs/outputs,
which are represented by name. Each block at least has one function associated with it which is called when the block is supposed to be executed (or 'fire'), and all the graphics associated with the block (pins, labels, graphics) share a tag with basic block, so they can be acted on simulaneously for graphical transforms (currently 'dragging' and selection). Pins can be connected by wires to form graphs in any fashion, also dynamically. Wires can carry any list when using the default transfer function, or used merely as representing pointers.
Blocks and pins are referenced by name, where pins are considered subparts of blocks, e.g. block_name.pin_name. Any block representing a procedure ('function') can be generated by a single commandline listing it's function, inputs and outputs. The block size is automatically accomodated for the number of pins.The whole graphical workplane can be saved as a tcl/tk file, and can be loaded by 'source'-ing it in any tcl/tk canvas.
Alternatively, the connection structure can be saved in various forms
of net-lists, including a list
of function calls to the standard 'connect' procedure that simply draws a wire between the pin names in its arguments.
Other types of blocks include (gif) images, text entry fields, small
(interactive) text windows, an
oscilloscope block with time-base slider, a small tcl command window with history, a 5x7 dot display and a drum-track editor. An 'genarray' procedure arranges a rectangular array of any number of dimensions of connected blocks on the screen (tested for at least 16x16=256 blocks), which subsequently are editable like any other block, it can link the sides of the array with a given pin.
Beside the network editor, various application oriented Tcl/Tk procedures deliver the basic functionality of a GP database (which is being applied to store thousands of 'art-works', and addresses), generating Web pages from database or list-ed data, a combined 'talk', remote command and graphical Ftp-like application (Tcp/IP based), and various interfaces for C-based audio generating tools (graphs, drum paterns).
The effective development time for the actual code was no more (probably less) than half a year.
A screen dump of a recent development session: