00:00:00 --- log: started forth/18.12.21 00:19:07 --- quit: MrMobius (Read error: Connection reset by peer) 00:42:28 --- join: reepca (~user@208.89.170.250) joined #forth 01:56:25 --- quit: proteusguy (Remote host closed the connection) 01:57:36 --- join: proteusguy (~proteus-g@cm-58-10-209-244.revip7.asianet.co.th) joined #forth 01:57:37 --- mode: ChanServ set +v proteusguy 01:59:47 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 02:01:33 --- quit: proteusguy (Remote host closed the connection) 02:02:42 --- join: proteusguy (~proteus-g@cm-58-10-209-244.revip7.asianet.co.th) joined #forth 02:02:42 --- mode: ChanServ set +v proteusguy 02:03:31 --- quit: ashirase (Ping timeout: 272 seconds) 02:24:12 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 03:16:11 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 03:21:58 Hi 03:38:37 Hey john 03:38:41 How you doing 03:47:29 Fine, thanks, and you? 04:15:58 Okay I guess 04:38:30 --- quit: rdrop-exit (Quit: Lost terminal) 04:54:31 --- quit: ncv (Remote host closed the connection) 04:54:57 --- join: ncv (~neceve@host165-120-111-163.range165-120.btcentralplus.com) joined #forth 04:54:57 --- quit: ncv (Changing host) 04:54:57 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 04:55:01 --- quit: ncv (Remote host closed the connection) 04:55:28 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 05:17:27 --- quit: ncv (Remote host closed the connection) 07:00:11 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 07:24:07 How deep should a return stack be? 07:26:39 3/4 of a page 07:26:49 the other 1/4 being the data stack 07:27:07 --- quit: tabemann (Ping timeout: 250 seconds) 07:31:17 "8 words is probably enough for the return stack" - CM 07:31:59 yeah but we established yesterday that i don't accept what he says as the word from god 07:32:06 lol. I just checked, and it's 8 deep on the F18A too. 07:32:23 Stuck in his ways hah 07:32:39 i found that i end up using more depth in the return stack than i do in the data stack 07:32:55 I find that sometimes 07:33:10 I like to use the return stack to just store data I'm not using 07:33:17 yeah 07:42:48 oh now that i actually look at mine, i forgot i had changed it 07:43:15 on amd64, i'm allocating a page for the data stack and just the rest of all stack space is return stack 07:43:32 i guess when memory is basically infinite, why not 07:45:05 i'm also bad at forth and all forth i've ever written is also bad so you know, take my advise with a grain of salt or whatever 07:48:44 max data stack depth in retro (latest snapshot, rebuilding from source) is 21 cells and address stack max depth is 73 cells 07:49:23 that's pretty close to my 1:3 rule 08:02:38 * Zarutian just allots 256 cells per stack 08:42:32 --- quit: Zarutian (Read error: Connection reset by peer) 08:42:54 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 08:44:53 --- join: gravicappa (~gravicapp@ppp83-237-167-171.pppoe.mtu-net.ru) joined #forth 09:43:19 crc: 21 and 73 seem to be pretty arbitrary 10:08:23 --- join: dys (~dys@tmo-100-83.customers.d1-online.com) joined #forth 10:17:29 --- quit: dave0 (Ping timeout: 240 seconds) 10:33:16 WilhelmVonWeiner: that just happens to be the max depths used when rebuilding currently; I have far larger spaces actually allocated for the stacks. 10:35:46 oh, that's what's actually used? now i actually do feel like a wizard 10:36:19 The current build for BSD/Linux/macOS has 512 data, and 3x that for addresses. (now borrowing zy]x[yz's 1:3 ratio). For iOS, the limits are absurdly large (2 million cells, and 4 million cells). 10:42:19 zy]x[yz: that ratio seems to hold pretty up well with the most of the tests I ran 10:44:38 cool. that's completely an accident. i didn't actually measure anything when i came up with it 11:08:20 this may not hold for more traditional forths (retro is a little odd in that it uses conditional calls, but not conditional jumps, for implementing conditional flow control) 11:14:09 ah, true 12:36:11 --- join: MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 13:17:30 --- quit: pierpal (Ping timeout: 244 seconds) 13:43:41 --- quit: dave9 (Ping timeout: 250 seconds) 13:44:05 --- join: dave9 (~dave@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 15:10:41 --- quit: gravicappa (Remote host closed the connection) 15:18:50 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 15:25:09 --- quit: pierpal (Ping timeout: 240 seconds) 15:33:39 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 16:26:10 --- quit: john_cephalopoda (Ping timeout: 252 seconds) 16:27:54 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 16:29:45 --- join: tabemann (~tabemann@rrcs-162-155-170-75.central.biz.rr.com) joined #forth 16:43:18 --- quit: xek (Remote host closed the connection) 16:43:36 --- join: xek (~xek@apn-31-0-23-82.dynamic.gprs.plus.pl) joined #forth 16:48:09 --- quit: xek (Ping timeout: 240 seconds) 16:56:41 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 17:19:50 --- quit: dave0 (Quit: dave's not here) 17:57:37 --- quit: tabemann (Ping timeout: 250 seconds) 18:31:41 --- quit: pierpal (Read error: Connection reset by peer) 18:37:04 --- quit: PoppaVic (Remote host closed the connection) 18:37:09 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 18:39:00 On the host PC Forth I use circular stacks of 256 cells each 18:40:50 --- join: PoppaVic (~PoppaVic@unaffiliated/poppavic) joined #forth 18:47:25 why circular 18:49:07 They can never physically overflow/underflow 18:49:47 They can still logically overflow/underflow of course 18:51:30 Similar to what Chuck does on his chips 18:55:32 The host part of the tethered Forth runs on a bytecoded VM on the PC 19:02:23 that sounds like cheating 19:02:53 In what way? 19:03:27 well, the host should have plenty of tools - bytecode there? Native seems normal 19:04:45 The host is just a development environment on a tethered Forth, native doesn't buy me anything. 19:05:11 I suppose. 19:06:25 I can run the host on any little-endian POSIX compliant platform. 19:08:53 Happily, my C usually works that way. 19:09:24 The host Forth isn't a general purpose Forth, it's a special purpose Forth for interactive cross-assembly/cross-compilation over a tether. 19:10:58 Yeah, I suspected. 19:13:50 It only has two cooperative tasks, a user terminal task, and a tether task. 19:17:15 In modern terminology, it's an IDE. 19:17:51 Albeit a very no-frills block-based IDE. 19:20:53 --- join: tabemann (~tabemann@2602:30a:c0d3:1890:a433:523c:27b8:b5c8) joined #forth 19:23:34 Gotta walk the dogs then get a haircut, chat again soon. 19:23:44 --- quit: rdrop-exit (Quit: Lost terminal) 19:32:51 A circular stack is a pretty neat idea, I have to say. Unfortunately on my target doing so would add more overhead 19:33:11 Well on any target, but particularly embedded ones 19:34:01 Like a too-small space: it sounds like a fine way to crash & burn 19:34:39 Every time I considered adding safety checks, I keep coming to the conclusion that it's not worth it. 19:35:02 Except for flash memory, I need to be careful there. 19:36:59 I think that's why tethering makes sense. 19:37:46 do the safety/s[ace checks while developing - not on the end-product where you should KNOW your final requirements 19:48:31 hey guys 19:48:40 hey 19:50:12 in attoforth I made it have two execution modes, selected at compile-time - normal mode, with few safety checks, and debug mode, which while also having the ability to trace every word also adds stack safety checks to every single word 19:51:15 normally I execute in normal mode because it's considerably faster, but when debugging I sometimes use debug mode so I can see when it is exactly overrunning or underrunning stacks, in addition to being able to trace everything 19:54:06 (normal mode also has stack checks, but only when executing words from the outer interpreter - it's not as safe, even though there is considerable padding at the bottom and top of each stack in case they are overrun) 20:00:35 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 20:01:00 hey 20:01:11 re 20:01:35 Today I've something nice: "Reverse Polish is used by some pocket calculators, and in languages like Forth and Postscript." --in The C Programming Language (1988) 20:01:49 I've found rather 20:02:25 Interesting how Kernighan and Ritchie noticed PostScript when it was only 3 years old. 20:04:56 i like how in rpn you can execute each word as you see it, you don't have to look ahead in case you do eg. 2+3*4 20:11:19 I like how, except for when using control words, each subset of a program can be its own subprogram 20:12:24 and I suspect that if one replaced control words with words taking closures, this would be true with control structures as well 20:13:12 I could implement this in my forth, considering I have already implemented nested functions and closures 20:13:22 does control word mean BRANCH ? 20:55:42 anything using BRANCH or ?BRANCH, yes 20:55:59 which is split up into separate words working together 20:56:27 like for instance : foo IF ." foo" ELSE ." bar" then ; 20:56:50 whereas the alternative using functions, which is possible in my forth, would be something like 20:57:29 : foo [: ." foo" ;] [: ." bar" ;] IF-ELSE ; 21:00:36 Retro does this: :foo [ 'foo s:put ] [ 'bar s:put ] choose ; 21:01:50 what I implemented is more ANS forth-like than retro, but thanks to some implementation-specific magic has support for lambdas 21:01:51 All of my flow control words (except repeat/again) take pointers to words or quotations 21:21:40 I'm inspired to create a set of control flow words based on functions (quotations counting as anonymous functions) 21:54:29 I need better names for my conditional words' names 21:54:58 * PoppaVic chuckles 21:57:08 I've basically just taken the standard forth words' names, e.g. IF-THEN, IF-ELSE, BEGIN-UNTIL, WHILE-REPEAT, DO-LOOP, and DO+LOOP but these look really ugly 21:57:22 but I don't want to reuse names already taken for control words 21:58:35 btw, why the chuckle? 21:59:35 because those are your standard control-flow words. I prefer to think of 0branch, branch, (absolute and relative and indirect) 22:01:23 to me, BRANCH and ?BRANCH are primitives for implementing higher-level abstractions, not words meant for user-level consumption 22:03:14 and yes, I'm trying to reimplement standard control-flow constructs using anonymous functions 22:05:26 (well, not trying - I have them implemented, I just have shitty names for them) 22:37:04 --- quit: Zarutian (Ping timeout: 250 seconds) 23:59:59 --- log: ended forth/18.12.21