2024-02-09 11:24:17 Markers replace it. It was found as Forth evolved that the simple dictionary structure itself didn't provide enough information to clearnly forget things. What if you've added vocbularies since the word you forgot and one of them is in your search path when you Forget? 2024-02-09 11:24:32 You just removed that vocbulary from the dictionary and yet are still trying to search it. Things like that. 2024-02-09 11:24:52 Markers give you an opportunity to save all the info you'll need to do a proper reduction of the dictionary to that point later. 2024-02-09 11:25:31 There are a number of "problems" like that with FoORGET in a modern forth; vocabularies are just one example. 2024-02-09 11:28:40 Also the modern trend to use multiple memory regions that you spread parts of your Forth system out across can complicate FORGET. I dont know that any of these issues are "unsurmountable," but they make it harder and more epensive to implement FORGET. 2024-02-09 11:28:50 Markers were just considered a better approach. 2024-02-09 11:29:01 MARKER foo 2024-02-09 11:29:04 ... other stuff... 2024-02-09 11:29:18 then executing foo will cut the dictionary back to that point. 2024-02-09 11:30:04 MARKER will create foo and store within it all the necessary information to later reduce the dictionary to there. 2024-02-09 11:30:43 I've never been 100% clear on whether foo is removed upon execution of foo, or just stuff AFTER foo. 2024-02-09 11:33:05 "Remove the definition of name and all subsequent definitions." https://forth-standard.org/standard/core/MARKER 2024-02-09 11:33:34 Thanks. 2024-02-09 13:09:30 i did finish the starting forth book, but didn't pay much attention to the last chapters 2024-02-09 13:09:58 Do you know of Thinking Forth? 2024-02-09 13:10:09 and keep feeling like i know nothing yet, i didn't do much exercises which is what helps you to learn 2024-02-09 13:10:33 GeDaMo yes, also started to read it several times, but have to finish 2024-02-09 13:10:51 yet it does not seem to really teach forth, but about the forth philosophy 2024-02-09 13:11:22 and for some reason almost all i've read were things i already had in mind 2024-02-09 13:11:37 i guess forth resonates with my way of thinking 2024-02-09 13:12:21 but i didn't finish that book, now i'm starting the forth programmers handbook 2024-02-09 13:13:00 also i wonder if i should start adding words i see on those books into my abomination 2024-02-09 13:13:33 i can't add a lot of them since i have no memory allocation and the dictionary is actually a hash table 2024-02-09 13:13:52 but i guess is better to just learn forth and keep going with gforth for now 2024-02-09 13:14:17 gforth is missing some words and variables i see on the books 2024-02-09 13:14:36 ?stack seems to do absolutely nothing, yet the word exists 2024-02-09 13:15:14 h is a variable that does not exist, but here does, i wonder if it was on purpose as here just fetches h 2024-02-09 13:15:36 so you are not allowed to mess with H 2024-02-09 13:15:58 also i would like to play with blocks and the editor words 2024-02-09 13:16:14 but i could add those into my abomination 2024-02-09 13:16:40 GeDaMo did you finish the thinking forth book? 2024-02-09 13:16:49 there is some kind of revelation in it? 2024-02-09 13:17:29 actually the guy who recommended me to learn forth was talking about the forth philosophy 2024-02-09 13:17:47 and he said he does not use forth the language, but the philosophy always 2024-02-09 13:18:00 I read it a long time ago, I can't remember much 2024-02-09 13:19:17 i always asked about metaprogramming and bottom up 2024-02-09 13:19:28 that's why the guy recommended me to learn forth 2024-02-09 13:19:51 and i just fell in love with it when i saw the basic stuff 2024-02-09 13:22:31 yet the starting forth book and thinking forth i guess, seem to state that the approach forth encourages is top down 2024-02-09 13:22:46 but in reality people seem to mix both approaches 2024-02-09 13:24:16 lispers use a technique called wishful thinking, which is just to assume the code alredy exists and you just use it, it seems to help taking decisions a lot 2024-02-09 13:25:20 for example if you have to make some sort of api, you assume the api already exists and just use it, you use the functions and the stuff that does not already exist 2024-02-09 13:59:12 https://www.jupiter-ace.co.uk/index_forth_books.html 2024-02-09 13:59:21 didn't know there were so many forth books 2024-02-09 15:44:14 I really liked "Thinking Forth". It shaped almost all of how I write code since then. (Which is mostly embedded C, drivers, and such) 2024-02-09 15:46:57 dsmith can you elaborate a bit? i'm curious 2024-02-09 15:47:37 it seems something hard to explain, so no pressure 2024-02-09 15:48:27 i guess it's best to finish it and see for myself 2024-02-09 15:50:33 It's been a while.. Smaller functions mostly I guess. Function pointers instead of flags. Naming things. 2024-02-09 15:51:35 hahaha 2024-02-09 15:52:27 Like instead of a big complicated if conditional, I'll wrap that up in a function or macro that named what it means, not what it does. 2024-02-09 15:52:43 factoring, mainly 2024-02-09 15:52:57 but also proper naming 2024-02-09 15:54:10 It's online now. https://www.forth.com/wp-content/uploads/2018/11/thinking-forth-color.pdf 2024-02-09 15:55:05 i have that pdf 2024-02-09 15:55:17 i just opened, it remembers where i was, page 93 2024-02-09 16:05:34 Thinking Forth is very good, and not just for Forth programming. 2024-02-09 16:14:02 Yes 2024-02-09 17:30:59 i fail to see the enlightenment in thinking forth, yet i assume i have to go deeper with the book 2024-02-09 18:24:53 i keep thinking the whole thing is about simplicity and factoring 2024-02-09 18:25:04 i do not see much more about it 2024-02-09 18:26:10 chuck did write a book that he didn't know why he wrote were talked about simplicity and how to avoid doing stuff that you don't really need 2024-02-09 18:27:16 programming a problem oriented language is the name of the book 2024-02-09 18:30:12 Do not put code in your program that might be used. Do not leave hooks on which you can hang extensions. The things you might want to do are infinite; that means that each one has 0 probability of realization. If you need an extension later, you can code it later - and probably do a better job than if you did it now 2024-02-09 18:31:40 documenting the hook ideas and the unrealized code though is a better idea 2024-02-09 18:41:22 i kind of like this chuck book 2024-02-09 18:42:05 it's promising me to teach me how to make a problem oriented language and seems to let me choose the platform/language i want to write it 2024-02-09 18:42:27 want to use to write it* 2024-02-09 18:42:57 I may tell you to load an index-register or to jump on negative and you'll have to translate that into the equivalent for your computer and language. 2024-02-09 18:43:41 looks like he is going to teach me how to fix my abomination :D 2024-02-09 18:43:49 haha 2024-02-09 18:46:09 ah he wants me to use assembly 2024-02-09 18:46:11 You will have to code in assembler! Not the whole program, if you insist, but the important parts that we'll be concentrating on. 2024-02-09 18:46:47 assembly was much more common back then 2024-02-09 18:51:33 he said 3 spaces is good 2024-02-09 18:51:46 everyone blamed me to use 3 spaces instead of 2 2024-02-09 18:51:57 at least not him 2024-02-09 18:52:42 ACTION uses two and has done so way before it came a trend at various places 2024-02-09 19:10:02 in this book i see some symbols seem to be changed with the time in forth 2024-02-09 19:10:22 it's telling me the comma does print an element from the stack and drops it 2024-02-09 19:10:41 @ keeps being fetch, but store is = instead of ! 2024-02-09 19:54:58 Hi, just throwing out two interesting Forths I ran across recently (haven't had a chance to play with them yet): 2024-02-09 19:55:12 https://github.com/uho/preforth 2024-02-09 19:55:38 https://git.sr.ht/~elektito/starforth/ 2024-02-09 19:55:55 Personally, lately I've been diving back into Zeptoforth (on my Pico) 2024-02-09 19:56:21 https://github.com/tabemann/zeptoforth 2024-02-09 19:58:36 "Starforth has only a passive resemblance to Forth. It does not have an interpreter, not an interactive environment, and no dictionary in the sense Forths have." 2024-02-09 19:59:26 okay. I think it was interesting because it was one of those "just heard of forth yesterday, going to build one from assembly" projects 2024-02-09 20:00:01 hahaha 2024-02-09 20:00:24 not sure if you are familiar with Gemini, but here's some posts about it: 2024-02-09 20:00:37 gemini://elektito.com/gemlog/17-starforth-2 2024-02-09 20:00:55 i don't use gemini 2024-02-09 20:01:05 but there are webs that act as some sort of proxy 2024-02-09 20:01:15 just a second ... 2024-02-09 20:01:34 https://portal.mozz.us/gemini/elektito.com/gemlog/17-starforth-2 2024-02-09 20:02:53 What if I start writing the Forth code first? 2024-02-09 20:03:04 that's the wishful thinking approach 2024-02-09 20:03:10 they sound interesting, but both of them aren't things I can really look at in depth due to my avoidance of GPL code 2024-02-09 20:04:49 I'm a firm advocate and user of copyleft, so no problem for me 2024-02-09 20:06:57 : colon words are so beautiful ; 2024-02-09 20:07:35 i love them can't explain why, but i assume because it is a minimalist way to define a function 2024-02-09 20:07:48 no signature block delimiters or shit 2024-02-09 20:07:53 just the name and the code 2024-02-09 20:08:47 i assume also because they imply composition/concatenation 2024-02-09 20:09:12 the price is stack manipulation 2024-02-09 20:13:11 Zeptoforth has local variables too 2024-02-09 20:13:43 they look just like the parameter description comment that is usually used 2024-02-09 20:16:38 i liked tile forth 2024-02-09 20:17:04 it had a way to bind stack parameters to some kind of temp variables 2024-02-09 20:17:09 i stole that concept 2024-02-09 20:17:38 i have temp variables that will get removed once the colon word ends execution 2024-02-09 20:18:30 i keep having trouble deciding if to stick to a real forth or going my way 2024-02-09 20:18:58 i assume i'll go my way, but for example there is no memory allocation, so a lot of forth tricks and words cannot exist 2024-02-09 20:19:30 i like how in forth an array is a very simple thing, just allocate space for the elements and increment the address to index them 2024-02-09 20:19:42 from there fetch and store work as always 2024-02-09 20:20:35 if you make any complicated structure, it's likely that fetch and store will keep working 2024-02-09 20:20:59 i do not have fetch and store :/ 2024-02-09 20:22:25 but if i hear what chuck says about simplicity, i don't need any of those 2024-02-09 20:23:22 i have lists and hashes and can build structures from that 2024-02-09 20:24:25 i also keep wondering about the return stack 2024-02-09 20:25:06 the only use i see for it is to be able to have tco, which i can always workaround 2024-02-09 22:39:36 the return stack is also used for looping in most forths