2021-11-10 04:08:14 I need to setup my beagleboard and a znc again now that I feel IRC is calling to me. 2021-11-10 04:08:48 Speaking of which, I wonder if someone made a Forth for the original beagleboard white. 2021-11-10 08:20:58 "RECURSE" is in my opinion one of the good standard words 2021-11-10 08:21:11 Before that it was quite janky to recurse 2021-11-10 08:22:27 eris[m]: That's a good idea for building up words (re-defining with more content later), might be a bit confusing to read/LOCATE 2021-11-10 14:13:37 What's the difference between ['] and POSTPONE? 2021-11-10 14:14:24 In other words, can you give an example of, and elaborate on the difference between appending compilation semantics vs runtime semantics? 2021-11-10 14:22:15 ." is a good example, I'll try to see how it is implemented. 2021-11-10 14:24:34 Ah the convention to have a separate run-time semantics word is to define it with a name enclosed with parenthesis? Like for ." it is (.") 2021-11-10 14:25:40 neuro_sys_: my understanding, from the FORTH PROGRMAMER'S HANDBOOK... 2021-11-10 14:26:07 is the POSTPONE is used to reverse temporarily the effect of the IMMEDIATE word 2021-11-10 14:26:36 so, IMMEDIATE causes you word to execute immediately, even inside a colon definition 2021-11-10 14:26:57 POSTPONE causes the next word to actually be compiled into the definition, instead of executed immediately 2021-11-10 14:27:29 in the handbook, they give an example of how the runtime behavior of IF might be contained in a word called (IF) 2021-11-10 14:27:55 the IF could be defined as 2021-11-10 14:28:08 : IF ( -- addr) POSTPONE (IF) HERE 0 , ; IMMEDIATE 2021-11-10 14:30:10 "['] finds the word in the dictionary and compiles its execution token as a literal to be pushed on the stack when the definition in which it appears is executed." 2021-11-10 14:31:15 I would expect ['] to be an IMMEDIATE word if it was defined by FORTH code 2021-11-10 14:33:09 So, POSTPONE "causes the next word to be compiled into the definition", and ['] "compiles its execution token as a literal". 2021-11-10 14:34:55 in PUNYFORTH, ['] is defined in assembly language, or I might take a look at that definition 2021-11-10 14:36:32 From Forth Programmer's Handbook: "POSTPONE causes the _compilation_ behaviour of name, rather than the _execution_ behaviour of name, to be added to the current definition." 2021-11-10 14:37:27 I was a bit curious how do you separately define compilation versus execution behaviour of the same word. And how does POSTPONE finds the compilation behaviour instead of the execution behaviour of . 2021-11-10 14:38:00 I first thought it's CREATE ... DOES> ... 2021-11-10 14:39:18 Reading on it is becoming more clear for me. 2021-11-10 14:41:01 CREATE and DOES> kind of gives you the impression that there are separate slots or something for storing compilation vs runtime behavior, but that is only an illusion 2021-11-10 14:45:27 really you are just carefully controlling whether individual words compile something into the active definition, or not 2021-11-10 14:46:19 and those individual words (being compiled into the definition) can be words that either compile something into the active definition, or don't 2021-11-10 14:47:24 figure out how to combine those in a useful way and you can create a new "compiler directive" 2021-11-10 14:48:38 "compiler directives" usually need to temporarily and immediately store something on the stack, do some compiling, and then use that thing stored on the stack, or leave it there for another compiler directive 2021-11-10 15:01:21 on PunyForth, the definition of postpone: is simply: 2021-11-10 15:01:26 16r3FFE9548: 2021-11-10 15:01:26 16r3FFE954C: ' 2021-11-10 15:01:42 (using the built-in decompiler) 2021-11-10 16:34:38 neuro_sys_: ['] is just ' for inside a word 2021-11-10 16:36:14 i.e. : test ['] word ; 2021-11-10 16:36:27 then `test` would be the same as `' word` at the interpreter