2023-06-06 02:53:14 : , ( x) HERE 1 CELLS ALLOT ! ; 2023-06-06 07:31:34 Yes? 2023-06-06 07:33:19 I have a family of such words. Byte, word, half-cell, and cell words for the body regionand for the header region. 2023-06-06 07:35:51 I just like posting random simple definitions in here sometimes 2023-06-06 07:35:56 I use the half-cell words a lot more often than I do the cell word. 2023-06-06 07:36:01 That is a nice one. 2023-06-06 07:36:23 It's a little gross honestly, I don't like how ANS is missing CELL 2023-06-06 07:36:51 Oh, it is? That seem slike kind of an obvious one to have. Do they "explain" that somehow? 2023-06-06 07:37:22 They just figure 1 CELLS is "good enough"? 2023-06-06 07:37:24 I'm sure there's some random Forth where CELL did something else like creates a splinter cell in your house or something 2023-06-06 07:37:39 It's a bit offensive just because it's poor English. :-) 2023-06-06 07:40:11 When is someone going to write a cloud-based Forth 2023-06-06 07:40:40 Don't know - in my own mind it's hard for me to "detach" Forth from embedded style work. 2023-06-06 07:41:08 Just offhand I'd think that a cloud Forth probably ought to have some "interesting extensions." 2023-06-06 07:41:34 Since there are things that people kind of take for granted that Forth doesn't normally offer "out of the box." 2023-06-06 07:41:46 I'd think it would need some of those to appeal to such an audience. 2023-06-06 07:42:24 The big job I'd like to see it tackle is writing some kind of scalable Forth, having the same basic constructs that current solutions offer 2023-06-06 07:43:15 I was thinking a little the last couple of days about how I might tackle trying to add "object like" behavior to Forth. 2023-06-06 07:43:26 Kind of idle thinking - it's not necessarily something I'm all hot for. 2023-06-06 07:43:33 Yeah me neither 2023-06-06 07:43:56 I've discovered that the PACKAGE word allows me to write neater struct member access words through 2023-06-06 07:43:58 I figured classes would provide a jump table for methods, and there would be an additional machine code "handler" you might call doobj. 2023-06-06 07:44:11 Method would be a table index passed in on the stack: 2023-06-06 07:44:18 . 2023-06-06 07:44:19 Often I don't want public access words anyway, so I just get to write short words like .THIS .THAT and they only appear in a private wordlist 2023-06-06 07:44:35 doobj would just route execution to the definition called out by that table item. 2023-06-06 07:45:14 I didn't see any good way to chain classes together - looked like the simple approach would be to get inheritance by inheriting parent-defined jump tables, and extending them in the new class. 2023-06-06 07:45:21 Yeah that kind of instancing is like an extension of DOES> 2023-06-06 07:45:30 Yeah. 2023-06-06 07:45:35 Which is sort of like a one-method class system 2023-06-06 07:45:41 DOES> 2023-06-06 07:46:09 I didn't think much about what the actually code of defining classes would look like. 2023-06-06 07:46:28 Anyway, more of an intellectual curiosity than anything else. 2023-06-06 07:47:04 IMO a big deal with OOP is just finding ways to shorten amount of crap to write when using structs/classes 2023-06-06 07:47:21 Yeah, it often feels "verbose" to me. 2023-06-06 07:47:27 i.e. I don't want to write "MY-STRUCT.MEMBER" every time I want MEMBER 2023-06-06 07:47:39 I think the general idea is fine; it's certainly a worthwhile mental model. 2023-06-06 07:47:44 And I don't want to 'pass' the object itself to member functions explicitly every time I call a member 2023-06-06 07:48:15 Hmmm. But somehow it has to know what actual object is in play. 2023-06-06 07:48:50 And that's what a type system is for 2023-06-06 07:48:55 It almost feels like vocabulary type stuff should be tied in somehow. 2023-06-06 07:49:05 But that's a whole separate part of the system. 2023-06-06 07:50:11 The syntax I wrote above has me kind of "executing" the object. But surely you'd want to be able to justput an object on the stack too. 2023-06-06 07:50:35 with no method, but Forth doesn't have a super elegant way of doing both of those things. 2023-06-06 07:50:53 I have two broad ideas for shortening access words, one is to write i.e. "USING ", which allows me to lookup members of that struct without the text preceding the '.' 2023-06-06 07:51:02 Yes. 2023-06-06 07:51:03 Until END-USING or ; or something 2023-06-06 07:51:48 That's where I thought vocabularies seem to come in. 2023-06-06 07:52:01 USING "targets" words that follow. 2023-06-06 07:52:39 And it seems like you might want a stack of those things - methods would dig down until they found an object they recognized. 2023-06-06 07:52:50 Yeah 2023-06-06 07:52:56 In case you have a couple different structs 2023-06-06 07:53:11 In most code I'd expect just one or two at a time 2023-06-06 07:53:16 Right. 2023-06-06 07:55:46 It really is similar to the thoughts I'd had for including types. I've settled in on thinking that the stack would contain pointers to objects exclusively, and the compiler would keep up with what that was going to look like at any given time. 2023-06-06 07:55:55 And would use that to guide word searches. 2023-06-06 07:56:12 FIND would only be happy with a word that expected the current stack layout. 2023-06-06 07:56:36 I'll do pretty much anything to avoid types 2023-06-06 07:56:51 It's a fairly clean idea, but then I usually get greedy and want to have a way to still be able to put raw integers or addresses onto the stack. 2023-06-06 07:56:59 Probably better to keep it pure. 2023-06-06 07:58:09 I guess having that all be compile time only would limit capabilities in certain ways. 2023-06-06 07:59:03 I came up with the USING idea while working on my "new B" design, because likewise I wanted to avoid types ... really the whole point of 2023-06-06 07:59:08 a new B is that it's C without types 2023-06-06 07:59:41 I know kind of historically what B is, but don't really have much familiarity with it. 2023-06-06 07:59:45 B really is such an elegant language, it's a shame that C had to add so much clutter, and that's what you get with types... clutter 2023-06-06 07:59:58 It's just C without types 2023-06-06 08:01:23 So when you call a function, you just shove in whatever items you want to? 2023-06-06 08:01:28 Yeah 2023-06-06 08:01:29 And it's up to you to make sure it works? 2023-06-06 08:01:35 That's actually kind of appealing. 2023-06-06 08:01:39 That's how C actually works too, without prototypes 2023-06-06 08:01:41 In C90 2023-06-06 08:01:51 Like the hello world program in B is just: main() putf("Hello, world!*n"); 2023-06-06 08:02:01 No includes, no prototypes 2023-06-06 08:02:15 I like simple and to the point. 2023-06-06 08:02:16 And no 'block' is needed for a function, a function body can just be one statement 2023-06-06 08:02:38 That's getting closer to Forth. 2023-06-06 08:03:00 It's really depressing seeing how elegant B is compared to C. Of course in the 90's things got so out of hand that C looks elegant 2023-06-06 08:03:09 I like thinking of my Forth as just a big slab of code, with "entry points" I've specified. 2023-06-06 08:03:48 Well C became popular in the 80's and because it was still far neater than Pascal, but with an actual type system and primitive compile-time safety 2023-06-06 08:04:06 Pulling the headers off into another region kind of amplified that perspective for me. 2023-06-06 08:04:56 I didn't quite get that separation all the way done in my current system - definitions still point back at headers. 2023-06-06 08:05:06 I intend to take it the rest of the way on the next one. 2023-06-06 08:05:20 "Here's all the stuff you need to run - and here's all the stuff you use to 'get at it'." 2023-06-06 08:07:37 One cool 'feature' of B is that its arrays (called vectors) *really are* just an address. 2023-06-06 08:07:40 If you write `auto v[10];` then you've allocated 11 cells, one for the variable v, and 10 for the vector. v now contains address of the remaining 10 cells 2023-06-06 08:08:16 You can send that address to that allocation of 10 cells somewhere else and then reuse the variable 'v' for something else if you want 2023-06-06 08:11:25 Hmmm. Yeah, I often think about chunks of memory that have their own size in the first cell. 2023-06-06 08:11:44 That is something I designed into New B 2023-06-06 08:12:08 In New B when you declare a vector it puts the size into the next cell, and then the content after that 2023-06-06 08:12:51 So you can do v[-1] to get the size of the vector, and resize it if that's helpful for some reason 2023-06-06 08:13:23 Although I think there will be a function `size(v)` to get the size, just a little cleaner visually 2023-06-06 08:14:14 I also have been thinking about how to reduce syntax, one idea is to make all local scope variables 1-3 letters long, and anything longer is assumed to be external scope 2023-06-06 08:14:45 And then anything starting with underscore is module-local 2023-06-06 08:14:50 Just an idea, anyway 2023-06-06 08:15:24 But it avoids ever writing a declaration of local scalars, and there would be no need for 'extern', 'static', 'auto' keywords 2023-06-06 08:18:19 So, maybe one way to think about this (Forth stuff) is that when we execute an object, it has a run-time behavior, and that's all you get when it executes in a running definition. But maybe at compile time it also makes some modification to the search path. 2023-06-06 08:18:43 Kind of like adding a vocabulary effect to a word in addition to its primary function. 2023-06-06 08:19:03 Maybe temporary, or maybe you'd have to explicitly "clear" it. 2023-06-06 08:21:02 What about if someone has a word that takes such an object as a parameter and then modifies it? 2023-06-06 08:21:48 That word has no idea where to look without something like USING, so maybe USING can be there as well in those situations 2023-06-06 08:22:41 And now we're at my New B design, because I had designed it so if you use "struct x" in a def then it becomes scoped, but you can also do "using x" to achieve the same thing if it doesn't come up naturally 2023-06-06 08:23:34 Could be. I see what you're getting at - there is a difficulty there. 2023-06-06 08:23:46 : foo ...modify object... ; 2023-06-06 08:23:50 Exactly 2023-06-06 08:23:53 : bar object foo ; 2023-06-06 08:24:12 The compiler had no idea when foo was compiled what the code in bar was going to look like. 2023-06-06 08:24:31 that is a big sharp thorn right there. :-( 2023-06-06 08:24:50 So I suggest: using object : foo ...modify object... ; previous 2023-06-06 08:25:48 And then you can just do : bar object foo ; and : foobar object ...modify object... ; without 'using' because it's implied 2023-06-06 08:28:56 I think that's a reasonable compromise 2023-06-06 09:23:10 Yeah, it was there when foo was compiled, so foo knows what to do. 2023-06-06 09:23:47 I'd always assumed that in a system like this I'd have to tell words what the stack was going to look like. I'd considered doing that via "enabled" stack comments. 2023-06-06 09:24:20 : * ( vector vector -- vector) ... ; 2023-06-06 09:24:32 Or matrix, or whatever. 2023-06-06 09:25:01 That's not quite "object oriented," but it seems like it's getting into a similar neighborhood. 2023-06-06 09:25:46 Definition has to be told what KIND of thing will be on the stack, even though it won't know WHICH thing until runtime. 2023-06-06 09:30:07 It's not "object oriented", it's just a type system. But I do think a lot of the power of OOP is just grouped naming features and encapsulation 2023-06-06 09:32:20 wasn't OO about messages according to some Alan Kay? 2023-06-06 09:36:22 I see why that comment makes sense, but I think veltas is on the right track. In terms of how you use it it is kind of about managing your names. 2023-06-06 09:38:16 thrig: I accept Bjarne Stroustrup's interpretation of what OOP means in most languages, of which I'd say encapsulation is like a third of it 2023-06-06 09:38:44 People obviously don't use OOP that well in practice, for most people it's just a way of grouping and hiding stuff, almost all of which exists in C anyway 2023-06-06 09:40:45 That would be me. 2023-06-06 09:41:31 If I remember rightly Bjarne boils it down to encapsulation, inheritance and polymorphism 2023-06-06 09:44:23 encapsulation and inheritance have always made sense to me - I've never really "gotten" polymorphism. 2023-06-06 09:54:51 poly probably makes sense in GUI design where you have something and you're like "hey something render yourself" 2023-06-06 09:55:08 It makes sense everywhere, drivers are like polymorphism 2023-06-06 09:55:29 You're like "I have a disk, I don't know how to use it but I know I can read and write from it and ask how big it is" 2023-06-06 09:58:23 Bjarne describes the thing I'm interested in as "data abstraction", which he doesn't consider OOP 2023-06-06 09:58:26 So how is that not "encapsulation"? 2023-06-06 09:58:33 What exactly IS "polymorphism"? 2023-06-06 09:58:46 Bundling functionality inside containers with data - that makes sense to me. 2023-06-06 09:59:09 You don't need to know what's in there - you only need to know what you can do with it. 2023-06-06 09:59:49 In a sense that's no different from hardware design. I turn this knob - my music gets louder. 2023-06-06 09:59:56 How does that happen? Well, someone knows... 2023-06-06 10:00:01 https://en.wikipedia.org/wiki/Polymorphism_(computer_science) 2023-06-06 10:00:51 Ok, so akin to overloading? 2023-06-06 10:01:29 Being able to use symbols in different contexts, and have them mean the appropriate thing in each case? 2023-06-06 10:01:33 overloading is when you put 300 people on a 30 person ferry 2023-06-06 10:04:27 KipIngram: It's not a fundamental set of features, it's more just a programming paradigm 2023-06-06 10:04:45 It's not like you can't achieve the features of polymorphism in non-OOP languages 2023-06-06 10:04:58 It's just that OOP languages provide them in a certain way 2023-06-06 10:07:23 You might read what Bjarne actually said about it, I'm misremembering anyway https://www.stroustrup.com/whatis.pdf 2023-06-06 10:07:33 Yeah, I'm seeing that I am familiar with most of these IDEAS - just not under the correct "lingo." 2023-06-06 10:08:09 Nowhere does he say 'polymorphism', I suppose that's allowed by calling and dispatch mechanisms along with a static or dynamic type system and inheritance 2023-06-06 10:08:21 Well nobody agrees on the lingo 2023-06-06 10:08:27 In the system I've envisioned, a function that works on some object without really needing to know what the object exactly is (stack manipulations are an example) has one of those forms of polymorphism. 2023-06-06 10:08:35 I don't think Bjarne's terminology is necessarily normal among even C++ programmers 2023-06-06 10:08:37 Who cares what those objects are? You can still swap them. 2023-06-06 10:08:48 And certainly the simula terminology isn't typical 2023-06-06 10:08:53 Or there might be a function to return the size of an object that was "universal." 2023-06-06 10:09:03 Yeah I'd say that was 'single dispatch' 2023-06-06 10:09:14 You can look that up 2023-06-06 10:10:25 I run into this sort of thing reading math papers. I'll be all baffled, and when I finally get it all "decoded" it turns out to be concepts I already knew. 2023-06-06 10:11:33 Just with swanky mathematician names. 2023-06-06 10:11:57 Always made me wonder why the old language wasn't perfectly good enough. 2023-06-06 10:12:45 I feel like, though, that's what people do when they "priestify" a domain - they wrap it all up in a new language. 2023-06-06 10:13:19 I don't really feel a whole lot of "agile development" was NEW - I'd done some of that stuff just on instinct long before I ever heard of agile. 2023-06-06 10:13:30 But it all got new names. 2023-06-06 10:38:45 Yeah very true 2023-06-06 10:39:13 I think the reason it gets branding and names is because people who happen across it don't fully understand why it works, and aren't aware it's not new 2023-06-06 10:39:26 :-) So I tend to roll my eyes a little over the way it's been turned into a veritable religion. 2023-06-06 10:39:55 There's only one religion I have time for :P 2023-06-06 10:44:09 :-) 2023-06-06 10:51:16 I don't really consider it to be a cult, I think it's just a meme or fad 2023-06-06 10:51:43 Nobody really takes agile that seriously anyway, at least I wouldn't imagine so because nobody actually seems to practice it 2023-06-06 10:52:19 I think people actually tried to do XP and scrum years ago but nowadays you're lucky if you can get people to apply anything even slightly iterative 2023-06-06 10:52:25 We've just had a couple of "rah rah" guys that carry their colored sticky notes around with them over the years. 2023-06-06 10:52:27 or test driven 2023-06-06 10:52:42 Nothing wrong with sticky notes :P 2023-06-06 10:53:57 No, not at all. It's just that these guys weren't particularly technical guys, and mostly billed themselves as "agile experts." 2023-06-06 10:54:18 And I've just always felt that technical work should be led by technical people. 2023-06-06 16:34:03 okay, someone answer me this: why do LargeLanguageModels have such wierd names? 2023-06-06 16:34:18 because programmers 2023-06-06 16:34:26 and people that want memorable names 2023-06-06 16:34:40 https://www.together.xyz/blog/redpajama-7b case in point 2023-06-06 16:35:00 Llamas in red pajamas 2023-06-06 16:37:27 https://pennylane.ai/qml/demos/tutorial_zx_calculus.html just begs for a Forth port no? 2023-06-06 16:51:57 That will take me a while to absorb, but it looks interesting. 2023-06-06 16:56:24 It's... quite abstract. 2023-06-06 21:35:40 Zarutian_iPad: ok, I suspect there's a lot of power in that zx calculus. I just don't know my quantum computing well enough to really get my hands around it, though. 2023-06-06 21:36:18 I have a fair sense about the gist of quantum computing (and how very much it's NOT like regular computing), but I've never really "waded in." 2023-06-06 21:36:44 Question pop up on Quora all the time - "When will quantum computers make computers obsolete?" etc. 2023-06-06 21:37:15 My opinion is never. There's plenty of stuff that regular computers do just as well as a quantum computer would, and they're a lot easier to build. 2023-06-06 21:37:26 We're GOOD at building them. Supremely good. 2023-06-06 21:37:38 You don't need a quantum computer to check Facebook or watch a movie. 2023-06-06 21:38:14 I think that we'll figure out how to build them well enough to "have them around," and they'll fill a niche and solve particular problems for us - problems they do excel at. 2023-06-06 21:38:44 I particularly think they might revolutionize drug development and other "fancy chemical stuff." 2023-06-06 21:38:59 We may get a "golden age" of super materials. 2023-06-06 21:39:43 But I don't think standard computers are going anywhere, unless someone finds a COMPLETELY unexpected way to make quantum computers "even cheaper" than the ones we make now. 2023-06-06 21:59:42 Ah, so it's possible to kick a script out of a sleep in Linux. 2023-06-06 22:00:13 Apparently if your script calls sleep, you can kill the *sleep pid* and your script will just carry on. 2023-06-06 22:00:17 That's useful. 2023-06-06 23:40:02 wait till you learn about editing the shell script on the fly