▲ 18 ▼ The official awful.systems Advent of Code 2023 thread (awful.systems) submitted 2 years ago* (last edited 2 years ago) by gerikson@awful.systems to c/notawfultech@awful.systems 121 comments fedilink hide all child comments Rules: no spoilers. The other rules are made up as we go along. Share code by link to a forge, home page, pastebin (Eric Wastl has one here) or code section in a comment.
[+] datarama@awful.systems 4 points 2 years ago* (3 children) [deleted] permalink fedilink source parent hideshow 6 child comments replies: [–] self@awful.systems 4 points 2 years ago (1 child) fuck yes scheme. you might have just inspired me to write some Lisp Machine Lisp solutions, since I might need a Lisp Machine codebase to test one of my side projects permalink fedilink source parent hideshow 2 child comments replies: [+] datarama@awful.systems 4 points 2 years ago [deleted] permalink fedilink source parent [–] gerikson@awful.systems [S] 4 points 2 years ago (1 child) Re Perl findall, I used this regex in my "clean" solution which I didn't post because I figure it's more honest to submit what worked, not the smart stuff you found out later. regex# find all numerals and number in English from the string $line and put them into the array @spelled my @spelled = ( $line =~ (m/(?=(\d{1}|one|two|three|four|five|six|seven|eight|nine))/g ); permalink fedilink source parent hideshow 2 child comments replies: [+] datarama@awful.systems 4 points 2 years ago [deleted] permalink fedilink source parent [–] froztbyte@awful.systems 3 points 2 years ago I like your condensed solve method, yay for concise code permalink fedilink source parent
[–] self@awful.systems 4 points 2 years ago (1 child) fuck yes scheme. you might have just inspired me to write some Lisp Machine Lisp solutions, since I might need a Lisp Machine codebase to test one of my side projects permalink fedilink source parent hideshow 2 child comments replies: [+] datarama@awful.systems 4 points 2 years ago [deleted] permalink fedilink source parent
[–] gerikson@awful.systems [S] 4 points 2 years ago (1 child) Re Perl findall, I used this regex in my "clean" solution which I didn't post because I figure it's more honest to submit what worked, not the smart stuff you found out later. regex# find all numerals and number in English from the string $line and put them into the array @spelled my @spelled = ( $line =~ (m/(?=(\d{1}|one|two|three|four|five|six|seven|eight|nine))/g ); permalink fedilink source parent hideshow 2 child comments replies: [+] datarama@awful.systems 4 points 2 years ago [deleted] permalink fedilink source parent
[–] froztbyte@awful.systems 3 points 2 years ago I like your condensed solve method, yay for concise code permalink fedilink source parent