5 ms·
A Forth to Scratch compiler
- Retr0spectrum 10y agoThere are quite a few interesting transpilers involving Scratch. For example, https://phosphorus.github.io/ https://phosphorus.github.io/ lets you transpile Scratch code to JavaScript for improved performance. Other projects of note are an LLVM frontend for Scratch: https://github.com/bobbybee/scratch86 https://github.com/bobbybee/scratch86 And a corresponding backend: https://github.com/bobbybee/scratch-llvm https://github.com/bobbybee/scratch-llvm
- saghm 10y agoCompiling to JavaScript to improve performance? There's something new
- stevekemp 10y agoIt is nice to see the recent rise of posts about FORTH. It's a language I first played with back on the 48k ZX Spectrum in the late nineties. When I first used it I loved the way you could redefine the language, at run-time in the REPL. These days I just love the purity and cleanliness of the language. I don't have a single compelling use-case for it, but over the years I've written my own implementation in C, Java, and Perl. Having recently started playing with hardware it is nice to see you can even run it on ESP8266 / Arduino hardware.
- xzm 10y agoVery timely remark :) Take a look at what jcw (of tclkit fame) is doing: http://jeelabs.org/2017/02/various-shades-of-forth/ http://jeelabs.org/2017/02/various-shades-of-forth/
- stevekemp 10y agoThanks for the link, they were indeed timely pieces!
- qwertyuiop924 10y agoIt looks like it might be a nice language to write stuff for the GBA with. Or the GB/CGB, for that matter, but space is much more limited there.
- ycmbntrthrwaway 10y agoThis project completely misses the point of Forth. Forth is an interactive assembler. This one has no REPL. Control structures are easy to introduce in the Forth itself because IF, ELSE and THEN are separate "immediate" words that just manipulate the return stack and compile some branching code immediately when parser encounters them. This compiler has no return stack at all and just looks for IF..ELSE..THEN during parsing. Forth is ugly outside but has beautiful implementation. This compiler is some ugly python code inside.