2023-10-26 04:41:19 KipIngram, crc, and all others: thanks for your feedback, it has been very important to me :) 2023-10-26 04:41:39 KipIngram, yes it's a kind of "help facility" i have for each word 2023-10-26 04:42:47 KipIngram, my idea of homoiconicity was "a stack as a type" 2023-10-26 04:43:03 a forth stack as a normal type you have in the stack! 2023-10-26 05:02:17 Sounds like Smalltalk to me ;) 2023-10-26 05:02:29 :) 2023-10-26 05:02:39 smalltalk let you to do that? 2023-10-26 05:02:40 I'm doing some pipeline-oriented programming in PHP, and yea I have nested pipes 2023-10-26 05: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 05:03:05 hmm i'm not so familiar with the concept of 'nested pipes' 2023-10-26 05:03:11 olle, oh i see 2023-10-26 05:24:36 pipe(do_thing, do_other_thing, pipe(foo, bar)); // nested pipes 2023-10-26 05:25:00 Both pipes and Forth has "implicit glue", as I call it :) 2023-10-26 05:25:03 have* 2023-10-26 05:30:41 KipIngram: XOR is the same as + in 1-bit anyway 2023-10-26 05:31:02 So it makes sense and I would be confused by someone using + for something else 2023-10-26 05:31:11 In boolean algebra 2023-10-26 05:59:31 Hm no channel for Factor? 2023-10-26 07: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 07: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 07:50:15 Maybe that can already be done with a vocabulary? 2023-10-26 08:12:35 What would an example of that "mocking' be? 2023-10-26 08:15:58 KipIngram: Replace a database call to fetch a user with a direct user object, for example. 2023-10-26 08:17:30 I'm not sure where the stack would figure here, it would be about replacing the DB words 2023-10-26 08:18:13 Yes, I'm not immediately seeing that either. 2023-10-26 08: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 08:19:10 You could use a separate vocabulary for the mocking versions of words 2023-10-26 08: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 08:19:35 Right - you'd just establish a different vocabularly list for the test run. 2023-10-26 08:21:03 GeDaMo: That'd be more Forth-like I guess, yes :) 2023-10-26 08:22:32 Maybe they do this in Factor already :d 2023-10-26 08:27:55 I'm just not getting how the "configurable stack" comes into it. 2023-10-26 08:31:15 I had assumed they meant 'stack' as in a layer of software rather than a 'stack' data structure 2023-10-26 08:31:43 But maybe they do want a stack, seems over-engineered if so 2023-10-26 08: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 08:33:24 I think this is reasonable and would do the same, by wrapping the file I/O functions 2023-10-26 08:34:04 It's basically like polymorphism with the FILE* type, seems correct to me :) 2023-10-26 08:52:24 Oh, ok - that makes sense. 2023-10-26 08:52:35 I was trying to think of the Forth stack. 2023-10-26 08:52:58 Yeah, the question makes a lot more sense looking at it that way. :-) 2023-10-26 08:53:49 If you want to change the meanings of words without recompiling, you can use defer words 2023-10-26 08:58:40 I can do that to any word in my system, just as a consequence of the architecture. 2023-10-26 08:59:06 There's a level of indirection in there I can re-vector. 2023-10-26 08:59:40 It's just a consequence of separating headers and bodies. 2023-10-26 09:00:18 Compiled definitions have pointers into the headers, then they have pointers to bodies. 2023-10-26 09:00:39 The one I'm planning now won't have that. 2023-10-26 09: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 09: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 09:06:52 :-) a "test sandwich." 2023-10-26 09: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 09:37:03 "Fixtures" - you mean tooling to collect additional information? 2023-10-26 09:55:53 KipIngram: A fixture is a dummy database or file setup, for example 2023-10-26 09:56:00 Example data to be used by a test 2023-10-26 10: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 10:49:35 like /dev/full 2023-10-26 10:51:00 rendar: that might be more like a mock, I think 2023-10-26 10:51:07 Or I have it mixed up a bit 2023-10-26 10:51:41 i was thinking: 2023-10-26 10: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 10:52:49 how could we introduce async words in Forth? 2023-10-26 10:53:23 rendar: Make a new word `async` that brances the process? 2023-10-26 10:53:28 Oh 2023-10-26 10:53:32 That's your question :) 2023-10-26 10:53:38 Or? 2023-10-26 10:53:59 You need a word that tells the system that the next words should be done concurrently or? 2023-10-26 10:55:07 even if i have an async word, what would `"url.com" async get-url` result into the stack? 2023-10-26 10:57:05 Hm 2023-10-26 11: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 11:02:56 runasync better 2023-10-26 11:06:41 wait 2023-10-26 11: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 11:08:25 rendar: yea endasync is the await, sorry 2023-10-26 11:08:35 but you can `and` any number of steps like that 2023-10-26 11:12:39 hmm 2023-10-26 11: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 11:13:27 and then push results into the stack 2023-10-26 11:13:32 when all concurrent jobs are done 2023-10-26 11:13:36 Yea, feels natural to me :) 2023-10-26 11:13:42 yeah, good idea 2023-10-26 11:15:10 But no idea about implementation details, and that each unit needs its own call stack etc 2023-10-26 11:20:15 yeah 2023-10-26 11:21:21 I see. 2023-10-26 11:21:53 My somewhat "hacky" software background is showing here. :-) 2023-10-26 11:22:09 I'm really a hardware guy that has "putzed around" with software a fair bit. 2023-10-26 11: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 11: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 11:25:33 what was that? a distributed computing card? 2023-10-26 11:25:35 Hehe 2023-10-26 11:25:48 pine64 has a board with 6 pine64 units on, max 2023-10-26 11:25:54 but never found a use for it 2023-10-26 11:26:06 olle, but is that distributed Forth? 2023-10-26 11:29:32 rendar: you're talking about the GA144 2023-10-26 11:30:12 zelgomer, right! 2023-10-26 11:30:14 what's that? 2023-10-26 11:31:06 it's a microchip they've developed at green arrays with 144 cores and a very forthy ISA 2023-10-26 11:31:25 each core has something like 128 bytes of memory 2023-10-26 11:31:42 and at idle it consumes almost no power 2023-10-26 11: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 11:32:37 "he"? 2023-10-26 11:32:55 Chuck Moore 2023-10-26 11:33:11 rendar> KipIngram, i see.. speaking of hardware, i saw a presentation from Chuck Moore 2023-10-26 11:33:11 I thought that was probably it but figured it didn't hurt to check 2023-10-26 11:33:32 85 yo last month 2023-10-26 11:34:02 zelgomer, that's very interesting 2023-10-26 11:34:13 yeah i agree with you, the future belongs to ARM and RiscV 2023-10-26 11:34:31 but those 144 cores work independently? 2023-10-26 11:34:56 yes, and they can each communicate with their adjacent neighbors 2023-10-26 11:35:01 and, the cpu has an internal stack to achieve its 'very forthy ISA' ? 2023-10-26 11:35:28 transputers were going to be the future 2023-10-26 11: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 11:37:09 oh! 2023-10-26 11:37:16 so you have a forthy microcode 2023-10-26 11:37:32 that's very interesting, is this ISA described in some document? 2023-10-26 11:37:55 there have been a few chips like that, RTX2000 and so on 2023-10-26 11:38:09 https://www.greenarraychips.com/ 2023-10-26 11:38:11 wasn't one of the HP minis basically a 16-bit stack CPU? 2023-10-26 11: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 11:39:37 mmm 2023-10-26 11:39:39 that makes sense 2023-10-26 11: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 11: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 11: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 11:56:33 rendar: The GA144? 2023-10-26 11:56:39 Nice chip. 2023-10-26 11:56:42 yeah 2023-10-26 11:56:56 totally asynchronous design, which is exceptional all on its own. 2023-10-26 11:57:13 very cool that each core can communicate with its immediate neighbor 2023-10-26 11:57:14 And when you realize Chuck designed it completely using no "off the shelf" CAD, it's extra remarkable. 2023-10-26 11:57:18 Yes. 2023-10-26 11:57:31 wow 2023-10-26 11: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 11:57:47 wait, totally async design? can you elaborate on this? every instruction is async? 2023-10-26 11:57:56 There is no clock. 2023-10-26 11:58:02 oh! 2023-10-26 11:58:04 Signals just flow through the thing. 2023-10-26 11:58:12 And data exchanges use a back and forth handshake. 2023-10-26 11:58:24 The big payoff is that parts of the circuit where nothing is changing consume almost no power. 2023-10-26 11:58:28 data exchanges between cores 2023-10-26 11:58:36 Or within cores. 2023-10-26 11:58:45 It's TOTALLY asynchronous. 2023-10-26 11:58:54 that's incredible, that happens because there is no clock, right? 2023-10-26 11:58:58 Right. 2023-10-26 11:59:20 instead, with a clock, you'd need to loop over HLT instructions or something like that i guess 2023-10-26 11:59:25 By and large, "digital design" MEANS synchronous - it's very rare to find fully asynch stuff. 2023-10-26 11:59:38 yeah i agree 2023-10-26 11: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 11:59:52 Which solves a lot of dicey timing problems for you. 2023-10-26 11:59:59 It's easier to design synch logic. 2023-10-26 12:00:28 So not only did he undertake an incredible challenge - he actually made it work. 2023-10-26 12:00:47 And did it without any professional tools. 2023-10-26 12:00:47 indeed 2023-10-26 12:00:54 Chuck is incredible! 2023-10-26 12:00:54 I think it's more or less heroic. 2023-10-26 12:01:01 He really is remarkable. 2023-10-26 12:03:23 i agree 2023-10-26 12:03:41 and we can just imitate him! for where we can.. :) 2023-10-26 12:13:55 Yes - good role model. 2023-10-26 12:23:04 Isn't he a crazy person? 2023-10-26 12:23:25 Wait that's Charles H. Moore 2023-10-26 12:23:48 Is he called chuck? 2023-10-26 12:25:43 https://colorforth.github.io/index.html 2023-10-26 12:26:08 "Chuck Moore's colorForth, OKAD and S40 Forth Multicomputer chip" 2023-10-26 12:26:35 dang, almost 10 years 2023-10-26 12:27:29 https://colorforth.github.io/Crispin.htm <-- yesterday was St. Crispin's day, for what it's worth 2023-10-26 12:37:29 olle, the name 'Charles' is often abbreviated as 'Chuck' 2023-10-26 12:39:33 Got it 2023-10-26 12:40:05 Yes, Charles / Chuck. 2023-10-26 12:40:32 He's... "interesting." Critics might call him crazy, due to his very hard core views on certain things. 2023-10-26 12:40:40 I think he's awesome, though. 2023-10-26 12:41:57 He's... "uncompromising." 2023-10-26 12:42:10 He walks a different path :P 2023-10-26 12:42:17 And if you don't like his ideas, he really doesn't care. 2023-10-26 12:42:32 Right - he does, and you're free to follow if it suits you. 2023-10-26 12:44:28 https://www.forth.com/resources/space-applications/ 2023-10-26 12:55:15 I guess I just have a fondness for "mavericks." 2023-10-26 12:57:01 There's plenty of conformity in the world - we needs a few folks bucking the trend. 2023-10-26 12:59:52 core views on certain things? 2023-10-26 13: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 13:16:21 He believes this gets you a substantially better solution. 2023-10-26 13:17:16 and sometimes you just want to call a sqrt without having to write it yourself 2023-10-26 13: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 13: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 13:18:29 That sort of thing, rendar. And as I said, in a very non-compromising way. 2023-10-26 13:18:47 i see 2023-10-26 13: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 13:19:36 It's entertaining reading. 2023-10-26 13:19:48 https://www.ultratechnology.com/ 2023-10-26 13:20:03 i see 2023-10-26 13: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 13:20:21 indeed, me too 2023-10-26 13: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 13: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 13:21:16 Without any attempt at "generality." 2023-10-26 13: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 13: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 13:22:29 And he may be right, but... I want to try. 2023-10-26 13:22:55 A file system is another such "generic solution." 2023-10-26 13:23:31 well, I finished all 14 and a half hours of Wildberger's Boolean algebra presentation. 2023-10-26 13:23:40 I'm counting that as CE at work. 2023-10-26 13: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 13: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 13:41:34 I'm probably going to watch through all of these again at some point - I think it's very valuable material. 2023-10-26 20:22:50 I have a mathy question: what is it called when I have an angle represented by a number between 0 and 1? 0 being no rotation pointing up the x axis and 1 being full rotation and also pointing up the x axis 2023-10-26 20:23:34 it is not radians as that involves pi or tau 2023-10-26 20:24:52 it is not degrees 0 - 360˚ but similiar though (ditto with newdegrees) 2023-10-26 20:25:54 this question sprung up from a title of a talk why you can not multiply two vectors together 2023-10-26 20:27:32 a vector can be translated into three things, its origin, the length of the thing and an angle like I described above 2023-10-26 20:28:02 also an "Airplane" joke 2023-10-26 20:29:46 re the angles: so 90˚ is 1/4 or 0.25, 180˚ is 1/2 or 0.5 and 270˚ is 3/4 or 0.75 2023-10-26 20:34:10 here is how you might multiply two vectors together: first you multiply their lengths together 2023-10-26 20:36:13 then you find the difference between the angle of one and the line from that ones origin that intersects the endpoint of the other vector 2023-10-26 20:37:13 you multiply that with the angle of that second vector 2023-10-26 20:38:04 is it useful? not in the fucking slightest but I am no mathematician 2023-10-26 20:42:10 though now I am thinking about it in terms of a direction and steering of a SR04 or roomba like robot it makes sense of multiplying the vectors together more simply: the lengths are multiplied together and the angles are multiplied together 2023-10-26 20:43:30 think of it like "go three times as far as the first one says and turn half times as the other one says 2023-10-26 20:44:10 but then the vectors are not of the same "space" 2023-10-26 20:45:25 an analogy: buy three times the number of eggs the recipie calls for 2023-10-26 20:46:50 say the recipie calls for four eggs then the multiplier of three together with that produces a dozen 2023-10-26 20:50:30 video in question https://www.youtube.com/watch?v=htYh-Tq7ZBI 2023-10-26 21:43:49 Zarutian_iPad: DooM encodes angles from 0 to 0xffffffff and calls it BAM - "Binary Angle Measure" 2023-10-26 21:45:22 as for what you call from 0 to 1: a turn 2023-10-26 21:45:39 (i'm no mathmetician either) 2023-10-26 21:45:44 a turn! thanks