2025-10-18 19:37:14 I was philosophizing about stack-based and the was thinking about comparison operators. Many algorithms start by duplicating the top argument(s). Would it perhaps make sense for operators like > to just leave the top two items on the stack and just add a flagresult on top? 2025-10-18 19:48:07 Not sure about making it the default, but it's a useful option for sure -- UXN, a Forth-inspired virtual stack machine architecture, reserves a flag bit in its instruction encodings specifically for this purpose, and it does make certain things somewhat easier to write 2025-10-18 19:48:48 Yeah, such approach can indeed speed up things, but you do end up with a whole new set of words (2dup> 2dup= etc.). If this kind of optimization was indeed worth it, I think it'd rather pimp up the compiler with a single lookahead as well as a lookup table. 2025-10-18 19:49:05 When it sees "2dup >", it instead compiles the replacement word in the table 2025-10-18 19:49:48 This way, you don't have to expand your vocabulary only for speed purposes 2025-10-18 19:50:51 Another good lookahead is " ;" that can be replaced by a jump instead of call+return 2025-10-18 19:51:18 the good ol' tailcall 2025-10-18 19:54:52 yeah i was wondering if forth were redesigned, whether it would be a better or equally good default. But itt does mean you need something like "> drop drop" when you don't need it 2025-10-18 19:57:15 in my experience the words' consumption of stack arguments feels really core to Forth's identity as a language 2025-10-18 19:57:59 I often find myself writing words which don't necessarily *need* to drop their arguments, but do so anyway just because it feels more idiomatic 2025-10-18 20:03:14 forthBot: S" somelauw qui se prend la tĂȘte devant son ordinateur "S IMAGE 2025-10-18 20:03:30 https://i.ibb.co/201xGkQt/mforth-image-r-Fge-M1.png 2025-10-18 20:05:38 hmm, consistency matters, although some dialects do have a print-command that doesn't drop 2025-10-18 22:03:30 Environment for cleobuli_ inactive, freeing... 2025-10-18 22:09:25 I'd vote either for every forth word to consume the value(s) on the stack or mark "keeping" words explicitly like Uxntal does. Some time ago I tried a forth-like PL that had it all - both consuming and keeping words intermixed. It was quiet hell. I could never write a single statement with certainty. I had to try everything in REPL first.