IRC Log - 2025-02-15 - ##forth

Channel: ##forth
Total messages: 51
Time range: 04:36:32 - 22:29:24
Most active: KipIngram (13), wryl (11), GeDaMo (7)
04:36:32 ##forth <pgimeno> fwiw, Jupiter ACE compiles THEN and BEGIN to words that are effectively a no-op, but they help with decompilation
04:51:15 ##forth <KipIngram> That's a good point - if you wanted a total decompile ability then that kind of thing would help.
08:10:52 ##forth <veltas> More appropriate for essentially a compact BASIC replacement, where SEE needs to show the actual source, but you don't want to store all the text
08:11:03 ##forth <veltas> The ACE also stores comments right?
10:47:49 ##forth <user51> veltas: what prompted me to say that was this https://www.99-bottles-of-beer.net/language-forth-793.html (too much factoring)
10:49:50 ##forth <user51> sometimes i even think that just a big block without any words might be easier to write, and only factor if you really need it. otherwise you write a word and it's a dup there swap there and uhhh
12:45:38 ##forth <KipIngram> I'm quite into the factoring thing.
12:46:51 ##forth <KipIngram> There's nothing I hate more than to see a page of Forth that's all one word indented like C.
12:47:32 ##forth <KipIngram> Well, that's likely not true - I'm sure I could thing of thigns even worse.
12:47:43 ##forth <KipIngram> think
12:48:09 ##forth <KipIngram> Agh. Can't type this morning. Not totally awake yet, I guess.
12:56:03 ##forth <ghodawalaaman> [bot]clog: !help
12:56:05 ##forth <ghodawalaaman> !help
12:56:14 ##forth <ghodawalaaman> [bot]clog: !commands
12:58:08 ##forth <user51> KipIngram: definitely need a coffee machine with forth on it :)
13:00:24 ##forth <user51> KipIngram: i'll note that i'm 100% on a desktop, which may be a useful distinction. factoring is probably a good tradeoff if there's less resources available.
13:01:32 ##forth <KipIngram> I've just evolved this style of writing little groups of related short definitions - they make little blocks on the screen. I've found it easer to pick my old code back up, etc.
13:43:22 ##forth <MrMobius> factoring can impact speed on some systems
13:44:05 ##forth <MrMobius> I ended up with long words on a 6502 program to try to claw back some performance
13:46:10 ##forth <KipIngram> Yeah, that's true. Did you profile so you knew where to focus that?
13:48:14 ##forth <MrMobius> Nah. It was fast enough to work but slow enough to be annoying so any increase in speed was welcome
13:48:28 ##forth <MrMobius> You can certainly speed things up that don't matter if you're not careful
19:29:07 ##forth <wryl> Has anybody tried a multi-stack Forth before?
19:30:54 ##forth <GeDaMo> Most Forths have multiple stacks, usually at least two
19:30:54 ##forth <GeDaMo> Floating point and string stacks are not uncommon
19:31:04 ##forth <wryl> As in, an arbitrary number of them.
19:32:06 ##forth <GeDaMo> How would you select between them?
19:32:53 ##forth <wryl> There's a few ways. Naively you could have something designated as the "main" stack, and then use that to coordinate pushes/pops to other named stacks.
19:33:30 ##forth <GeDaMo> Some of Chuck Moore's chips have A and B registers with instructions to move between them and the stack
19:33:59 ##forth <wryl> : swap temp1 push temp2 push temp1 pop temp2 pop ;
19:34:56 ##forth <wryl> Something to alleviate juggling.
19:35:22 ##forth <GeDaMo> But now you're juggling between stacks :P
19:35:49 ##forth <wryl> Named stacks are just fancy variables.
19:36:05 ##forth <wryl> Linear collections.
19:37:53 ##forth <wryl> You could hold a bunch of things on alternate stacks and then chew through them pretty quickly.
19:38:26 ##forth <wryl> Anyway, was just curious if a Forth implementation existed that did something like this.
19:39:14 ##forth <GeDaMo> Not that I know of
19:39:49 ##forth <GeDaMo> Hang around, someone else might know of one
20:20:15 ##forth <KipIngram> I know that a considerable number of years ago I saw a system offered that had four data stacks. I've tried to go back and find it, mostly just out of curiosity, and failed, though.
20:22:26 ##forth <user51> that's just a register machine, no? :P
20:23:32 ##forth <KipIngram> This may be what I remember:
20:23:35 ##forth <KipIngram> https://bernd-paysan.de/4stack.pdf
20:23:51 ##forth <KipIngram> Yes, I do think of it as basically a register machine with stacks tacked beneath the registers.
20:24:40 ##forth <user51> what i did was put things on a continuum and think, say i had n stacks.. boom MMIXFORTH
20:25:26 ##forth <KipIngram> That link I just posted - that system had ALUs for each stack.
20:58:00 ##forth <xentrac> pgimeno: aha, thanks! I should have thought of that; it's an obviously good idea now that you mention it
21:00:21 ##forth <xentrac> wryl: the floating-point stack suggests you could have one stack per data type. The Reduceron was a multi-data-stack machine but wasn't Forth
22:24:31 ##forth <pgimeno> veltas: yes the ACE stores comments, and doesn't allow them in immediate mode, only when compiling
22:28:17 ##forth <pgimeno> wryl: the Kipple esoteric language has 26 stacks, but what you're suggesting isn't a bad idea... think having R> and >R but also S> and >S, T> and >T... just R is the return stack and the rest would be auxiliary data stacks
22:28:54 ##forth <wryl> Yeah.
22:29:24 ##forth <wryl> Provided you could get the stack depth of any given stack, as well, you could do things like store strings and do processing on them rather than reaching for RAM.