@mrjbq7, @erg, @bjourne,
I am starting a new project based on Factor. Skov is a visual (or graphical) programming system where programs are represented by graphs. It can be thought of as a visual Lisp.
I had been thinking of a visual Lisp for some time because Lisp programs are trees and I thought that trees could be displayed better in a graphical form rather than as text. At the time, I hadn't understood all the advantages of this so I didn't pursue the idea.
In early August, I realised that Lisp, Factor and Rebol, three very powerful languages, are all solving problems present in the other two while introducing new problems. They are sort of circling around an ideal without being able to get there. Lisp explicitely shows the structure of the program, at the cost of lots of parentheses. Factor and Rebol don't need the parentheses but the structure of the code is lost. The structure has to be recreated by the compiler and by the programmer's brain. Each word has to take a fixed number of arguments and the compiler and the programmer have to know the number of arguments taken by each one. Factor is written in the order of execution, which allows it to pass data between words without the need for named arguments. The drawback of this is the profusion of maddening stack sufflers. Lisp and Rebol don't need stack shufflers but they require the programmer to give names to everything. This prevents fine-grained refactoring, which is also limited in Factor by the need to write stack effects. What prevents Lisp, Factor and Rebol from reaching the ideal is text-based input.
I realised that it is not possible to have a text-based language where code is easy to write, easy to read, program structure is explicit, refactoring is unlimited, results can be easily used in several places, data can be passed around easily, and where the programmer doesn't have to remember anything other than function names.
Consider what a visual system allows us to get rid of: let expressions, parentheses, stack shufflers, positional arguments, all syntax.
I researched the field of visual languages, which was mostly unknown to me. In most systems, the programmer has to move blocks or nodes around to draw his program, almost spending more time doing interior decoration than actual programming. In Skov, the user doesn't have any control over the appearance of the program. The graph is automatically layed out.
On the question of productivity, I would argue that programming in Skov may actually be faster than in text-based languages. You enter all the words you will be needing with your keyboard, in the order in which they come to mind, not in an order imposed by the system. Then you take your mouse and simply draw all the connections between the words.
Factor was the best possible base for Skov because it is a powerful language, it has a lot of vocabularies, words have good names, it has image-based persistance and an OpenGL user interface, it works the same on the three common platforms and it is entirely contained in one directory.
The Skov project currently contains about 800 lines of Factor code, which is amazingly little.
At the moment, it is possible to create vocabularies and words, to use words in other words, to execute words and see the results. It is possible to use words that take quotations like map, filter or if. You can save the image so that your work will still be there the next time you open Skov.
In the future, I imagine there could be a system image that the user wouldn't modify and several user-created images that would contain the Skov code. These images could be sent to other people to share code. I would also like Skov to be homoiconic, not in the sense of code and data having the same appearance, but in the sense of them being processed by similar tools.
Here is what the interface looks like:
I would be happy to read your comments on this project.