2023-10-26 00:15:30 Wow - I continue to be impressed at how much cleaner and more powerful Boole's original algebra was than the standard techniques. 2023-10-26 00:16:14 In modern Boolean algebra, you basically use AND, OR, and NOT and you might write expressions like ABC+A\B(C+D) etc. 2023-10-26 00:16:24 The \ preceding a letter inticates it's inverted. 2023-10-26 00:16:53 In Boole's original setup, you negated by adding 1, and + was exclusive OR rather than standard OR. 2023-10-26 00:17:22 The whole thing is just closer to standard mod 2 arithmetic, so the "algebraic" moves are more traditional. 2023-10-26 00:18:14 Repeated terms in a sum can just be dropped in pairs. Since + is exclusive or, + is zero. 2023-10-26 00:18:39 All of the arithmetic is done mod 2, so where you might have gotten 3 times something before you can just immediately reduce that to 1. 2023-10-26 00:19:00 And exponents can just be ignored - ^n is logically the same as . 2023-10-26 00:19:17 those two rules wind up slicing out a lot of work. 2023-10-26 00:20:27 And, moreover, it's entirely straightforward to reduce an expression to a "canonical form," and two circuits that implement the same function will always reduce to the same canonical expression. So deciding it two circuits are functionally equivalent is entirely a matter of mechanical crank-turning. 2023-10-26 00:20:39 And that's a subtle question using traditional methods. 2023-10-26 00:21:11 Wildberger calls that the "Boole poly-number" of the circuit / expression. 2023-10-26 00:21:45 (poly numbers are a technique I've never seen anyone talk about except him - I assume he invented it). 2023-10-26 00:22:35 Boole poly numbers are even simpler than his normal ones, due to the whole thing being over the binary field. 2023-10-26 00:24:50 Many years ago I was interested in writing software to do various things with digital logic - this makes me feel like that again, only using these methods. 2023-10-26 00:25:35 This is probably the most interesting stuff I've seen Wildberger talk about (to me) because it bears direction on the very foundation of my professional training. 2023-10-26 00:25:42 s/direction/directly/ 2023-10-26 00:28:33 It all makes me wonder why anyone felt the need to adjust Boole's materials in the first place. Maybe it was because he was a dead foreign guy and not a contemporary working at a high falutin' place like Bell Labs or something. 2023-10-26 00:29:20 I mean, why credit a dead guy when you can change a few names and sand the corners down a little and take credit for it? Publish or perish... 2023-10-26 00:30:32 The new stuff is more in tune with set theory, which by the mid-20th century had sort of taken over the basement of all of math - that might be part of it too. 2023-10-26 00:31:10 Wildberger has opinions on that hierarchy too - he thinks the foundation should be arithmetic of natural numbers rather than set theory. 2023-10-26 00:31:47 But his goals don't include establishing a rigorous basis for "the continuum," so it's not surprising he has a whole different starting point. 2023-10-26 00:33:33 If anyone is interested, this playlist is here: 2023-10-26 00:33:35 https://www.youtube.com/playlist?list=PLIljB45xT85CnIGIWb7tH1F_S2PyOC8rb 2023-10-26 10:41:19 KipIngram, crc, and all others: thanks for your feedback, it has been very important to me :) 2023-10-26 10:41:39 KipIngram, yes it's a kind of "help facility" i have for each word 2023-10-26 10:42:47 KipIngram, my idea of homoiconicity was "a stack as a type" 2023-10-26 10:43:03 a forth stack as a normal type you have in the stack! 2023-10-26 11:02:17 Sounds like Smalltalk to me ;) 2023-10-26 11:02:29 :) 2023-10-26 11:02:39 smalltalk let you to do that? 2023-10-26 11:02:40 I'm doing some pipeline-oriented programming in PHP, and yea I have nested pipes 2023-10-26 11:03:01 rendar: Nah, just that "everything is an object" meaning a stack is an object, which could contain other objects (which could be stacks themselves) 2023-10-26 11:03:05 hmm i'm not so familiar with the concept of 'nested pipes' 2023-10-26 11:03:11 olle, oh i see 2023-10-26 11:24:36 pipe(do_thing, do_other_thing, pipe(foo, bar)); // nested pipes 2023-10-26 11:25:00 Both pipes and Forth has "implicit glue", as I call it :) 2023-10-26 11:25:03 have* 2023-10-26 11:30:41 KipIngram: XOR is the same as + in 1-bit anyway 2023-10-26 11:31:02 So it makes sense and I would be confused by someone using + for something else 2023-10-26 11:31:11 In boolean algebra 2023-10-26 11:59:31 Hm no channel for Factor? 2023-10-26 13:08:07 I know - that's part of Boole's original work being more closely connected to math. The newer stuff uses + to represent inclusive or, which is a step away from that. 2023-10-26 13:50:03 I want a configurable stack where the side-effects of writing to file/db/stdout/etc can be mocked during unit testing. 2023-10-26 13:50:15 Maybe that can already be done with a vocabulary? 2023-10-26 14:12:35 What would an example of that "mocking' be? 2023-10-26 14:15:58 KipIngram: Replace a database call to fetch a user with a direct user object, for example. 2023-10-26 14:17:30 I'm not sure where the stack would figure here, it would be about replacing the DB words 2023-10-26 14:18:13 Yes, I'm not immediately seeing that either. 2023-10-26 14:19:05 You mean that a word that would normally fetch something from a database gets a direct user interaction instead? Interactive input? 2023-10-26 14:19:10 You could use a separate vocabulary for the mocking versions of words 2023-10-26 14:19:34 Switch to the mocking vocab then redefine the words which are being tested so they pick up on the mock versions 2023-10-26 14:19:35 Right - you'd just establish a different vocabularly list for the test run. 2023-10-26 14:21:03 GeDaMo: That'd be more Forth-like I guess, yes :) 2023-10-26 14:22:32 Maybe they do this in Factor already :d 2023-10-26 14:27:55 I'm just not getting how the "configurable stack" comes into it. 2023-10-26 14:31:15 I had assumed they meant 'stack' as in a layer of software rather than a 'stack' data structure 2023-10-26 14:31:43 But maybe they do want a stack, seems over-engineered if so 2023-10-26 14:33:03 olle: I think in microsoft's standard library and I assume others, the FILE objects have a secret overload parameter that's used to redirect I/O to buffers etc, so that i.e. vfprintf() can be the 'real' formatted printing function 2023-10-26 14:33:24 I think this is reasonable and would do the same, by wrapping the file I/O functions 2023-10-26 14:34:04 It's basically like polymorphism with the FILE* type, seems correct to me :) 2023-10-26 14:52:24 Oh, ok - that makes sense. 2023-10-26 14:52:35 I was trying to think of the Forth stack. 2023-10-26 14:52:58 Yeah, the question makes a lot more sense looking at it that way. :-) 2023-10-26 14:53:49 If you want to change the meanings of words without recompiling, you can use defer words 2023-10-26 14:58:40 I can do that to any word in my system, just as a consequence of the architecture. 2023-10-26 14:59:06 There's a level of indirection in there I can re-vector. 2023-10-26 14:59:40 It's just a consequence of separating headers and bodies. 2023-10-26 15:00:18 Compiled definitions have pointers into the headers, then they have pointers to bodies. 2023-10-26 15:00:39 The one I'm planning now won't have that. 2023-10-26 15:02:21 olle: If you have a "test vocabulary" that you can optionally compile with, then of course you're not really testing those words - you're actually testing the words that use those words. 2023-10-26 15:04:14 You could also have a separate test program that used the words under test within some special test harness. So together those two things let you "test from below" and "test from above." 2023-10-26 15:06:52 :-) a "test sandwich." 2023-10-26 15:33:51 KipIngram: Usually the goal is to split a test suite in two: one with mocking and one (slower) with fixtures 2023-10-26 15:37:03 "Fixtures" - you mean tooling to collect additional information? 2023-10-26 15:55:53 KipIngram: A fixture is a dummy database or file setup, for example 2023-10-26 15:56:00 Example data to be used by a test 2023-10-26 16:49:28 yeah a fixture is a virtual something, that instead of doing the action, it tells you that it *would* do that, printing something or even returning an error to debug 2023-10-26 16:49:35 like /dev/full 2023-10-26 16:51:00 rendar: that might be more like a mock, I think 2023-10-26 16:51:07 Or I have it mixed up a bit 2023-10-26 16:51:41 i was thinking: 2023-10-26 16:52:36 if we have this Forth: `"nasa.gov" get-url 2 2 +` it will pop the url and initiate the http request, but it won't calc 2 2 + until the url isn't downloaded 2023-10-26 16:52:49 how could we introduce async words in Forth? 2023-10-26 16:53:23 rendar: Make a new word `async` that brances the process? 2023-10-26 16:53:28 Oh 2023-10-26 16:53:32 That's your question :) 2023-10-26 16:53:38 Or? 2023-10-26 16:53:59 You need a word that tells the system that the next words should be done concurrently or? 2023-10-26 16:55:07 even if i have an async word, what would `"url.com" async get-url` result into the stack? 2023-10-26 16:57:05 Hm 2023-10-26 17:02:45 Maybe it would have to be multiple words, like a class def? `async foo and bar endasync` where `and` splits the things to do 2023-10-26 17:02:56 runasync better 2023-10-26 17:06:41 wait 2023-10-26 17:07:12 olle, you mean that inside the async bloc foo and bar would run concurrently, but the execution will still block until 'endasync' ? 2023-10-26 17:08:25 rendar: yea endasync is the await, sorry 2023-10-26 17:08:35 but you can `and` any number of steps like that 2023-10-26 17:12:39 hmm 2023-10-26 17:13:15 so your basic idea is to always have a blocking "block" (sorry for the pun) but where you can put several things that will run concurrently 2023-10-26 17:13:27 and then push results into the stack 2023-10-26 17:13:32 when all concurrent jobs are done 2023-10-26 17:13:36 Yea, feels natural to me :) 2023-10-26 17:13:42 yeah, good idea 2023-10-26 17:15:10 But no idea about implementation details, and that each unit needs its own call stack etc 2023-10-26 17:20:15 yeah 2023-10-26 17:21:21 I see. 2023-10-26 17:21:53 My somewhat "hacky" software background is showing here. :-) 2023-10-26 17:22:09 I'm really a hardware guy that has "putzed around" with software a fair bit. 2023-10-26 17:22:26 I have tried to read about some of the formal CS stuff, but that's all been strictly "self-study." 2023-10-26 17:25:23 KipIngram, i see.. speaking of hardware, i saw a presentation from Chuck Moore time ago, where he presented like a board.. with 177 computations units or something like that, all working with Forth 2023-10-26 17:25:33 what was that? a distributed computing card? 2023-10-26 17:25:35 Hehe 2023-10-26 17:25:48 pine64 has a board with 6 pine64 units on, max 2023-10-26 17:25:54 but never found a use for it 2023-10-26 17:26:06 olle, but is that distributed Forth? 2023-10-26 17:29:32 rendar: you're talking about the GA144 2023-10-26 17:30:12 zelgomer, right! 2023-10-26 17:30:14 what's that? 2023-10-26 17:31:06 it's a microchip they've developed at green arrays with 144 cores and a very forthy ISA 2023-10-26 17:31:25 each core has something like 128 bytes of memory 2023-10-26 17:31:42 and at idle it consumes almost no power 2023-10-26 17:32:06 he was going on about how low power computing is going to be important for the future when we start injecting ourselves with nanoparticles which scares the absolute shit out of me 2023-10-26 17:32:37 "he"? 2023-10-26 17:32:55 Chuck Moore 2023-10-26 17:33:11 rendar> KipIngram, i see.. speaking of hardware, i saw a presentation from Chuck Moore 2023-10-26 17:33:11 I thought that was probably it but figured it didn't hurt to check 2023-10-26 17:33:32 85 yo last month 2023-10-26 17:34:02 zelgomer, that's very interesting 2023-10-26 17:34:13 yeah i agree with you, the future belongs to ARM and RiscV 2023-10-26 17:34:31 but those 144 cores work independently? 2023-10-26 17:34:56 yes, and they can each communicate with their adjacent neighbors 2023-10-26 17:35:01 and, the cpu has an internal stack to achieve its 'very forthy ISA' ? 2023-10-26 17:35:28 transputers were going to be the future 2023-10-26 17:35:55 it's not just the stack, but the instructions themselves are basically forth code words. dup and swap and so on, and you can encode like up to three operations in each instruction 2023-10-26 17:37:09 oh! 2023-10-26 17:37:16 so you have a forthy microcode 2023-10-26 17:37:32 that's very interesting, is this ISA described in some document? 2023-10-26 17:37:55 there have been a few chips like that, RTX2000 and so on 2023-10-26 17:38:09 https://www.greenarraychips.com/ 2023-10-26 17:38:11 wasn't one of the HP minis basically a 16-bit stack CPU? 2023-10-26 17:39:19 iirc i think there was like a partitioning to it. i.e., opcodes within a certain range were built-in instructions, opcodes above that were user-defined forth words 2023-10-26 17:39:37 mmm 2023-10-26 17:39:39 that makes sense 2023-10-26 17:39:58 I guess you could do something like just have every memory cell be either an address or a literal value 2023-10-26 17:40:36 and decide that the first 256 values were opcodes, so 0000h to 00ffh are opcodes and cannot be used as user word pointers 2023-10-26 17:41:17 you could still use those memory addresses to store values, because 0000 @ would still work, but using 0000h as an "instruction" would call that opcode 2023-10-26 17:56:33 rendar: The GA144? 2023-10-26 17:56:39 Nice chip. 2023-10-26 17:56:42 yeah 2023-10-26 17:56:56 totally asynchronous design, which is exceptional all on its own. 2023-10-26 17:57:13 very cool that each core can communicate with its immediate neighbor 2023-10-26 17:57:14 And when you realize Chuck designed it completely using no "off the shelf" CAD, it's extra remarkable. 2023-10-26 17:57:18 Yes. 2023-10-26 17:57:31 wow 2023-10-26 17:57:44 Each core is very small; I feel like that changes "programming it" from the normal 'embedded experience' to more like doing a circuit design. 2023-10-26 17:57:47 wait, totally async design? can you elaborate on this? every instruction is async? 2023-10-26 17:57:56 There is no clock. 2023-10-26 17:58:02 oh! 2023-10-26 17:58:04 Signals just flow through the thing. 2023-10-26 17:58:12 And data exchanges use a back and forth handshake. 2023-10-26 17:58:24 The big payoff is that parts of the circuit where nothing is changing consume almost no power. 2023-10-26 17:58:28 data exchanges between cores 2023-10-26 17:58:36 Or within cores. 2023-10-26 17:58:45 It's TOTALLY asynchronous. 2023-10-26 17:58:54 that's incredible, that happens because there is no clock, right? 2023-10-26 17:58:58 Right. 2023-10-26 17:59:20 instead, with a clock, you'd need to loop over HLT instructions or something like that i guess 2023-10-26 17:59:25 By and large, "digital design" MEANS synchronous - it's very rare to find fully asynch stuff. 2023-10-26 17:59:38 yeah i agree 2023-10-26 17:59:44 With a clock it doesn't matter how the signals behave in between clocks - it's only their value at the clock edge that matters. 2023-10-26 17:59:52 Which solves a lot of dicey timing problems for you. 2023-10-26 17:59:59 It's easier to design synch logic. 2023-10-26 18:00:28 So not only did he undertake an incredible challenge - he actually made it work. 2023-10-26 18:00:47 And did it without any professional tools. 2023-10-26 18:00:47 indeed 2023-10-26 18:00:54 Chuck is incredible! 2023-10-26 18:00:54 I think it's more or less heroic. 2023-10-26 18:01:01 He really is remarkable. 2023-10-26 18:03:23 i agree 2023-10-26 18:03:41 and we can just imitate him! for where we can.. :) 2023-10-26 18:13:55 Yes - good role model. 2023-10-26 18:23:04 Isn't he a crazy person? 2023-10-26 18:23:25 Wait that's Charles H. Moore 2023-10-26 18:23:48 Is he called chuck? 2023-10-26 18:25:43 https://colorforth.github.io/index.html 2023-10-26 18:26:08 "Chuck Moore's colorForth, OKAD and S40 Forth Multicomputer chip" 2023-10-26 18:26:35 dang, almost 10 years 2023-10-26 18:27:29 https://colorforth.github.io/Crispin.htm <-- yesterday was St. Crispin's day, for what it's worth 2023-10-26 18:37:29 olle, the name 'Charles' is often abbreviated as 'Chuck' 2023-10-26 18:39:33 Got it 2023-10-26 18:40:05 Yes, Charles / Chuck. 2023-10-26 18:40:32 He's... "interesting." Critics might call him crazy, due to his very hard core views on certain things. 2023-10-26 18:40:40 I think he's awesome, though. 2023-10-26 18:41:57 He's... "uncompromising." 2023-10-26 18:42:10 He walks a different path :P 2023-10-26 18:42:17 And if you don't like his ideas, he really doesn't care. 2023-10-26 18:42:32 Right - he does, and you're free to follow if it suits you. 2023-10-26 18:44:28 https://www.forth.com/resources/space-applications/ 2023-10-26 18:55:15 I guess I just have a fondness for "mavericks." 2023-10-26 18:57:01 There's plenty of conformity in the world - we needs a few folks bucking the trend. 2023-10-26 18:59:52 core views on certain things? 2023-10-26 19:16:07 Yes, on specific things. For example, one of the big ones is that he's very anti- "libraries." As in software libraries. He advocates solving precisely the problem you face, from scratch and with no "extra hooks" of any kind. 2023-10-26 19:16:21 He believes this gets you a substantially better solution. 2023-10-26 19:17:16 and sometimes you just want to call a sqrt without having to write it yourself 2023-10-26 19:17:19 He uses fixed point scaled arithmetic for everything - no floating point. For example, in the process of designing the GA144 he wrote a CAD package that included a simulator for the silicon physics. He did all of that in scaled integers. 2023-10-26 19:17:52 Well, he would note that you can't just go get the square root. you get a ton of other baggage along with it. 2023-10-26 19:18:29 That sort of thing, rendar. And as I said, in a very non-compromising way. 2023-10-26 19:18:47 i see 2023-10-26 19:19:21 There's some stuff written by Chuck that you can find out there, but there's also a lot "about" Chuck and his philosophy written by a guy named Jeff Fox. 2023-10-26 19:19:36 It's entertaining reading. 2023-10-26 19:19:48 https://www.ultratechnology.com/ 2023-10-26 19:20:03 i see 2023-10-26 19:20:03 I don't follow Chuck religiously or anything - I admire his ideas in general, but I am willing to bend them. 2023-10-26 19:20:21 indeed, me too 2023-10-26 19:20:43 Like I'm planning this system that will support types for numerical processing, array handling, and so on - he'd probably rain all over that. 2023-10-26 19:21:08 He would tell me to make the specific array I needed when I needed it, and write the code for manipulating it in the necessary ways. 2023-10-26 19:21:16 Without any attempt at "generality." 2023-10-26 19:21:50 after all, in his point of view the only reason you'd want a "type" of any sort would be because you're thinking about using it later on other problems. 2023-10-26 19:22:17 He'd say those later problems would likely turn out to be just a little bit different, and the solution you build today likely won't be quite the perfect fit. 2023-10-26 19:22:29 And he may be right, but... I want to try. 2023-10-26 19:22:55 A file system is another such "generic solution." 2023-10-26 19:23:31 well, I finished all 14 and a half hours of Wildberger's Boolean algebra presentation. 2023-10-26 19:23:40 I'm counting that as CE at work. 2023-10-26 19:24:26 And given how core it is to my training, I'm counting it in the special "role based" category they want to see a certain amount of learning fall into. 2023-10-26 19:25:18 Generally you can count learning about almost anything, whether it has to do with your job or not. But there's a sub-category for 'pertinent' stuff that you have to check off as well. 2023-10-26 19:41:34 I'm probably going to watch through all of these again at some point - I think it's very valuable material.