2023-11-18 00:13:40 veltas: sorry, no ill intentions towards you! legitimately curious and open minded. sorry if I caused any offense 2023-11-18 01:18:21 It's just flabbergasting to me the kind of stuff people will get on YouTube and talk about. I try to mostly watch "conventionally educational" stuff, but now and again I'll let myself just ooze around, and wow you can find the most insane stuff. 2023-11-18 01:19:00 And there's always a vlogger who will talk with them and encourage them and oh and ah over it like it's most most amazing thing ever. 2023-11-18 01:19:41 p-HN_ICaCyM 2023-11-18 01:45:51 what flags do I need other than immediate and compile-only? 2023-11-18 01:59:07 Depends on your feature suite - that might be enough. 2023-11-18 01:59:49 I've used an additional one, but it was non-standard. 2023-11-18 02:00:18 I had a class of words that, when they were compiled, required an offset be compiled after then. So I had a flag for that. 2023-11-18 02:01:09 Also, my current method for temporary words involves setting a flag to indicate that status, so that I know which ones to rip out of the list later. 2023-11-18 02:01:29 I'm going to do that in a different way this time, though, so I won't need such a flag. 2023-11-18 08:17:33 MrMobius: Thank you for clarifying, and apologies if I have misinterpreted. 2023-11-18 17:27:34 This is a good treatment: 2023-11-18 17:27:35 https://en.wikipedia.org/wiki/Tsiolkovsky_rocket_equation 2023-11-18 20:08:08 How do I add all numbers on the stack? 2023-11-18 20:08:21 Loop until stack is empty 2023-11-18 20:09:07 Generally, you don't 2023-11-18 20:09:25 Your code is supposed to know how many elements it's pushed onto the stack 2023-11-18 20:09:56 Booo 2023-11-18 20:10:16 So use array instead? 2023-11-18 20:10:35 why not loop until the stack is empty? 2023-11-18 20:12:06 Yes why not 2023-11-18 20:12:21 How are you detecting the stack being empty? 2023-11-18 20:13:37 By peeking the stack...? Peek poke 2023-11-18 20:14:04 SP@ SP0 - 1- DO + LOOP or something like that. i don't remember all the conventional words and their semantics 2023-11-18 20:14:27 looping with depth should do the trick 2023-11-18 20:14:34 SP@ and SP0 order depends on whether your stack grows up or down, of course 2023-11-18 20:15:20 Another reason to have a bot in here ^^ `help sp@` etc 2023-11-18 20:15:36 Hmmm ... I'd forgotten about depth 2023-11-18 20:16:28 I usually look up words at https://gforth.org/manual/Word-Index.html 2023-11-18 20:16:36 it's really the DO..LOOP part i'm not confident with. when i got into forth i almost immediately went and defined my own control flow words that work a little differently, and i never remember the traditional vocab 2023-11-18 20:16:37 : sum-stack depth 0 tuck do + loop ; 2023-11-18 20:17:13 GeDaMo: maybe start at 1 though since + takes two parameters 2023-11-18 20:17:23 That's what the tuck is for 2023-11-18 20:17:43 aaah 2023-11-18 20:18:10 1 without the tuck works too 2023-11-18 20:18:43 Why is loop compile only? 2023-11-18 20:18:48 : sum-stack begin depth 1 > while + repeat ; 2023-11-18 20:18:49 : sum-stack depth 1 do + loop ; 2023-11-18 20:19:18 ollephone: because in interpet mode your words are interpreted as soon as they're encountered, so there's no way for loop to jump back to a word that's already been parsed, executed, and forgotten about 2023-11-18 20:19:33 ollephone: control flow usually means immediate words which insert things into the current word definition 2023-11-18 20:20:34 You can write looping words for immediate mode if you want 2023-11-18 20:21:00 Kk 2023-11-18 20:21:01 sure, but they would have to be parsing words, and conventionally they aren't 2023-11-18 20:21:03 In gforth it's possible to write 10 0 [do] [i] . [loop] and so on 2023-11-18 20:22:28 You could pass an xt 2023-11-18 20:22:45 Yeah 2023-11-18 20:22:56 xt and array? Like a functional map 2023-11-18 20:23:16 Speaking of control flow, nowdays I call 'if' a ternary operation rather than a statement 2023-11-18 20:35:48 ollephone: https://ideone.com/6e631h 2023-11-18 20:37:58 That looks familiar :P 2023-11-18 20:38:37 :P