Two different Smalltalk-on-embedded articles on the front page of Hacker news right now: This one (by me) and <a href="https://news.ycombinator.com/item?id=34208753" rel="nofollow">https://news.ycombinator.com/item?id=34208753</a><p>Yes, Toit is pretty much a Smalltalk dialect.<p><i>Similarities</i><p>Blocks (closures passed to functions as a foundation of control flow)<p>Blocks have non-local return (you can return from the syntactically enclosing fn in a block).<p>Block arguments introduced with | | delimiters<p>Single inheritance object orientation<p>Dynamic typing but type safe<p>Named arguments<p>Uses virtual machine to run, including garbage collector.<p><i>Differences</i><p>Toit's syntax is more like a cleaned up Python than Smalltalk.<p>Toit also has positional arguments.<p>Toit's blocks are more lightweight than Smalltalk closures (no allocation)<p>Development is with source files and compiler, not image-based.<p>Toit has optional types, and if you use them they are checked. (Types are non-nullable by default.)<p>Toit has interfaces<p>Toit can build standalone executables, VM included<p>Toit has top level functions not attached as methods to some class.<p>Array (List) indexing is 0-based, not 1-based.<p>Quick intro here: <a href="https://docs.toit.io/language" rel="nofollow">https://docs.toit.io/language</a>
Has anyone else here done AoC on a microcontroller?<p>I'm still at it, using an STM32 part with 40KB of RAM. Have never touched Smalltalk, instead I'm using Rust. It's going ok, though I'm only at day 12.
> special CoordSet that wraps a regular Set, encoding objects into integers... we don’t need to implement decoding the integers and reifying the Coord objects<p>Wouldn't it be much simpler to just keep a set of hashes? That's basically what this is.