2023-01-09 00:23:01 Ok, so what do you guys think of this, for the top layer of processor operation? 2023-01-09 00:23:12 RAM content will be arranged as a stream of "records." 2023-01-09 00:25:11 Each record will begin with one byte. The upper bits (two or three - whichever I windup needing, hopefully two) will identify the "type" of the entities in the record. The lower bits of the byte will specify how many such entities are in the record. Then will follow the items themselves. They may be six bit opcodes, or they may be XTs of various lengths. 16 bits, 32 bits, maybe others. 2023-01-09 00:26:05 The each item will be the indicated size. If its low order bit is 0, it will be a relative address; if it's 1 it will be absolute, starting from RAM location 0. 2023-01-09 00:26:57 I figure I'll be able to code using the small type for quite a long time. 2023-01-09 00:28:02 The hardware will peel that structure apart and keep up with everything. It will present a stream of either 6 bit opcodes or 32-bit absolute xt's to the remaining hardware, just as I've been planning. 2023-01-09 00:31:40 When that hardware finds a record start byte, it will set state to capture the item type and load the count into a counter, and then just pluck those items out of RAM in some sensible way and either pass opcodes to the hardware I've already designed or turn the xt items into 32-bit absolute references and act on them. 2023-01-09 00:32:09 One of the ideas here is to have the most compact code possible. 2023-01-09 00:33:43 I'd have to write 64k of code before it would even become possible to need xt's longer than 16 bits, and even then an awful lot of references can be <=16 bit using relative addressing. 2023-01-09 00:36:17 The logic will still fetch full-cell-width words, and will pick them apart appropriately in the decode unit. 2023-01-09 01:14:31 BTW, looks to me like practically all of the interesting astronomy calculations (observational astronomy, at least) come down to either the equation of time (for which you'd want a good curve fit) or else solving the basic "spherical triangle" problem. I.e., you know some of the parameters of the triangle and you want to be able to get the rest. So a "generic solver" for such triangle problems seems like it 2023-01-09 01:14:33 would be the backbone of a lot of tools. 2023-01-09 04:41:14 KipIngram: Curve fitting, that's how the oldest computers were meant to work 2023-01-09 04:41:36 Like Babbage's machine was basically a curve fitter 2023-01-09 04:41:55 You can go far with curve fitting 2023-01-09 07:53:33 Re code size and also calculators since we've been talking about them, you might get an idea of how much ROM you need from them 2023-01-09 07:54:30 TI-83 - 32K, HP42S - 64K, HP48S - 256K, HP48G - 512K 2023-01-09 07:55:23 Just roughly since those are three different processors with different densities 2023-01-09 07:57:29 And someone told me Free42 is somewhere around 300K when compiled for ARM M0 2023-01-09 09:19:08 MrMobius: That sounds reasonable. I've not played with Free42 any except on my phone; haven't noted its size. 2023-01-09 09:19:31 Android doesn't make app size very... evident. 2023-01-09 09:19:44 Android doesn't make a lot of stuff evident. 2023-01-09 09:20:13 It and iOS both have always struck me as "OS's for the ignorant." 2023-01-09 09:20:24 Ignorant of their computer tools, that is. 2023-01-09 09:21:22 To me the beauty of Linux is how it's structured to allow you to combine many small tools into powerful functionality. Android and iOS go whole hog the other way, trying to wall off apps from one another as much as they possibly can. 2023-01-09 09:21:41 A misguided approach, as far as I'm concerned. 2023-01-09 10:33:45 Heard Google is going to make RISC-V an android platform 2023-01-09 10:34:20 I do hope it becomes an industry alternative to ARM/x86, I'm not the biggest fan of it but having something more focused on being open would be the best 2023-01-09 10:52:05 I'm always all for "more open." 2023-01-09 10:52:20 Even in areas that I don't really work with - it's just a good principle. 2023-01-09 10:52:52 I guess I'm thankful that big businesses step in that direction *at all*; it's easy to see how they could be tempted not to. 2023-01-09 10:53:08 Google is the sort of company where something like that could happen 2023-01-09 10:53:26 And Apple too actually, although they're probably happy with their ARM solutions right now 2023-01-09 10:55:02 Apple is looking into RISC-V 2023-01-09 10:58:58 Nice 2023-01-09 10:59:09 MS might as well get in it too 2023-01-09 10:59:33 (or according to a hacker news posting that claimed that apple had a risc-v job posting that was redacted or something) 2023-01-09 10:59:57 Google have made more serious statements about it 2023-01-09 11:00:04 Maybe Apple doesn't want to commit yet 2023-01-09 11:00:22 it would make sense for Apple to at least kick the tires 2023-01-09 11:00:34 I think Apple's skillsets are well suited 2023-01-09 11:01:02 They just converted over to their own ARM chipset, that's like 99% of the work/discovery required to move to RISC-V 2023-01-09 11:02:49 You know, I have very little good to say about USPS tracking information. 2023-01-09 11:03:07 I'm trying to watch that Swiss Micros calculator work its way toward me, and they are pathetically uninformative. 2023-01-09 11:03:32 It's "been shipped" - that's about all I can tell. 2023-01-09 11:04:35 ROUTING TO GCHQ... ROUTING TO NSA... 2023-01-09 11:05:03 :-) 2023-01-09 11:13:03 Apparently the first RISC-V laptop is already out there 2023-01-09 11:13:07 alibaba thing 2023-01-09 11:13:20 Heh. Alibaba has practically everything. 2023-01-09 11:14:16 I know China will want to get behind it too 2023-01-09 11:17:36 I wonder why the encoding of immediates is so random in RISC-V 2023-01-09 11:28:48 they say the encoding is to make the routing easier 2023-01-09 11:35:56 I can buy that. It's an explanation that I can pretty easily imagine being true. Likely you'd have to delve into the work fairly thoroughly to necessarily "see it." 2023-01-09 11:44:29 Wow - according to this book I'm reading the most important instrument in observational astronomy - and I think they mean important for understanding how the celestial objects move around, is the transit. 2023-01-09 11:44:49 They've got fairly sophisticated procedures for using them, to collect a lot of data that statistics can be applied to. 2023-01-09 11:46:02 Lets you very accurately measure when a star or planet crosses over some chosen hour angle circle. 2023-01-09 11:46:37 There's a whole series of verticle lines across the field of view - you record the time the object crosses each one, and those are your samples you reduce. 2023-01-09 11:52:47 something to be discreet about, anyways 2023-01-09 13:25:46 So I'm sketching out a spherical triangle solver for the WP34S. 2023-01-09 13:26:30 One that works like the old HP calculator time value of money apps - you get a button for each quantity defining the triangle. You can set those quantities by entering a number and hitting the corresponding button. 2023-01-09 13:26:53 If you hit a button WITHOUT entering a number, though, it takes that as a command to go solve for that quantity based on the others. 2023-01-09 14:15:06 hmm 2023-01-09 14:15:36 people tells me a concat lang is one of the most obfuscated langs 2023-01-09 14:15:49 without counting random stuff like brainfuck 2023-01-09 14:16:24 for example if we compare a concat lang vs lisp 2023-01-09 14:17:20 I think you can mantain clearness in code with a concat lang, but also I know is really easy to get obfuscated code with it 2023-01-09 14:26:34 I don't understand how anyone could consider Forth "obfuscated." Its operation is just as simple as it could possibly be. 2023-01-09 14:26:47 Read a word, look it up, do it. Lather, rinse, repeat. 2023-01-09 14:26:56 How can you simplify that further? 2023-01-09 14:29:05 well maybe they refer to the code they see in my lang 2023-01-09 14:29:52 but also the fact a concatenative lang is usually foreign for most devs 2023-01-09 14:30:33 Fair enough, but to me that reflects on the devs, not the language. 2023-01-09 14:34:02 not to start another "discussion" but a language can be simplified to the point where it starts to hurt you at least for readability 2023-01-09 14:34:24 all that extra typing has the side effect of making the code readable to other humans and maintainable by yourself 2023-01-09 14:36:19 Well, I do think that any language can be "used badly." 2023-01-09 14:36:32 Including Forth. 2023-01-09 14:39:36 I suppose it's mainly that I have random symbols like ~ # $ which are words doing random stuff 2023-01-09 14:39:47 but they say in general anyways 2023-01-09 14:40:39 mainly: " well, I believe that concatenative langs achieve the pinnacle of obfuscation before we get to outright vice (like Malbolge)" 2023-01-09 14:42:52 Yes, Forth does have some names that are... arbitrary. But they become second nature pretty quickly. I agree that someone with no exposure to the language can't just sit down and "somehow know" what every word does. 2023-01-09 14:43:32 But honestly that's true with other things too. Take arithmetic. Why + for example? Nothing about how it looks says "add." 2023-01-09 14:43:50 But we learn. 2023-01-09 14:45:19 well in my case < > <= == >= do not exist 2023-01-09 14:45:43 I have equal less.or.equal less greater greater.or.equal XD 2023-01-09 14:46:02 Ewwww.... 2023-01-09 14:46:09 haha I knew you would dislike it 2023-01-09 14:46:17 Yes, I expect you did. 2023-01-09 14:46:18 but I prefer them to <= and alike 2023-01-09 14:46:36 I've even thought about using <> instead of "swap." 2023-01-09 14:46:39 also it's a noob error to confuse < for > but I tend to do it 2023-01-09 14:47:21 Ah, just remember that "the small end points to the small number." 2023-01-09 14:47:29 When it's a true statement, I mean. 2023-01-09 14:47:38 with less as < and greater as > there's no way to misstype them 2023-01-09 14:47:51 KipIngram: yeah, I mean I sometimes put > instead without noticing 2023-01-09 14:48:01 then I wonder why not works, still it's easy to spot 2023-01-09 14:48:15 Oh, you just typo it. 2023-01-09 14:48:20 Gotcha. 2023-01-09 14:48:44 anyways even without this simple error, I prefer less than < 2023-01-09 14:49:09 I know less.or.equal is quite sad, but meh 2023-01-09 14:49:36 still I hope they add to readability 2023-01-09 14:49:50 even if I have # $ and ~ symbols xD 2023-01-09 15:19:01 0 1 1000000 range '+ do.list . => 500000500000 0.32 real 2023-01-09 15:19:26 using an additional word is quite a bit of overhead 2023-01-09 15:19:50 : oh + ; 0 1 1000000 range 'oh do.list . => 500000500000 0.48 real 2023-01-09 15:20:05 now I want to try how much bind adds 2023-01-09 15:20:21 ISC named? a lot 2023-01-09 15:36:16 I think how "spread out" code is on a line or lines affects understandability too. I like being able to have a lot of meaning in a small space - somehow it's like I can grasp it as a 'single entity' that way, instead of as a slew of interconnected things. It's like my eye is better able to take it in as "a thing," rather than as a "network." 2023-01-09 15:36:56 When I have to shift my eyes back and forth to get my attention on all of it, I can't do that as well. 2023-01-09 15:38:21 A really trivial example is "swap over." After a while, you start thinking about the meaning of that *phrase*, rather than the meaning of the individual words. And it's "tuck." 2023-01-09 15:39:03 swap-top-two-stack-items copy-second-stack-item-to-top just doesn't allow that as well. 2023-01-09 15:39:26 haha that's the name I would choose 2023-01-09 15:41:44 My definitions have gotten pretty short - say 45 characters long. But for any significant functionality I usually wind up using several definitions, so several lines. 2023-01-09 15:42:18 But that creates a rectangle on the screen with an aspect ration not horribly different from square. And I think I "think of" that rectangle of code as one unit. 2023-01-09 15:43:14 So often I wind up thinking of final words - the words I actually use and want in the dictionary - as "blocks" of code, and they actually are "block-shaped." 2023-01-09 15:46:37 : oh [ two one ] bind 'one var 'two var + ; 0 1 1000000 range 'oh do.list . 2023-01-09 15:46:48 4.77 real :/ 2023-01-09 15:46:58 fuck the bind 2023-01-09 15:47:06 idk how to make it faster 2023-01-09 15:47:37 ACTION cries in spanish 2023-01-09 15:50:32 500000500000 2.80 real oh 2023-01-09 15:53:52 still is a lot of overhead 2023-01-09 15:55:31 : oh [ two one ] bind :one :two + ; 0 1 1000000 range 'oh do.list . => 2.57 real 2023-01-09 15:56:02 I'd like it to have it in one second at least :/ 2023-01-09 15:56:14 I suppose I'll have to fake compile 2023-01-09 16:21:11 You have a word that's named oh ? 2023-01-09 16:21:57 shouldn't be too hard to get used to big oh notation 2023-01-09 16:22:57 hahaha 2023-01-09 16:23:08 KipIngram: oh and meh are my foobar 2023-01-09 16:23:34 time ago was fuck, fuckme, fuckyou, fuckmemore 2023-01-09 16:23:39 but I'm growing 2023-01-09 16:23:42 (slowly) 2023-01-09 16:23:53 That's fair. Sort of like "me" is my "self." 2023-01-09 16:24:24 before was oh my fuck, now it's oh my cat 2023-01-09 16:24:48 and oh my cat is very nice and you don't know it it's my lorem ipsum 2023-01-09 16:25:10 You used to be able to use DAMNITALL in Fortran instead of DIMENSION. 2023-01-09 16:25:35 never liked foobar, but at least discovered they come from fubar 2023-01-09 16:25:46 fucked up beyond any recognition/reparation 2023-01-09 16:26:40 Yeah. 2023-01-09 16:26:58 I'm sure people who were super worried about impropriety switched it to foo. 2023-01-09 16:27:30 and baz is from ‘ye focking baztard!’ 2023-01-09 16:27:44 :0 2023-01-09 16:27:45 ACTION notes that is a retcon 2023-01-09 16:40:52 hello dear forthers 2023-01-09 16:41:47 forth score and forthy years ago our forthfathers 2023-01-09 16:42:10 hi lopa 2023-01-09 16:42:35 ACTION stabs thrig with a forthk in thrigs thigh 2023-01-09 16:42:45 [ two one ] compile.bind : oh insert :one :two + ; 0 1 1000000 range 'oh do.list . => 1.62 real 2023-01-09 16:42:59 ok I got more or less what I wanted, but it's a bit sad 2023-01-09 16:43:24 or is it fourk? you know like trident has three tines, fourk has four? 2023-01-09 16:43:59 asking after stabbing? 2023-01-09 16:44:05 pretty sure that would something involving tetra or quad 2023-01-09 16:45:47 I dislike this 'insert' hotfix 2023-01-09 16:46:00 and instead of trident we could use trik? 2023-01-09 16:46:04 it's actually a nop word marked as immediate = 1 2023-01-09 16:46:30 immediate is a "hash" with words and the number of elements they return xD 2023-01-09 16:47:02 so reader words (as there's no real compile phase) will check if a word is immediate, and if so, how many elements does return 2023-01-09 16:47:52 : for example is a immediate = 0 word 2023-01-09 16:49:19 [ two one ] compile.bind : oh insert ...; is actually inserting the function that compile.bind generates into the colon word xD 2023-01-09 16:50:47 I could mark compile.bind as immediate = 1, but then the [ two one ] should be outside the definition anyways 2023-01-09 16:51:00 anyways it looks a bit more correct 2023-01-09 16:51:27 or make it read words 2023-01-09 17:01:19 This is interesting: 2023-01-09 17:01:24 https://www.researchgate.net/profile/Mario-Latendresse/publication/2544306_Fast_and_Compact_Decoding_of_Huffman_Encoded_Virtual_Instructions/links/56bd3a1f08aed695994629f7/Fast-and-Compact-Decoding-of-Huffman-Encoded-Virtual-Instructions.pdf 2023-01-09 17:02:21 what is a virtual instruction? 2023-01-09 17:04:19 oh, just a vm instruction 2023-01-09 17:28:36 Yeah, looks to me like they're taking a bytecode and finding a huffman encoding of it that shrinks the code stream. Has to be virtual because the idea is that shrunk code stream will be directly executed. 2023-01-09 17:28:44 The decoder would be integrated into the vm. 2023-01-09 17:28:54 My own interest was in the potential for the decoder to be hardware. 2023-01-09 17:30:48 They claimed a 60% compression factor in a case study. 2023-01-09 17:30:53 That's pretty substantial. 2023-01-09 17:33:14 Main problem I see with it is that with n-bit instructions, you have at most 2^n opcodes. If you then decide you're going to have a short 3-bit instruction, it will consume an eighth of your instruction slots, so 2^(n-3) slots. 2023-01-09 17:33:23 So you PAY for that compression fairly dearly. 2023-01-09 17:34:24 not so long ago I discovered a bytecode interpreter is just a switch case xD 2023-01-09 17:34:39 I.e., you could have used fewer bits in your instructions anyway, because you're going to get to have fewer of them. 2023-01-09 17:34:42 I expected them to be something more "sophisticated" than that 2023-01-09 17:34:54 but no, a switch case 2023-01-09 17:35:10 I wouldn't dare to say: I made a bytecode interpreter 2023-01-09 17:35:17 when all I've done is a switch case 2023-01-09 17:37:48 There are various ways of implementing them. 2023-01-09 17:37:57 Jump tables are fast. 2023-01-09 17:38:24 And would probably be my first "go to." 2023-01-09 17:39:17 An indirect threaded Forth is really just a jump table, but the "table entries" are spread around in definitions, instead of being packed up into a table. 2023-01-09 17:40:09 Spread around in headers, rather. 2023-01-09 17:40:49 And instead of using a table index as your code, you use the actual address of that "table entry." 2023-01-09 17:41:42 So it's sort of like having a very large, very sparsely used table, that has other kinds of information, like names and so on, blended into it. 2023-01-09 17:41:58 supposedly the compiler converts a switch into a jump table 2023-01-09 17:43:17 It'll convert it into whatever it decides is most sensible for that particular case. 2023-01-09 17:43:31 Which is jump table most often. 2023-01-09 17:43:38 you can also use some array with functions or hash table with functions, which is slower 2023-01-09 17:43:51 but still, I wouldn't dare to call that a bytecode interpreter 2023-01-09 17:45:50 : (jmptbl) ( idx — ) DUP R@ @ > IF R@ @ R> 1+ + >R EXIT THEN 1+ R> + >R ; \ is an example of a jump table in Forth 2023-01-09 17:46:18 or a jump table implementation 2023-01-09 17:47:11 the default case is to jump over it 2023-01-09 17:47:49 s/1+ + >R/1+ + @ R/ forgot to fetch the actual jump target 2023-01-09 17:50:12 vms14: Truth be told, nothing a computer does is very fancy. 2023-01-09 17:50:29 They just do fairly brain-dead things really, really fast. 2023-01-09 17:51:25 yeah, but "a bytecode interpreter" sounds like you made something cool 2023-01-09 17:51:39 then you look and see a switch case 2023-01-09 17:51:42 :D 2023-01-09 17:52:05 in a loop, often! 2023-01-09 17:53:46 Summer after my freshman year of college, I did a coop work tour with General Dynamics in Fort Worth here in Texas. F-16 avionics; they even sent FBI guys to my home town to check my character and so on. 2023-01-09 17:54:08 Anyway, a contractor working there let me borrow a book from him to read that summer, on "System Software." 2023-01-09 17:54:23 Assemblers, loaders, linkers, etc. etc. Various OS topics, and so on. 2023-01-09 17:54:51 I remember being flabbergasted - what had seemed like black magic to me previously was suddenly all revealed to be just piddly simple stuff. 2023-01-09 17:55:07 No "magic" at all. Totally changed how I regarded computers. 2023-01-09 17:55:51 That guy was a really nice guy - I learned a lot from him. 2023-01-09 18:01:42 nice, I like to steal knowledge from people 2023-01-09 18:40:25 :-) I prefer to think of it as copying. 2023-01-09 21:45:09 Good grief - this WP-34S will do a LOT of stuff, but they had to backflip a little to cram it all into that poor little HP-30B. It is definitely not all "intuitive' - keeping the manual close at hand while learning one's way around is essential. 2023-01-09 21:53:48 My physical WP-34S units are equipped with the aftermarket crystal and include stopwatch functionality in the firmware. The emulator doesn't have that. It does have apparently accurate DATE and TIME commands, though, and I didn't have to set those. Must be getting them from the Android system somehow. 2023-01-09 22:50:04 What's interesting, though, is that the on-screen keyboard clearly says "STOPW" down on the bottom row. Not the key itself, but one of the shifted functions of the R/S key.