I think I’d like to try this year’s in a language I haven’t touched before. What languages should I consider if I want something paradigmatically different from Go, Python, etc?
I do them in Elixir and I find it to be a great language for this kind of thing. I'm not a very sophisticated Elixir programmer, but I think my solutions are decent enough (and readable, for the most part!). I have a repo which has solutions for quite a few of the puzzles, along with some nifty little mix tasks to help set up a skeleton for each day's puzzle and automatically fetch the input file. If you're intereste…
Advent of Code 2023 is nigh
121–130 of 319 posts
Re: Advent of Code 2023 is nigh
#122Earlier quoted context omitted.
Same here. I would've really like if the spec specifically mentioned the possibility of that one edge case ahead of time instead of having to sift through the 1000 lines of input. No hate on AOC though, I really respect all the hard work that goes into it.
Yeah I was sort of lucky that my edge case was on the last line, still took a full hour of wondering why my solution was wrong though.
Re: Advent of Code 2023 is nigh
#123Earlier quoted context omitted.
Yeah I was sort of lucky that my edge case was on the last line, still took a full hour of wondering why my solution was wrong though.
What was this edge case you encountered? My code worked...after I finally read the problem closely enough.
Re: Advent of Code 2023 is nigh
#124It's a tough day 1, I hope it doesn't scare off too many people. Normally day 1 is just some variation of "add numbers in a list", but this year has a mean pt 2 and a few traps for people to fall into. I wonder how long the global leaderboard will stay up before it gets hidden due to people solving with ChatGPT?
Re: Advent of Code 2023 is nigh
#125As others have said, part 2 of today's was really difficult. I finally solved it using Python regex `overlapped=true`, but it was very tricky. The irritation of having all of the test cases passing, but it failing for my challenge input! I hope it doesn't scare off newcomers, but I already know a few who have given up on part 2.
Same here. I would've really like if the spec specifically mentioned the possibility of that one edge case ahead of time instead of having to sift through the 1000 lines of input. No hate on AOC though, I really respect all the hard work that goes into it.
> eightwothree
> 4nineeightseven2
> zoneight234
I test my AoC solutions incrementally by printing output, so I found that I was failing to produce the correct list of numbers in a line right away. I suppose if you're taking a faster approach and just trying to extract the first and last numbers that it's easier to miss. It's always a good idea to look at the example input, though.
Re: Advent of Code 2023 is nigh
#126Genuinely curios why people are so into AoC ... Feels leetcode-y
A few reasons I like them: 1. The goal is to come up with a workable solution - not to try to fold your brain inside out to optimize them like leetcode. They feel a little more "real-world" (though still firmly in the domain of programming puzzle) 2. There is a community that all solve them at once. At my company, we have a leaderboard and a Slack channel discussing them every day. And then there is the Reddit and ev…
Re: Advent of Code 2023 is nigh
#127Day one part 2 was relatively rough. Things I learned from it: rust regex crate doesn't support look-ahead, rust onig crate is currently broken in many ways and shouldn't be used (the version in crates.io doesn't compile and the version on GitHub is failing tests and look-ahead isn't working). It was a very frustrating time for me. After 2 hours of troubleshooting the above I used the same approach in python and it t…
Rust regex crate author here. fancy-regex is built on top of the regex crate and supports look-around. The regex crate doesn't support arbitrary look-around because it isn't known how to implement efficiently. See: https://swtch.com/~rsc/regexp/regexp1.html
A bit of a philosophical question:
If how to write an efficient implementation is yet not known to man, ie. not a matter of the library's author time or skills, but literally a limit on human knowledge: why not at least provide the functionality with a good enough implementation? (with caveats just possibly mentioned in documentation)
IMHO that'd be arguably a good thing for everybody, at a minimum better than just not offering the possibility at all. Which drives users to frustration, or leaves them having to discover a more pragmatic alternative lib that opted to add it.
This is no complaint or feature request... I just want to learn from some insight behind the thought process of "if it's not efficient, better not have it at all"
PS. Thanks for the link. Now I have a good read for the weekend, for sure!
Re: Advent of Code 2023 is nigh
#128Earlier quoted context omitted.
Same here. I would've really like if the spec specifically mentioned the possibility of that one edge case ahead of time instead of having to sift through the 1000 lines of input. No hate on AOC though, I really respect all the hard work that goes into it.
Unless the question has been edited recently, it did. There are multiple lines in the second example input that show the overlap: > eightwothree > 4nineeightseven2 > zoneight234 I test my AoC solutions incrementally by printing output, so I found that I was failing to produce the correct list of numbers in a line right away. I suppose if you're taking a faster approach and just trying to extract the first and last nu…
Re: Advent of Code 2023 is nigh
#129> Consider your entire calibration document. What is the sum of all of the calibration values?
Where is the document? Where do I download it?
Re: Advent of Code 2023 is nigh
#130Maybe I'm too stupid for this > Consider your entire calibration document. What is the sum of all of the calibration values? Where is the document? Where do I download it?