3 ms·
Why Forth, of all available languages? Unless you're riffing on that really weird series of YA fantasy where the guy falls into a world full of demons and start
by Xymist 3y ago
Why Forth, of all available languages? Unless you're riffing on that really weird series of YA fantasy where the guy falls into a world full of demons and starts converting magic into programs because it makes debugging the universe easier. Think that involved Forth. Still not sure why.
- eximius 3y agoFun book, but no. And I wouldn't describe those as YA. YA doesn't typically rant about ANSI C conferences. It's more like Discworld in that it's quite silly but not necessarily targeted at youth. My reason for Forth is quite simple: it has extremely little structure which makes it a much much easier output target to work with. At it's simplest, a series of glyphs could directly transliterate into Forth words. More complicated schemes are more interesting, for this purpose, but it would defeat the purpose of its use to target, say, C. Also, Forth is easily embeddable and interpretable with only the words I want exposed. Whipping C again, but targeting C would mean a whole mess of sandboxing and C bindings which sounds much harder than Forth words or some such. I have many other ideas too. Multiple rings of circles represent threads or some kind of concurrency, mana is used like 'gas' in the EVM to naturally denote the cost of spells and prevent abuse, possibly compile from Forth to some WASM target or something for performance, etc. Edit: put another way, Forth-likes blur the lines between a programming language and a mutable environment of high level bytecodes which makes it a natural intermediary language for some cases.