2024-08-16 04:36:36 I wouldn't mind seeing the places my ancestors came from (which is like 85% Great Britain and 14+% Scandinavia). Other than that I'm happy enough to "travel via internet. I particular feel no yen to go to potentially dangerous places. 2024-08-16 10:04:29 KipIngram: Hit me up if you go to UK 2024-08-16 12:16:18 Does the concept of hygienic and non-hygienic macros of Lisp apply to Forth too? 2024-08-16 12:53:12 Not really because you don't tend to name variables with limited scope(?) 2024-08-16 14:43:11 hmm good point 👍 2024-08-16 15:17:17 veltas: That would be cool; I will. Likely won't be until after I retire, so at least 5-6 years. 2024-08-16 19:52:54 i think that i just hit the enlightenment moment this week 2024-08-16 19:54:43 today i have: (subroutine threaded forth written in c) -> parses (forth text files defining assemblers and meta compilers) -> outputs (native forth for the target platform) 2024-08-16 19:55:58 it's occurred to me that with that much working, i can go back and completely refactor the host bootstrapping forth. instead of writing a subroutine forth in c, it will be a very small amount of c to only implement a virtual machine, and then i will use my meta forth flow to generate its rom image. 2024-08-16 19:58:08 i can't remember where i saw this, i'm sure it was one of chuck's inventions, but my virtual machine will use the technique where it simply loads cells at PC, and if the value is within some predefined range then it's a builtin instruction, and otherwise it's taken to be a high level forth word address and automatically nests 2024-08-16 20:04:33 That's kind of what I did in https://github.com/kragen/tokthr/blob/master/tokthr.S: cmp $last_asm_bytecode, %eax 2024-08-16 20:05:15 except that it's not taking it to be an *address* for a high-level Forth word but rather an *index*, because it's a token-threaded (unfinished!) Forth 2024-08-16 20:06:00 right 2024-08-16 20:06:02 it's totally plausible that Chuck invented that technique 2024-08-16 20:08:21 it's somewhat less appealing when you're not in a token-threaded context, because if you're doing ITC or DTC, you're accepting some space cost to save execution time 2024-08-16 20:08:46 (compared to token threading aka bytecode) 2024-08-16 20:10:21 and that extra conditional in the inner interpreter is pretty costly; if I had to guess, I'd guess it halved the speed of an ITC implementation 2024-08-16 20:10:22 in terms of execution time 2024-08-16 20:10:48 but actually what I should have said is, congratulations! 2024-08-16 20:16:43 no, i appreciate the discussion. the ultimate goal for this thing is simplicity, not so much speed, because its only purpose is as a host development environment for building cross compilers, and those have more native and performant interpreters. i actually had not thought of this in terms of dtc or itc, though. it feels more like extensible bytecode, but my tokens just happen to line up with virtual 2024-08-16 20:16:49 addresses. i think perhaps that's dtc? i'd need to think about it some more. 2024-08-16 22:32:04 in DTC you jump to the address you read out of the threaded code, similar to subroutine threading, but without a call opcode before each address; so to compile a high-level word you need to insert a little machine-code stub at the beginning of each word; in ITC there's a cfa at the pointed-to address 2024-08-16 22:32:35 there's a nice set of diagrams at https://www.bradrodriguez.com/papers/moving1.htm 2024-08-16 22:33:45 ITC and DTC are simpler than token threading, and arguably DTC is simpler than subroutine threading, and ITC is simpler than DTC, even though historically it came later 2024-08-16 22:34:05 I should say *arguably* ITC is simpler than DTC 2024-08-16 22:35:55 I feel like "call **addr" is simpler to "call addr if addr < limit else call colon interpreter" 2024-08-16 22:39:06 yeah, i know, i've just always thought of dtc as having a code prologue at the beginning of high level words 2024-08-16 22:39:10 the latter can be coded as "lessz, cond-branch, do interpreter..." 2024-08-16 22:39:41 in mine, the interpreter understands the high level words natively, so a forth word literally just begins with the threaded coded 2024-08-16 22:39:59 dlowe: well, it's not *much* simpler 2024-08-16 23:57:52 So much lame stuff in the world. I recently bought a pack of 2n2222A transistors on Amazon. No manufacturer identified, no pinout given. I figured that wasn't a problem, I'd just look up the typical pinout online. But I find both E, B, C and C, B, E listed (left to right, looking at the flat package face). 2024-08-16 23:57:54 How annoying. 2024-08-16 23:58:07 I actually wound up having to build a little LED circuit on a breadboard to suss it out. 2024-08-16 23:58:27 The LED lights with the transistor turned either way, but it was easy to measure the base and collector currents and get the beta. 2024-08-16 23:58:57 One way it was 34; the other way 89. Average advertised value is 100, though beta is a "highly variable" parameter. I'll go with the 89. 2024-08-16 23:59:39 (beta is collector current divided by base current)