00:00:00 --- log: started forth/18.12.04 00:00:56 --- quit: groovy2shoes (Excess Flood) 00:01:16 --- join: groovy2shoes (~groovy2sh@unaffiliated/groovebot) joined #forth 00:16:28 --- quit: dddddd (Ping timeout: 250 seconds) 00:29:15 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 01:53:13 --- join: ncv (~neceve@host165-120-98-94.range165-120.btcentralplus.com) joined #forth 01:53:13 --- quit: ncv (Changing host) 01:53:13 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 02:05:06 --- quit: ashirase (Ping timeout: 268 seconds) 02:07:57 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 03:09:51 --- quit: gravicappa (Ping timeout: 268 seconds) 03:39:23 --- quit: ncv (Remote host closed the connection) 03:44:28 --- join: gravicappa (~gravicapp@109.233.168.8) joined #forth 04:15:37 --- quit: smokeink (Remote host closed the connection) 04:15:59 --- join: smokeink (~smokeink@118.131.144.142) joined #forth 05:14:27 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 05:26:21 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 05:34:43 --- quit: gravicappa (Ping timeout: 252 seconds) 05:38:52 Good evening Forthwrights 05:45:16 --- quit: smokeink (Remote host closed the connection) 05:58:42 Hey rdrop-exit 05:58:56 Hi John 05:59:56 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 06:00:15 What's new in the Forth world 06:00:28 ? 06:01:31 --- quit: john_cephalopoda (Read error: Connection reset by peer) 06:05:20 --- join: [1]MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 06:08:16 --- quit: MrMobius (Ping timeout: 252 seconds) 06:08:17 --- nick: [1]MrMobius -> MrMobius 06:09:45 --- join: [1]MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 06:12:40 --- quit: MrMobius (Ping timeout: 250 seconds) 06:12:40 --- nick: [1]MrMobius -> MrMobius 06:16:13 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 06:45:40 --- quit: xek (Ping timeout: 252 seconds) 07:00:33 --- quit: rdrop-exit (Quit: Lost terminal) 07:16:36 --- quit: dave0 (Quit: dave's not here) 07:21:08 --- join: gravicappa (~gravicapp@h109-187-232-229.dyn.bashtel.ru) joined #forth 07:21:52 --- join: TheCephalopod (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 07:23:55 --- quit: tabemann_ (Ping timeout: 252 seconds) 07:30:57 --- join: xek (~xek@37.248.138.80) joined #forth 07:34:09 --- quit: siraben (Quit: issued !quit command) 07:35:18 --- join: siraben (sirabenmat@gateway/shell/matrix.org/x-cgrllwcczyiircsc) joined #forth 08:13:03 --- quit: xek (Ping timeout: 246 seconds) 08:33:20 --- join: xek (~xek@public-gprs350809.centertel.pl) joined #forth 08:36:08 --- join: dys (~dys@tmo-103-188.customers.d1-online.com) joined #forth 08:37:13 --- quit: TheCephalopod (Quit: Trees can see into your soul. They lurk everywhere.) 09:14:55 --- quit: pierpal (Quit: Poof) 09:15:11 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 09:17:12 --- quit: xek (Remote host closed the connection) 09:17:43 --- join: xek (~xek@public-gprs350809.centertel.pl) joined #forth 09:38:04 --- quit: ncv (Ping timeout: 250 seconds) 09:38:38 --- join: newuser|14733 (4fc37606@gateway/web/cgi-irc/kiwiirc.com/ip.79.195.118.6) joined #forth 09:39:13 --- quit: newuser|14733 (Client Quit) 10:06:44 --- quit: xek (Read error: Connection reset by peer) 10:07:13 --- join: xek (~xek@public-gprs350809.centertel.pl) joined #forth 11:08:53 --- quit: cheater (Read error: Connection reset by peer) 11:20:01 --- quit: gravicappa (Ping timeout: 268 seconds) 12:30:49 --- quit: pierpal (Ping timeout: 244 seconds) 12:32:15 --- quit: xek (Ping timeout: 268 seconds) 12:35:25 --- join: cheater (~cheater@unaffiliated/cheater) joined #forth 12:44:09 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 13:05:18 --- quit: pierpal (Ping timeout: 246 seconds) 13:17:22 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 14:29:11 --- quit: ashirase (Quit: ZNC - http://znc.in) 14:42:25 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 15:33:08 Has anyone been doing Advent of Code? 15:33:26 I'm onyl on day 2 because I've been putting it off, but I'm back at it now. 16:02:04 --- join: TheCephalopod (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 16:05:54 --- quit: john_cephalopoda (Ping timeout: 250 seconds) 16:08:28 WilhelmVonWeiner: I wanted to join it but I've been too busy :þ 16:08:38 --- quit: TheCephalopod (Quit: Trees can see into your soul.) 16:11:24 forth's memory model allows for some novel solutions. 16:15:04 afaict, anyway 16:19:08 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 16:20:37 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 16:23:41 hi 16:23:56 Good morning Forthwrights 16:26:15 hi rdrop-exit 16:26:36 Hi Dave0 16:29:06 rdrop-exit: hello hello 16:43:30 Hi Wilhelm 16:45:07 speaking of "hi" 16:45:09 time for bed 16:45:32 Good night :) 17:22:41 --- quit: dddddd (Remote host closed the connection) 17:39:10 --- join: smokeink (~smokeink@118.131.144.142) joined #forth 18:18:12 --- quit: cheater (Ping timeout: 246 seconds) 18:20:27 --- join: cheater (~cheater@unaffiliated/cheater) joined #forth 18:50:16 --- quit: cheater (Ping timeout: 272 seconds) 18:51:47 --- join: cheater (~cheater@unaffiliated/cheater) joined #forth 19:21:08 --- quit: dave0 (Quit: dave's not here) 19:25:58 Hi all 19:26:39 Hi Siraben 19:28:12 Hi rdrop-exit 19:29:54 --- join: tabemann_ (~tabemann@2602:30a:c0d3:1890:e076:b2ce:d7a5:84d9) joined #forth 19:56:35 --- join: gravicappa (~gravicapp@109.233.168.8) joined #forth 19:56:45 0 shadow Return Stack Miscellanea 19:56:45 1 19:56:45 2 supplant Compile code to push the cell at onto the return 19:56:45 3 stack and store in its place. 19:56:45 4 19:56:47 5 revert Pop cell and store at address . 19:57:16 0 source Return Stack Miscellanea 19:57:16 1 19:57:17 2 : supplant ( x' a -- )( r: -- x ) !@ push ;inline compiled 19:57:17 3 19:57:17 4 : revert ( a -- )( r: x -- ) pop \! ;inline compiled 19:57:19 5 19:59:08 IIRC these were called bury and exhume in some Forths 19:59:37 I'd have to dig through the old FD issues 19:59:47 to verify 20:02:19 I use Chuck's names for ">r" and "r>", i.e. "push" and "pop" 20:07:18 !@ ( x a -- x' ) is a primitive that exchanges with cell at 20:08:52 \! ( a x -- ) is a primitive, ! with the arguments reversed 20:16:40 supplant and revert are useful for temporarily overriding a global variable before calling a word, then restoring it afterwards 20:19:38 Anyway, that's my code snippet share of the day. :) 20:26:37 hey guys 20:26:53 What's ;inline and compiled ? 20:28:47 ;inline is so that when the word is compiled into another, its code is inlined into the other word rather then compiling a call to it into the other word 20:30:00 that reminds me of some math code that I wrote 20:30:17 that I literally wrote another function to generate the math function that the user actually calls 20:30:32 compiled marks the word as a compile-only word, it isn't found by the interpreter only by the compiler 20:30:52 to loop unroll and evaluate things such as factorial and 1/factorial statically 20:33:18 Examples of compile-only words are control flow words such as |if|, |else|, etc... 20:33:45 They only work inside colon definitions 20:35:04 Hi Tabemann 20:36:01 * tabemann_ finally implemented code for enable clean killing of tasks 20:36:28 i.e. the thread does not die right away, but rather it executes at exit handlers before killing itself 20:36:42 hara-kiri 20:37:04 well the problem with my word KILL is that the task just dies right then and there 20:37:14 so if there's any cleanup that is needed it doesn't happen 20:37:47 but rather I made a word TERMINATE that, well, suggests to the task that it ought to kill itself, and the task tidies things up before calling KILL on itself 20:39:17 (calling KILL on itself is necessary, because otherwise the task will just execute a garbage value after the bottom of the return stack, and attoforth will crash) 20:40:41 (this is by design - otherwise, before executing each word, it would have to check whether the IP is, say, NULL, which would incur a performance hit) 20:41:42 Every time I read such things it makes me appreciate more the utter simplicity of cooperative multitasking 20:43:23 I've looked at multitasking Forths that simply don't allow tasks to exit 20:44:04 they may allow them to be enabled and disabled, but once created they are there forever 20:44:16 That would be normal in an embedded app 20:45:48 but yeah - being preemptive multitasking has definitely made attoforth more complex 20:46:24 the core of attoforth is simple, but the Forth portion has things like spinlocks, locks, condition variables, unbounded channels, and bounded channels 20:47:03 (well, the core of attoforth isn't that simple, with the IO manager and all) 20:48:17 at the same time it allows things like each task to have its own blocking IO independent of the other tasks, whereas were it cooperative blocking IO in one task would block the rest of the tasks, at least without special support 20:49:44 It all comes down to making sure the complexity is inherent to the problem your application is trying to solve, or whether it's just arbitrary complexity that just results in unneeded overhead, increased maintenance, bugs, etc... 20:50:50 Fred Brooks has a great book about this "The Deisgn of Design" 20:50:56 the level of complexity as the user sees it is lower than the level of complexity in the implementation 20:52:07 The Forth philosophy isn't about surface simplicity, it's about having simplicity through and through at all levels 20:52:15 rdrop-exit: You mean the "incidental" vs. "essential" complexity thing? 20:53:18 Yes, I prefer inherent vs arbitrary complexity, but same difference 20:55:31 I've always been of the philosophy that it is okay to have complexity as long as you present a clean and simple interface which abstracts it all away so you don't have to think about it 20:55:50 One of Brooks points is that that simple things should always remain simple, even as the complexity of the overall system rises 20:57:02 Tabemann, that is where the Forth philosophy and approach differ from the mainstream 20:57:07 like for instance channels - damn simple to work with, with very few gotchas or corner cases or like - but they're built on circular buffers, condition variables, locks, and spinlocks, all of which have their own complexities 20:59:16 It's ok to have complexity if it is inherent to the problem you are trying to solve 20:59:27 or bounded channels - these take care of like the only gotcha with channels, which is if you're producing faster than you're consuming you'll expand your memory usage forever 21:01:07 the complexity in locks and condition variables are inherent - by their nature they have to manage things like waiting queues of tasks waiting to be woken up, and these may be any number of tasks 21:02:24 and they have to deal with the general trickiness involved in preemptive concurrent programming 21:02:53 and they have to protect their own data structures from concurrent access with simpler locks, i.e. spinlocks 21:03:31 (they're not true spinlocks because they yield each time they fail to take the lock) 21:04:01 You're not getting where I'm coming from, if the problem you're trying to solve does not require the complexity of preemptive multitasking then the additional complexity imposed by preemptive multitasking is arbitrary complexity you are imposing on the solution. 21:06:09 it's a trade-off - the complexity incurred by needing locks and condition variables versus the complexity incurred by needing to make sure one yields in the right places and often enough but not too often to avoid starvation 21:08:39 of course, if one just uses channels, bounded or not, one generally does not have to worry about things like locking and condition variables in the first place, because they are all abstracted away 21:10:13 It's not about surface complexity, it's about overall system complexity. Sweeping complexity under the rug of an abstraction doesn't make it go away. 21:13:17 but then one has to consider what is more important - the complexity one has to deal with directly as a programmer, versus the complexity of the whole system - in one case one may be less and the other may be more, and in another case vice versa 21:14:37 a channel-based preemptive multitasking system is very simple on the surface, yet has considerable complexity in the whole implementation, whereas a cooperative multitasking system is very simple in the implementation, yet has more considerations that the programmer has to deal with directly (e.g. how to block on IO) 21:19:25 (OTOH a lock-and-condition variable-based preemptive multitasking system is very complex on the surface, and I can see why cooperative multitasking would be attractive in comparison to it) 21:21:51 Forth isn't Basic or Python, the typical Forth programmer understands his system from the ground up, and often implements his own Forths. 21:23:22 well yes 21:25:07 So the dichotomy between programmer and implementer is much less pronounced with Forth. 21:26:32 Making the system more complex overall, to make it appear less complex on the surface, is much less attractive to the typical Forth programmer. 21:26:55 Than say a Python or Basic programmer. 21:27:46 I personally just like having nice abstractions to deal with, even when it means me myself doing the dirty work of building those abstractions from scratch 21:29:21 like blocking IO - it's something I really wanted to have, even though I knew it meant having to build a goddamn IO manager centered around poll() 21:30:31 (and I mean true blocking IO, not just doing a spin/yield wait until nonblocking IO succeeds) 21:31:33 If your solutions will require that, then you should have it. 21:31:58 of course this was for a reason - my primary computer is a laptop, which I much of the time don't have plugged in, and doing a spinwait would kill the battery life 21:33:33 of course there's other ways to do it 21:33:54 I have seen embedded forths with cooperative multitasking which put the processor to sleep until an interrupt arrives 21:34:05 but those are embedded Forths, which can do such things 21:34:16 The typical Forth solution if your waiting for I/O is to let another task run, and if there's no other task ready go to sleep 21:34:29 *you're not your 21:36:33 that's what I do - I deschedule the blocked task, and if all tasks are descheduled I just wait on a condition variable for a signal from the IO manager indicating that a task should be woken up, and the IO manager sets a flag on that task telling the main pthread that that task should be run 21:37:08 most of the time no tasks are scheduled, which means that it simply waits for IO 21:39:35 As long as the IO manager can also go to sleep, then it's equivalent 21:40:24 the IO manager is centered around a poll() loop, so by default it is sleeping 21:41:06 it only wakes up if it gets IO, a task changes the IO manager configuration, or a task has finished a timed sleep 21:46:10 there you go 21:51:36 I have to walk the dogs and have a very late lunch. Chat again soon. 21:51:47 --- quit: rdrop-exit (Quit: Lost terminal) 22:44:31 --- quit: tabemann_ (Ping timeout: 268 seconds) 22:47:25 --- join: tabemann (~tabemann@2602:30a:c0d3:1890:e076:b2ce:d7a5:84d9) joined #forth 22:54:23 --- quit: tabemann (Ping timeout: 268 seconds) 22:55:25 --- join: tabemann (~tabemann@2602:30a:c0d3:1890:e076:b2ce:d7a5:84d9) joined #forth 22:56:59 --- quit: pierpal (Quit: Poof) 22:57:19 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 23:00:52 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 23:31:48 --- quit: dys (Ping timeout: 250 seconds) 23:59:59 --- log: ended forth/18.12.04