A Smalltalk built on FN Lisp 0 ▲ Blog on blog.gnoack.org 1 hour ago · 7 min read1389 words · Tech · hide · 0 comments First, a demo! Overview: How does this work? The entry point (load-st.fn) Some Smalltalk bindings The Grammar (smalltalk.g) What does this parse to in practice? The Smalltalk base library (st.st) One of the example programs in the FN programming language is a tiny Smalltalk implementation, in about 400 lines of code. I wrote FN and this example over a decade ago, but it wasn’t open source until 2020, so I failed to write it all up so far. But as it came up in a discussion over beers on the side of the Open Source Summit, I figured it might be a good idea to explain a bit how this works, because it’s a very succinct (but also dense) way to define a language. First, a demo! Start up the interactive Smalltalk interpreter with: ./fn -S examples/load-st.fn It brings up an interactive prompt like this: ST> 1 methods (isOdd > = < upto: / - + * isEven asString %) ST> ', ' join: ((1 upto: 10) map: #asString) "1, 2, 3, 4, 5, 6, 7, 8, 9" ST> The Smalltalk expression ', ' join: ((1 upto: 10) map:… No comments yet. Log in to reply on the Fediverse. Comments will appear here.