2023-09-06 00:05:44 So, I think I may go to seven bits instead of six on my instructions. With six I get five instructions in a cell for sure, with a somewhat slim possibility of a sixth. With seven I get four for sure, with a considerably larger possibility of a fifth. 2023-09-06 00:06:18 I think that the "slightness" of the sixth in the first case means that I'll mostly be getting five, whereas I'll OFTEN get five on the second approach. 2023-09-06 00:06:35 It removes the need for that clumsy "alt" instruction, doesn't really impact my code density that much. 2023-09-06 00:07:23 If it was "guaranteed six" down to "guaranteed four" that would be a significant cost, but I don't think that's how it is likely to turn out. 2023-09-06 00:10:08 And I think that if i do that, given the additional instruction space it will open up, I will have an alternate call instruction that uses a fixed width offset field. That will let me handle calls without necessarily having to use up the rest of the cell. 2023-09-06 00:10:47 I just won't do a thread swap check on such calls, so they'll be intended for "brief" calls imposed mostly for factoring purposes. 2023-09-06 00:12:10 With seven bit fields, I'll be able to call 64 for cells in either direction, or 128 cells "back," depending on whether I treat it as signed or unsligned. 2023-09-06 00:22:24 Also, I have talked in the past about extensions to a typed system (Octave like capability). That also ties in with all this calculator talk. 2023-09-06 00:23:23 What if some subset of the instructions (say, 16) were reserved for type-specific operations, and the right library of functions was selected by the type field of the object uppermost on the stack/ 2023-09-06 00:23:44 Those would be completely definable on a type-by-type basis. 2023-09-06 00:32:46 Anyway, I could have three call instructions: jss (jump soubroutine short), jsl (jump subroutine long), and jsb (jump subroutine base). 2023-09-06 00:33:39 The latter would use the slot data immediately following the jsb instruction to call an item offset from the system base address. That would get "core system words" that weren't vm instructions. 2023-09-06 00:34:01 So jss and jsb would be used most often, but jsl would be there to take up the slack in corner cases. 2023-09-06 00:42:31 Good article on ARM addressing modes here: 2023-09-06 00:42:33 https://devblogs.microsoft.com/oldnewthing/20210602-00/?p=105271 2023-09-06 00:42:44 Looks like it has everything it needs. 2023-09-06 03:14:32 KipIngram: Just got an email from Oracle saying my free trial is over (again?) but everything's still working 2023-09-06 03:17:45 Also Raymond Chen wrote some great articles on PPC too 2023-09-06 03:18:00 I recommend them to new starters at my job who need to do PPC assembly 2023-09-06 03:30:58 Huh I just realised AVX-512 operates on a whole cache line in each register, that's crazy 2023-09-06 08:54:58 Yeah, those instructions are crazy. 2023-09-06 08:55:33 I guess maybe that's a logical chunk to work on, though - given that the whole thing is built for cases where you have 'massive" numerical paralleism. 2023-09-06 09:00:49 Looks like HP's "RPL" has several "layers." There's "user rpl" and "system rpl." They're highly similar, but user rpl interposes a "protection" layer that does argument checking and so on. System rpl bypasses that - I guess the assumption is that it's always going to be carefully developed and debuged code. 2023-09-06 09:01:00 then there's an assembly language layer too. 2023-09-06 09:01:08 This is all in that do I linked yesterday. 2023-09-06 09:01:22 There's also a long list of supported data types. 2023-09-06 09:40:47 crc: I'm quite happy with the phone I told you I wanted to buy 2023-09-06 09:41:06 Its similar to a blackberry with android 11 2023-09-06 09:41:36 6g ram 128g storage 2023-09-06 09:42:22 I somehow managed to make termux immortal and it will never be killed 2023-09-06 09:43:13 Also termux displays on the notifications the option to acquire a wakelock which makes the phone unable to go to sleep mode 2023-09-06 09:43:39 Already have apache half configured xd 2023-09-06 09:43:50 Iam.codingtheworld.com 2023-09-06 09:44:18 This is termux with andronix 2023-09-06 09:44:35 Termux is a nice package. 2023-09-06 09:44:37 Its empty cause I'm rewriting my toy rpn lang 2023-09-06 09:45:09 KipIngram: I'm trying to make this phone my main development platform 2023-09-06 09:45:23 Its going quite fine 2023-09-06 09:45:26 vms14: Yesterday I posted a link to docs for Hewlett_Packard's "RPL" language, which is what's used on the HP-48 line of calculators. You might be able to get some ideas from it. 2023-09-06 09:45:36 The keyboard is too small and its hard to type 2023-09-06 09:45:43 But I'm getting used to it 2023-09-06 09:45:47 Bluetooth keyboard? 2023-09-06 09:46:00 No, it has a physical one 2023-09-06 09:46:06 Its like a blackberry 2023-09-06 09:46:12 No, I mean, you could get yourself a BT keyboard. 2023-09-06 09:46:20 To use when you're "stationary." 2023-09-06 09:46:24 Ah yeah 2023-09-06 09:46:34 And some sort of screen id like 2023-09-06 09:46:40 I've got a couple of nice ones. 2023-09-06 09:47:08 Which models 2023-09-06 09:52:05 Um, hang on. I'm having trouble remembering the brand. 2023-09-06 09:52:08 I may have to go find one. 2023-09-06 09:53:15 Nvm 2023-09-06 09:53:27 I want to find something cheap 2023-09-06 09:53:54 That uses hdmi or if possible can connect directly with android 2023-09-06 09:54:03 And small 2023-09-06 09:54:13 Logitech K810. 2023-09-06 09:54:15 Like 7 inch 2023-09-06 09:54:19 Kind of an old model. 2023-09-06 09:54:25 It's a bit bigger than that, but not a lot. 2023-09-06 09:54:44 Very nice response, though, and it has three keys that pick a pairing. You can pair it with three different things and toggle. 2023-09-06 09:54:58 Ah I meant the screen xd 2023-09-06 09:55:17 For a keyboard... 2023-09-06 09:55:24 Oh, gotcha. I went through a phase where I used my phone primarily. No additional display - just the BT keyboard. 2023-09-06 09:55:40 I have more than one year without touching a standard keyboard 2023-09-06 09:55:57 The day I touch one it will feel good 2023-09-06 09:56:01 I bet. 2023-09-06 09:56:06 I really like a good keyboard. 2023-09-06 09:56:20 I try pretty hard not to use my phone keyboard to any great extent. 2023-09-06 09:56:26 for when I have to I use Swype. 2023-09-06 09:57:37 I'm trying to get used to this keyboard, its hard but I think I can feel comfortable 2023-09-06 09:57:59 Anyway, that doc I linked has all kinds of info on how RPL handled various types of data. 2023-09-06 09:58:20 Its missing some symbols so I went crazy looking for a customizable keyboard that let's me add only the symbols I need 2023-09-06 09:58:27 In some ways its evocative of Forth, but it looks like it has a drastically different memory management model. 2023-09-06 09:58:34 A real memory manager, with garbage collection. 2023-09-06 09:59:16 Whereas in Forth you put a word into the next available bit of the dictionary, in RPL you write a code string like << ...code... >> and then you just "store" that string in a variable. That's how it gets a name. 2023-09-06 09:59:33 So a code string is a first-class data item. 2023-09-06 09:59:55 https://imgur.com/a/N6vf32N 2023-09-06 10:00:10 This is the virtual keyboard 2023-09-06 10:01:27 https://jbak2.ucoz.net/ 2023-09-06 10:01:48 Its russian I guess, but I use google translate 2023-09-06 10:02:03 You specify the layout 2023-09-06 10:02:23 https://jbak2.ucoz.net/c/layout/lc.html 2023-09-06 10:02:27 Yeah, I can't get much out of that. 2023-09-06 10:02:37 Its a helper to make a layout 2023-09-06 10:03:03 For now I'm fine and I can write code with it 2023-09-06 10:03:16 I struggle a bit with emacs hotkeys 2023-09-06 10:04:02 It's been so long since I've used emacs I can't really "remember" it in any strong way. 2023-09-06 10:04:53 I remember thinking it's navigation mechanics seemed a little prefererable to vim, but they're both good. 2023-09-06 10:05:44 In the calculator stuff I've been looking at, as you type in a name, the row of soft buttons at the bottom of the screen take on auto-complete candidates. 2023-09-06 10:05:58 So at any point you can stop typing and just reach up and hit one of the soft buttons. 2023-09-06 10:06:31 On the DM42 there's a row of unlabeled buttons immediately below the screen - they're intended to pair up with the soft labels at the bottom of the screen. 2023-09-06 10:08:17 I think vi makes more sense with this keyboard 2023-09-06 10:08:37 I could try to change esc for another key as I have no esc 2023-09-06 10:08:52 But I'm lazy to make a transition 2023-09-06 10:08:54 I liked how with emacs you didn't actually have entry and navigation "modes". You just held down ctrl if you wanted to navigate. 2023-09-06 10:09:17 Swapping ctrl and caps-lock is usually the first thing I do to a new computer. 2023-09-06 10:09:25 Yeah, changing mode feels too much work 2023-09-06 10:09:38 Just such a waste, assigning that big easy to reach key to CapsLock. 2023-09-06 10:09:51 I have two keys which I can set to ctrl or tab 2023-09-06 10:10:00 While putting ctrl down in an awkward position you have to twist your fingers to reach. 2023-09-06 10:14:32 So I've recognized a new pet peeve of mine the last couple of days. I've started noticing people constantly talk about "reading" books when they're really talking about listening to an audio book. 2023-09-06 10:14:45 I'm sorry - that's a perfectly fine way to consume a book, but it is NOT "reading." 2023-09-06 10:15:54 And some people will argue about it, too - one person even said there's a "stigma" around audio books and that not calling it reading contributes to that stigmatization. 2023-09-06 10:17:11 I find audio books a bit hit or miss 2023-09-06 10:17:26 Audible have got some good stuff, but read by a guy who tries to "do accents" 2023-09-06 10:17:43 and he clearly fancies himself as quite skilled at it, particularly Scottish accents 2023-09-06 10:18:01 Well, my main exposure to such discussions is in the reddit community re: The Dresden Files. A guy named James Marsters (he played "Spike" on Buffy) reads those, and he is... well, to say he's well-loved is a huge understatment. 2023-09-06 10:18:14 The community is positively nuts over his narrations. 2023-09-06 10:18:30 so as he wobbles between Groundskeeper Willie, a blacked-up 1970s actor trying to do a Pakistani accent, and something that's like a cross between Welsh and Northern Irish 2023-09-06 10:18:31 Lots of people even say that he's ruined other audio books for them. 2023-09-06 10:18:41 it's just unlistenable 2023-09-06 10:18:51 And that's generally how I feel about the WRITING of those books, too - after reading them, it's hard to find anything that compares. 2023-09-06 10:19:09 KipIngram: yeah I think if you've got good talent working on it, it's just incredible 2023-09-06 10:19:35 I "never" do audio books, but I decided to listen to these just to see what all the fuss is about. He is good. 2023-09-06 10:19:47 But audio could just never replace reading for me. 2023-09-06 10:19:48 I actually have an audiobook of Neuromancer read by William Gibson 2023-09-06 10:20:10 ... he is not as good a voice talent as he is a writer 2023-09-06 10:20:12 no sir 2023-09-06 10:20:15 Now THAT can be hit or miss. Not too long ago the Dresden Files author wrote a novella entry in the series called "The Law." 2023-09-06 10:20:25 He narrated it himself - Marsters was unavailable. 2023-09-06 10:20:28 It was AWFUL. 2023-09-06 10:20:36 The guy can write, but man, he can't narrate. 2023-09-06 10:20:48 I quite like audio books when I'm in the car 2023-09-06 10:20:53 I don't always want to listen to music 2023-09-06 10:20:56 it was initially released on audio only, so it's the only way I could get it. 2023-09-06 10:21:08 So I listened to it, and at some points thought I wasn't going to be able to finish. 2023-09-06 10:21:18 of course proper radio dramatisations are better still 2023-09-06 10:21:28 Yeah, when I drive I'm a music guy. Classic rock. 2023-09-06 10:21:29 get hold of the BBC Radio 4 dramatisation of The Lord of the Rings 2023-09-06 10:21:46 And my job isn't of a sort that lets me listen to something like a book while I work. 2023-09-06 10:21:48 quite often I don't have anything at all on when I'm driving, it's about the only time I get (relative) quiet 2023-09-06 10:22:11 I get quiet by being the first person awake (or the last person at night). 2023-09-06 10:22:17 yeah I don't like anything on when I'm working 2023-09-06 10:22:28 I can't - it breaks my concentration. 2023-09-06 10:22:32 although today I am mostly dicking around on IRC because I'm waiting for a contractor to do stuff 2023-09-06 10:22:37 But when I read I read deeply - a total immersion sort of thing. 2023-09-06 10:22:51 Someone can say something to me and at first I don't even hear them. 2023-09-06 10:22:59 Don't "register" that it's for me, i mean. 2023-09-06 10:23:26 Same when I watch TV or a movie - I "pay attention." :-) 2023-09-06 10:23:44 I've got over my dislike of youtube videos for learning stuff like video editing techniques, I'm working through some dead good Blender videos right now 2023-09-06 10:23:57 turns out that I just simply disliked the presenters in the first few I saw 2023-09-06 10:24:04 Oh, I've gotten tons of learning out of YouTube. 2023-09-06 10:24:17 Leonard Susskind has done a great series of physics lectures. 2023-09-06 10:24:24 nice 2023-09-06 10:24:31 positioned somewhere in between "pop science / entertainment" and "real university material." 2023-09-06 10:24:52 Normally I prefer real lecture series. 2023-09-06 10:25:16 Because I am actually trying to learn the stuff, for real - not just have a "gee whiz" moment. 2023-09-06 10:25:36 Still, though, a few of the science communicator personalities are fairly enjoyable.\ 2023-09-06 10:25:42 Veritasium is really good. 2023-09-06 10:25:48 Sabine Hossenfelder. 2023-09-06 10:26:34 And Physics Girl is just so nicce to look at that I can't resist. :-) 2023-09-06 10:26:47 there's a lot of weird beeping and metallic clanging from the server room 2023-09-06 10:26:53 I should investigate 2023-09-06 10:27:08 Yeah, sounds like. 2023-09-06 10:27:13 it may be that the guy has got this bloody telephony circuit figured out now 2023-09-06 10:28:23 the problem can be succinctly described as "one big government supplier is pointing at the other big government supplier, who's pointing right back at the first one, blaming each other, but basically the problem is Windows Server 2003" 2023-09-06 10:28:28 Sabine advocates superdeterminism / no free will, though, and that thoroughly puts me off. 2023-09-06 10:28:42 Sounds typical. 2023-09-06 10:30:49 Oh, and PBS Spacetime is good. 2023-09-06 10:31:47 With the later narrator - Matt something. He's pleasant to listen to. The earlier guy sounded like he was shouting and "forcing excitement" all the time. 2023-09-06 10:32:28 oh I hate that, it's why I can't really put up with Look Mum No Computer or Colin Furze for long 2023-09-06 10:32:45 LMNC is a really sound guy too, it's just his shouty delivery in his youtube channel is a bit much for me 2023-09-06 10:33:15 Yeah - I just can't listen to such things long. 2023-09-06 10:35:17 ACTION imagines himself working for an audio book company and interpreting the books 2023-09-06 10:36:03 That will definitely never be my second career... :-) 2023-09-06 10:36:06 Could be fun 2023-09-06 10:36:30 I find fine an audiobook for something like a novel 2023-09-06 10:36:45 But not information or documentation 2023-09-06 10:36:47 I'd rather read it. 2023-09-06 10:36:57 And yeah, certainly not for "informational reading." 2023-09-06 10:37:31 See it as the way a lazy person would read a book 2023-09-06 10:37:46 Otherwise it wouldn't 2023-09-06 10:38:37 So in a job interview never say you listen audiobooks 2023-09-06 10:39:02 Except if the enterprise is microsoft 2023-09-06 10:39:10 But that implies reading is hard / a chore. 2023-09-06 10:39:30 It is for a lot of people 2023-09-06 10:39:34 Specially this days 2023-09-06 10:39:41 That's sad. 2023-09-06 10:39:52 In my case I have no interest in reading books 2023-09-06 10:39:58 I guess that's that stigma I mentioned people talking about, though. 2023-09-06 10:40:07 Only documentation ones, but not stories 2023-09-06 10:40:14 Oh, I love reading, if I can just find something good. 2023-09-06 10:40:25 And thAt dresden series has pushed my bar up so that it's hard to find good stuff. 2023-09-06 10:40:28 I have a wild imagination 2023-09-06 10:40:35 Though that Dan Faust series managed to qualify. 2023-09-06 10:41:18 I would think a vivid imagination would make reading more entertaining. 2023-09-06 10:42:08 After I finished college I didn't read a lot - all the technical reading in college and changed how my mind consumed stuff. 2023-09-06 10:42:17 I had to make a fair effort to "re-engage" with fiction. 2023-09-06 10:42:44 So for quite along time I didn't read much/any fiction. 2023-09-06 10:42:58 Then the first ebook readers started to appear, and I "made that efforT>" 2023-09-06 10:43:47 Ereaders are probably my favorite electronic appliance. 2023-09-06 10:44:59 The really early ones were uncomfortably heavy, but by the second or third generation they had that resolved. 2023-09-06 10:45:13 Oh 2023-09-06 10:45:26 Id like an e reader just for reading programming books 2023-09-06 10:45:30 But meh 2023-09-06 10:45:33 The phone it is 2023-09-06 10:45:47 I don't use ereaders for any kind of technical stuff. 2023-09-06 10:45:51 Those readers are good to read with the sub 2023-09-06 10:45:52 Sun 2023-09-06 10:45:57 They generally do a shit job on equations, illustrations, and so on. 2023-09-06 10:46:12 Yes, they're good in bright ambient light. 2023-09-06 10:46:19 I use one with a backlight, though. 2023-09-06 10:57:29 I don't think I care for that RPL bit about managing code as strings that just float around wherever you decide to put them. 2023-09-06 10:57:53 On the other hand, having that as an available "interface" to them might be ok. 2023-09-06 10:58:35 That is, there would still be a dictionary, but you could reference a definition as though it's a "by itself string." Whenever you changed it, it would just recompile as needed. 2023-09-06 11:02:18 I'd still want to be able to see my source in the usual form, but having it presented as separate named words would be fine too. 2023-09-06 11:03:11 The "Catalog" key would give you a view into your hierarchical dictionary, and you could run words, or edit them, or whatever, via that entry point. 2023-09-06 11:20:36 So, the Solver lets you enter initial guesses for your variable. And on a clean start that will guide it to one or the other root for something like a quadratic. But once it has found a root it seems "stuck" on it. For example, if I solve x^2-4 = 0 and give it an initial guess of -1.9, it finds -2. If I give it 1.9, it finds 2. But AFTER it finds -2, even if I enter the exact other root it still 2023-09-06 11:20:37 continues to return -2. 2023-09-06 11:21:01 I don't care much for that behavior. 2023-09-06 11:21:28 What I think it should do is cycle around all available roots. 2023-09-06 11:27:47 Also, when I get around to doing this in earnest, I want my system to support all this geometric algebra stuff. 2023-09-06 11:28:10 General objects that are linear combinations of scalars, vectors, bivectors, etc. 2023-09-06 11:28:22 Somewhere I'd set the dimension I wanted to work in. 2023-09-06 12:10:04 So, anyway, what I'm considering here is having an ability to edit a word's code as an isolated string, but that won't change the fact that it's located somewhere in a linear stream of source code. Changing a word somewhere back in the history will just trigger a FORGET back to that word followed by a re-compile of that word and everything after it. 2023-09-06 12:10:38 So compile speed will need to be good enough to support that in a "painless" kind of way. 2023-09-06 12:21:59 I've realized that my favourite forth word is : 2023-09-06 12:22:29 the colon word 2023-09-06 12:34:54 :-) 2023-09-06 12:35:03 It's to some degree Forth's "soul." 2023-09-06 12:36:40 When Chuck was asked once what made a system "Forth," I think the two things he highlighted were 1) uses a data stack and 2) has : definitions. 2023-09-06 12:39:30 I see a number of things about the DM42 that I find slightly disappointing. 2023-09-06 12:39:39 One was Solver's failure to find complex roots. 2023-09-06 12:40:11 Another is that if I enter a 2x2 matrix that has an inverse, the soft key under the matrix menu labeled "INV" will invert it just fine, but the 1/x key won't. 2023-09-06 12:40:45 I mean, it says right there in the X register "2x2 Matrix," so it knows what's there. And 1/x means "reciprocal." That should work. 2023-09-06 13:03:18 I suspect that this kind of failure to have an all-encompassing solution rises out of taking some "starting system" that's already done and attempting to bolt new features onto it. Instead of starting with a blank piece of paper and doing the job right across the board. 2023-09-06 13:04:00 The first way you wind up with some halfway thing that represents "the best you can do and still ship (close to) on time." 2023-09-06 13:04:54 and the other way is APL 2023-09-06 13:05:27 APL has some real good ideas in it. 2023-09-06 13:09:24 So my abomination is a forth after all? 2023-09-06 13:11:04 KipIngram: does your colon word have more than one behavior? 2023-09-06 13:11:31 Ah you had alternate words for defining temporary words 2023-09-06 13:12:08 I wonder about oop syntax 2023-09-06 13:13:13 My colon word creates an environment when it starts and sets it as the current environment, so word definitions inside will be created in that environment 2023-09-06 13:13:38 This could be used somehow to implement oop 2023-09-06 13:14:37 Yeah, the : word only does the one thing - it makes a permanent new dictionary entry. 2023-09-06 13:14:58 .: does more or less the same thing, but it just marks the header created for later "removal" by .wipe. 2023-09-06 13:15:21 I put removal in quotes because I don't always necessarily recover that memory, but in any case the word is purged from the search order. 2023-09-06 13:16:22 I could take a defined word and use it as object, using its environment to find methods and properties 2023-09-06 13:16:50 I don't have anything so involved - a word is just a spot in the dictionary with some code located there. 2023-09-06 13:17:05 In my case a word is a hash table 2023-09-06 13:17:22 It has a type, a value and an environment 2023-09-06 13:17:37 Environment only if its a colon word 2023-09-06 13:17:52 I don't think I truly even get what you mean by that. 2023-09-06 13:18:07 When a colon word is executed it "enters" in that environment 2023-09-06 13:18:08 To me "environment" is just the state of my system "now." 2023-09-06 13:18:15 And running words modifies that state. 2023-09-06 13:19:04 For me environment is a scope 2023-09-06 13:19:07 Do you mean like you might see an entirely different dictionary within the definition of one word from another? 2023-09-06 13:19:14 Yes 2023-09-06 13:19:20 Its lexical scope 2023-09-06 13:19:31 I can create search orders of vocabularies, but such things don't get "tacked to a word." 2023-09-06 13:19:43 It's just part of my system state at any given moment. 2023-09-06 13:19:47 A colon word has its own environment 2023-09-06 13:20:00 And it can have words defined there 2023-09-06 13:20:01 What if you want it to modify something outside that environment? 2023-09-06 13:20:12 You exit the scope 2023-09-06 13:20:26 Ib that case the colon word 2023-09-06 13:20:33 I get my lexical scope by defining any required "helper words" BEFORE I define my main word, so it can call them, and then after I define my main word I .wipe them so they're gone. 2023-09-06 13:20:42 So while my word was being compiled, they were visible - later they're not. 2023-09-06 13:21:04 Well to modify an existing variable I have a way 2023-09-06 13:21:12 So I can factor a word to my heart's content, with no long term "noise" in the dictionary. 2023-09-06 13:21:48 It would be trivial for me to have .var and .const as well, and then I could have variables and constants that were visible to a definition but not otherwise. 2023-09-06 13:21:54 I have temporary variables that are made only for the purpose of binding values from the stack 2023-09-06 13:22:06 And normal variables 2023-09-06 13:22:30 I can modify an existing normal variable 2023-09-06 13:22:32 My stack frame lets my words treat stack cells like variables. 2023-09-06 13:22:42 So I do that without having to shuffle the values around. 2023-09-06 13:23:22 Which reminds me I don't have a way to declare them so I don't use one from the outer scope 2023-09-06 13:24:02 Setting them to a value will first look if the variable exists and modify the one of that scope 2023-09-06 13:24:17 Instead of creating a new one 2023-09-06 13:24:43 But just need a way to declare a variable 2023-09-06 13:24:58 For now I use the colon 2023-09-06 13:25:04 I've wobbled around some on the syntax for those frame variables, but recently I've been leaning toward 1| 2| 3| 4| for slots "deeper" into the stack and |1 |2 |3 ... for slots shallower. 2023-09-06 13:25:10 All referred to the frame pointer. 2023-09-06 13:25:43 And I'd have 0| but wouldn't need separate |0 - those would be the same slot. 2023-09-06 13:26:28 so every word has like an array of slots for variables 2023-09-06 13:26:37 and you access them by index 2023-09-06 13:27:04 well they are just marks 2023-09-06 13:27:38 I append a colon to the name of the variable i want to set 2023-09-06 13:27:46 24 :oh 2023-09-06 13:27:57 but thats a temporary variable 2023-09-06 13:28:03 Wait - you're allocating space "inside" the words for local variables? 2023-09-06 13:28:22 that space is the environment 2023-09-06 13:28:24 Usually local variables are dynamically allocated on a stack, so you can re-use memory. 2023-09-06 13:28:42 the environment has space for words temp vars and variables 2023-09-06 13:29:09 and im wondering about a fake immediate 2023-09-06 13:29:17 Ok, the question I'm trying to ask is "Does a word's environment consume space when the word isn't being executed?" 2023-09-06 13:29:57 Does the environment persist between executions? 2023-09-06 13:30:11 yes, its an interpreter, the words are all in memory 2023-09-06 13:30:21 If I wanted something like that, then I'd say e.g., 2023-09-06 13:30:25 .var var1 2023-09-06 13:30:28 .var var2 2023-09-06 13:30:39 : foo ...use var1, var2 at will... ; 2023-09-06 13:30:42 .wipe 2023-09-06 13:31:04 And those slots for var1 and var2 data would be persistent. 2023-09-06 13:31:10 Only foo would know how to get at them. 2023-09-06 13:31:19 why only foo 2023-09-06 13:31:42 another definition next to that wont take them? 2023-09-06 13:31:45 Because .wipe removes those names from the dictionary. 2023-09-06 13:31:47 ahhh 2023-09-06 13:32:06 in my case is the reverse 2023-09-06 13:32:10 So if I wanted for bar to also access them, I'd just define it before .wipe 2023-09-06 13:32:51 I could have a whole collection of "private" data items, manipulated by a whole collection of words, and otherwise hidden. 2023-09-06 13:33:04 But that's not what I call a "local" variable. 2023-09-06 13:33:17 Local variables get their space allocated on entry to a word, and deallocated on exist. 2023-09-06 13:33:27 They're transient and only exist while the word is executing. 2023-09-06 13:33:37 I'd call the above "private data." 2023-09-06 13:34:06 with that definition local variables are my temp vars 2023-09-06 13:34:28 And for "local" variables I'd allocate them on the stack, set the frame pointer appropriately with { ... } and access them with |1 |2 etc. 2023-09-06 13:34:31 they get removed every time the word they reside ends 2023-09-06 13:34:47 but normal variables persist 2023-09-06 13:35:08 Yeah. I can do either of those things, and I feel like my implementation is quite efficient. 2023-09-06 13:35:21 i mainly use them to bind values from the stack 2023-09-06 13:35:22 What I do not try to do is nest DEFINITIONS. 2023-09-06 13:35:42 I.e., I don't try to say : foo ... ; 2023-09-06 13:35:42 1 2 3 [ one two three ] bind 2023-09-06 13:35:57 1 2 3 three ! two ! one ! 2023-09-06 13:36:06 yeah the equivalent 2023-09-06 13:36:13 but are local vars 2023-09-06 13:36:24 when this scope ends they die 2023-09-06 13:36:53 Wait, you set those (or can set them) from outside the word that uses them? 2023-09-06 13:36:53 also I have bind.hash and bind.list 2023-09-06 13:36:58 That's not very "private." 2023-09-06 13:37:11 keys are names of the variables and values values 2023-09-06 13:37:54 KipIngram: temp vars no 2023-09-06 13:37:57 What I cannot do is arrange to define some new object easily and have it automatically get its private data. 2023-09-06 13:38:10 a temp var when set it will always be a new one 2023-09-06 13:38:16 in the current scope 2023-09-06 13:38:23 For instance, with that foo example above, if I wanted a second copy of the thing I'd need to go through the whole definition process again. 2023-09-06 13:38:35 So even though it has some resemblance to OO ideas, it's not really an OO system. 2023-09-06 13:38:53 but when you set a normal variable it will try to find an existing one and modify that if exists 2023-09-06 13:39:17 also you can always take the environment of a word 2023-09-06 13:39:45 i.e., I don't have any generic way of defining a "class." 2023-09-06 13:40:00 its a hash table so you can push it on the stack and modify it at your will 2023-09-06 13:40:09 I can pretty much define OBJECTS, "by hand." 2023-09-06 13:40:21 AN object with its ONE COPY of private data. 2023-09-06 13:40:24 i need a way to define objects 2023-09-06 13:40:28 and some syntax 2023-09-06 13:40:44 how would your oop syntax be? 2023-09-06 13:41:03 But I have no way of setting things up so that I can say " obj1 obj2 and have both obj1 and obj2 get their unique private data areas. 2023-09-06 13:41:57 thats why i wondered about the colon word and their alternate forms 2023-09-06 13:42:00 Well, I can "sort of" with makes> does> 2023-09-06 13:42:29 The sole purpose of my one "alternate form" is to leave a word marked for later removal from the search sequence. 2023-09-06 13:42:34 but actually since a word has its own scope i can use that scope as a way to find methods and poperties 2023-09-06 13:42:57 which means that the words defined inside that colon word would become methods 2023-09-06 13:43:04 and the variables properties 2023-09-06 13:43:20 What I'm thinking of doing in this F18A-based system is more sophisticated. I know that for a real scientific computing environment, or a calculator, I'm going to want types. 2023-09-06 13:43:25 not sure about that 2023-09-06 13:43:34 So I'll need the idea of an object on the stack marked as to what type of object it is. 2023-09-06 13:43:52 And I'm thinking about reserving some subset of my machine instructions to represent "type-specific operations." 2023-09-06 13:44:05 So, object identifies its type, type identifies vectors for those instructions. 2023-09-06 13:44:23 So that would be a bit like per-type methods that can be triggered using single vm instructions. 2023-09-06 13:47:04 That HP RPL language has two levels - "user" rpl vs. "system" rpl. I think what that may become for me is to have my "system" level be basically native Forth, and the "user" level will have all the type awareness and so on. 2023-09-06 13:47:49 KipIngram: so you are playing with a chuck's chip? 2023-09-06 13:48:10 :o 2023-09-06 13:50:11 No, just using the design of one as a source of ideas. 2023-09-06 13:50:28 Mostly the notion of packing several short opcodes into each cell. 2023-09-06 13:51:05 This looks like it's going to be a very compact system, so I'm interested in finding out how much functionality I could put in the sort of space these calculators typically have. 2023-09-06 13:51:41 Turns out the calculator sitting in front of me right now, the Swiss Micros DM42, has an ARM Cortex M4F processor with 96k of RAM. 2023-09-06 13:52:05 And that little board I got for future project work is also an ARM Cortex M4F, with 128k of RAM. 2023-09-06 13:52:11 So, very similar environments. 2023-09-06 13:53:36 seems to be a simulator 2023-09-06 13:53:38 https://github.com/tonyrog/f18 2023-09-06 13:53:55 idk if it can serve you 2023-09-06 13:54:38 At the moment the calc tells me 69824 bytes are "available.' 2023-09-06 13:55:04 Oh, nice. Thanks. 2023-09-06 13:55:10 Likely not, but I'll take a look. 2023-09-06 13:55:32 I'm writing a Python emulator that I'll be able to use for desiging the vm-instruction-implemented parts of my system. 2023-09-06 13:55:40 That should be binary portable across platforms. 2023-09-06 13:56:04 Just a binary blob that I can bolt on top of a vm implementation. 2023-09-06 13:56:44 I'd been thinking six-bit instructions, but at the moment I'm leaning toward seven. So a 32-bit cell will carry four or five instructions. 2023-09-06 13:57:28 NEXT will just peel off the next instruction and jump to it; when the cell's exhausted then I'll fetch the next one. 2023-09-06 13:58:15 And that will happen "naturally" - I won't have to have code that keeps up with where I am in a cell. 2023-09-06 13:58:26 NEXT will work as though it were one infinitely wide cell. 2023-09-06 14:01:02 It was when I realized that - that NEXT didn't have to lose any time mucking about with "is it time to reload yet?" that I started to get really interested in the idea. 2023-09-06 14:01:27 I think it's going to do pretty well on the speed front.