Note: I’ve lightly adjusted the title as “A small stack based, written to bring Advent of Code 2022 Day 13 puzzle to the extreme consequences” is missing words, and I felt lacked clarity. I hope this is in line with the story submission guidance “when the original story’s title has no context or is unclear, please change it.”
Little Forth-y languages make me happy. I like the support for local variables in this one, even though that’s heretical in concatenative orthodoxy. Well, maybe not “heretical”, since Factor supports them, but the Factor docs sort of imply they’re an oddity that’s only rarely useful.
I bet concatenative languages would be much more successful in the mainstream if authors embraced local variables and other non purist features. It’s hard to go from C style imperative languages to thinking in Forth, and I’m guessing most people give up quickly because the lack of locals is one step too far. Once you get it, I bet the need melts away, though. Maybe we need to think more like drug dealers—“the first hit is free, and feels really good.”
Agreed. The Common Lisp way. You have all the Lispy stuff but also imperative constructs and data structures, so the programmer can pick the best approach based on the problem at hand.
Ever since I learned to use RPN on a HP calculator, doing maths the stack way has been natural to me. dc and Emacs calculator work in the same way. I believe if more kids got used to using stack-based calculations it would be a boon for stack-based languages.
I’ve also made local variables when I made PISC, though aocla is probably pulling a small bit of influence from TCL, which was also an influence on PISC.
Based on my interactions in the Factor community, local variables are considered to be quite fine to use. Granted, the more factored you words are, the less you probably need locals, but getting there is a process that you can stop once you’re satisfied.
I fell back into that world recently and am now even using my own RPL implementation for real (tiny) personal scripts. It’s so rewarding creating your own thing and then building other things on top of it!
Note: I’ve lightly adjusted the title as “A small stack based, written to bring Advent of Code 2022 Day 13 puzzle to the extreme consequences” is missing words, and I felt lacked clarity. I hope this is in line with the story submission guidance “when the original story’s title has no context or is unclear, please change it.”
Little Forth-y languages make me happy. I like the support for local variables in this one, even though that’s heretical in concatenative orthodoxy. Well, maybe not “heretical”, since Factor supports them, but the Factor docs sort of imply they’re an oddity that’s only rarely useful.
I bet concatenative languages would be much more successful in the mainstream if authors embraced local variables and other non purist features. It’s hard to go from C style imperative languages to thinking in Forth, and I’m guessing most people give up quickly because the lack of locals is one step too far. Once you get it, I bet the need melts away, though. Maybe we need to think more like drug dealers—“the first hit is free, and feels really good.”
Agreed. The Common Lisp way. You have all the Lispy stuff but also imperative constructs and data structures, so the programmer can pick the best approach based on the problem at hand.
Ever since I learned to use RPN on a HP calculator, doing maths the stack way has been natural to me.
dc
and Emacs calculator work in the same way. I believe if more kids got used to using stack-based calculations it would be a boon for stack-based languages.I’ve also made local variables when I made PISC, though aocla is probably pulling a small bit of influence from TCL, which was also an influence on PISC.
Based on my interactions in the Factor community, local variables are considered to be quite fine to use. Granted, the more factored you words are, the less you probably need locals, but getting there is a process that you can stop once you’re satisfied.
It looks remarkably close to RPL, HP calculators’ Forth/Lisp inspired language.
I fell back into that world recently and am now even using my own RPL implementation for real (tiny) personal scripts. It’s so rewarding creating your own thing and then building other things on top of it!