3 ms·
Every AoC problem boils down to the task of "read and parse this text file, write a small script with an algorithm to compute something with the input (maybe do
by jstx1 5y ago
Every AoC problem boils down to the task of "read and parse this text file, write a small script with an algorithm to compute something with the input (maybe doing this for time) and you aren't bound by the performance of your machine or your language". Python is one of the best languages for that task. If you had to do anything similar in the real world, you wouldn't
I also don't think that the problems are that easy. With Python I can focus more on solving the problem instead of trying to fight a new language (or to force a language into a task for which it isn't all that great).
- sokoloff 5y agoI’m using AoC to learn Clojure this year. I found Day 14 part 2 to be performance-bound (the naive solution that worked fast for part 1 didn’t for part 2). I have to cycle back to it to use a smarter algorithm for part 2.
- jstx1 5y agoRight but you aren't performance bound by the language - rewriting the brute force for day 14 part 2 in C won't get you anywhere. I think that Eric tries to design the puzzles and the inputs in a way that - a well implemented smart solution runs in a reasonable time even in a slow language on a slow computer (this is what I meant by not being performance bound) - some of the exponential growth puzzles can't be realistically brute-forced even with a fast machine and a performant language (like the example you mentioned)
- sokoloff 5y agoAh. I get what you’re saying and agree strongly. I mis-read your intended (but clear enough) message the first time.