2025-05-04 11:25:01 Well, any interesting forth code lately? 2025-05-04 11:28:18 Not much on my end, sadly. But I've been thinking how many practical sequences of stack operations are there. Example, I frequently use "dup ( something ) over ( something else )" but haven't found a name for that. Naming things is hard, so maybe I should just use IDs and call it 12. 2025-05-04 11:41:22 W/Let_expression ? 2025-05-04 11:42:34 I prefer Values over stack juggling. 2025-05-04 11:43:45 M-Sci: Dangerously close to locals :P 2025-05-04 11:47:17 Even "dup" is a Value, right? What will I get through that indirection? Frame Pointer (to Activation Frame) is also a possibility? 2025-05-04 11:52:41 user51: W/Method_chaining ? 2025-05-04 13:27:33 forthBot: LOAD "test.fth" 2025-05-04 13:27:57 forthBot: 1 2 3 4 5 6 7 REVERSE-STACK .S 2025-05-04 13:27:58 <7> 7 6 5 4 3 2 1 2025-05-04 13:28:18 this is art ... 2025-05-04 13:35:35 forthBot: SEE REVERSE 2025-05-04 13:35:35 : REVERSE DUP 2 < IF DROP EXIT THEN 1 DO I ROLL LOOP ; 2025-05-04 13:35:56 forthBot: SEE REVERSE-STACK 2025-05-04 13:35:56 : REVERSE-STACK DEPTH REVERSE ; 2025-05-04 15:35:56 Environment for cleobuline inactive, freeing... 2025-05-04 16:08:47 M-Sci: Practically speaking, it's a stack operation. Not sure how the rest relates. Don't know what method chaining is either. 2025-05-04 16:49:06 user51: According to a web search, it's a method for chaining together a sequence of method calls where each one returns an object, so you don't need to fuss over storing the intermediate results and passing them to the next call. For us Forth folk the stack kind of handles that for us transparently anyway, so I'm not sure how much it would offer in our context. 2025-05-04 16:54:17 https://www.newsguardtech.com/fr/special-reports/ia-centre-de-suivi/ 2025-05-04 17:36:19 I made some progress on my calculator forth: https://raw.githubusercontent.com/JoeyShepard/prog-tools/refs/heads/main/images/planet-casio/progress-2025.04.28.png 2025-05-04 17:46:22 MrMobius: That looks great, what does it run on? 2025-05-04 17:46:46 an fx-cg50 graphing calculator 2025-05-04 17:47:09 mb, I missed the first line. Just thought it looks great. 2025-05-04 17:47:34 although the screenshot is from SDL2. I made a few wrapper functions so I can compile it for the calculator or for SDL2 which is easier to debug than uploading to the calculator 2025-05-04 17:47:35 thanks! 2025-05-04 17:48:44 MrMobius: Nice! 2025-05-04 20:03:03 c'est l'heure de la sieste ici ? 2025-05-04 21:49:08 PostScript does a thing that you could do in Forth that I've never seen anybody do, which is to push a "stack mark" to delimit things like an array you're building up 2025-05-04 21:49:36 so in PostScript you can define an array with three integers like [ 9 12 26 ] 2025-05-04 21:49:48 [ pushes a stack mark, and then you push each of the three ints 2025-05-04 21:50:53 ] measures the depth of the stack down to the stack mark to figure out how big of an array to allocate, allocates it, and then copies the three integers into it (and pops them off the stack, and pops the stack mark) 2025-05-04 21:51:35 in PS this is mostly used for things like building up arrays and dictionaries, but you could just as well use it to pass a variable number of arguments to a function 2025-05-04 21:53:02 like conceivably if you wanted to write a word that returned the sum of some squares you could write it to take arguments like { 9 12 26 }square-sum where { does this stack-mark thing 2025-05-04 21:54:22 you can implement this with a single variable or value which specifies the depth at which the latest stack mark was pushed, and saving its old value inside each new stack mark (and restoring it when you pop the stack mark) 2025-05-04 22:04:42 I've thought about that. I think marks like that would come in handy when processing Lisp or JSON or other such things. 2025-05-04 22:05:19 yeah 2025-05-04 22:05:22 It's a little like Chuck's infix processing algorith he laid out in that book of his. 2025-05-04 22:05:45 because you can do a loop inside the { ... }whatever 2025-05-04 23:28:13 xentrac: i try to do sum-square using return stack but it fail into a loop give me 0 at the end 2025-05-04 23:28:36 yeah, I'm not suggesting using the return stack 2025-05-04 23:29:42 i do it using a var but , i will create a word a word to access to the return stack under the loop return values