| Edit | Rename | Upload | Download | Back to Top |
One such format is SIF, which is part of the ANSI standard. Richard A. Harmon has SIF readers for Squeak and Dolphin at homepage2.rconnect.com/raharmon/. It would be great if people could port them to other dialects before we meet. Or, we could port them to the other dialects the first few days of Camp Smalltalk and then join another project. Most of the other projects could use a SIF reader and writer so that they could move code freely between dialects.
Richard A. Harmon harmonra@webname.com
A couple of folks that I sent my SIF implementation to said they might port it to VAST or VW. I have not heard that anyone has.
My SIF has a lot of extra stuff (mainly program element components) to internally represent the program elements specified in ANSI, and to add sets (collections) of program element components). I read and write the program element components by sending messages to an instance of a program reader or a writer class. Thus all the ANSI specific formatting detail is segregated in just the reader and writer classes.
To port bare-bones SIF just to read and write code requires only these two classes and a little controlling code. A few methods in the component classes that handle annotations are also needed. My whole big bunch of SIF stuff is not required.
I would guess the bare-bones SIF would take someone familiar with the dialect two days to port it. I used the bare-bones version for a year before adding the GUI program browser and program editor.
The best examples of how to read and write SIF code are methods in the program browser and program edit user interfaces commands category.
The main objection to SIF is that it can not handle namespaces.
I've been corresponding with someone about how to extend SIF to handle namespaces. I think I will use an approach similar to that in a paper on Subsystems by Allen Wirfs-Brock. I can't figure out how to do this without breaking ANSI SIF, so I think a namespace version would need an additional non-compliant reader and writer and 1.1 version to distinguish it from 1.0 SIF. It will be a while until I can work on this as my plate is full doing the ANSI messages and tests.
I started porting the Dolphin SIF code to VA, but got stuck where several methods called Compiler>>evaluate:with:. VA does not like that, and the Compiler source is hidden, so this one will have to be handled by the Experts.
I successfully filed all the code into VW3.0, and am working towards simple fileIn and fileOut menu options on a class by class basis. I'll be in touch with Richard on this.
Eric Arseneau wrote on comp.lang.smalltalk
I have just posted my code for anyone to access if they wish. The link is www.pocketsmalltalk.com/sif/
I currently have support for:
With this utility you will be able to file code out from one dialect and file it into another. It tries to keep as much information as possible.
It is not the greatest code in the world and can be brittle if the file is not quite right. I have not done very extensive testing, but then again who ever does ;-> I have done some basic testing. Have used it to bootstrap to all the dialects, starting from Dolphin. It works ok for me, and I thought I would share it.
I would like to work on one of the two portability project, the ASCII or the XML. I pla to spend one day working on the mapping of object to RDB, an spent the other time on portability.
I moved some applications from VSE (The smalltalk dialect I use most) and VA. I ported also code to ObjectStudio , and I'm starting working on Dolphin.
I have foud problems related to interfacing with the compiler, with the packaging/team environement (Envy versus Team/V versus the text based approach of ObjectStudio), the Exceptions (VA does not support class based one), etch. Those things procured me more headache than the code differencies. I foud also problems on simple things like prompters or setting the ourglass cursor. All of these things are differents, and, if it is true that some are connected with the UI side (the most different side of smalltalk between dialect), it is also true that some simple widget should be equal on the different dialects. I have some version of those, and will try to package (documenting) for the camp-
I understand the camp will work on base code differencies, but the above discussion was to discover if some other guy has done something similar, for the same reason.
| Edit | Rename | Upload | Download | Back to Top |