[HN Gopher] TruffleSqueak: Polyglot Programming with Squeak/Smal... ___________________________________________________________________ TruffleSqueak: Polyglot Programming with Squeak/Smalltalk and GraalVM Author : fniephaus Score : 39 points Date : 2020-08-16 19:56 UTC (3 hours ago) (HTM) web link (github.com) (TXT) w3m dump (github.com) | fniephaus wrote: | Author here. Happy to answer any questions! | Rochus wrote: | I have somewhat lost track of the different versions. What is | the difference between GraalSqueak and TruffleSqueak? | kjeetgill wrote: | Ever since Graal was opensourced I've been nothing short of | mesmerized by all of the amazing work being done on/with it. | | I'd love to just hear more about your experience building this | on top of Graal/Truffle. Any interesting or surprising | anecdotes? | fniephaus wrote: | Thanks! | | > I'd love to just hear more about your experience building | this on top of Graal/Truffle. | | There are lots of good resources for learning how to | implement a language in Truffle. In addition to the official | documentation and the GraalVM Slack, I often find myself | looking at other GraalVM languages that are open source (e.g. | Graal.js, SimpleLanguage, GraalPython). Also, the tooling | available to language implementers is quite good (e.g. all | debugging and profiling tools for Java, Truffle's language- | agnostic tools, Ideal Graph Visualizer for analyzing | Graal/Truffle graphs, Graal/Truffle command-line flags, ...). | | > Any interesting or surprising anecdotes? | | Supporting a Smalltalk system on the GraalVM definitely comes | with interesting challenges, here are a couple of examples: | | - Truffle is designed for building AST interpreters. Squeak | is based on the Smalltalk-80 specification, which includes a | well-defined bytecode set. For compatibility, you want a | bytecode interpreter for Smalltalk. We even wrote a paper | about how to do this with Truffle: | https://fniephaus.com/2018/icooolps18-graalsqueak.pdf. | | - Implementing some core Smalltalk mechanisms (e.g. | allInstances, thisContext, becomeForward:, ...) and make them | work well with the Graal compiler. | | - Smalltalk is not just a language, but also a programming | system. TruffleSqueak uses AWT/Swing for rendering the UI on | GraalVM, and SDL2 when AOT-compiled with native image. | Running UI applications with the Graal compiler, however, can | yield interesting results. See for yourself: | https://www.youtube.com/watch?v=wuGVyzUsEqE. | | - Saving the image without breaking compatibility with the | OpenSmalltalkVM and other Smalltalk VMs. | | - Most languages are file-based, so Truffle's APIs are | designed for files. In Smalltalk, everything -- even code -- | is an object. | | Let me know if you have any follow-up questions. You may also | find our paper on TruffleSqueak (formerly GraalSqueak) an | interesting read: | https://fniephaus.com/2019/mplr19-graalsqueak.pdf. | | (edit: fix formatting and typos) | kipply wrote: | yay this is great! <3 | fniephaus wrote: | thank you, kipply! ___________________________________________________________________ (page generated 2020-08-16 23:00 UTC)