00:00:00 --- log: started forth/18.06.24 01:16:57 --- quit: ThirtyOne32nds (Ping timeout: 240 seconds) 01:41:58 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 03:23:46 --- join: ThirtyOne32nds (~rtmanpage@13.sub-174-204-13.myvzw.com) joined #forth 03:32:51 --- join: ncv (~neceve@2a02:c7d:c5c9:a900:14fa:fcbb:861b:b7e6) joined #forth 03:32:51 --- quit: ncv (Changing host) 03:32:51 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 03:35:27 --- quit: ThirtyOne32nds (Ping timeout: 240 seconds) 04:37:38 --- quit: dave9 (Quit: one love) 04:42:41 --- quit: pierpal (Quit: Poof) 04:43:01 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 04:54:01 --- quit: pierpal (Quit: Poof) 04:54:17 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 05:05:24 --- join: Yaargh (byte@unaffiliated/yaargh) joined #forth 05:42:39 --- join: ThirtyOne32nds (~rtmanpage@196.sub-174-204-10.myvzw.com) joined #forth 05:49:07 --- quit: pierpal (Quit: Poof) 05:49:25 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 06:30:43 --- quit: pierpal (Quit: Poof) 06:31:05 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 06:47:17 --- quit: ThirtyOne32nds (Ping timeout: 260 seconds) 06:48:03 how would you name a constant that is the log2 of another constant? 06:48:56 log2_2 06:49:24 sorry log2_ 06:49:47 or _log2, or log2_of_, or any number of descriptive names 06:50:07 e.g., given 8 const /cell : cells 3 << ; you might want a constant for 3 there 06:50:19 log2_/cell ? 06:50:41 I mean, I guess the spirit of my question is whether log2 should even appear in the name 06:50:45 or is there a better word for that 06:51:16 cell_shift or cell_exponent? 06:59:50 --- quit: dddddd (Remote host closed the connection) 07:22:23 >>bits or < Or >>count < well the point of doing it is to define both << and >> words 07:22:53 Oh, I see. 07:22:58 bits 07:23:28 I should note that I have a huge aversion to "long" names, with "long" a fairly easy state to achieve. 07:29:31 When I was discussion those partially non-destructive comparison operatores with a friend yesterday he suggested dup_u< and so on. 07:29:37 I balked at the length of those. 07:30:16 He has a bit of an aversion to having to learn new things. 07:30:32 I think once I'd worked with .u< and family for a while they'd be as meaningful to me as anything else. 07:32:52 my comparisons are all totally non-destructive 07:32:56 I also saw some places where I've done OVER OVER ; those would become OVER . 07:33:06 =, <, >=, etc are all defined as ( n1 n2 -- n1 n2 f ) 07:33:11 You keep both numbers and put a flag on top of them? 07:33:34 so then instead of a bunch of "dup =" everywhere, I instead have a bunch of " = nip if" 07:33:41 In the phrase DUP 10 U< I sort of regard "10 U<" as the "operation." 07:33:54 right 07:33:57 So I'm looking at getting rid of the 10, but not the other number. 07:34:05 yeah, makes sense 07:34:22 There would be some places where that didn't quite fit, I suppose, but I think it will fit lots of times. 07:34:42 actually I do have one word that kind of works that way: test takes a number and a bitmask, pops the bitmask and pushes a flag if the result of the and is non-zero 07:34:58 Yes - same idea. 07:35:28 I also defined words CHR and CHR++. CHR++ is essentially COUNT, CHR behaves the same but doesn't increment the address. 07:54:10 Given my naming of the comparison words it occurs to me that what I called CHR could also be .C@ 07:54:18 And CHR++ .C@++ 08:01:19 --- quit: impomatic (Read error: Connection reset by peer) 08:03:46 That's very odd. 08:04:09 I defined : .U< DUP U< ; in my GForth test file and used it in three places. 08:04:15 It fails for some reason. 08:04:24 Oh. 08:04:27 Because that's wrong. 08:04:29 Duh. 08:04:32 Never mind. 08:04:41 Insufficient caffeine. 08:05:14 : .U< OVER SWAP U< ; 08:53:26 --- join: ThirtyOne32nds (~rtmanpage@196.sub-174-204-10.myvzw.com) joined #forth 09:41:36 My word names tend to be longer. 8 characters (average), longest is 23. (2-3 characters of that are the prefixes I use to group related words) 09:42:16 Thanks for that 09:42:54 `file:for-each-line` is a good word name 09:46:23 I remember how Ken Thomson is quoted as saying if he could re-do UNIX, he'd rename "creat" to "create" 09:54:40 --- join: dys (~dys@tmo-081-116.customers.d1-online.com) joined #forth 10:11:18 --- quit: groovy2shoes (Ping timeout: 276 seconds) 10:24:33 --- join: groovy2shoes (~groovy2sh@unaffiliated/groovebot) joined #forth 10:40:33 --- quit: groovy2shoes (Ping timeout: 276 seconds) 10:53:27 --- join: groovy2shoes (~groovy2sh@unaffiliated/groovebot) joined #forth 11:10:21 So I wrote a test harness for the number converter this morning. 11:10:35 It can only test for success, though - I need to do a bit more work to let it test for failure cases. 11:10:42 I know how I'm going to do that, though. 11:12:01 I'm going to have something like : TEST NUMBER 1 ; 11:12:25 And then have ERR put a 0 flag on the stack, set the return stack pointer to the saved value, and return, which should produce a 0 return from TEST. 11:13:25 Probably will need to save the data stack pointer too, since the different error cases happen with different stuff on the stack. 11:22:04 --- quit: pierpal (Quit: Poof) 11:22:22 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 11:38:11 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 11:39:26 --- quit: Zarutian (Read error: Connection reset by peer) 11:39:39 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 11:49:24 --- join: karswell (~user@cust125-dsl91-135-5.idnet.net) joined #forth 11:54:55 --- quit: pierpal (Quit: Poof) 11:55:11 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 12:05:51 --- quit: pierpal (Read error: Connection reset by peer) 12:06:02 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 12:12:57 --- quit: pierpal (Ping timeout: 240 seconds) 12:58:57 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 13:08:48 --- quit: groovy2shoes (Quit: moritura te salutat) 13:14:57 --- join: pierpa (4f2c3a2d@gateway/web/freenode/ip.79.44.58.45) joined #forth 13:41:52 --- quit: ThirtyOne32nds (Ping timeout: 245 seconds) 13:47:33 Ok, that worked just fine. Now I have a fully automated test harness. 14:27:51 --- quit: ncv (Ping timeout: 256 seconds) 14:37:27 --- quit: dys (Ping timeout: 248 seconds) 14:45:26 I have no business doing what I'm doing whatsoever 14:46:00 I just spent like two hours debugging a segfault in something I just wrote 14:46:18 I prototyped it in interpreted forth, and it worked, but then when I transcribed it into my assembly, it segfaults 14:46:50 the exciting conclusion was that I had a branch to 1f somewhere, and I forgot to write the label, so it was branching to some other word's 1: 14:51:43 Heh heh heh. 14:52:03 Things like that make me want to slap my forehead - they seem so obvious after they're found. 14:53:43 well anyway, I've completely replaced my overcomplicated auto-pad-stack-local-variable thing with just a system-wide circular buffer 14:54:41 8 buffer ( return the current cursor address and advance it by 8 bytes ) 14:54:48 and pad is now just : pad 0 buffer ; 14:56:32 Interesting. So if you need access to any of the old items you have to have saved the address somewhere. 14:56:50 But you can use pad again some number of times before the older item is invalidated. 14:58:10 That's somewhat like my stdin and stdout streams are going to work. I'm going to have each line equipped with offsets to the previous and next line, so I can navigate around in it. 14:58:36 yeah, basically use "pad" when you just want ephemeral scratch space for immediate local use. use "buffer" for ephemeral scratch space that you either plan to give back to the caller, or you want it to be protected from other words you might call that use pad before you're done with it 14:58:45 I'm just going to count on never needing to go so far back that I've overwritten the data. 14:59:56 Yes, it's nice and simple. 15:00:21 my parsing words parse into it by taking the starting address with pad, and then when they're finished they commit the length with buffer 15:00:42 Right. 15:27:48 --- join: dave9 (~dave@207.213.dsl.syd.iprimus.net.au) joined #forth 15:28:35 hi 15:39:55 --- quit: dave0 (Ping timeout: 256 seconds) 15:40:11 --- quit: dave9 (Ping timeout: 256 seconds) 15:41:54 Hi Dave. 15:43:57 --- join: dave0 (~dave@207.213.dsl.syd.iprimus.net.au) joined #forth 15:47:28 --- join: dave9 (~dave@207.213.dsl.syd.iprimus.net.au) joined #forth 15:49:06 --- join: ThirtyOne32nds (~rtmanpage@196.sub-174-204-10.myvzw.com) joined #forth 15:56:52 --- join: groovy2shoes (~groovy2sh@unaffiliated/groovebot) joined #forth 15:58:07 hi KipIngram 15:58:57 KipIngram: i had to cycle the power, so the internet went down... dave0 is my desktop computer always connected.. dave9 is my laptop 16:02:58 brb 16:10:00 where are the other eight? 16:12:14 i am a decremented dave0 ! 16:18:28 --- quit: pierpal (Ping timeout: 245 seconds) 17:00:47 --- quit: nighty- (Quit: Disappears in a puff of smoke) 17:44:19 --- quit: dddddd (Remote host closed the connection) 17:57:53 back 18:03:58 --- join: nighty- (~nighty@kyotolabs.asahinet.com) joined #forth 18:23:44 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 18:27:24 --- quit: karswell (Remote host closed the connection) 18:27:35 --- join: karswell_ (~user@cust125-dsl91-135-5.idnet.net) joined #forth 18:27:57 --- quit: pierpal (Ping timeout: 240 seconds) 19:02:22 bbl 19:04:25 --- quit: dave9 (Quit: one love) 19:37:13 --- quit: pierpa (Quit: Page closed) 19:59:41 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 20:00:47 --- quit: pierpal (Client Quit) 20:01:06 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 21:05:43 --- quit: ThirtyOne32nds (Ping timeout: 248 seconds) 21:47:12 --- quit: pierpal (Quit: Poof) 21:47:28 --- join: pierpal (~pierpal@host45-58-dynamic.44-79-r.retail.telecomitalia.it) joined #forth 22:39:50 --- join: tusj (~tusj@185.176.244.72) joined #forth 22:58:02 --- quit: Labu (Quit: WeeChat 2.0.1) 23:00:50 --- join: dave9 (~dave@207.213.dsl.syd.iprimus.net.au) joined #forth 23:02:11 hi 23:12:43 --- join: ThirtyOne32nds (~rtmanpage@253.sub-174-204-17.myvzw.com) joined #forth 23:18:27 --- quit: ThirtyOne32nds (Ping timeout: 268 seconds) 23:22:13 --- join: dys (~dys@tmo-118-245.customers.d1-online.com) joined #forth 23:59:59 --- log: ended forth/18.06.24