2024-09-23 16:25:25 amby: I also wish C would let me DEMAND register variables. And then if I try to demand too much, it would have every right to fail / spit up on me, but I wish it supported cases where I knew what I was doing and would do exactly what I told it to do. 2024-09-23 16:26:20 But I suppose that's just a very rare use case, and they just didn't find it worth straining to support. 2024-09-23 16:26:36 The fraction of the programming population that would ever want to do it is probably quite small. 2024-09-23 16:26:54 I think that's how `register` did work originally 2024-09-23 16:27:09 But that is the primary limitation that makes me unable to really write a proper Forth in gcc. 2024-09-23 16:29:11 I think what happened was: 1. people wrote code on the PDP-11 using `register`. 2. people wanted to run that code on other machines like the 8080 and the Burroughs 5500. 3. people wrote C compilers for those other machines. 4. those C compilers had to ignore `register` to get the code to run at all. 5. those people sat on the ANSI C standards committee to make sure the standard was something their 2024-09-23 16:29:17 compilers could implement. 6. ANSI C imposed almost no requirements on compiler implementations of `register`. 2024-09-23 17:00:46 Yeah, that makes total sense. 2024-09-23 17:01:16 Actually I'd like even more than just an enforced "register" keyword, though. I'd like to be able to specify WHICH register. 2024-09-23 17:01:25 GCC does have that feature. 2024-09-23 17:01:39 Like I might want to do something with rsi involving lods, and it's the only one that will provide that. 2024-09-23 17:02:01 we were talking about this the other day: https://gcc.gnu.org/onlinedocs/gcc/Global-Register-Variables.html 2024-09-23 17:03:00 It could be as simple (on the x64 platform, of course) as just offering register names as reserved names, and if I use one of them it would just take that register out of the pool of resources that it got to plan the deployment of. 2024-09-23 17:03:28 more generally https://gcc.gnu.org/onlinedocs/gcc/Explicit-Register-Variables.html 2024-09-23 17:03:28 I think your argument around portability is almost certainly right, though. 2024-09-23 17:04:38 unjust was doing some experiments in here a week or two ago with crc's Ilo I think 2024-09-23 17:04:44 and got some mileage out of that feature 2024-09-23 19:24:13 I read the first chapter of Thinking Forth again -- I'm not so sure about it yet. 2024-09-23 19:24:51 One more tool at the box, at most. 2024-09-23 20:15:27 xentrac: that wasn't me. it was veltas that working on an implementation ilo in gcc during his lunch break about two weeks ago, if i remember correctly 2024-09-23 20:15:54 s/implementation/& of/ 2024-09-23 20:16:32 oh, sorry, veltas