00:00:00 --- log: started forth/20.12.03 00:18:47 --- quit: the_cuckoo (Ping timeout: 265 seconds) 00:33:46 --- join: the_cuckoo joined #forth 00:55:45 --- quit: the_cuckoo (Ping timeout: 256 seconds) 01:08:57 --- join: dave0 joined #forth 01:11:45 --- join: the_cuckoo joined #forth 01:34:28 --- quit: dave0 (Read error: Connection reset by peer) 01:39:43 --- join: dave0 joined #forth 01:41:31 --- quit: dave0 (Read error: Connection reset by peer) 01:41:44 --- join: DKordic joined #forth 01:46:48 --- join: dave0 joined #forth 01:50:19 --- quit: Zarutian_HTC (Remote host closed the connection) 01:56:03 --- join: xek joined #forth 02:08:51 --- quit: dave0 (Read error: Connection reset by peer) 02:14:07 --- join: dave0 joined #forth 02:33:17 --- quit: the_cuckoo (Ping timeout: 256 seconds) 02:58:36 --- join: the_cuckoo joined #forth 03:10:56 --- quit: X-Scale (Ping timeout: 246 seconds) 03:17:11 --- join: X-Scale joined #forth 04:30:53 --- join: Gromboli joined #forth 04:49:15 --- quit: dave0 (Quit: dave's not here) 05:03:11 --- nick: hosewiejacke -> hwj 05:04:35 --- part: hwj left #forth 06:13:36 --- join: MrMobius joined #forth 06:18:55 --- join: Gromboli_ joined #forth 06:22:22 --- quit: Gromboli (Ping timeout: 256 seconds) 06:24:08 I wonder if it's possible to simulate lexical scoping with Forth200x Quotations. 06:24:54 In combination with local variables of course. 06:25:33 { some-word } [: some-word ;] execute 06:28:44 Oh it is possible, just need to put the word on the stack! :facepalm: 06:29:02 It's not lexical scoping, but still gets the job done. 06:47:21 Solved the Advent day 2: https://gist.github.com/neuro-sys/724c335893c9036dc42690be6d17b21a 06:47:56 I gave up on stack shuffling, now it's significantly easier to write. 07:05:47 Sounds about right! 07:06:07 What is "Forth200x"? 07:07:23 I think Quotations are part of Forth200x standard (from what crc mentioned yesterday) and is only available in the latest versions of gforth. 07:08:37 Oh I see there is actually a draft of the standard online after all 07:08:51 Why is it not on the pretty website though? 07:09:03 forth-standard.org just has 2012's pdf I think? 07:24:02 Ah yeah they link the 2012 document from the 200x website. This is convoluted 07:24:13 --- join: hosewiejacke joined #forth 07:26:01 --- part: hosewiejacke left #forth 07:34:29 I haven't fully checked the websites yet. Mostly using the pretty website and gforth documentation so far. 07:44:52 Check out http://www.forth200x.org/documents/ 07:57:10 --- join: xek_ joined #forth 07:59:28 --- join: hosewiejacke joined #forth 07:59:56 --- quit: xek (Ping timeout: 260 seconds) 08:08:37 Thanks 08:12:35 --- quit: gravicappa (Ping timeout: 264 seconds) 08:27:34 --- join: gravicappa joined #forth 09:14:58 --- quit: hosewiejacke (Ping timeout: 240 seconds) 09:27:21 --- quit: Lord_Nightmare (Quit: ZNC - http://znc.in) 09:28:24 Here's day 3-1: https://github.com/neuro-sys/advent-of-code-2020/blob/main/day3-1.fs 09:29:03 --- join: Lord_Nightmare joined #forth 09:34:14 here's mine (both parts): http://forth.works/examples/advent-of-code-2020-day-3.retro.html 09:37:51 And this is the second part: https://github.com/neuro-sys/advent-of-code-2020/blob/main/day3-2.fs 09:50:57 --- join: hosewiejacke joined #forth 09:51:59 --- quit: hosewiejacke (Client Quit) 10:06:36 --- quit: xek_ (Ping timeout: 260 seconds) 11:59:26 --- quit: gravicappa (Ping timeout: 246 seconds) 12:17:43 --- quit: spoofer (Quit: leaving) 12:24:21 --- join: xek_ joined #forth 12:33:55 --- join: spoofer joined #forth 13:04:56 --- quit: presiden (Read error: Connection reset by peer) 13:05:16 --- quit: WilhelmVonWeiner (Read error: Connection reset by peer) 13:05:30 --- quit: nmz (Read error: Connection reset by peer) 13:21:43 --- quit: lispmacs[work] (Remote host closed the connection) 13:40:36 --- join: dave0 joined #forth 13:50:06 --- join: Zarutian_HTC joined #forth 14:20:56 --- quit: xek_ (Ping timeout: 260 seconds) 14:23:21 neuro_sys: Do you know about https://forth-standard.org/standard/rationale#rat:facility:BEGIN-STRUCTURE 14:24:15 In that example they show use of FIELD+ which would shorten your code a bit, but also the structure words which could shorten them even more (I'm reading your AoC day2-1 code) 14:26:38 --- quit: Zarutian_HTC (Ping timeout: 240 seconds) 14:28:06 So you could write e.g. begin-structure password:struct field: password:min field: password:max field: password:letter field: password:phrase end-structure 14:31:28 --- join: Zarutian_HTC joined #forth 14:36:56 Why does it feel like every AoC would be borderline trivial in awk 14:38:31 --- join: lispmacs[work] joined #forth 16:20:56 --- quit: dave0 (Quit: dave's not here) 16:39:51 --- join: jsoft joined #forth 16:58:22 --- quit: rann (Ping timeout: 244 seconds) 16:59:58 --- join: rann joined #forth 17:04:32 veltas: Thanks, I had that in mind, but didn't get around to reading about it yet. 17:05:21 Now I'll check that. Thanks for pointing it out. 17:05:48 AoC is pretty trivial so far indeed, but it gets progressively difficult. 17:43:15 It's not entirely clear to me why (the docs or the standard doen't mention usage) the structure field is used like 0 field-name. 17:51:29 Ah it is clear now, nevermind. :) An offset is always used with a base address, that's why. 17:51:31 xb 17:51:38 ^ typo 18:02:16 veltas: hah, for day 3 I saw someone post a one-line awk solution 18:02:48 i'd be happy if finally finished AoC this year 18:03:53 neuro_sys: nice, using named parameters makes it clearer 18:16:49 --- join: boru` joined #forth 18:16:51 --- quit: boru (Disconnected by services) 18:16:54 --- nick: boru` -> boru 18:23:04 --- join: nmz joined #forth 18:31:04 --- quit: nmz (Quit: EXIT) 18:31:29 --- join: nmz joined #forth 18:49:22 --- join: dave0 joined #forth 18:56:48 I don't 18:58:16 I don't expect to finish aoc, I'll likely run out of time as the challenges get longer 19:36:41 --- quit: Gromboli_ (Read error: Connection reset by peer) 20:33:44 --- join: gravicappa joined #forth 20:48:32 --- quit: sts-q (Ping timeout: 260 seconds) 20:51:10 --- join: sts-q joined #forth 22:11:02 --- quit: dave0 (Read error: Connection reset by peer) 22:14:25 --- join: dave0 joined #forth 23:59:59 --- log: ended forth/20.12.03