2022-04-14 00:35:32 KipIngram: what do you mean by "DO the process control"? submit the jobs, etc? 2022-04-14 03:41:11 If by "process control" you mean calling fork(), execve(), pipe(), etc then it does do that 2022-04-14 03:41:41 If you mean implementing those functions, then no 2022-04-14 03:43:47 For FORTH this badboy would be more appropriate https://pubs.opengroup.org/onlinepubs/007904975/functions/posix_spawn.html 2022-04-14 07:40:10 joe9: Yeah, I mean that the kernel is actual where all the management gets done. The shell just gives us an interface and calls on the kernel as needed. At least, that's my perception. 2022-04-14 07:40:22 Here's a page that discusses all the process management system calls: 2022-04-14 07:40:24 http://linasm.sourceforge.net/docs/syscalls/process.php 2022-04-14 07:41:02 What you'd have to do at the shell level is come up with some kind of suitable Forth syntax for *specifying your desires*, so that it could then go figure out what syscalls to make. 2022-04-14 07:41:33 Something like 'foo | bar > bam' in bash. 2022-04-14 07:42:06 Or like how you can include a & at the end to have a line sent to background and so on. 2022-04-14 08:38:29 gforth has `system` which does the same as C's system(), I just wrap that with a word called $ and send the rest of the line as the input string 2022-04-14 08:38:56 Since that goes to sh I wouldn't be surprised if you can do piping/redirection already with that 2022-04-14 08:39:39 I can't think of a nice way of using forth syntax mechanisms to do shell input 2022-04-14 08:56:32 Me either - and I've tried to think on it some. 2022-04-14 08:57:54 Forth's model and the way it uses the stack just is a pretty "tight" arrangement. 2022-04-14 08:59:26 I was noticing similar things while looking at APL yesterday. APL processes "lines," and they're independent of one another, whereas Forth views the input stream as one continuous thing. 2022-04-14 09:00:46 And also there is no "default place" things go in APL - you can capture a result in a named variable, but if you don't it's gone. 2022-04-14 09:01:54 I have some vague idea that in Forth we'd need to add a layer between the process and the console, so that you could instruct a process to take its input stream from somewhere else and/or send its output somewhere else. 2022-04-14 09:02:17 Might be as simple as having "process variables" that KEY and EMIT vector through. 2022-04-14 09:02:38 We kind of do that with LOAD and BLK. 2022-04-14 09:02:51 But you'd need a provision for othe output as well. 2022-04-14 09:10:19 One noteworthy difference between Forth and APL is how they treat just a string of typed numbers, like 1 2 3 4 5. 2022-04-14 09:10:40 In Forth of course that's five separate stack entries; in APL it's a five-element one-dimensional array. 2022-04-14 09:11:34 So if you did that on two consecutive lines, in Forth the result is the same whether it's one line or two, but in APL you get two separate arrays that way - that's what I meant by APL attaching signficance to the "line." 2022-04-14 09:12:48 I do like the way you can type ⍳10, for example, in APL - that's equivalent to typing 1 2 ... 10 2022-04-14 09:13:32 Well, wait - there is a global variable that sets your starting index - if that's set to 1 then that gives you 1-10. If it's set to 0 it gives you 0-9. 2022-04-14 09:13:44 So that is a bit of a wart; it's like BASE all over again. 2022-04-14 09:15:03 It's interesting to note, though, that that token, ⍳10, isn't a literal - it's a function - ⍳ - operating on an operand, 10. 2022-04-14 09:15:53 The arithmetic rules are... unusual, but apparently Iverson set out to "improve the consistency" of the notation over our usual arithmetic rules. No precedence, for one thing - it's strictly right to left. 2022-04-14 09:16:56 I confess I've felt temptation at times to "adjust" Forth's "everything is space separated" rule. So far I've always shied away from it, but I've "thought about it." 2022-04-14 09:17:23 All those weird symbols - they're always stand alone parse tokens. 2022-04-14 09:18:45 I still find that idea I mentioned a few days ago - of being able to specify a string full of "delimiters" that would be treated as separate tokens even if they weren't space separated, tempting. That was when we were discussing parsing JSON. 2022-04-14 09:19:20 It wouldn't come out of the box that way - but you could activate that mechanism if you wanted it. Just seems like that opens the door to more flexibility. 2022-04-14 09:19:50 But it is another global variable to manage. 2022-04-14 09:21:55 Maybe we could "corral" all such things in a "state record" and have a mechanism for pushing and popping it. So you could push it, make any changes you wanted (to BASE, to DELIMITERS, to anything else it included) and then restore the whole thing when done. Instead of having a laundry list of separate things to handle manually, 2022-04-14 09:22:03 Quad IO is abandoned outside of APL 2022-04-14 09:22:29 Quad IO? 2022-04-14 09:22:43 quad is the name for the box 2022-04-14 09:22:48 IO is the index origin variable 2022-04-14 09:22:58 > All those weird symbols - they're always stand alone parse tokens. 2022-04-14 09:23:00 Ah. 2022-04-14 09:23:02 I wish! 2022-04-14 09:23:12 Sadly, there is an exception 2022-04-14 09:23:22 Well, I'm new - I probably should avoid making statements like that. :-) 2022-04-14 09:23:28 ∘. 2022-04-14 09:23:34 this is the 'outer product' 2022-04-14 09:23:49 So, if BLK and >IN were included in that "config record" then that would simplify LOAD a little. 2022-04-14 09:24:05 That's another place where we manually save a global state, change it, restore it. 2022-04-14 09:24:06 it's an operator which takes one function argument 2022-04-14 09:24:14 .....on the right 2022-04-14 09:24:27 whereas all other operators with one argument take it on the left 2022-04-14 09:24:47 ! also takes it on the right. 2022-04-14 09:25:29 But I guess my point was that !5 for example isn't "one token." It's a ! with an operand. 2022-04-14 09:25:41 I think those would be separately parsed. 2022-04-14 09:26:10 And sure, it has to HAVE an argument. 2022-04-14 09:27:23 ! isn't an operator 2022-04-14 09:27:24 its a function 2022-04-14 09:27:35 Oh, you are right. Sorry. 2022-04-14 09:27:36 i mean stuff like / in +/ 2022-04-14 09:27:39 I actually "knew" that. 2022-04-14 09:27:40 ^^ 2022-04-14 09:27:47 this is why i prefer the J/K terms 2022-04-14 09:27:55 noun, verb, adverb 2022-04-14 09:27:59 1 2 3 <- this is a noun 2022-04-14 09:28:12 Yes. Though function and operator are being used in their "math" sense. 2022-04-14 09:28:32 yea, fair 2022-04-14 09:28:34 I kind of like the grammar terms too. 2022-04-14 09:28:50 it also allows you to reason about first class functions 2022-04-14 09:28:50 which K has 2022-04-14 09:29:05 verbs take nouns as parameters 2022-04-14 09:29:11 verbs can't take verbs 2022-04-14 09:29:19 i have been golfing on my sectorforth and saved a few bytes :-) 2022-04-14 09:29:27 so, to support first class functions, you need some way to turn verbs into nouns 2022-04-14 09:29:30 which APL doesn't have 2022-04-14 09:29:34 but K does! 2022-04-14 09:29:45 kip, have you discovered trains yet? 2022-04-14 09:29:53 apl doesn't need functions... you should do everything in one line :-) 2022-04-14 09:30:05 ? 2022-04-14 09:30:11 APL does need functions 2022-04-14 09:30:22 everything is a function 2022-04-14 09:30:27 hehehe i was joking :-) 2022-04-14 09:30:38 if you mean user defined functions, you still need those 2022-04-14 09:30:50 every APL programmer i know carries around a little toolkit with them 2022-04-14 09:31:03 apl is so terse you can do heaps in one line :-) 2022-04-14 09:31:13 typically consisting of the Under combinator, and sane indexing 2022-04-14 09:31:13 yea 2022-04-14 09:34:03 if you're thinking of parsing APL, it's... very hard 2022-04-14 09:34:12 it needs to be done while you interpret the code 2022-04-14 09:34:28 so traditional parsing approaches dont apply 2022-04-14 09:50:41 eris: What are APL "operators" called in J/K? 2022-04-14 09:50:54 Oh - adverbs? 2022-04-14 09:50:59 And they take verbs? 2022-04-14 09:51:51 No - for me trains are either big things that run on big tracks or little things in an old man's garage that run on little tracks. :-) 2022-04-14 09:57:04 eris: This? https://help.dyalog.com/14.1/Content/Language/Introduction/Trains.htm 2022-04-14 09:57:41 I'm still mostly just familiarizing myself with how various functions differ in unary and binary usage and so on. 2022-04-14 09:58:26 Like ⌈ and ⌊ - apparently when they're unary they're number theory "ceiling" and "floor," but when they're acting on a group of values they're max() and min(). 2022-04-14 09:58:37 (i.e., keep fractional parts). 2022-04-14 09:59:29 And I also am thinking that applies function to each element of array, whereas / applies the function to "the array," as a single entity. 2022-04-14 09:59:54 And in that latter case you get the "multi argument" effect. 2022-04-14 10:00:08 I'm just experimenting and trying to figure it all out right now. 2022-04-14 10:01:47 Not sure yet how I really feel about this business of an item's "action" changing so dramatically depending on whether it has one argument or more than one. 2022-04-14 10:02:33 But eris - there would be a distinction between a scalar value and a one-element array value, right? 2022-04-14 10:04:54 What if I am using ⌈ to extract the max of a list of numbers, and in my application the length of that list just happens to go to 1? Will I still get that one value, since it is now the max? Or will I get ceil() 2022-04-14 10:04:57 ? 2022-04-14 10:05:21 ⌈/1.4 2022-04-14 10:05:25 Ooops 2022-04-14 10:05:35 Ok - I see. 2022-04-14 10:05:49 I'd want to be using / in that situation. 2022-04-14 10:06:11 So / makes it be the binary function, even if there's just one item in the group. 2022-04-14 10:06:14 That's fine. 2022-04-14 10:07:51 I know my way around the keyboard better today than I did yesterday. :-) 2022-04-14 10:08:01 Long way from "familiar" still, but... progress. 2022-04-14 10:08:32 So hey - why is AltGR-q assigned ? when ? is already on the keyboard? 2022-04-14 10:09:48 KipIngram: which keyboard do you have? the limited ANSI 101 key version or the full ISO 111 key version? 2022-04-14 10:10:28 quick way to check, press the key between left shift and z 2022-04-14 10:14:33 No such key. 2022-04-14 10:14:45 It's a 13" notebook, so it's probably a limited one. 2022-04-14 10:15:04 I miss a numeric pad. 2022-04-14 10:15:33 I've given serious thought to mapping digits to letter keys inside "calculator app." 2022-04-14 10:16:11 Probably uio jkl m,. 2022-04-14 10:16:33 I suspect if I used that much I'd get pretty fast with it. 2022-04-14 10:16:45 Maybe put 0 on n. 2022-04-14 10:18:36 When I used that HP-41CV in college, with those oh-so-nice old HP keys, I could touch type on it with my right hand. 2022-04-14 10:20:30 Another possibility, maybe more generic, would be to let left-alt initiate the typing of a number on those keys, and they'd stay in that mode until a key that didn't contribute to numbers was hit. 2022-04-14 10:20:43 Then I might be able to leave that mapping in place all the time. 2022-04-14 10:21:13 You'd think someone might have come up with something like that. 2022-04-14 10:21:22 For all of us numeric pad deprived peeps. 2022-04-14 10:24:35 ah, so the ansi version 2022-04-14 10:26:05 btw anyone come across an Polish kit home computer that only had 17 keys on it? 2022-04-14 10:26:28 a 4x4 hexdecpad and a single I putton 2022-04-14 10:26:42 s/putton/button/ 2022-04-14 10:27:35 text entry was via punching in the ascii code in hex then hitting I 2022-04-14 10:28:36 not sure if that is better or worse than Apollo Guidence computer DSKY 2022-04-14 10:31:41 though it had going for it that it had composite or RF out and the memory bus exposed on an expansion card edge connector 2022-04-14 10:33:33 keyboard, mouse, rs232, modem, papertape punch and optical reader were all kits available 2022-04-14 10:34:19 :-) That sounds like one of Chuck's "keyboards." 2022-04-14 10:34:36 I love Chuck, but he really can take ideas to the "extreme extreme." 2022-04-14 10:35:05 I think he really is into the "if some is good, more is better" philosophy. 2022-04-14 10:36:12 There something like https://github.com/woodrush/lisp-in-life but in FORTH? All I get is CGoL programs written in FORTH, which is not what I'm looking for.. 2022-04-14 10:37:15 Oh, those things are fun. CGoL "systems." 2022-04-14 10:37:42 I think I saw one that was "CGoL running on CGoL" about five layers deep. 2022-04-14 10:38:08 So you're looking for a Forth system runing ON CGoL - am I getting that right? 2022-04-14 10:38:36 It's not surprising to me that it's easier to find Lisp than Forth - CGoL is kind of an "academic" thing. 2022-04-14 10:39:24 I've now added APL to this list, but I find it interesting to see the different demographics that are attracted to things like Forth/Lisp/APL. 2022-04-14 10:39:42 The latter two seem to draw heavily from the "academician pool." 2022-04-14 10:41:17 ACTION has the perverse idea of using DTMF 4x4 pad plus some of the phone phreaker tones such as the red tone for I 2022-04-14 10:42:36 :-) 2022-04-14 10:42:45 Let's just use a Morse key. 2022-04-14 10:50:52 but actually the 4x4+1 plus a decent sized bitmap screen (256x240 px f.x.) is a nice backup interface on some industrial machines 2022-04-14 10:52:31 Yes. 2022-04-14 10:53:10 Another "gadget" I've thought about at times is a DiY tablet, running on Forth of course, with the main point being to experiment with different ways of interacting with such a thing. 2022-04-14 10:53:18 Tablets have been a disappointment to me. 2022-04-14 10:53:43 Seems like there's so much potential there, but they always wind up feeling like "toys" because of the nature of the software we're given. 2022-04-14 10:53:56 Little cutesy games, "applets," etc. 2022-04-14 10:54:01 Nothing... "serious." 2022-04-14 10:54:26 For example, it seems like a WONDERFUL platform for something like printed circuit board layout. 2022-04-14 10:55:38 Way back in the late 1990's I used a Palm Vx handheld organizer, and I *loved* that thing. I haven't seen equally effective text entry without a keyboard in all the years since. 2022-04-14 10:56:05 That Graffiti just worked really really well - it was a great "cooperation" between the system and the user. 2022-04-14 10:56:13 did it use something like T9 or IBM shark? 2022-04-14 10:56:36 oh, Palm Graffiti, heard of that 2022-04-14 10:56:41 T9 sounds familiar, but Graffiti was what they called it. 2022-04-14 10:56:51 But it turned out Palm had infringed on someone's patent. 2022-04-14 10:56:58 And they had to change it. 2022-04-14 10:57:03 It was never as good after. 2022-04-14 10:57:11 Also, the hardware quality dropped in later product generations. 2022-04-14 10:57:17 T9 was a horrible 'predictive' key input via a dictionary 2022-04-14 10:57:37 basically AutoIncorrects grandpa 2022-04-14 10:57:38 Instead of a "lasts forever unless you break it" glass screen, they shipped plastic, and a few months of heavy use wore out the stylus interface. 2022-04-14 10:57:53 I'm sure I've at least seen T9 somewhere back then. 2022-04-14 10:58:41 I don't recall having been enthralled by it. 2022-04-14 10:59:02 one thing I did, in Tcl, inspired by IBM shark was an stylus tracer over virtual keyboard thing 2022-04-14 11:06:00 basically where you looped or kinked the stroke that letter got entered 2022-04-14 11:06:52 bbl 2022-04-14 12:11:32 KipIngram: that is correct, yes, I had an interest in cellular automata some years ago :) 2022-04-14 12:33:44 I don't know where to find one, but I'd find that pretty fascinating too. 2022-04-14 16:06:46 Man, you're right - there isn't anything much to find out there on that. 2022-04-14 16:07:08 I can't really find anything on CGoL "processors" at all. 2022-04-14 16:12:32 Well, this could eventually get you there: 2022-04-14 16:12:35 https://nicholas.carlini.com/writing/2020/digital-logic-game-of-life.html 2022-04-14 16:12:50 With gates you can build a processor, and with a processor you can run Forth. 2022-04-14 16:12:59 Indirect, but... a way. 2022-04-14 16:13:57 Heh - whoever wrote that notes that printf is Turing complete. That's probably worth reading. 2022-04-14 16:15:14 Or, maybe you'll like this, since it deals with the fundamentals. 2022-04-14 16:17:50 Looks like he's working with just three fundamental pieces - gliders (which represent electrical current), a "glider gun" and a "glider eater." 2022-04-14 16:18:51 Ok, it's good - I like how he's proceeding. 2022-04-14 16:27:29 This is what he uses to simulate his designs: 2022-04-14 16:27:31 http://golly.sourceforge.net/ 2022-04-14 16:31:15 Here's another tool: 2022-04-14 16:31:17 https://sourceforge.net/projects/circuit/ 2022-04-14 16:34:53 I used Golly before in the past. Nice software. You can script it in Python and Lua. 2022-04-14 16:39:32 You might want to do a literature search, last I checked there was all kinds of interesting automata papers.. 2022-04-14 16:42:40 Yeah, I think this will be an interest for a while now - quite fascinating. 2022-04-14 16:43:17 This guy's ultimate goal is to implement an Intel 4004 with this approach, and then run Life on it. 2022-04-14 16:43:34 I shudder to think how slow that would be, but... it's the principle that matters, I guess. 2022-04-14 16:44:16 I haven't scratched out any numbers yet - I guess the most obvious question would be whether or not a Forth built this way could reasonably be considered "interactive." 2022-04-14 16:52:55 Ah, part 4 is "A Simple CPU..." 2022-04-14 16:53:03 The link to part 3 is broken. :-( 2022-04-14 16:54:00 Ah, I found it: 2022-04-14 16:54:02 https://nicholas.carlini.com/writing/2021/improved-logic-gates-game-of-life.html 2022-04-14 17:03:30 He might make a 5th part sometime, who knows :-) 2022-04-14 17:03:35 He's using a processor design used for concept slinging, the "URM" (unlimited register machine). It supports three instructions - increment a register, decrement a register, and jump if a register is non-zero. 2022-04-14 17:03:47 Here's the entire CPU on CGoL: 2022-04-14 17:03:49 https://nicholas.carlini.com/writing/2021/gameoflife/cpu.png 2022-04-14 17:05:04 That one has only 16 4-bit registers. 2022-04-14 17:05:24 No other RAM, but it does have ROM. 2022-04-14 17:11:31 That's nice stuff. :-) 2022-04-14 17:14:39 I recall Golly came with at least one Turing machine design.. 2022-04-14 17:21:30 Could be - I bookmarked it but haven't downloaded it or anything yet. 2022-04-14 17:21:49 I've always been interested in software that simulates things. 2022-04-14 17:22:10 I remember seeing an early Mentor Graphics promo back around college time and I thought that was just the coolest thing ever. 2022-04-14 17:22:52 I've written serious simulations of non-digital systems; usually specialized electric machinery the research lab I worked for at UT Austin was developing. 2022-04-14 17:23:13 I've never really done any digital simulation, but have always been i ntrigued. 2022-04-14 17:23:31 What we're talking about here isn't really quite the same thing, but it seems like it's in a neighboring community. 2022-04-14 17:47:41 So I just did a bit more timing on my system. Same thing I did a while back, basically, but maybe more carefully. I started with this: 2022-04-14 17:47:54 : down2 1- .0>me drop ; 2022-04-14 17:48:03 Just the simplest down counter. 2022-04-14 17:48:16 15 billion iterations of that took 35.13 seconds. 2022-04-14 17:48:57 I then stuck nop in the loop - it's a primitive no-operation word, so it just adds a NEXT. That took 47.29 seconds for 15 billion; that led to 811 ps for executing NEXT. 2022-04-14 17:49:11 Then I replaced the nop with nopd, which is an empty : definition. 2022-04-14 17:49:53 15 billion of those took 105.39 seconds, which led me one : def level overhead coming out to 1.53 ns. 2022-04-14 17:51:38 I figure that's not too bad. But for this those to register/register adds I have to do in those core routines are kind of painful NEXT is six machine code instructions, and two of them are those adds. I guess they're faster than the RAM reads that are in there, though, so they probably don't add to time as much as they add to instruction count. 2022-04-14 17:52:32 the : runtime only has one corresponding add rather than two, and the (;) has none. 2022-04-14 17:53:38 Well, both of those do include a NEXT at the end, so they still have the other two. Those I just mentioned were additional. 2022-04-14 17:54:33 I could probably go and add "extraneous" instructions in there and get a measurement for how much the adds are penalizing me. 2022-04-14 17:54:45 That seems worth doing at some point. 2022-04-14 17:55:01 Just do the same adds, but to some scratch register. 2022-04-14 18:03:28 Oh lovely. Added the instructions and ran it, and got a SHORTER length of time. Welcome to the real world of "no telling what the hell else is going on." 2022-04-14 18:03:42 So I guess I need to revise those measurements to <=. 2022-04-14 18:04:31 But at any rate, the extra time taken by the reg/reg adds seems to add no more than 5 or 10% to the duration of NEXT. 2022-04-14 18:29:24 I was spoiled in the early years of my career so far as timing went - I'd be checking code on a processor in some embedded system, where the processor had exactly one job to do, and that was "run my code." And back then all the timing was nice and precise, and I could tote up on a piece of paper how fast it should be and then make sure that it was indeed that fast. 2022-04-14 18:29:30 My how times have changed. 2022-04-14 19:33:13 Ok, I got a "gtod" (get time of day) word working. 2022-04-14 19:33:32 Returns seconds in TOS and microseconds below it. 2022-04-14 19:33:51 Now I can run longer tests that will average over the OS imposed variation. 2022-04-14 19:34:03 Really long ones, where I just walk away and let it run. 2022-04-14 19:36:12 Tested it out here: 2022-04-14 19:36:15 https://www.epochconverter.com/ 2022-04-14 19:45:03 Looks like a time check takes about 93 ns. 2022-04-14 20:35:50 I don't know why they had to complicate the get time of day return by spreading it across two 64-bit words. 2^63-1 (biggest positive 64-bit number) is enough to count off microseconds for almost 300,000 years. 2022-04-14 20:35:57 It would have fit. 2022-04-14 20:36:23 Maybe it has something to do with what typical computer hardware was like once upon a time. 2022-04-14 20:36:33 Like real-time clock hardware. 2022-04-14 20:36:49 Or maybe it's just a logical holdover from 32-bit days. 2022-04-14 20:37:00 That would actually make sense. 2022-04-14 20:38:55 Yeah - that makes sense. 2^32 (unsigned) will tick off seconds for 139 years. 2022-04-14 21:10:48 Now I need to write a word that will "bottle" these timing tests. 2022-04-14 21:11:03 find time-it 2022-04-14 21:11:46 It'll run a small number of iterations first, to figure out how many times to run it for the measurement. 2022-04-14 21:12:21 And with my stack frames I can clean up the stack nicely regardless of how leaves it. 2022-04-14 21:12:47 I'll have to think about how to set the stack up *for* the word. 2022-04-14 21:22:53 Ok, I changed the name of that word to uet. 2022-04-14 21:23:08 Since that's what it actually is - Unix epoch time. 2022-04-14 21:23:33 I just ran that twice on one command line - the time difference was 14 microseconds. 2022-04-14 21:27:18 Ok, so the deepest word in my dictionary is (;). 2022-04-14 21:27:41 uet find (;) uet 2022-04-14 21:27:54 and then recovering the difference gave 157 microseconds. 2022-04-14 21:29:02 So take off the 14, and that's 143 microseconds max to search the dictionary. 2022-04-14 21:35:59 Holy cow, this varies all over the map. 2022-04-14 21:36:24 I did the same thing twice more and got 34 microseconds and 25 microseconds. 2022-04-14 21:36:40 Looks like statistics is going to prove useful to have studied. 2022-04-14 21:38:00 Actually getting N measurements over some period of time rather than one will be better - it'll give me a much better idea about variability. 2022-04-14 21:39:32 Probably will write the timing utility so that I tell it how much time total I want it to spend, and have it figure out what to do to get me a hundred samplings. And then apply stats to those. 2022-04-14 21:42:42 Oh, that "config record" idea I floated this morning - I think the thing to do with that would be to assign a disk block for that. That way that space wouldn't actually be adding to my RAM footprint. Config push and config pop woud just "block it in" as needed. 2022-04-14 21:43:40 I thought of BASE, BLK and >IN, PATH and CURRENT, and that DELIMITERS thing if I ever choose to do that. Am I missing any other "config state"? 2022-04-14 21:44:25 Maybe call saving it conf! and restoring it conf@ 2022-04-14 21:46:26 Or cfg! and cfg@ 2022-04-14 21:47:11 cfg would be a "structure variable" that behaves like a push down stack. 2022-04-14 21:47:57 Limit it to one block, so there would be cfg stack underflow and overflow errors. 2022-04-14 21:49:33 If PATH refers to, say, 3-4 vocabularies on average, then that would be max 10 cells for a record (one extra for the path item count). So a block would hold 500 or so configurations. I can't imagine exhausting that. 2022-04-14 22:31:03 ugh. I can't to math tonight. 400 configurations. :-( 2022-04-14 22:31:23 Damn - that's wrong too. 2022-04-14 22:31:46 50. That's where the five came from. Geez. 2022-04-14 23:11:51 So, what is the computer science argument against having multiple returns? I see recommendations against it in various places, but I've felt like my code has become *much better* since I added conditional returns to my lexicon. Using them just feels completely natural to me. 2022-04-14 23:12:48 Often I feel like they just *precisely* resolve a situation that would otherwise be cumbersome. 2022-04-14 23:13:57 Now, I do think they need to be used in a disciplined way. Generally I regard the caller and the callee as a "unit" when I'm using those - if they get modified, they get modified *together*, as a single entity. 2022-04-14 23:14:36 It's generally always the case that the callee is a temporary word that won't be directly available in the dictionary after I've finished constructing the final words of interest. 2022-04-14 23:15:18 In other words, those returns are always going to go to ONLY ONE PLACE - there's no "future variability" involved there. I think that justifies regarding caller and callee as a connected entity. 2022-04-14 23:16:04 And I always put the caller and callee as close together as is feasible - ideally adjacent to one another, on successive lines. 2022-04-14 23:30:56 KipIngram, I think multiple returns are like goto statements in that you can use them if needed but they should generally be avoided 2022-04-14 23:31:47 one argument being that any clean up or variable setting before returning will need to be maintained in several places which is prone to error 2022-04-14 23:32:22 even if all youre doing is returning, you may want to add an error or status code or something in the future and it's better to only have to insert and maintain that in one place 2022-04-14 23:39:16 That makes sense - I think that in most of my cases, though, those notions refer more to the "primary callable word." The one that is in the dictionary long term and represents a "point of entry" for the user. These lower level routines are primarily for factoring and implementing control structures. 2022-04-14 23:39:54 This is actually my main (only?) way of doing control structures. I don't even have IF THEN etc. in my system at all. 2022-04-14 23:40:08 And it's been that way for a while now, and I don't miss them. 2022-04-14 23:40:20 But I see your point. 2022-04-14 23:42:21 Actually the things I do would likely annoy the CS gods even worse - I have conditional DOUBLE returns. 2022-04-14 23:44:43 But in those cases then all THREE involved layers have to be thought of as a single "thing." 2022-04-14 23:45:23 Oh, and I even have that "exception" thing, whereby I can jump back past as many layers as I choose. :-) 2022-04-14 23:46:15 But the only place I've actually used that is in FIND, when I actually succeed in finding the word. So it's got the answr - the thing that needs to be returned - on the stack, and it leaps back directly to the exist point from the whole business. 2022-04-14 23:46:34 s/answr/answer/ 2022-04-14 23:47:08 And the stack frame mechanism ensures that anything those intervening layers did to the stack gets cleaned up. 2022-04-14 23:52:19 What this whole discussion is making me thing is that I probably need to give some thought to this. I don't intend to give these mechanisms up - I like them too much. But I probably should "codify some precise rules" about how they get used. 2022-04-14 23:52:58 Maybe some "patterns" that I follow. I suspect I probably am following patterns, but only intuitively at this time. I should try to inject some "precision." 2022-04-14 23:53:28 Because all the things you mentioned are right. I need to have some confidence that I'm avoiding the obvious risks.