Phase 1 of the development of PigeonTalk is to create a full Smalltalk development environment. Currently, I'm working by editing text files of Smalltalk code and using a REPL (Read Eval Print Loop) to run the commands to file in the changed files. This is a very difficult way to develop Smalltalk code.
The REPL itself is a simple HTML / Javascript interface which establishes a WebSockets connection with the image (which may run on the same system or a different system). The VM has a Sockets interface written as VM primitives and I've written a Web Sockets interface in Smalltalk using the Sockets interface.
Using this interface, I can at least type Smalltalk commands into a Text field and have them executed then I press the Print It button.
Phase 1 improves this interface using an HTML canvas and Javascript drawing operations. This technique is similar to the one used by Dan Ingalls in his Lively Kernel. The difference is that Lively has you doing all of the programming in Javascript. With PigeonTalk, the components will be implemented in PigeonTalk using Smalltalk. The low-level drawing commands for each component will be sent using JSON to the Javascript code which interprets those commands to perform the drawing. (A later optimization will have the Javascript code store the commands for re-drawing each component and for PigeonTalk to only send the commands to re-draw the components which have changed).
Using this technique, I plan to develop my own simple windowing system. From there, I plan to implement workspaces, Smalltalk browsers and debuggers. That would allow the system to behave like a real Smalltalk development environment.
Here's what the interface looks like right now.
The Do It and Print It buttons are implemented at the VM level. The remaining buttons allow me to open the VM in a Development mode and perform single stepping and view stacks to make sure the VM is working properly.
The gray area at the bottom is an HTML canvas to use as the beginning of the windowing system. Once the windowing system works well enough, I'll remove the buttons and text fields at the top leaving only the canvas on the screen. This will be the Smalltalk user interface.
The first version of PigeonTalk will look and feel very much like a version of Smalltalk. Once this is working, I'll move on to Phase 2 to change the language itself. I'll describe that vision in another blog post.
No comments:
Post a Comment