2023-11-30 04:16:53 KipIngram: There are definitely bad crystals out there 2023-11-30 04:17:00 And I think sometimes they can go bad over time 2023-11-30 04:17:06 I don't know how but I've seen it enough 2023-11-30 04:17:19 Crystals? 2023-11-30 04:17:22 But if you've got a normal cheap one it probably works incredibly well 2023-11-30 04:17:27 olle: Mystical orbs 2023-11-30 04:17:29 :D 2023-11-30 04:17:35 Moonstone? 2023-11-30 04:17:39 We use them for all our work obviously, what have you been using a VT100? 2023-11-30 04:17:49 Quartz crystal oscillators 2023-11-30 04:19:14 KipIngram: One use of I I' J J' being at fixed positions is if you put something on return stack before a do..loop you can access it with J 2023-11-30 04:19:22 And that works on most forths even now I think 2023-11-30 05:56:15 olle: Quartz crystals used as oscillators in electronics. 2023-11-30 05:56:54 Starting in the 1930's or so quartz crystal based clocks replaced pendulum clocks as man's best timekeeping technology. 2023-11-30 05:58:02 Actually second best - for another 20 years or so the Earth's rotation was our best timekeeper. By the 1950's we'd made quartz clocks good enough to measure the wobble in Earth's spin, though. 2023-11-30 05:59:43 +1 2023-11-30 05:59:46 Yes, though *technically* that's an abuse of J (well, I suppose your system can tell you it's ok and then it's not). 2023-11-30 06:00:11 Quite impressed with myself for finding a hack too dirty for KipIngram :P 2023-11-30 06:00:42 :-) Well, it's a special circumstance. I'm the one proposing to do something that would break it. 2023-11-30 06:00:59 What would break it? 2023-11-30 06:01:23 It's my proposal to include additions cell sin the return stack frame that would make the hack not work. 2023-11-30 06:01:56 Actually the way around this would be to use multiple return stack pointers, but then we'd lose the hotness that makes the extra accesses fast. 2023-11-30 06:02:34 additional 2023-11-30 06:02:43 cells in 2023-11-30 06:02:49 I don't think adding more to return stack will break that one actually 2023-11-30 06:03:00 As long as I is the first thing on return stack 2023-11-30 06:03:08 Then J will be what was on top before loop 2023-11-30 06:03:10 You'd just reach over whatever the return stack frame was. 2023-11-30 06:04:00 I don't have do or i or j or loop in my system anyway. 2023-11-30 06:04:19 I've gone too far obviously :P 2023-11-30 06:04:25 I don't have any of the typical control structures / looping constructs. conditional returns have replaced all of it. 2023-11-30 06:04:47 Conditional returns + conditional "me" words. 2023-11-30 06:07:03 It's definitely an interesting style 2023-11-30 06:09:22 Well, I've liked it, but I have felt a little bad every time I add a name to the dictionary purely for marking a loop-back point. 2023-11-30 06:09:29 That feels a little wrong to me. 2023-11-30 06:09:42 But that's exactly what I'm trying to fix with this extra return stack frame info. 2023-11-30 06:10:13 It just feels to me like the only reason a name should be added to the dictionary should be to make something "callable." 2023-11-30 06:11:03 Though I can do it with that .: method, so it's only a temporary name. 2023-11-30 06:11:53 The main reason for the change isn't to eliminate that name; that's just a fringe benefit. The main reason is to make it so the "me" words don't have an offset after then and therefore don't take up more room in my instruction cell. 2023-11-30 06:12:01 Yeah it's not light-weight but it is interesting and 'pure' in a sense 2023-11-30 06:12:50 It also eliminates the compiler having to special case those words when it compiles them (by putting the offset after them). They become compiled like any other instruction. 2023-11-30 06:13:32 I still think you should 'go all the way' and have EOL end word definitions 2023-11-30 06:13:36 With this only literals and calls that are too far way to reach with my "local" calls will need parameter info compiled. 2023-11-30 06:14:06 Remind me what you mean by that? 2023-11-30 06:14:14 Automatic ; at end of line 2023-11-30 06:14:19 For definitions 2023-11-30 06:14:26 So you can save two characters on every line, for one thing 2023-11-30 06:14:36 Oh, I see. 2023-11-30 06:14:53 Well... that actually would fit my style pretty well. 2023-11-30 06:15:18 Just not have ; at all, you mean. 2023-11-30 06:16:05 That would keep me from being able to fall through to the next line if I wanted to. 2023-11-30 06:16:25 Which I do here and there. 2023-11-30 06:16:32 Maybe add a fallthru word that removes implicit exit from previous def 2023-11-30 06:16:45 Yeah, that would work. 2023-11-30 06:17:07 \ is used that way in some languages. 2023-11-30 06:17:15 I already do something like that because I want to end defs in a standard way that links the word but 'exit' is unnecessary because it never returns from last word 2023-11-30 06:17:27 e.g. in definition of QUIT 2023-11-30 06:17:56 I would probably call that word NORETURN in mine 2023-11-30 06:17:59 Yes, my ; is smart enough not to compile anything in those cases. 2023-11-30 06:18:03 As the fallthrough wouldn't work in my Forth 2023-11-30 06:18:44 Well, actually it's not quite that smart yet. 2023-11-30 06:18:47 Similar to IMMEDIATE ... I like words that modify the previous word's definition 2023-11-30 06:18:51 I keep thinking about making it that smart. 2023-11-30 06:19:02 I don't like smart compilation 2023-11-30 06:19:04 Currently I might end a word with me [ instead of me ; 2023-11-30 06:19:05 Leave it to the programmer 2023-11-30 06:19:41 ; is smart enough to tail call if the last word was a definition call. 2023-11-30 06:20:37 That's going to get harder in this system. 2023-11-30 06:20:40 I've got no tail calls 2023-11-30 06:20:50 If I have them I'll make a word to do it explicitly 2023-11-30 06:21:07 Because now a tail call might be a long call with an offset, or it might be a near call without one, and I'm going to have to be able to figure that out. 2023-11-30 06:21:11 Because often with tail calls you're assuming those semantics anyway, so it's good to be explicit 2023-11-30 06:21:47 Yeah, the programmer could use a jump instead of a call explicitly. 2023-11-30 06:21:53 And that does seem a bit more Forthy. 2023-11-30 06:22:50 I tried a good bit to make tail optimization work purely by inspecting the just compiled code, but in the end that just wouldn't work. 2023-11-30 06:22:56 There were always weird cases that would break it. 2023-11-30 06:23:12 I wound up having to maintain an explicit tail opt flag. 2023-11-30 06:23:30 LOL no points for guessing what I just did 2023-11-30 06:23:43 The compiler couldn't figure it out after the fact, but it did know when it was compiling that last word whether it was a call or not. 2023-11-30 06:23:48 Anyway what I tried to say was /EXIT is a better name for NORETURN 2023-11-30 06:23:49 So I just have it remember. 2023-11-30 06:24:01 And then clear that flag as soon as I do anything "else." 2023-11-30 06:24:16 And irssi kindly exited my client, didn't even realise exit was an alias for quit 2023-11-30 06:24:36 Part of the problem was that evEN THEN would break a tail optimization situation. 2023-11-30 06:24:43 Exactly 2023-11-30 06:24:56 Since it means you might be jumping completely over that last call, so there better be a return to land on. 2023-11-30 06:24:57 It's easy to write this logic but just a lot more code than being explicit 2023-11-30 06:25:17 Yeah, keeping the compiler as simple as possible is a good goal. 2023-11-30 06:26:01 these days, though, I don't have THEN. 2023-11-30 06:26:22 Instead of conditionally jumping over some code and to a return, I'd just conditionally return to start with, with reverse logic. 2023-11-30 06:36:18 So one way of doing all this that I'm planning would be to use seven bit instruction slots. That would get deployed as 64 "regular instructions," 32 "local calls" and 32 "local jumps." Each local call or jump would have five bits of parameter space to specify the jump/call distance. 2023-11-30 06:37:05 So 32 cell boundaries it could target, somewhere in the vicinity of the instruction pointer location. 2023-11-30 06:37:55 Or I might try to go with 6-bit instructions, which would mean 32 'regular' instructions, 16 local calls, 16 local jumps, each of which could target 16 nearby cell boundaries. 2023-11-30 06:38:40 The questions there are "are 32 regular instructions enough?" and "is 16 nearby cell boundaries enough?" 2023-11-30 06:39:11 if I do 6-bits, I can always have at least five instructions in a cell, and only fairly limited opportunity to "use" those two leftover bits. 2023-11-30 06:39:30 With 7 I can always have four instructions per cell, but with somewhat better opportunity to use the residual four bits. 2023-11-30 06:39:45 So I'm not sure 6->7 really penalizes me that badly. 2023-11-30 06:40:02 Since in quite a few cases I'd get five instructions into the cell anyway. 2023-11-30 06:41:11 And I've also considered the possibility of just pulling out the last stops and going with 8 bit instructions, which would mean never more than four instructions per cell, but a luxury of opcodes and double the near call/jump distance. 2023-11-30 06:42:20 I think 7 is the most likely choice at the moment. 2023-11-30 06:42:53 I just don't think trying to go with 6 would "pay off" by letting me use that sixth slot often enough to make it worthwhile. 2023-11-30 06:43:43 With just two residual bits I could only have four instructions that could naturally "live in" that sixth slot; it would be relatively rare that that happened to be the instruction I needed in that situation. 2023-11-30 06:45:36 I think near calls and near jumps would only ever need to go backwards, so at least I wouldn't need to split that range "around" IP. It would always be an offset back from IP. 2023-11-30 06:51:29 KipIngram: are you making your own Forth processor? 2023-11-30 06:52:32 Well, not in hardware; at least not currently. This is going to be emulated on a x86 or ARM processor. 2023-11-30 06:52:49 But yes; this is all re: the next system I'm about to start working on. 2023-11-30 06:53:12 Based loosely on Chuck's F18A architecture - most of what I just described is similar to how it works. 2023-11-30 06:53:26 The Forth I build on top of that will be a fairl straightforward code-threaded system. 2023-11-30 06:53:31 fairly 2023-11-30 06:53:56 https://www.greenarraychips.com/home/documents/greg/DB001-221113-F18A.pdf 2023-11-30 06:54:31 He uses 18-bit cells with three five bit instructions slots and a "possible" fourth slot with three bits. 2023-11-30 06:54:52 Ah okay, I've made two that run on FPGAs, one based off the J1 and another a bit-serial one. I struggled to come up with enough useful instructions (that also didn't slow the design too much) with 5-bits assigned for ALU instructions 2023-11-30 06:55:06 '32 instructions ought to be enough for anybody' 2023-11-30 06:55:13 My main target for this is the Maxim MAX32655TH micro board. 2023-11-30 06:55:39 +1 what veltas said :D 2023-11-30 06:56:03 I have gotten them down to 16 2023-11-30 06:56:13 Well, you'd think, but given my plethora of conditional returns it's hard to fit in 32. Most of all, though, as I noted earlier I'm not sure squeezing into 6 bits instead of 7 really buys me that sixth instruction in a cell very often. 2023-11-30 06:57:21 ACTION is in a rather good mood as  Henry Kissinger is _dead_. 2023-11-30 06:57:21 I actually started the planning here with 32 instructions in mind, but pretty quickly decided I'd be a lot happier with 64. 2023-11-30 06:57:33 Oh he is? Wow - that's pretty big news. 2023-11-30 06:57:39 Sorry, I assumed you meant reserving 5/6/7 bits for just the ALU and not the entire instruction 2023-11-30 06:57:51 I was a little too young when Kissenger was doing his main work to develop a strong opinion about him. 2023-11-30 06:58:03 I don't know why I thought that 2023-11-30 06:58:08 No, that's the entire instruction. 2023-11-30 06:58:09 KipIngram: https://www.reuters.com/world/us/henry-kissinger-american-diplomat-nobel-winner-dead-100-2023-11-30/ 2023-11-30 06:58:51 Zarutian_iPad, Henry Kissinger was one of the greatest men of the past century 2023-11-30 06:59:35 hello-operator: ya looked at excamera J1 yes? 2023-11-30 06:59:41 Well, I think that's undeniable, but such men generally do generate opinions in both directions. 2023-11-30 06:59:57 I think it's a shame to stomp on people's graves right after they've died 2023-11-30 07:00:07 Like I was always a huge Ronald Reagan fan, but some people absolutely despise him. 2023-11-30 07:00:20 I don't think Kissinger is particularly bad compared to many politicians people wouldn't blink an eye at 2023-11-30 07:00:29 And he was quite open about his moral greyness 2023-11-30 07:00:47 rendar: I take that 'great' here means, big/influential/too-big-and-ackwardly-in-the-way 2023-11-30 07:01:08 I quite like his writing 2023-11-30 07:01:12 That's what i meant when I said it was undeniable. 2023-11-30 07:01:38 I'm explicitly not "judging,' because I've not really studied it well enough. 2023-11-30 07:02:06 great = one the smartest and most brilliant men alive, whose writings value are recognized everywhere 2023-11-30 07:02:20 Zarutian_iPad: Yup, I made my own core in VHDL based off of it with interrupts, and a few more features. 2023-11-30 07:02:31 Some of the things he got done seemed impossible beforehand. 2023-11-30 07:03:11 hello-operator: I have tinkered some with a verilog core, and this design I'm looking at now would work well in that context, I think. 2023-11-30 07:03:22 what excamera J1 does is rather interesting as TOS and NOS are fed directly into units that usually are part of an ALU 2023-11-30 07:03:49 That's such a beautifully simple way of doing it. 2023-11-30 07:04:09 The main downside of it is that you are paying the energy cost of computing everything, and then throwing most of those results away when you pick just one of them. 2023-11-30 07:04:42 But it's targeted to FPGAs, and they're power hogs anyway, so... 2023-11-30 07:04:47 Maybe that doesn't matter much. 2023-11-30 07:04:56 this means that the ALU op is already done at the time the opcode for such is being decoded 2023-11-30 07:05:05 Right. 2023-11-30 07:05:12 It's definitely fast. 2023-11-30 07:05:18 And simple. 2023-11-30 07:06:53 re energy usage, depends on how many kinds of operations you implement 2023-11-30 07:07:52 Having TOS and NOS feed you ALU is what Forth "should be," regardless of how you design that ALU. 2023-11-30 07:09:49 The code for it is quite dense, I managed to fit quite a featureful Forth in about 7KiB, the multiple instructions per cell approach would be denser I imagine 2023-11-30 07:10:19 You only need one instruction anyway, SUBLEQ :D 2023-11-30 07:11:19 depends on how much fpga logic you want to spend on getting instruction out of a cell 2023-11-30 07:14:03 Are there any open source implementations for an FPGA for a F18 like processor? I'd like to see how they differ in their implementations compared to the J1 2023-11-30 07:15:25 btw, the 16 instructions I alluded to earlier: NOP UM+ AND XOR 1LBR 1+ @ ! DUP DROP SWAP SKZ >R R> EXT EXIT 2023-11-30 07:16:28 in 16 bit system if the first three nybbles in a cell are zero then it is an instruction otherwise it is a call to that address 2023-11-30 07:19:58 Nice 2023-11-30 07:20:18 1LBR and SKZ do what now? 2023-11-30 07:20:34 1 left bit rotate ? 2023-11-30 07:20:50 1 LeftBitRotate and SKip if Zero 2023-11-30 07:20:56 That was a good guess 2023-11-30 07:21:43 Wouldn't right shift (or a rotate, I never use rotate) be more useful? 2023-11-30 07:21:52 1LBR and AND should be sufficient for any shift 2023-11-30 07:22:03 Yeah, I guess 2023-11-30 07:22:10 the former is fiendisly simple to implement 2023-11-30 07:24:00 Zarutian_iPad: so it's 000X where X is one of those 16, or XXX0 for a call? 2023-11-30 07:24:02 the 'unit' is basically the TOS register outwires shifted left once and the msb one routed all the way to the lsb position 2023-11-30 07:24:17 hello-operator: yebb 2023-11-30 07:24:49 no XXXX for a call iff none of the first three is zero 2023-11-30 07:25:04 so 1F05 works 2023-11-30 07:25:25 and the addressing is cell based not byte based 2023-11-30 07:26:18 just means the first 16 cells of the address space can not be called directly 2023-11-30 07:27:31 (thinking out loud) You could replace call with "@ >r exit" and fit four instructions per cell perhaps 2023-11-30 07:29:29 a bit of a problem: you need two bits  in the ProgramStatusWord to keep track of where in a cell you are excuting an instruction 2023-11-30 07:30:06 and how doesone then implement (LIT) too? 2023-11-30 07:32:04 I do it like : (LIT) R> DUP 1+ >R @ EXIT ; 2023-11-30 07:32:47 which is the main reason 1+ exists as an instruction 2023-11-30 07:35:58 Wouldn't that just be the same? So long as you can't directly index each instruction? 2023-11-30 07:36:00 I mainly did it so I did not need to make fpga logic to get the next cell in the instruction stream for (LIT) (BRZ) and (JMP) 2023-11-30 07:37:30 well most of the eForth I ported onto this is just calls to more primitive words 2023-11-30 07:38:36 and some words are often just three or four words long 2023-11-30 07:38:41 I do like eForth, all my Forth ports to (various) processors are eForth based. What's the different between EXT and EXIT as well? 2023-11-30 07:39:08 EXT is my extension escape hatch 2023-11-30 07:39:51 takes an order code off the TOS and does that 2023-11-30 07:40:09 Ah okay. Also NOP could become DUP DROP 2023-11-30 07:41:48 some places I wanted to have a NOP hole for temp patching a word 2023-11-30 07:43:08 but yeah eForth is rather nicely portable but it lacks CREATE DOES> which I patched in later 2023-11-30 07:43:56 well it has the CREATE in similiar form but not for the DOES> mechanism 2023-11-30 07:44:12 Does it? I think all the eForth systems I looked at had it? It might be I was looking at later versions and not the original 2023-11-30 07:44:35 I honestly do not remember 2023-11-30 07:44:57 got a link to the version you used? 2023-11-30 07:46:58 I used two, https://github.com/samawati/j1eforth/blob/master/j1.4th and one of C.H Ting's books as well (although I forgot which one, it targetted a DOS) 2023-11-30 07:48:14 I used the C.H Ting one that targetted msdos and used microsoft macro assembler 2023-11-30 07:49:00 We probably used the same one, I can't remember it having CREATE...DOES>, I also can't remember it not having it :D 2023-11-30 07:49:28 probably added in the j1 version 2023-11-30 07:50:30 I have not used it much as I wrote an object system with garbage collection instead 2023-11-30 07:51:02 (completely class less btw) 2023-11-30 07:52:30 why? because I want to do composional graphics, gui widgets like theamed tk from tcl/tk, and such over VNC 2023-11-30 07:53:10 but not the last two on a 16 bit cell machine but 32 bit one 2023-11-30 07:54:28 the gfx one will have a rather interesting aproach 2023-11-30 07:55:39 I have defined four kinds of 'interfaces' 2023-11-30 07:56:16 I quite like TCL, I extended a small TCL like interpreter called picol by Antirez. I miss Tk (and Visual Studio) when attempting to make anything for phones or the web 2023-11-30 07:56:17 one for pixmaps, bitmaps, QuickDraw style masks 2023-11-30 07:57:05 oh yes I quite like tcl 2023-11-30 07:57:12 I probably shouldn't be saying this on Forth, but if I had to deal with anything that required it's own object system and garbage collection (or anything string heavy), I'd avoid Forth. Good luck though! 2023-11-30 07:57:31 Don't worry we're harsh on Forth in ##forth 2023-11-30 07:57:42 I wouldn't either 2023-11-30 07:58:16 well, the object system is quite forth inspired 2023-11-30 07:59:10 the objects live in a big circular memory buffer 2023-11-30 07:59:56 and have four parts each: header, xt, refs, and data 2023-11-30 08:00:22 refs are the references the object holds to other objects 2023-11-30 08:01:51 xt points to an method invocation handler of the object. A andler thatis bit the thing that comes after DOES> 2023-11-30 08:03:10 re the gfx, the second interface is for palettes and tilesets 2023-11-30 08:04:30 the first interface has four methods: getWidth, getHeight, getPixel, putPixel 2023-11-30 08:06:00 by using delegation I can make composers, adapters, etc that flip a pixmap/bitmap/mask around an axis 2023-11-30 08:06:45 rotate them in 90˚ increments 2023-11-30 08:06:59 shear or slant them 2023-11-30 08:07:56 rotate them in sub 90˚ incrementsusing the three sheers method 2023-11-30 08:08:56 do lerp based colour changing or other colour changing filters 2023-11-30 08:09:27 apply gfx 'kernels' 2023-11-30 08:10:02 all without having to spend too much extra memory 2023-11-30 08:10:17 how? by using delegation 2023-11-30 08:13:01 take for instance a simple masked composition. The 'pixmap' in that case as reference to a pixmap 0, pixmap 1, and a mask 2023-11-30 08:14:10 veltas: XD, I like the quote "Forth is Sudoku for programmers", which describes my relationship with the language. 2023-11-30 08:15:31 then when a getPixel for a particular coordnate gets invoked on it, it will first look at that coordnate in the mask to see if it is zero or one and depending on that do a delegated invocation to either pixmap 0 or 1 respectively 2023-11-30 08:17:50 this means such a mask composer takes five cells of object memory space 2023-11-30 08:18:37 (one for header, one for the xt, and three for the three references) 2023-11-30 08:36:28 hello-operator: That is kind of how Forth programming feels. 2023-11-30 08:36:44 It's very satisfying when a set of things "come together" oh so nicely. 2023-11-30 08:42:07 Hey, do any of you guys experience "hypnogagia" as you're falling asleep? This is while you're still conscious, but you're relaxed and "on your way" to sleep, with your eyes closed, and you start to notice patterns of color appearing in your vision. About the only thing I can say about is that it's 'ever changing - sort of just a mild chaos of color flowing around. 2023-11-30 08:42:46 all glory to the hypnogagia toad 2023-11-30 08:42:58 nope, but I have sometimes experienced the falling sensation 2023-11-30 08:43:18 A common pattern for me is for a dark dot to appear around the center of my vision, and it expands until it pushes everything out, then gradually becomes less dark and more like the normal eye-closed state. Then that repeats. 2023-11-30 08:43:29 thrig: out of imgshack free bandwidth alottment again? 2023-11-30 08:43:47 When I get a little deeper into it the inside of that circle can sometimes take on a sky-blue color. 2023-11-30 08:43:52 probably more that imgshack doesn't work with w3m? 2023-11-30 08:44:12 Oh, I hate that falling sensation - I've had that too. 2023-11-30 08:44:27 And on very rare occasions - only a few times ever - I've experienced audible hypnogagia. 2023-11-30 08:44:40 Just some random sound that clearly doesn't belong in my surroundings. 2023-11-30 08:44:50 just a reference to where "all glory to the hypnotoad" meme comes from 2023-11-30 08:45:00 I've always assumed this is all related to what happens when we dream, only we're not fully "out" yet so we're aware of it. 2023-11-30 08:45:31 And it's not nearly so well-formed as when we're fully dreaming. 2023-11-30 08:47:00 I've never had what I'd call a real lucid dream, but again on very rare occasons this hypnogagia stuff will seem to flash a brief image of something real, like a mountain landscape or a city street or something like that. 2023-11-30 08:47:08 Only for a beat - like a quarter second or something. 2023-11-30 08:48:00 you probably have had a lucid dream but no memory of it 2023-11-30 08:48:28 just as many folks dream but have no memory of it 2023-11-30 08:49:58 I guess that could be, but it leaves me in the same boat. :-) 2023-11-30 08:50:12 I've always been fascinated by the lucid dreaming concept and wish I were better at it. 2023-11-30 08:51:27 I have, a time or two, had a realization that I'm dreaming, at which point I wake up. So I can't say for sure that I wasn't already waking up and it was more of a realization that I was "just dreaming a second ago." 2023-11-30 08:52:21 I also have the impression that I don't visualize as well as some people do - my wife claims that when she visualizes something it's almost as good as looking at it. It's a hard thing to talk about, because it's hard to know if we're thinking of the same thing. 2023-11-30 08:52:41 I can "imagine' things like physical structures, and reason about them, but it's in no way like "seeing them" in my mind. 2023-11-30 08:54:53 I think imaginations can work diffrently depending on what you are doing it for 2023-11-30 08:55:18 Yeah. I don't mean to short-change myself; that "reasoning" I just mentioned can take me pretty far. 2023-11-30 08:56:08 for instance imagining an image composition of a painting is diffrent from doing what some cad heads I know can do 2023-11-30 08:57:20 But I never feel like I'm "seeing" anything. It's just a mental model. 2023-11-30 08:58:24 to "see" something like that I do need a blank canvas or such in front of me 2023-11-30 08:58:47 then I imagine the image onto the canvas 2023-11-30 08:58:52 I was always quite good at imaging digital circuits up to some reasonable size. I could follow signals around and so on. 2023-11-30 08:58:59 imagining 2023-11-30 08:59:31 Anyway, it's all something I'd like to see if I could develop/improve in some way. 2023-11-30 09:01:12 one excercise I learned in a hobby drawing school is to take a blank postit note, and 'extrude' it into a cube, then changing the colour of the faces 2023-11-30 09:01:39 then start carving out of it minecraft chisels and bits style 2023-11-30 09:02:11 that is removing mini cubes from it 2023-11-30 09:02:56 and still keeping track of the face colours 2023-11-30 09:05:49 then there is machinist excercises of how you get a particular shape using a mill and a lathe 2023-11-30 09:08:03 recently I been thinking about rotation via the three sheers method and Atari Quadrascan 2023-11-30 09:08:36 the gfx vector processor for vector displays 2023-11-30 09:10:05 a sheer can be tought of as wonky translation, like lets say for every twenty x units go up three y units 2023-11-30 09:11:35 and you could do such calculations quite quickly in hardware I suspect 2023-11-30 09:13:00 other sheers are same-ish 2023-11-30 09:28:36 That's "shear." "Sheer" has a different meaning, as in "sheer luck.' 2023-11-30 09:29:04 Like "pure luck" or "nothing but luck." 2023-11-30 09:29:16 no need to feel sheapish about spelling errors 2023-11-30 09:29:19 you get which way had shorn that sheep 2023-11-30 09:29:21 Gotta love homonyms. 2023-11-30 09:29:23 :-) 2023-11-30 09:30:00 like the Chinese GrassMudHorse ? 2023-11-30 10:45:00 any experiences with polyforth? 2023-11-30 10:45:59 I've read some of the manual but not used it 2023-11-30 10:46:24 I cannot figure out if there is a port of it for linux/unix. 2023-11-30 10:46:34 or, is it only x86 windows 2023-11-30 10:46:44 Honestly I get impression it's only x86 DOS 2023-11-30 10:46:54 If there was one for Windows that's news to me 2023-11-30 10:47:15 It's definitely more of an OS than a 'hosted' Forth 2023-11-30 10:47:58 Well I wouldn't even say x86 DOS, more like a boot disk for x86 PC's 2023-11-30 10:48:37 ok, thanks. 2023-11-30 10:49:08 https://www.forth.com/resources/forth-programming-language/ 2023-11-30 10:49:16 According to this they moved to DOS later on 2023-11-30 11:34:02 It's pretty clear to me what an "os" should offer on a lot of fronts. Memory management, process scheduling, etc. Read and write the disk. But then in other areas I'm not as sure. Exactly what the primitives on offer should be for networking, for example. 2023-11-30 11:35:16 I imagine there's a whole hierarchy of possibilities, there, similar to with storage - storage could offer raw block read/block write, it could offer an extra level of abstraction like Forth's block buffers which get managed for you, or it could offer file system access, or whatever. 2023-11-30 11:35:28 I expect the network stuff has a similar tree of "levels." 2023-11-30 11:36:13 I don't think I ever learned much about "networking with DOS." 2023-11-30 11:36:36 back when I was using DOS I used a modem. 2023-11-30 11:37:21 When I read up on plan9 I got the impression that it basically hid networking inside the file system. 2023-11-30 11:37:31 You could work with remote files more or less the same way you did local files. 2023-11-30 11:39:36 KipIngram: yes, the remote files are bound as local files. 2023-11-30 11:39:59 but, the catch is that if it has to go throug the internet, latency makes it a pita. 2023-11-30 11:41:18 Yeah, not surprising. 2023-11-30 11:41:34 Does "real" networking somehow improve that? It still has to go through the same links. 2023-11-30 11:42:22 BTW, I saw a video a day or two ago touting super-improved latencies on 5G. Like that was almost the major improvement it offers. 2023-11-30 11:42:39 certainly it has higher bandwidth too, but the latency change looked like a game-changer. 2023-11-30 11:44:22 Anyway, my point is mostly that if I were writing a Forth OS, I'd come to the networking part and wouldn't really know the smartest way to proceed. 2023-11-30 11:44:38 Whereas I think on most other fronts I'd be able to pick at least a reasonable path. 2023-11-30 11:44:59 I guess that's telling me what I ought to learn more about. 2023-11-30 11:47:13 This is a nice looking phone: 2023-11-30 11:47:15 https://www.motorola.com/us/smartphones-moto-g-power-5g/p?skuId=880 2023-11-30 11:47:36 Super large batter - supposedly it'll stand by for three days on a charge. 2023-11-30 11:47:55 I'm a big battery life fan. 2023-11-30 11:51:12 My notebook with WiFi connection to my AT&T UVerse just turned in 338 Mbit/sec down, 183 Mbit/sec up. 6 msec ping latency. 2023-11-30 11:51:31 I've been pretty happy with UVerse. 2023-11-30 11:52:00 We've had it for nearly ten years now, and it's only gone down 3-4 times in that period. 2023-11-30 11:52:11 Once it was for a couple of days, though, and that was kind of painful. 2023-11-30 11:52:37 nope not an addict can quit the internet anytime I want 2023-11-30 11:53:54 lmao 2023-11-30 11:54:04 Not me - I am definitely an addict. 2023-11-30 11:54:22 I could live a very simple life, so long as I have good internet. 2023-11-30 12:06:24 Not the worst addiction to have. 2023-11-30 12:10:02 Probably could vary a lot depending on how one uses it. :-) 2023-11-30 13:03:05 KipIngram: Two big things OS's do is divying up resources whether physical like a hardware device or logical like a TCP socket 2023-11-30 13:03:16 And the right way to do this really depends on what sort of applications you want to support 2023-11-30 13:03:47 In my opinion even mainstream OS's like Linux don't actually have a totally 'general' way of doing this, a lot if just incremental creep of these features over time 2023-11-30 13:04:23 The Linux stack likes doing a lot of this with the filesystem as an interface 2023-11-30 13:04:34 But it's not the only interface 2023-11-30 13:04:52 KipIngram: Sorry I said "two big things", the other is sharing between different users 2023-11-30 13:05:04 Which means security, access control, sharing CPU time etc 2023-11-30 13:05:47 PolyForth supported multiple users, not sure how the security was 2023-11-30 13:05:55 Might have been more of honour-based security 2023-11-30 13:06:34 Sharing CPU time was mostly cooperative although I don't doubt they had some preemptive guards to stop a crashed program(?) 2023-11-30 13:07:05 unix often still uses Kligon-based security 2023-11-30 13:26:48 Klingon-based eh? 2023-11-30 13:26:50 DIE WELL 2023-11-30 13:29:43 instead of create does>, i plan to implement a create did>. that way it will be faster because the work will already have been done before the word is executed 2023-11-30 13:30:51 granted various measures have been bolted on to unix, but that's different from a verified OS that signs where the bits come from and so forth 2023-11-30 13:49:33 veltas: I've got little interest in multi-user support, though i certainly want multi- thread/process support. 2023-11-30 13:49:51 So some of those sharing aspects will be relevant; others maybe not. 2023-11-30 13:50:34 And yeah, I'm a little torn about Linux's "pseudo files." In some ways i quite like the approach, but I suspect there are inconvenient aspects to it too. 2023-11-30 13:50:50 I'm rather fond of the "micro-kernel" concept. 2023-11-30 13:58:58 KipIngram: "pseudo files"? 2023-11-30 13:59:13 "Files" like /proc/* 2023-11-30 13:59:49 If you read them, the system scans various aspects of the system and creates a file layout for you; if you write them it exerts influence over the system. They're not really files on disk. 2023-11-30 13:59:55 KipIngram: yeah 2023-11-30 14:00:02 that's almost as old as I am though 2023-11-30 14:00:05 It's the Linux way of interacting with the system resources. 2023-11-30 14:00:07 Hmm I want to parse-name and store in a constant 2023-11-30 14:00:11 s/Linux/Unix/ 2023-11-30 14:00:27 Yeah; I was just responding to the stuff veltas said. 2023-11-30 14:00:36 I mean, the pseudofile thing works fine. 2023-11-30 14:00:42 nothing terribly "wrong" with it. 2023-11-30 14:00:53 And it is an easy way of thinking about the whole setup. 2023-11-30 14:00:58 yeah 2023-11-30 14:01:25 it's an easy way to inject text and get it back from things that aren't strictly speaking files but may be considered a "funny serial port" 2023-11-30 14:01:43 Most of it I've not worked much with; mostly I've just dealt with /sys/block/???/queue. 2023-11-30 14:02:13 There are various settings there I've had to tune to get best performance out of our storage products. 2023-11-30 14:02:45 back when I used to use the Linux driver; these days I use a replacement stack from Intel called spdk. 2023-11-30 14:03:47 ACTION vaguely recalls doing some work with microkernels years back 2023-11-30 14:04:32 I like microkernels as a response to os feature creep. 2023-11-30 14:04:39 / bloat 2023-11-30 14:06:16 I had a RetroForth that ran under L4Ka::Pistachio; this was back in 2005 2023-11-30 14:08:46 Uh which char does `count` stop on? 2023-11-30 14:08:59 I don't think I really did much in terms of leveraging the microkernel aspects though 2023-11-30 14:11:41 string, "puts down string as cstring" 2023-11-30 14:11:54 olle: count normally would read the first byte in a string as the length, then return this & a pointer to the string's actual first character 2023-11-30 14:11:55 "puts down" what xD 2023-11-30 14:12:15 crc: k 2023-11-30 14:12:38 olle: count expects an address on the stack - all it does fetch the byte from that address and increments the address. 2023-11-30 14:12:39 c" hello" -> 5 c, $h c, $e c, $l c, $l c, $o c, 2023-11-30 14:13:04 : count ( addr -- addr+1 byte[addr]) ... ; 2023-11-30 14:13:08 If the 5 is at address 123, count would return 124 5 2023-11-30 14:13:39 count + will nicely jump you over a string. 2023-11-30 14:13:40 Aha 2023-11-30 14:14:42 It leaves you ready to call TYPE on the string. 2023-11-30 14:15:14 Right 2023-11-30 14:15:21 And what about this "puts down" for string, ? 2023-11-30 14:15:32 puts down? 2023-11-30 14:15:39 throws down 2023-11-30 14:15:40 That's what the gforth doc says 2023-11-30 14:15:52 I have no idea what they mean by that. 2023-11-30 14:16:00 dup c, mem, 2023-11-30 14:16:06 writes into the dictionary memory 2023-11-30 14:16:09 Oh, I'm not familiar with that word. 2023-11-30 14:16:19 throws down, atomic leg drop, etc 2023-11-30 14:16:20 string, copies a string to here 2023-11-30 14:16:25 But yes - i'd expect it to move the counted string into the dictionary starting at first available byte. 2023-11-30 14:16:42 puts out 2023-11-30 14:17:05 A lot of systems put words there to start with when the parse them, or at least almost, so that if a word turns out to be defined the string is already in the right place. 2023-11-30 14:17:14 that does make certain assumptions about your system layout, though. 2023-11-30 14:17:44 I.e., WORD will put the word in the right spot in case it becomes defined. 2023-11-30 14:17:57 OK so I can use parse-name to get a string, convert it to a counted string and then save it in a constant? 2023-11-30 14:19:13 I don't know GForth's details on that; in my system it's called WORD and in my current system it will put it in the right spot right off the bat. 2023-11-30 14:19:21 I only need to fill in the other header info around it. 2023-11-30 14:20:03 KipIngram: i did that at first, but don't you find that you trip all over yourself testing in interpret mode? 2023-11-30 14:20:26 e.g., WORD foo $. ( or whatever the string print word is called ) 2023-11-30 14:20:47 the interpreter parses $. and clobbers your "foo" 2023-11-30 14:20:53 I just don't do that, but yes, that looks like it could be problematic. 2023-11-30 14:21:05 makes it tricky to test as you're writing these words, imo 2023-11-30 14:21:15 Yeah, it would. 2023-11-30 14:21:51 but I rarely use WORD directly; I'm more apt to call CREATE. 2023-11-30 14:22:19 true, but i didn't have a working create at the time :) 2023-11-30 14:22:47 This time I'm not sure I'll do it that way, just because of how I'm planning to organize memory. 2023-11-30 14:23:28 I'm still planning to do that ring buffer for transient info; I'll probably stick the word in there as a counted string and leave its address on the stack. 2023-11-30 14:23:45 That is, just like I would handle a quoted string. 2023-11-30 14:23:47 `50 allot` changes `here`? 2023-11-30 14:23:52 gforth docs sux man 2023-11-30 14:23:53 Yes. 2023-11-30 14:23:55 thanks KipIngram 2023-11-30 14:24:00 : here dp @ ; 2023-11-30 14:24:08 : allot dp +! ; 2023-11-30 14:24:21 cool people call dp .here 2023-11-30 14:24:26 :-) 2023-11-30 14:24:46 "terminal*:92:12: warning: place is obsolete" >< 2023-11-30 14:24:47 grrr 2023-11-30 14:25:58 zelgomer: If I have word leave the word in my 'transient space' it will resolve the problems with interactive testing. 2023-11-30 14:26:53 I want to naturally support quoted strings, so I'll wind up with "string" and bl word string doing the same thing. 2023-11-30 14:27:42 yeah i guess i could have handled it with just a word to call "word" and then advance the dp. oops, oh well 2023-11-30 14:28:30 i wound up doing the circular scratch pad thing we were talking about the other day, anyway, so i just use that 2023-11-30 14:28:35 hm why is `place` obsolete? 2023-11-30 14:29:49 what does place do? 2023-11-30 14:30:22 zelgomer: yeah, I'm kind of fond of the circular scratch pad idea. 2023-11-30 14:30:54 Initially it'll be pretty much only for strings, but later when I start to get to more advanced stuff that involves types I'll use it for all kind of things. 2023-11-30 14:31:23 I don't really want to try to stuff types into Forth right out of the box, but I feel pretty strongly about supporting string literals. 2023-11-30 14:31:41 And the main missing piece for that is "where the hell do I put iT/' 2023-11-30 14:31:47 it?" 2023-11-30 14:32:12 The circular buffer feels like the most light-weight way of handling that. 2023-11-30 14:32:33 And it will obviate PAD, or at least PAD will use it. 2023-11-30 14:32:51 i've been thinking about it (or trying to rationalize it). i think it is effectively the same as a stack (as in the C sense), except you don't have to clean up, and overflows may clobber data belonging to a much higher stack frame instead of segfaulting. 2023-11-30 14:33:15 So once a parsed word is in that buffer, then yes - I'll have a word like string, 2023-11-30 14:33:21 olle: it's not an ANS or Forth20xx standard word 2023-11-30 14:33:22 Except I'm almost certain to call it s, 2023-11-30 14:33:52 https://forth-standard.org/proposals/place-place 2023-11-30 14:33:55 KipIngram: in mine, "pad" returns the current circular position (so you can use it for leaf words that don't need to reserve space), and "buffer" takes an integer to advance the pointer and returns the address. so in other words, : pad 0 buffer ; 2023-11-30 14:33:55 Not yet or not ever? 2023-11-30 14:34:02 Anyway, gotta go, thanks guys 2023-11-30 14:34:19 Ah, that's pretty nice. 2023-11-30 14:34:26 Later, olle. Stay safe. 2023-11-30 14:34:59 i may have actually implemented buffer in terms of pad, though, idr 2023-11-30 14:35:52 olle: as far as I'm aware that RFC is still under discussion 2023-11-30 17:33:57 I think I'm going to support two different ways of closing stack frames this time. : } ( n --) ... ; is the original way - it restores the stack pointer to the value it had when the frame was opened and then drops n items. The new one will be }_ and it will do the same thing, except additionally the stack will have the result computed by the frame (the TOS value just before the n parameter is entered. 2023-11-30 17:34:17 That will let me send a result out of a frame more conveniently than I've done in the past. 2023-11-30 17:34:39 Previously if I wanted to do that I had to make a place for it on the stack before I pushed the inbound parameters and then I had to store the result there explicitly. 2023-11-30 17:35:38 Also, this will let me avoid needing "regular stack frame" { ... } and "exception stack frame" {| ... |}. The one style will cover both applications. 2023-11-30 18:01:09 KipIngram, review the gforth stack-frame words. 2023-11-30 18:02:06 What are they called? 2023-11-30 18:02:50 stack frame words ;-) 2023-11-30 18:03:15 The main reason I introduced the first sort of stack frame was to allow me to index into the stack in a nicely controlled way. But it wound up having a fringe benefit even if I don't need to do that - it guarantees getting the stack clean, even if I have multiple paths that leave differeing amounts of stuff on the stack. 2023-11-30 18:04:02 I don't get any easy response when I Google gforth stack frame words. 2023-11-30 18:04:21 The second type was to let me "leap out" of a deep nesting of calls. 2023-11-30 18:05:15 Like in FIND - I'm way down in a triply nested loop when I achieve 'success' and find the word I'm looking for. {| and |} give me a way to jump all the way back out in one go, which makes it so those words in the middle don't have to know how to deal with "success." 2023-11-30 18:05:39 They're just written as though the search will fail every time. 2023-11-30 18:06:07 KipIngram, https://dl.acm.org/doi/pdf/10.1145/378911.378917 best link so far 2023-11-30 18:06:26 Thanks. 2023-11-30 18:07:07 https://dl.forth.com:8443/jfar/vol3/no1/article3.pdf 2023-11-30 18:07:20 That looks slightly similar to mine, except I save the old frame pointer on the return stack rather than the data stack. 2023-11-30 18:08:03 I guess some things there are only so many ways to do. 2023-11-30 18:08:29 yeah, yer working in one or another space - even if you allocate a THRID space (like float) 2023-11-30 18:08:37 third, two 2023-11-30 18:08:50 I originally tried to do without a frame pointer and just index off of the stack pointer, but that gets confusing because it's constantly changing, which makes the index of the various items change too. 2023-11-30 18:09:18 Much easier to keep up with what's going on if you have a fixed reference frame. 2023-11-30 18:09:22 I am fine with forth swap-shit 75% or more of the time, but the stackframe stuff is sometimes about the ONLY path to sanity 2023-11-30 18:10:20 My worst situation was QUERY. EXPECT already had several items on the stack that I needed to get at more or less at the same time, and QUERY made it worse by adding in a command history list to keep up with too. 2023-11-30 18:10:31 (and yeah, I dislike dribbling variables around when a frame makes more sense) 2023-11-30 18:10:40 hah! yeah 2023-11-30 18:10:46 At some points in there there were six things to juggle around, and the normal noodling words just don't know what to do with that. 2023-11-30 18:11:05 right, that's when ARG1 ARG2... make sense 2023-11-30 18:11:45 We had a talk here one day about turning the whole system inside out, with a GUI style event loop, and that would altogether change how the text input of the system worked - it did seem like that would clean things up quite a lot. 2023-11-30 18:11:50 KipIngram, I suspect the best approach, btw, is a small stackframe voc, too. Keeps it the hell out of the way, otherwise 2023-11-30 18:11:59 Because in the context of a GUI, text fields on screen need to have some global state associated with them. 2023-11-30 18:12:07 So the amount of stuff to keep on stack was reduced. 2023-11-30 18:12:16 But I haven't actually done a system that way yet. 2023-11-30 18:12:37 sounds moot: what happens when you "redirect" source or sink? 2023-11-30 18:12:58 Don't know - haven't done that yet either. But it's part of what I want in this next one. 2023-11-30 18:13:05 ok 2023-11-30 18:13:29 well, then yer in need of handles/streams for i/o. - rather than raw bit/byte 2023-11-30 18:13:43 Yes - streams/devices. 2023-11-30 18:13:54 stdin/stdout/stderr. 2023-11-30 18:14:37 "The system" will just process stdin to stdout, but that might wind up coming from / going to all kinds of places. 2023-11-30 18:14:45 Mind you, C (and nix) always pissed me off: certain things you NEED to do are only available on the handle/FILE* you ain't using. 2023-11-30 18:15:24 I never really accepoted that idiocy: since the underlying code HAD to be the same 2023-11-30 18:16:18 (and then there are the linux raw syscalls that "are not portable" - and remain necessary. 2023-11-30 18:16:31 We were just talking about that (the "everything is a file" thing in Linux) earlier today. 2023-11-30 18:17:07 Yeah, try porting syscalls between MacOS and Linux. That's kind of a nightmare. 2023-11-30 18:17:40 Especially if you're not using C, because you need those magic numbers in the C .h files. 2023-11-30 18:29:54 I always felt that the integer ID (handle) was great for portability, but then they hid shit inside and in-support-of FILE* - and it just pissed me off.. Almost nothing user-side needs to see inside a FILE struct, so just write the goddamned operators and be done, sheesh 2023-11-30 18:30:39 ..andother linux syscall/irritation was the "char ready" or "bytes available" shit. 2023-11-30 18:31:21 Yeah, I think seek, read, write mostly covers your bases. 2023-11-30 18:38:03 Well, and open/close. 2023-11-30 18:46:08 KipIngram, you need MORE - check those syscalls for the ready/available stuff, for the crap we need to convert handle to FILE* and FILE* to handle to do.. It's just damned silly. 2023-11-30 19:00:02 Well, one thing I want is to be able to start a disk operation in a non-blocking way, and then have a follow-on call I make later that will block if the data still isn't ready. That way I at least have a chance to do other work while the disk is cranking. 2023-11-30 21:44:02 Man, don't y'all ever shut up? 2023-11-30 21:56:14 no 2023-11-30 22:08:11 oh, wow - something other than join/leave was listed.. opps. Missed it. 2023-11-30 22:11:49 PoppaVic: feel free to monologue 2023-11-30 22:11:59 someone may comment after they wake up 2023-11-30 22:12:54 Nah.. That's as bad as Standup.. hell, next someone will do the Vagina Moaninglog and then everyone will head-explode ala' Kingsmen 2023-11-30 22:13:25 ..Back to back to Falling Skies 2023-11-30 22:55:53 Kingsman was good. 2023-11-30 22:56:14 I went in not expecting too much and was pleasantly surprised. 2023-11-30 22:56:29 Manners. Maketh. The man. :-) 2023-11-30 22:59:09 yup.. and 'splodin' heads ;-P 2023-11-30 22:59:55 ..in fruity-rainbow colors ;-) 2023-11-30 23:03:44 f redcoats