2023-02-02 03:45:15 KipIngram: Often I'll make an address a CONSTANT, don't you? 2023-02-02 03:46:10 I'm assuming lembas has vitamin C as well 2023-02-02 03:47:11 Magic bread is quite biblical 2023-02-02 03:47:34 It's interesting noticing those kinds of influences in LotR 2023-02-02 03:49:04 I think CONSTANT is worth: allocating 64-bit for all constants; or having (CONSTANT32) and (CONSTANT) code to load sign-extended 32-bit from PFA or indirectly if it's larger 2023-02-02 04:52:28 https://github.com/cforth/cnforth 2023-02-02 05:01:11 Today I learned Chinese word for Forth translates as "forward" sometimes 2023-02-02 05:01:26 I suppose they mean somewhat the same thing? 2023-02-02 05:04:26 GitHub has put "notranslate" class on pre blocks in wikis 2023-02-02 05:04:41 So you have to copy+paste Chinese to Google Translate 2023-02-02 05:04:59 I'm assuming this is because code was being misinterpreted as foreign languages, but this isn't a good fix 2023-02-02 05:07:26 Chinese is quite compact, good match for forth code 2023-02-02 05:10:44 Stalevar: is it you? 2023-02-02 05:11:15 Stalevar: who wrote cnforth? 2023-02-02 05:16:42 nope 2023-02-02 05:27:10 https://github.com/zooxo/ivt 2023-02-02 05:27:28 Just links to various forth things which others might find interesting 2023-02-02 05:29:54 This is interesting https://github.com/CNFIG/asm-cforth/blob/master/asm-cforth.c 2023-02-02 05:30:02 Also CNFIG is apparently chinese FIG 2023-02-02 05:51:02 can we say that forth enables function composition only with its stack? 2023-02-02 05:51:16 (in a tacit, or zero-point way) 2023-02-02 05:51:38 Scientists get out, reeeeee 2023-02-02 09:27:51 rendar: It's possible that's all you've got out of the box, but you could build something else if you liked. 2023-02-02 09:41:23 I don't even know what rendar is asking. I know what "tacit / point-free" means in a loose sense, and I know forth, and I know function composition. 2023-02-02 09:41:29 But I don't understand the question 2023-02-02 10:06:56 dc -e '2o[q]sq1d[d127n]dsnx' 2023-02-02 10:07:29 dc -e '2o256[p1+d512>.]ds.x' | sed s/^1// 2023-02-02 10:07:41 Apparently pure dc makes some things harder 2023-02-02 10:08:19 The code is supposed to output all possible byte values in binary (0's and 1's) with all the leading zeroes 2023-02-02 10:31:22 dc -e '2o[seq]sq1[d127n]dsnx' # slightly shorter 2023-02-02 10:38:46 Need to learn dc some time 2023-02-02 10:40:37 veltas, the question is if forth uses only the stack for function composition or it has other mechanisms 2023-02-02 10:49:05 veltas, well, it's almost like forth but with one letter commands and no way to define new words, but instead it can execute macros (for example seq to store top of the stack into some trash variable and quit, since there is no drop) 2023-02-02 10:49:39 [seq]sq and then it can be called by >q or rendar: The data stack is the primary data structure Forth gives you for computation, but of course it also gives you a memory array and a dictionary to organize it with. That's a really flexible tool that you can do anything with you want - so it depends on how you choose to use it. That's really all I meant. It's a very "generic" tool, and capable of anything more or less. 2023-02-02 11:08:02 KipIngram, by the way dc has as many stacks as you want 2023-02-02 11:08:30 probably you may run out of memory at some point 2023-02-02 11:08:31 command Sa pops value from main stack and puts it to a stack, while La does the reverse 2023-02-02 11:08:36 :-) Forth folk have explored multiple data stacks. None of the ideas have ever really "caught on." 2023-02-02 11:08:59 One of the core benefits of the usual setup is that operands are entirely implicit, so you don't have to specify them in your code stream. 2023-02-02 11:10:38 Of course if you support multiple threads then you tacitly have multiple stacks, but that's not quite what you mean. 2023-02-02 15:17:15 how are exceptions handled in color forth? 2023-02-02 15:18:51 the screen bleeds red 2023-02-02 17:12:15 thrig: Well, I finished up part 6 of that Gondor siege link you supplied last night. That was pretty good stuff. 2023-02-02 17:12:26 Not what I was expecting going in, but very informative. 2023-02-02 17:12:46 Military history stuff can be fascinating. 2023-02-02 17:13:11 I got sucked into a seven or eight hour Wikipedia rabbit hole once on the historical evolution of military technology. 2023-02-02 17:13:59 The guy that wrote those is quite a fan of logistics. 2023-02-02 17:15:27 So, by the time of the F18 Chuck was drifting away from @ and !, in favor of using an address stored in the A or B registers. 2023-02-02 17:15:58 So to get all of an @ you'd use two words - one would move TOS into A, and then you'd use A@. 2023-02-02 17:16:14 His claim was this brings about a significant change in coding style. 2023-02-02 17:16:36 I wonder if in such a system execution of a variable name should deliver the address straight into the address register? 2023-02-02 17:17:08 That seems efficient, except there would be no way to know which one (he used A for reads and B for writes), and you don't know when you fetch the address how you intend to use it. 2023-02-02 17:18:05 So I guess... no. But it seems a shame to have it there in TOS, which is also a register, and not just USE it there. 2023-02-02 17:18:46 It's hard for me to see how A@ and B! really pay off unless you're going to do a whole series of operations and you take advantage of the postincrement thing. 2023-02-02 17:22:00 I think having both (the standard @ and ! as well as A@ and B!) is likely the way to go. Then you need >A and >B, and *perhaps* A> and B>, though not necessarily. 2023-02-02 17:22:51 A and B beg to be rsi and rdi in x64, but I'm already planning to use rsi as IP, so that's a decision to make. 2023-02-02 17:41:14 I like this idea of having two registers but it doesn't feel very forthy 2023-02-02 17:41:22 Although if Chuck likes it maybe it is.... 2023-02-02 17:43:53 Well, I agree that it's something of a philosophical deviation, but having that cached address and post-increment capability is clearly an efficiency win. Even without hardware support it would be, by placing the increment in the same primitive as the fetch. But with hardware support, it's just undeniable. 2023-02-02 17:43:57 For certain tasks. 2023-02-02 17:44:36 And somewhere in his writings Chuck explicitly points out that compared to applications of the late 60's era, modern applications are much more about "moving data around" than they are about computations. 2023-02-02 18:13:59 https://www.youtube.com/watch?v=mSbYQz3rluM 2023-02-02 18:14:15 Yeah that's true KipIngram, do you know which writing that was by chance? 2023-02-02 18:55:58 Nah, I'd have to go back and find it. I reread a whole slew of them a month / month and a half ago. 2023-02-02 18:56:33 Bunch of Jeff Fox's stuff too. So it all kind of oruns together. But it might be findable by including F18 in the search; he was talking about that instruction set. 2023-02-02 18:56:40 And why it was the way it was. 2023-02-02 19:13:56 Here's mention of it, but I think this is an email exchange between Fox and a guy named Sean Pringle: 2023-02-02 19:13:58 http://www.ultratechnology.com/enthflux.htm 2023-02-02 19:14:24 He talks about the A reg and also about shallow stacks and how they influence your programming style. 2023-02-02 19:17:34 This seems to come from the era where they were all about compile speed. I still think that was something of a historical anomaly and that things are just different today. 2023-02-02 19:17:59 I seriously doubt I will ever write a large enough amount of Forth source for compile speed to matter to my human perception of time.