HNHacker News
TopNewBestAskShowJobs

TheErikOnBike

6 karma · joined October 28, 2021

submissionscomments
TheErikOnBike··on SqueakJS – A Squeak VM in JavaScript
Instead of having a Smalltalk image which contains the typical GUI (Morphic or otherwise being BitBlt on a HTML Canvas) I run a Smalltalk image which has a number of Classes representing WebComponents. These classes have a small interface with Javascript (implemented as primitive calls in case you are familiar, similar to other SqueakJS plugins). When instantiating such a WebComponent, it will also instantiate a DOM element (the WebComponent). Events in the browser are wrapped in Smalltalk event classes and will be given to an event handler process (Smalltalk process) which will do the relevant work. So for example drag and drop is implemented fully in Smalltalk. The Smalltalk image I run to have this Web UI (and run only a Web UI, no business logic in the browser) is very small. It is only a little over 200Kb. My code is free to use. See https://github.com/ErikOnBike/CodeParadise I need to add some more documentation and more demos. I have been very busy with developing software and have been lacking a bit in giving some love to those. Edit: An explanation and demo can be found here: https://vimeo.com/457353130
TheErikOnBike··on SqueakJS – A Squeak VM in JavaScript
Could you elaborate? I do not understand your response in relation to the remark that JS integration is interesting.
TheErikOnBike··on SqueakJS – A Squeak VM in JavaScript
Did you try different browsers? The speed is very reasonable for me (considering the amount of BitBlt). I use SqueakJS to develop business software (using only Smalltalk). In these applications I am running SqueakJS headless and create a GUI using WebComponents (created through Smalltalk classes). This also runs very fast (tested on Firefox, Chrome and Safari).
TheErikOnBike··on SqueakJS – A Squeak VM in JavaScript
Yes it is. It will be stored in the browser using IndexDB. You can download these back onto your computer. See https://squeak.js.org/run/