2023-02-10 01:00:13 joe9: I'm having a really hard time with this book. I feel like I'm in kindergarten being taught my ABCs. Seriously, how dead can they beat this horse? 2023-02-10 01:00:57 This really isn't a "plan9 book." This is an "operating systems book," and man, it is BEGINNER. 2023-02-10 07:58:06 KipIngram: plan9 is an Operating System, and I would expect a manual to plausibly try and explain 'everything' 2023-02-10 07:59:21 For example the ZX Spectrum's manual assumes a beginner. Not assuming that would have left out most of their audience. The plan9 OS was meant to be used by advanced users and people who had never used a computer before alike 2023-02-10 07:59:56 Also there are features plan9 pioneered we take for granted now, that needed explaining 2023-02-10 08:00:46 And if it was written pre-2000 I would expect much more detail, because people didn't have the internet as it is now to search for everything they didn't get 2023-02-10 08:09:58 Yearly reminder that 2/ is not 2 / or 2 U/ 2023-02-10 08:10:46 Although 1 RSHIFT is 2 U/ 2023-02-10 09:21:16 Well, yes, everything should be explained. 2023-02-10 09:21:33 And there's nothing wrong with the book - there need to be books for absolute novices to study. 2023-02-10 09:21:54 I'm just pointing out that it's pitched at an extremely simplistic level - there's just a lot of handholding. 2023-02-10 09:22:35 Which is fine - just not terribly useful for me. It means there's a lot of stuff to wade through that doesn't really "build" me. 2023-02-10 09:26:12 Something that focused more specifically on how plan9 differs from Unix, and why, would be be more "efficient" for me. 2023-02-10 09:26:42 And how those changes were implemented, etc. 2023-02-10 10:16:05 I generally have always liked the "everything is a file" approach - it seems plan9 takes that even further than Unix does. 2023-02-10 10:28:18 MrMobius - ok; must have been Zarutian (ipfs -> blocks). 2023-02-10 10:28:55 I definitely understand the desire for something "beyond blocks," but I've always felt like Forth should offer blocks, just because that is the fundamental way the hardware works, and Forth should provide "ground floor" access. 2023-02-10 10:29:18 Honestly even Forth's usual block system is still an abstraction of sorts, because it does that default buffer management for you. 2023-02-10 10:29:58 More fundamental would just be : block_read ( addr n -- ) ... ; and : block_write ( addr n -- ) ... ; 2023-02-10 10:30:12 which would leave the memory side of things to you as well. 2023-02-10 10:30:36 But at least it reduces the disk side to it's fundamental level. 2023-02-10 10:31:14 I usually go to a fair bit of trouble to make the "already resident in RAM" path through BLOCK as fast as I can possibly make it. 2023-02-10 10:31:48 I usually structure it as a primitive, which does the residency test; if the block isn't 'resident then I launch a Forth definition to handle that. 2023-02-10 10:32:34 And I usually use quite a large number of block buffers. 2023-02-10 10:34:04 stinky noises about everything a file: https://www.youtube.com/watch?v=9-IWMbJXoLM 2023-02-10 10:34:08 Hey, has anyone ever suggested a really sleek way of loading and running pre-compiled Forth code? And doing it in a way that lets you load some code, run it, and then unload it, without having to unload everything else you loaded afterward? 2023-02-10 10:34:22 I've thought about it at times, but it's just not really an easy situation for Forth to deal with. 2023-02-10 10:34:39 thrig: Always good to listen to the other guy's argument. 2023-02-10 10:35:34 there's some more at https://jeamland.net/talks/ 2023-02-10 10:35:37 In this system I'm planning now the main problem with that kind of dynamic usage comes from the xt table. 2023-02-10 10:36:01 I could move the loaded code itself around in RAM without that much trouble - I'd just modify the xt table entries that pointed to it. 2023-02-10 10:36:41 But the xt table itself would wind up with holes in it - a word has to keep the same xt the whole time it's loaded, and in fact in this case would only work at a fixed position in the xt table, unless I went to a good bit of trouble. 2023-02-10 10:36:49 Since the compiled code actually contains xt's. 2023-02-10 10:37:15 But even if I recompile the source every time I load it, I'd still wind up with fragmentation in the xt table. 2023-02-10 10:38:06 Which can be coped with - it would be possible to re-use them, but in doing so then words from some one block of code I loaded would get scattered out over the table, and that would make it a lot harder to remove them later. 2023-02-10 10:40:42 The best I've thought of so far would be to specify on LOAD whether the code being loaded was "permanent" or "transient," and if transient use XT slots from the high end of the table. 2023-02-10 10:40:55 At least then there would come to be no holes in the permanent section of the table. 2023-02-10 10:41:13 And you'd expect that everything in the transient section would "go away" sooner or later. 2023-02-10 10:59:40 thrig: I'm having a hard time deciding is that guys complaints are really because of the general idea of "everything is a file," vs. just about the particular way they chose to use that concept in the specific design. 2023-02-10 10:59:50 It's sort of like how you can write bad code in any language. 2023-02-10 11:00:23 I.e., there would be "bad" everything-is-a-file designs as well as good ones. 2023-02-10 11:00:56 I agree that the setup he's describing here isn't a particularly friendly design. 2023-02-10 11:05:23 I think if I were doing a file-based interface for USB what i'd WANT would be 1) I plug in my device and 2) an item for that device appears in a USB device hierarchy. As usual in Linux that hierarchy could be organized in several ways - by device type, by vendor, etc. So I'd just use whichever organization I wanted to find it and then would open it and talk to it. 2023-02-10 11:05:25 End of story. 2023-02-10 11:05:32 I don't see the point of all those intervening layers. 2023-02-10 11:25:25 Hmmm. It seems like at least part of what he's complaining about is that a completely inexperienced person can't just sit down and intuitively know what to do in Unix. 2023-02-10 11:25:36 But honestly, I don't regard that as a valid objection. 2023-02-10 11:25:49 Of course you have to learn to use a system - one shouldn't expect to not face that. 2023-02-10 11:26:28 I don't know a whole lot of Unix, but nonetheless the bit I do know (grep and sed most notably) tend to get me a long way. 2023-02-10 11:26:44 head and tail go on that list too. 2023-02-10 11:26:52 Just those four things, and you can figure most stuff out. 2023-02-10 11:27:07 I'm constantly writing pipelines involving those tools. 2023-02-10 11:28:27 And I have absolutely zero use for any argument that even tries to advocate Windows over Linux. 2023-02-10 11:28:45 I don't CARE if Microsoft got a thing or two right. 2023-02-10 11:29:06 They almost had to score well a time or two, given how big the damn thing is. 2023-02-10 11:29:14 Just by luck. 2023-02-10 11:38:39 I think one thinkg typically missing from Forth is what I'll call "transient name/value associations." We can put anything we want in the dictionary, but for the most part the dictionary is "permanent." 2023-02-10 11:39:02 It seems like there needs to be some standard and ubiquitous way of making temporary associates between names and values. 2023-02-10 11:39:21 Maybe this is the category "environment variables" would fall into. 2023-02-10 11:39:38 or a registry! 2023-02-10 11:39:48 Ugh. 2023-02-10 11:39:53 But yeah. I suppose. 2023-02-10 11:39:55 tee hee hee 2023-02-10 11:40:20 And you really shouldn't have to know which type a name was - there should be a unified way of accessing them. 2023-02-10 11:40:34 You just know that somehow, some way, that symbol is defined. 2023-02-10 11:41:05 This doesn't necessarily have to be super high performance. 2023-02-10 11:41:36 As in, maybe it's fine to resolve the association at runtime. 2023-02-10 11:42:11 Whereas I regard the dictionary as something to be accessed only at compile time. 2023-02-10 11:42:33 Or for interpretation, of course - you dodn't necessarily have to be compiling anything. 2023-02-10 12:18:29 joe9: I'm still having a little trouble getting used to how "arbitrary" the screen layout in acme seems. It's almost as though you just type wherever you feel like on the window. 2023-02-10 12:30:57 joe9: Plan9 and Forth; let's kibbitz. So it seems straightforward enough to arrange something like the notion of connecting your window to another system. That would just involve being able to do some fancy plumbing on your input and output streams. Fine - let's say we've got that working. 2023-02-10 12:31:18 So now you'd be able to sit at your computer and type into your window and execute words in the Forth dictionary of the remote machine. 2023-02-10 12:32:02 But I could envision wanting to mount remote Forth vocabularies in your own name space, so you might have vocabularies accessible to you that were spread out across several different machines. 2023-02-10 12:32:35 So let's say I have access to foo, on machine A, bar on machine B, and bam on machine C. These are all in my search path. 2023-02-10 12:32:39 So now I type 2023-02-10 12:32:55 : distributed foo bar bam ; 2023-02-10 12:32:59 distributed 2023-02-10 12:33:03 What happens? 2023-02-10 12:33:17 I don't see that as an easy thing to make sense of. 2023-02-10 12:33:25 My stack has to be on some one machine, somewhere. 2023-02-10 12:33:32 So only words on that machine can act on it. 2023-02-10 12:33:54 So unless we're going to go passing stack zones around from mahine to machine, I don't see what to do with that. 2023-02-10 12:34:29 Just being able to plumb the I/O doesn't handle that, and for that matter it may not handle even being able to FIND words on multiple machines at the same time. 2023-02-10 12:34:38 be able 2023-02-10 12:36:40 But it just feels like the goal for a distributed Forth system would be to be able to use words at will, defined anywhere in your network, in any combination you wanted to. 2023-02-10 12:36:54 The whole point of mounting a remote vocabulary would be to be able to use the tools it provided. 2023-02-10 12:37:52 cache coherency might get tricky with multiple systems and network outages and what 2023-02-10 12:37:57 I suppose in plan9 the idea is that by connecting your i/o to a remote server, you can use that servers commands, and at the other end those commands can access your targeted files whether they're on that server or not. 2023-02-10 12:38:00 So it all works out. 2023-02-10 12:38:29 But it requires connections not just at the i/o level but at the file level also, and in Forth we're left with the stack as a resource that doesn't fit into either one of those categories. 2023-02-10 12:38:37 You bet it could. 2023-02-10 12:38:59 Multi-core issues on steroids. 2023-02-10 12:39:19 re Forth and distributed computing: I rather like the idea of sending small Forth VMs around 2023-02-10 12:39:24 So I guess my most interesting question is "how does the user stack work in a distributed system"? 2023-02-10 12:40:09 Zarutian_iPad: Yes, sending a whole chunk of work off somewhere to be processed and the results sent back (or sent to some third place) - that seems fairly doable. 2023-02-10 12:40:20 It's this very fine-grain distribution that looks problematic. 2023-02-10 12:40:27 so, an VM would migrate around and access big dataset throug io like interfaces or some such 2023-02-10 12:40:35 Can you distribute a Forth *program* across a network? 2023-02-10 12:40:56 Yeah, if it was flow-based, I could see that working. 2023-02-10 12:41:09 The whole VM would travel around, but at any given time it would use resources only on the local machine. 2023-02-10 12:41:23 Then you'd send the whole thing, stack included, to the next machine you needed. 2023-02-10 12:42:10 you could have a Forth VM spawn another, and to keep the snapshot sizes down one could use the save state trick of the zork machine 2023-02-10 12:42:38 basically a run encoded xor delta from an wellknown vm snapshot 2023-02-10 12:42:49 So say you finish what you want to do with a VM on machine A. 2023-02-10 12:43:01 Now your task definition has to get sent to machine B. 2023-02-10 12:43:13 But how to you initialize the IP for when it's turned loose on machine B? 2023-02-10 12:43:28 the vm stops at A snapshoted and sent to B 2023-02-10 12:43:29 Probably some kind of serialization is required here. 2023-02-10 12:44:06 The code that causes that transfer from A to B needs to know how to prepare the vm for continued execution on B. 2023-02-10 12:44:17 to the vm itjust looks like a pause between instructions 2023-02-10 12:44:29 Yes. 2023-02-10 12:44:44 Which mean sit looks like nothing. 2023-02-10 12:45:22 It seems evident that it has to know the address of a word on B, to aim IP at. 2023-02-10 12:46:03 So B catches it, makes a few tweaks, and lets it run. When it comes back from that word, it then may need to go somewhere else. 2023-02-10 12:46:03 or just each vm having its own small address space 2023-02-10 12:47:12 and there is a primitive instruction that tells the vm runner to stop the vm snapshot it and send it to particular place 2023-02-10 12:49:12 The thing is, though, this is only a useful scenario for fairly coarse distribution. 2023-02-10 12:49:26 Try to make it too fine grain and your performance will be pathetic. 2023-02-10 12:49:31 but this kind of distributed computing is hard and I am not sure that forth might be suitable for it 2023-02-10 12:49:46 Well, that's kind of what I'm thinking too. 2023-02-10 12:50:04 On the other hand, a distributed block/file system might be very interesting. 2023-02-10 12:50:33 As would be being able to connect your window to a remote machine. 2023-02-10 12:50:51 you could have a more restricted kind of words though. One kind that are PrimitiveRecursiveAlgorithm level and they need to specify the data stack effects 2023-02-10 12:51:37 then you could fire them off to places 2023-02-10 12:52:01 Yeah; like I said, I think coarse-grain multiprocessing could be interesting. 2023-02-10 12:52:12 but you would need to do the ‘returning’ yourself so to speak by having such words fire back 2023-02-10 12:52:30 bbl 2023-02-10 12:52:31 And maybe it would make sense in that setting to send your stack zone off to some other machine, for a significant amount of processing, and have the results come back. 2023-02-10 12:56:29 How do I tell what encoding it is if I have its mapping table? 2023-02-10 12:57:03 I can tell from first glance it's not one of most common encodings 2023-02-10 14:23:52 I don't know any way other than finding a list of encodings somewhere and compare until you're convinced. 2023-02-10 14:45:49 for enc in `iconv -l | tr -d / | tr A-Z a-z`; do printf '\xB0\xB1\xB2\xB3' | iconv -cf "$enc"; echo " $enc"; done | grep рст 2023-02-10 14:45:54 KipIngram, this 2023-02-10 14:59:40 You just look then to see which one seems sensible? 2023-02-10 15:01:16 KipIngram, there is only one encoding 2023-02-10 15:01:50 I know the position of certain letters in common encodings so I grepped for those which have other letters where I didn't expect 2023-02-10 15:01:58 and turns out there was only one 2023-02-10 16:00:59 What did it turn out to be? 2023-02-10 16:05:57 Useful: https://help.ubuntu.com/community/GtkComposeTable 2023-02-10 19:00:27 Well, finished scanning through that plan9 book. 2023-02-10 20:36:14 I do have to say that I am fairly curious about acme. That's in spite of the fact that I am traditionally extremely "anti-mouse." 2023-02-10 20:36:27 Maybe part of me just would like to think that someone might "save it." 2023-02-10 20:36:52 I.e., maybe it's not the mouse itself I'm against, but rather traditional typical usage of it. 2023-02-10 20:37:26 I always wind up feeling like it's most often used in an attempt to make it so people can use the computer without learning anything. 2023-02-10 20:37:44 Like it's used to graft a massive help system onto applications. 2023-02-10 20:37:56 Which is mostly what I think menu systems are. 2023-02-10 20:38:30 I think 90% of the time, users could work faster with a keyboard-based interface, but then they wouldn't have the "crutch" offered by the menus. 2023-02-10 20:39:05 I wish I could just slap acme on my system as a package and play with it. 2023-02-10 20:39:26 I did install virtual box, but I haven't gone any further toward trying to bring up a plan9 system. 2023-02-10 20:40:05 Also, I don't have a mouse - I have a trackpad, and that's generally a fairly different experience. 2023-02-10 20:49:51 This looks interesting: 2023-02-10 20:49:53 https://www.cs.tufts.edu/~nr/cs257/archive/rob-pike/conc-win.pdf 2023-02-10 20:50:49 Window systems built with concurrent design - Pike claims the approach simplifies it, and elsewhere (what led me to this paper) was that he claimed that it eliminated the "clumsy main event loop otherwise required." 2023-02-10 20:51:06 The stuff I've been recently thinking about may be "concurrency in Forth." 2023-02-10 21:08:18 wait isnt VNC or RemoteFrameBuffer a decendant of this? 2023-02-10 21:10:14 it seems that the paper is talking about, in a way, the Mealy machine way of doing computation 2023-02-10 21:11:28 a Mealy Machine is a function that take two arguments, input and old state, and returns two things, output and new state 2023-02-10 22:18:05 I'm just now getting started reading it. Got sidetracked. 2023-02-10 22:39:46 I am definitely on board the the "layers" idea, in spite of the memory requirements (basically you have a bitmap for every window, off-screen, and copy from those to construct the display when necessary). 2023-02-10 22:40:02 Vs. expecting clients to redraw portions of their window on demand. 2023-02-10 22:40:14 to me that's one of the big reasons to have a lot of RAM in the first place. 2023-02-10 22:47:34 What he seems to be advocating here is to not squash all the events together into one stream, only to then have to disentagnle them with a big switch statement. 2023-02-10 22:48:03 Instead, separate them into per-device streams, each handled by its own concurrent thread. 2023-02-10 22:51:50 This sounds promising: 2023-02-10 22:51:57 "A 2023-02-10 22:51:59 complete client that connects an operating system’s command interpreter to a window, including all processing of keyboard input such as echoing, typing correction, and so on, takes about 100 lines of 2023-02-10 22:52:01 Newsqueak, distributed across three processes (keyboard, mouse, and display)." 2023-02-10 23:47:16 So this is interesting to me, because this timer tick multi-threrad thing I've been thinking about provides a very good basis for communicating concurrent processes. So if that structure really simplifies the construction of windowing systems, I may be in a really good position to take advantage of that. 2023-02-10 23:51:20 But these processes have to be able to communicate too - I need to get that wired in as cleanly and fundamentally as the concurrency looks like it will be. 2023-02-10 23:53:19 But Pike gives a description of the necessary channels in this paper.