Hi Carsten,
there is the bundle {Smalltalk Transform Project} which includes the machinery for porting VisualWorks to Gemstone.
I started to add Pharo, but have not finished yet. In Gemstone I could use namespaces which is not possible in Pharo.
For translating VW to Squeak/Phara/Cuis/VA/etc. the namespaced class (and shared) names need to be renamed to global names.
This is not trivial and I was working on that, but it is not finished (and don���t know if I even will finish it ��� jump in if you need it 😊).
My take on porting is a bit different from the typical one-shot approaches I have seen so far.
Instead of freezing a piece of code and then more or less manually translating the code,
I describe the code transformation from the source to the target dialect in a declarative way.
(see slides 11 to 20 in https://www.slideshare.net/esug/pdftalk-for-gemstone from ESUG 2017).
This allows for leaving the source code unchanged and is fully repeatable.
This is important when your source code base is changing and you need to port the code on a regular basis.
In practice, instead of changing the code in the target dialect, you change the transformation which produces the target code.
With this, you can use all Smalltalk tools in the source dialect in the live environment in which the code is working, especially #references and the RB rewrite engine.
The transformations can be:
Here is an example of such a transformation (for the basic fonts package of PDFtalk):
PackageChange localChanges: (Array
������������������������������������������������������������ with: (ClassChange
�������������������������������������������������������������������������������������������� classReference: #{PDFtalk.Fonts.Font}
�������������������������������������������������������������������������������������������� instanceChanges: (Array
���������������������������������������������������������������������������������������������������������������������������� with: (Rewrite method: #fontbody rule: #replaceGemstoneErrorClasses)
���������������������������������������������������������������������������������������������������������������������������� with: (Ignore method: #screenFont)
���������������������������������������������������������������������������������������������������������������������������� with: (Ignore method: #screenFontDescription)
���������������������������������������������������������������������������������������������������������������������������� with: (Ignore method: #screenFamilyName))
�������������������������������������������������������������������������������������������� classChanges: (Array
���������������������������������������������������������������������������������������������������������������������������� with: (Replace method: #loadedFonts code: #_gs_loadedFonts)
���������������������������������������������������������������������������������������������������������������������������� with: (Replace method: #fontClasses code: #_gs_fontClasses)))
������������������������������������������������������������ with: (ClassChange
�������������������������������������������������������������������������������������������� classReference: #{PDFtalk.Fonts.FontBody}
�������������������������������������������������������������������������������������������� instanceChanges: (Array with: (Rewrite method: #encoder rule: #replaceDottedName))
�������������������������������������������������������������������������������������������� classChanges: (Array with: (Rewrite method: #tokenLinesFrom: rule: #replaceGemstoneBaseMethods))))
If you are interested, you can ask me for further explanations.
(All code is in the public store under MIT licence)
Happy hacking,
������������������������������ Christian
Von: Esug-list <esug-list-bounces@lists.esug.org> Im Auftrag von Carsten H��rle
Gesendet: Dienstag, 17. September 2019 14:36
An: esug-list@lists.esug.org
Betreff: [Esug-list] Github / Pharo / VisualWorks porting tools
Hi,
there is a lot of Smalltalk code in Github for Pharo and VisualWorks.
The main repository for Seaside seems to be Github also.
Which VisualWorks tools are available to support code exchange with Github and Pharo?
How does the Cincom developer team do the porting of new versions, e.g. for Seaside?
I found a Cypress interchange format implementation for VisualWorks from Travis Griggs:
https://github.com/CampSmalltalk/STIG
However the code 7 years old and does not work in current VisualWorks versions and has several bugs.
I started fixing it, but before I invest to much effort, I would like to ask how other people do the porting from and to Github / Pharo or other dialects.
Regards
Carsten
--
Carsten H��rle,
straightec GmbH, Frankfurter Stra��e 48, 63150 Heusenstamm, Germany
+49 6104 6008-0