Skip to main content

JsSqueak - Wednesday, December 29th

For our December meeting, Florin Mateoc will show us JsSqueak, a JavaScript implementation of (JavaScript compiled) Squeak.

Whereas SqueakJS or TruffleSqueak are implementations of the Squeak stack VM which run the Squeak bytecodes, JsSqueak compiles all the Squeak code to JavaScript (including the VM plugins), it exports the image state as one big JavaScript storeString, and then loads them, and runs the JavaScript implemented minimal VM (mostly primitives) and the JavaScript-translated Squeak methods as one combined JavaScript application. The compiled JavaScript application can be run either in a browser or in Node.js

While JavaScript, especially with its newest additions, is a very powerful language, which allows us to implement most Smalltalk-specific features (e.g. processes/green threads are implemented using generator functions and recursive yield* for all invocations, DNU is implemented using proxies and proto manipulation, the Smalltalk parallel class hierarchy is implemented using JavaScript classes with static properties and their parallel prototypes hierarchy, weak classes are implemented using JavaScript WeakRef instances in their (weak) slots), one obvious challenge is implementing contexts.
Since we compile Squeak classes to JavaScript classes, Squeak methods to JavaScript methods (and class-side Squeak methods to static JavaScript methods), the code runs on the native JavaScript call stack, and we do not have a mapping between the JavaScript function activations and reified contexts. Nevertheless, it turns out that, by providing specialized implementations for various aspects that are implemented using contexts/stack walking in Squeak, we can actually run almost all Squeak code as-is.

Florin Mateoc is an electronics engineer who has always loved programming and who has actually only ever worked as a software engineer.
Florin has worked as a professional Smalltalk programmer in Enfin (later called ObjectStudio), VisualAge, VisualWorks, and a little bit as a hobbyist in Squeak.

This will be an online meeting from home.

If you'd like to join us, please sign up in advance on the meeting's Meetup page to receive the meeting details. Don’t forget to bring your laptop and drinks!

 Update 8 January 2022: The recording of the presentation is now up on Vimeo.

Comments

Popular posts from this blog

The next UK Smalltalk User Group meeting is on this coming Monday, 30th January at 6.30pm at it’s usual location  The Counting House . This is the first of the talks that we selected at the Christmas meeting. And for some reason I got chosen to go first: Anatomy of an IDE Using a few example IDEs we are going to look at what makes an IDE valuable. Building software is a complex business, software that works and stays in production for years. It is a craft that involves engineering, insight and skill. The tools that we use to build that software are vital enablers to our success. Between 1997-2004 the dominance of Java and the main vendors’ tools strategies led to something of a stagnation for IDEs. But since then with the return to language diversity and the broadening of platforms there has been a real opportunity to experiment with what an IDE is and means and to look at how it could evolve. We will look at a range of IDEs including WebVelocity, Cloud9 and Codea and cont

Kyma - an object oriented sound and music system - Wednesday, May 27th

The next meeting of the UK Smalltalk User Group will be on Wednesday, May 27th. Alan Jackson will talk to us about Kyma , an object- oriented sound design environment built with Smalltalk technology. Given the current COVID-19 restrictions, this will be an online meeting from home. If you'd like to join us, please sign up in advance on the meeting's  Meetup page  to receive the meeting details. Don’t forget to bring your laptop and drinks!

Amber with Silk - Wednesday, February 24th

 The next meeting of the UK Smalltalk User Group will be on Wednesday, February 24th.   Christian Haider will guide us in a tour of the Amber dialect of Smalltalk and its Silk web framework. In his own words... Amber , created by Nicolas Petton, is a Smalltalk implemented in JavaScript running in a web browser. Silk , written by the Amber maintainer Herby Vojčík, is a web framework in Amber.    I was looking for a good solution for the web for a long time. At the last ESUG, I was bugging everybody about a Smalltalk in the browser, because I decided to redo the frontend of my current project in Smalltalk instead of JavaScript. There were some developments, but only Amber was available. So I tried it for real on a little side project ( sources ) to see if this route is viable - spoiler: it is!   Silk, the web framework, caught my attention and I fell in love with it. Silk is very simple, straight forward and powerful, just the properties I love Smalltalk for. A Silk is basically a faca