00:00:00 --- log: started forth/20.12.06 00:48:18 --- quit: gravicappa (Ping timeout: 256 seconds) 01:23:02 --- quit: jsoft (Ping timeout: 272 seconds) 02:25:11 --- join: gravicappa joined #forth 02:50:27 I tried day 1-1 with "classic" style: https://github.com/neuro-sys/advent-of-code-2020/blob/main/day1-1.fs 02:54:47 Cool, I am reading it 02:55:08 You don't need to close a file if you're just reading it, as far as I know 02:59:21 I like : load-file open read close ; 03:00:59 Instead of dup 0= you can do ?dup, but you will need to swap the if/else parts 03:01:32 And then you can remove the drop when it's 0 03:06:26 Ah right forgot the ?dup 03:06:41 Similarly in the loop you do "0<> while ... repeat drop", you could have "?dup while ... repeat" equivalently 03:07:14 Quite often ?dup is useful when comparing against zero or checking a flag 03:08:53 I think so anyway I am struggling to think seriously about your code because I am in the middle of writing merge sort for my big boy version 03:09:59 I really like what you've done here neuro_sys, it's very clean as well 03:10:28 I think I would actually prefer more comments reading it, I think Chuck Moore is wrong on that one, especially stack comments 03:11:59 Thanks. Yeah the two or three words in particular there would benefit a lot from stack comments. 03:12:18 I don't mind no comments mid-definition if it's a short definition 03:12:27 --- quit: siraben (Ping timeout: 240 seconds) 03:12:54 --- quit: jimt[m] (Ping timeout: 260 seconds) 03:13:27 I think it helps the most to have them for the input and output of words, to avoid having to necessarily read the whole program to figure out what's happening 03:14:36 Instead of leaving 0 at the end of the array, have you considered checking when the search address is HERE to end the inner loop? 03:15:08 Oh and there is a forth standard word for "1 cells +": cell+ 03:17:19 Nice, just pushed the changes 03:23:09 --- join: dave0 joined #forth 03:28:45 Looking at your code has given me a good idea for my merge sort code 03:38:12 --- join: siraben joined #forth 03:50:07 --- join: jimt[m] joined #forth 04:33:50 --- join: xek_ joined #forth 04:39:48 --- quit: DKordic (Remote host closed the connection) 05:43:47 I added day 1-2: https://github.com/neuro-sys/advent-of-code-2020/blob/main/day1-2.fs 05:55:24 --- quit: dave0 (Quit: dave's not here) 06:06:46 Part 2 is not as easy to factor 06:09:51 But it's worth trying to make that smaller I think 06:39:46 neuro_sys: Is there anything you've made with these classic rewrites to put in your forth utils library? 06:42:12 veltas: That library is useless at this point. I'd have to re-write them all. 06:42:37 Maybe after I do day2, or possibly in day3 they may be needed, and reworked. 06:43:24 Luckily I think that forth is either especially reworkable, or it requires the skill of constant reworking regardless 06:43:25 At least I can change them to use Dictionary instead of allocate, but so far I was imitating C-syntax, so they're pretty much moot at this point. 06:45:18 I didn't notice you using allocate previously 06:55:24 --- join: Gromboli joined #forth 07:34:07 --- quit: xek_ (Ping timeout: 240 seconds) 08:24:19 --- join: Zarutian_HTC joined #forth 08:35:34 --- quit: gravicappa (Ping timeout: 256 seconds) 08:48:13 --- join: gravicappa joined #forth 09:19:46 --- join: jsoft joined #forth 09:48:25 --- join: agspathis joined #forth 10:05:27 --- quit: jsoft (Ping timeout: 240 seconds) 10:11:25 --- join: xek_ joined #forth 11:23:48 --- quit: agspathis (Remote host closed the connection) 12:00:36 --- quit: cp- (Remote host closed the connection) 12:44:58 --- quit: gravicappa (Ping timeout: 240 seconds) 13:14:05 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 13:14:45 --- join: Zarutian_HTC joined #forth 13:41:48 --- quit: xek_ (Ping timeout: 256 seconds) 14:00:35 --- quit: Zarutian_HTC (Ping timeout: 246 seconds) 14:05:01 --- join: Zarutian_HTC joined #forth 15:21:41 --- quit: Vedran (Ping timeout: 265 seconds) 15:22:00 --- join: Vedran joined #forth 16:01:11 --- quit: Zarutian_HTC (Remote host closed the connection) 16:24:47 --- quit: tabemann (Remote host closed the connection) 16:25:01 --- join: tabemann joined #forth 16:52:47 --- join: cp- joined #forth 18:12:25 --- join: boru` joined #forth 18:12:28 --- quit: boru (Disconnected by services) 18:12:30 --- nick: boru` -> boru 18:30:24 --- quit: Gromboli (Read error: Connection reset by peer) 18:34:29 --- join: dave0 joined #forth 19:16:31 --- quit: dave0 (Quit: dave's not here) 19:36:31 --- join: jsoft joined #forth 20:17:14 --- quit: proteusguy (Remote host closed the connection) 20:43:58 --- quit: sts-q (Ping timeout: 240 seconds) 20:58:17 --- join: sts-q joined #forth 21:00:31 --- join: gravicappa joined #forth 21:24:47 --- join: proteusguy joined #forth 21:58:59 --- quit: proteusguy (Ping timeout: 260 seconds) 22:10:21 --- join: proteusguy joined #forth 23:06:17 --- join: hosewiejacke joined #forth 23:59:59 --- log: ended forth/20.12.06