2023-09-14 00:02:03 Wow - that really is a small world. 2023-09-14 04:19:10 Huh cannot ssh from work anymore 2023-09-14 04:19:22 They're onto me lol 2023-09-14 04:27:05 Oh no looks like my VM just lost internet/interest 2023-09-14 04:27:14 (work VM, not oracle) 2023-09-14 05:49:14 MrMobius: mux is one such word, it is a bit more generic 2023-09-14 05:49:54 : mux dup >r and swap r> invert and or ; ( x1 x2 mask -- x ) 2023-09-14 05:50:45 Short for "multiplex", based off of the operator 2023-09-14 05:50:53 You can define min/max with them 2023-09-14 05:51:27 2dup mux 2023-09-14 06:21:04 I think someone called is CHOOSE 2023-09-14 06:21:07 it* 2023-09-14 06:21:17 I think this same question gets asked at least once a year as well 2023-09-14 06:41:02 dup is ( x1 -- x1 x1 ) and 2dup is ( x1 x2 -- x1 x2 x1 x2 ), in my forth i'm adding dup2 which is ( x1 -- x1 x1 x1 ) and dup3 which is ( x1 -- x1 x1 x1 x1 ) ...with this notation also 2dup2 would be contemplated, thoughts? 2023-09-14 07:09:26 Depending on how true/false are represented, PICK might get you part way to a choose. 2023-09-14 07:10:30 : CHOOSE ( x y cond -- x|y ) PICK NIP NIP ; 2023-09-14 07:18:19 CHOOSE or CHOICE 2023-09-14 07:33:01 Tangential, but IMHO, some traditional Forth naming choices are kind of clunky. Like `... STATE IF ... THEN` doesn't read particularly well. 2023-09-14 07:53:21 xelxebar: well, you can change that 2023-09-14 07:53:29 xelxebar: how would you like it to read? 2023-09-14 07:54:24 You mean Forth Inc, because fig Forths used ENDIF 2023-09-14 07:54:37 Precisely because they thought it read weird 2023-09-14 07:54:45 KipIngram: re solving for it's vitally important to know how to work out things like Ohm's Law 2023-09-14 07:55:02 I personally think it makes sense as long as you understand it's "THEN" in a different semantic meaning to "THEN" in most if statements 2023-09-14 07:55:05 it's even more important to know what you can get away with 2023-09-14 07:56:58 veltas: Well, I was mostly thinking STATE IF, more than THEN. Wouldn't a dumb rename to COMPILING? or whatnot would make sense? 2023-09-14 08:18:04 xelxebar: Or IMM or something, I suppose you're right that STATE's quite generic 2023-09-14 08:18:21 But you can always hide STATE if you want to use the name for something else 2023-09-14 10:58:12 xelxebar: COMPILING would make more sense given what STATE actually is used for. 2023-09-14 10:59:25 But STATE has been in Forth for so long that everyone is just "used to it" - it's absorbed its meaning pretty thoroughly. 2023-09-14 14:47:37 Oh, earlier I suggested s[i] as a way for an APL expression to access the Forth stack. Along with that, I might use f[i] to access specific slots in an open stack frame. Two slightly different but quite similar ideas. 2023-09-14 15:59:12 dup is ( x1 -- x1 x1 ) and 2dup is ( x1 x2 -- x1 x2 x1 x2 ), in my forth i'm adding dup2 which is ( x1 -- x1 x1 x1 ) and dup3 which is ( x1 -- x1 x1 x1 x1 ) ...with this notation i was thinking 2dup2 possible, do you think its clear? 2023-09-14 16:01:42 is that something you do enough to need a core word for? 2023-09-14 16:03:51 well, yes 2023-09-14 16:03:57 otherwise i didn't 2023-09-14 16:04:14 i have functions that pushes 2 things into the stack, so drop2 is very usefsul instead of drop drop 2023-09-14 16:05:09 sorry, i meant dup, not drop 2023-09-14 16:21:31 I think it's very much an individual call whether to have double precision int words. 2023-09-14 16:21:53 Made a lot of sense in 16-bit systems, and a little even in 32-bit systems. I've never seen the need in 64-bit systems. 2023-09-14 16:22:00 But... ymmv. 2023-09-14 17:06:06 KipIngram: Good point about the vectors like 1 2 3. Are you familiar with strand notation? It's a kind of generalization. Back-to-back expressions create an vector with those elements, e.g. (1 2 3) (4 5 6) or 'APL' 'in' 'Forth' or even (1 2 3) 'APL'. 2023-09-14 17:07:43 J doesn't have strand notation and recognizes strings of space-separated numbers as a single *token*. 2023-09-14 17:08:43 BQN (https://mlochbaum.github.io/BQN/) decides to make space always mean "function application" and offers a couple different decorations for array notation. 2023-09-14 17:10:12 https://mlochbaum.github.io/BQN/doc/arrayrepr.html#array-literals 2023-09-14 17:11:04 That's probably a relatively tractable problem. 2023-09-14 17:11:23 The bigger issue, as you have mentioned a couple times, seems to be infix notation. 2023-09-14 17:12:54 Removing infix like you mention is way too drastic, I think. It would really disrupt the way APL expressions read. 2023-09-14 17:14:14 What about going the other way? Forth syntax is so regular that it's probably easier to have a "Forth mode" inside APL. 2023-09-14 17:15:32 If one could stomache Polish Notation instead of RPN, then a "put array elements on stack" operation, say ARR->STK, might work 2023-09-14 17:17:05 Visually, it'd be something like this: ... R@ >R DUP ARR->STK (+/÷≢) ⍳100 2023-09-14 17:18:17 The RPN to PN switch is in Forth is equally disorienting, though. It's like we're bumping up against the problem of mixed RTL and LTR orthographies. 2023-09-14 21:36:26 No, not familiar with strand notation, but I will check it out. 2023-09-14 21:37:00 Yeah, completely dealing out infix wouldn't leave enough behind to be worth it, I think. 2023-09-14 21:37:35 What I have in mind is to have a way to run "pure APL" expressions, in a completely standard way. But then to also have the ability to run individual APL operators from more standard Forth code too. 2023-09-14 21:37:44 Same function, just "gotten at" in different ways. 2023-09-14 21:38:04 That | [3 4 5] 0⍴ would be the latter. 2023-09-14 21:39:14 When it processed that, the system would be processing "Forth style." But if it saw something that was more fully correct APl, it would process the entire expression as APL. 2023-09-14 21:40:44 Don't know if there's anything interesting here, but when I Googled "strand notation" it led here: 2023-09-14 21:40:46 https://mlochbaum.github.io/BQN/doc/arrayrepr.html 2023-09-14 21:41:00 Looks at least worth reading. 2023-09-14 21:47:00 Ok, that page links here: 2023-09-14 21:47:02 https://aplwiki.com/wiki/Strand_notation 2023-09-14 22:31:18 「1 2 3」 <-- that seems reasonable.