29 ms·
Advent of Code 2024
- arjvik 2y ago9 seconds to get both stars is absolutely insane - there had to be some AI assistance here. Come to think of it, a pipeline that feeds the problem text into an LLM to generate a solution and automatically runs it on the input and attempts to submit the solution, doing this N times in parallel, could certainly solve the first few days' problem in 9 seconds.
- isoprophlex 2y agoAI coding assistants ruined the global leaderboard experience. AoC might as well nerf it by discarding the quickest x percent of submissions, or something...
- WithinReason 2y agoThey should check that LLMs can't solve the problems in 9 seconds and come up with appropriate problems. Or just allow AI assistants, they are now as much part of the programmer's toolkit as syntax highlighting or autocomplete or Stack Overflow, and pretending otherwise is not useful.
- Retr0id 2y agoThe first few days are supposed to be beginner-accessible, it's practically impossible to have something beginner accessible but GPT-inaccessible.
- martin-t 2y agoNot gonna happen. AoC always starts with beginner level problems. That's why it's so commonly used for learning the basics of new languages. A problem that wouldn't be immediately solvable by LLMs would either be too advanced or simply too large to be fun. This is probably where programming as a whole is going. Many of the things that make programming fun for me, like deeply understanding a small but non-trivial problem and finding a good solution, are gonna be performed much faster by LLMs. After all most of what we do has been done before, just in a slightly different content or a different language. Either LLMs will peak out at the current level and be often useful but very error prone and not-quite-there. Or they'll get better and we'll be just checking their output and designing the general architecture.
- matsemann 2y agoThat's like going out for a run and taking an electrical scooter around the park instead. The point isn't finishing, the point is doing the activity.
- WithinReason 2y agoThen why have a leaderboard?
- matsemann 2y agoBecause someone likes to compete? There are 5k races as well, which people enjoy to do even though vehicles exist. And people would rightfully be upset if they got beaten by someone not running themselves.
- zwirbl 2y agoAnd then allow aimbots for counterstrike, stockfish at chess tournaments and Epo on the tour de France. The leader board is intended for people to compete against each other, one could make a separate leaderboard for LLM, kind of similar to the chess AI leaderboards.
- falcor84 2y ago> allow aimbots for counterstrike I'm not played counterstrike in over a decade, so you got me wondering - are there matches where everyone uses aimbots? What does the game look like then? I suppose there's a new mix of strategies evolving, with a higher focus on the macro movement planning?
- worthless-trash 2y ago> are there matches where everyone uses aimbots? Yes > What does the game look like then? I have only observed the games, it requires a lot of hiding. Most of the time the winning method is to act at the very last second and hope the other player is distracted.
- WithinReason 2y agoFalse equivalence. The sole reason for counterstrike and chess to exist is competition. Programming is about solving a problem. If you want to turn programming into a competition you shouldn't take away tools from the programmer.
- jbjbjbjb 2y agoYou’re saying programming isn’t not equivalent to chess here because programming isn’t a competition, but the Advent of Code leaderboard very much is a competition.
- fuglede_ 2y agoIt's not that bad. I'm sure there are more LLM'ers in there than the one, but you can tell that the majority of the day 1 leaderboard is made up of people who have historically performed well, even before LLMs were a thing. Compare https://adventofcode.com/2024/leaderboard/day/1 https://adventofcode.com/2024/leaderboard/day/1 to e.g. https://fuglede.github.io/aoc-full-leaderboard/ https://fuglede.github.io/aoc-full-leaderboard/ There was also at least one instance of people working together where you would have 15 people from the same company submit solutions at the same time, which can be a bit frustrating but again, not a huge issue.
- fuglede_ 2y agoOkay, I think I have to go ahead and retract my own comment. Day 5 appears to have been sufficiently tricky for humans to do quickly while still easy enough for the LLMs that it is clear that there is a very large amount of cheating going on.
- gorgoiler 2y agoI have a rule in life: no summary statistics without showing the distribution. Usually this goes for any median which might be in a sneaky bimodal distribution of, say, AI models vs humans. I guess it applies to leaderboards too though.
- exitb 2y agoPotentially the challenge just doesn’t make as much sense anymore? There apparently are „mental calculations” competitions and I’m sure their participants have fun. Yet I can hardly imagine doing arithmetic in ones head is any fun for an average mathematician. The challenge just shifted elsewhere over time.
- hmottestad 2y agoOpenAI did something similar with their o1 model. Ran a coding problem through o1 thousands or maybe millions of times and then checked if the solution was correct. I can imagine a great pipeline for performance optimization: 1. have an AI generate millions of tests for your existing code 2. have another AI generate faster code that still makes the tests pass So I guess all I want for Christmas is a massive compute cluster and infinite OpenAI credits :P
- nneonneo 2y agoIt was, of course, an AI-generated solution; they posted it here: https://web.archive.org/web/20241201052156/https://github.com/qianxyz/advent-of-code/commit/6458076f5782790f8878a957add96093e72ce5a2 https://web.archive.org/web/20241201052156/https://github.co... Later, after being called out on it, they posted an apology to their GitHub profile (https://web.archive.org/web/20241201064816/https://github.com/qianxyz https://web.archive.org/web/20241201064816/https://github.co...): "If you are here from the AoC leaderboard, I apologize for not reading the FAQ. Won't happen again." Both the repo and that message are now gone.
- dsissitka 2y agoFor comparison, here's how long it took in past years: 2015 - 10:55 2016 - 7:01 2017 - 1:16 2018 - 1:48 2019 - 1:39 2020 - 7:11 2021 - 1:07 2022 - 0:53 2023 - 2:24 And this year's second place was 0:54.
- fuglede_ 2y agoNote that regarding the outliers, in 2015 and 2016 the puzzles weren't as widely known, and in 2020, AWS' load balancers crashed and the puzzle was unavailable to most people for 6 minutes, then solved in a few minutes. https://adventofcode.com/2020/leaderboard/day/1 https://adventofcode.com/2020/leaderboard/day/1 -- postmortem: https://old.reddit.com/r/adventofcode/comments/k9lt09/postmortem_2_scaling_adventures/ https://old.reddit.com/r/adventofcode/comments/k9lt09/postmo...
- fuglede_ 2y agoYep, there was; they even wrote so in their commit message before removing it: https://old.reddit.com/r/adventofcode/comments/1h3w7mc/2024_day_1_no_llms_here/ https://old.reddit.com/r/adventofcode/comments/1h3w7mc/2024_...
- Almondsetat 2y agoCaring about the leaderboards is the problem. Are you (impersonal) seriously doing AoC for clout or something?
- nicce 2y agoI did it without AI last year and planning to do it again, for fun.
- zwnow 2y agoTrue. Leaderboards are and always have been full of cheaters.
- thinkingemote 2y agoIf people are concerned about leaderboards there are private leaderboards: https://adventofcode.com/2024/leaderboard/private https://adventofcode.com/2024/leaderboard/private Personally I don't do it to compete, I just like puzzles.
- aithrowawaycomm 2y agoThe primary reason to not care about AoC leaderboards is that that it penalizes people for being in the wrong time zone. That said, the top 100 or so contributors clearly do care about these things and using an LLM is cheating. In particular the LLM cheating isn’t just by conjuring a solution: humans don’t get ASCII characters pumped directly into their brain, we have to slowly read problem descriptions with our eyes. It takes humans more than 9 seconds to solve AoC #1 purely because of unavoidable latency.
- exitb 2y agoI wonder how many seconds could be won by the organizers if the challenge included a blant prompt injection breaking the result.
- emadb 2y agoI participate almost every year but I don't care about the leaderboard. The timezone play a crucial role in being able to be ready at the right time, so actually who cares? I prefer to build private leaderboards with my friends and colleagues.
- rvz 2y agoAt this point, it just shows that Advent of Code is completely worthless given the ease and accessibility of AI-assisted tools to solve these problems. RIP Advent of Code.
- wiseowise 2y agoSarcasm?
- abenga 2y agoWhy? Solving interesting problems to learn is a worthwhile goal. Why should it matter to you that others are "cheating"?
- zwirbl 2y agoBecause competing against other people is the fun part for some people. Why not allow everyone to use stockfish at chess tournaments?
- zwnow 2y agoThis is stupid though. Advent of Code Leaderbords were always full of cheaters. At least since 2020 when I first started. If you want competitive programming, AoC is not the place for that.
- graynk 2y ago“For _some_ people” is at odds with “_completely_ worthless”, don’t you think?
- dakiol 2y agoTo be fair, I read it as "_completely_ worthless for _some_ people"
- rich_sasha 2y agoWithout condoning cheating, I am impressed with the automation aspect of it. 9 seconds sounds more or less like the inference time of the LLM, so this must have been automated. Login at midnight + lots of C&P may not have done it. Perhaps there is a scope for an alternative AoC type competition aimed at AI submissions... ...though of course that would be experimenting to get us all out of work. Hmm.
- zwnow 2y agoIf real life problems were as easy and defined as AoC problems we might be able to be replaced at some point. I highly doubt you can replace software devs otherwise. Who else is going to take the blame for software issues?
- rich_sasha 2y ago"Write me a snippet that does X" is a step behind "figure out how to log into this page, download the data, write a snippet that gives the right answer to the sample data, then run it on the real thing and submit the output to the text box".
- deleted 2y ago[deleted]
- tags2k 2y agoAs with real life, the speed generally doesn't matter as long as you get a working solution and you find it fun. If you find "copy and paste into an LLM and then copy and paste the answer back out" fun, then I suppose you do you. I didn't realise it was be timed, which is good because I casually set up a new rig to give future puzzles some kind of rig. I used C# which, although probably more wordy than other solutions, did the job and LINQ made light work of the list operations. Ended up with about 6.5 minutes for each one but most of that was refactoring out of pedantry.
- delta_p_delta_x 2y agoIs there a way to override the CSS (on Chromium)? The body font and weight, Source Code Pro is far too thin and far too wide and gives me a headache (and has regularly turned me off AoC). I'd like to change it to `sans-serif`.
- delta_p_delta_x 2y agoSelf-response: Stylus is useful here[1]. There is a list of already more readable styles than the default that the community has prepared. [1]: https://github.com/openstyles/stylus https://github.com/openstyles/stylus
- 9029 2y agoI have used Stylus for CSS tweaks: https://addons.mozilla.org/firefox/addon/styl-us/ https://addons.mozilla.org/firefox/addon/styl-us/
- riffraff 2y agoOn thing you can do is fetch the html and extract the main content to display it in your favorite way, it's been stable for years, and you can use the (stable) session_id cookie, it's how many people approach the challenge.
- GCUMstlyHarmls 2y agoYou can hit the "Reader" button on Firefox (ctrl-alt-r), I think Chrome also has that? Or an extension that does the same thing would probably work. Bit simpler than writing an override or fetching the HTML.
- babo 2y agoThere are CLI tools to fetch and submit solutions. At least one of them allows you to download the puzzle description as markup: https://github.com/scarvalhojr/aoc-cli https://github.com/scarvalhojr/aoc-cli
- deleted 2y ago[deleted]
- mcintyre1994 2y ago
- tmountain 2y agoIt feels like AI will shape a lot of the submissions for these types of coding “traditions”. But, I guess that’s just the world we live in.
- Retr0id 2y agoEven before AI I was never fast enough for a respectable global rank, but it's still fun to compare solutions with friends.
- uludag 2y agoI'm actually pleasantly surprised by the results. I like to think that despite problem 1 being easily solvable by LLMs, just about everyone (sans qianxyz) read the FAQ, and decided that they would forego a leaderboard spot for the sake of this coding tradition. Either that, or there were hundreds of people trying and none were able to get it working despite the basic problem. I like to imagine most people reading the rules and being a good sport.
- wiseowise 2y agoAll the people I know already participate on private boards. AI enshitification will only speed up the process of moving there.
- danielbln 2y agoAre we using enshittification for everything we don't like these days? We invented calculators, those really enshittified manual arithmetic puzzles. Private boards for this stuff makes sense anyway, it's the Internet afterall.
- wiseowise 2y agoUsing LLM for this kind of thing is like using cheats or aim assist for online games. So yes, this is prime example of enshifittication.
- 2y ago
- ctur 2y agoWoohoo, one of the highlights of this time of year. I had to do mine from an eastbound flight over the pacific. This has become a fun tradition not just for me personally but for many friends, colleagues, and fellow HNers. Big props once again to wastl and his helper elves for making this! I encourage anyone who gets value from this to donate to support it if they can. It is a passion project but nonetheless comes with real costs.
- mteoharov 2y ago> I encourage anyone who gets value from this to donate to support it if they can. It is a passion project but nonetheless comes with real costs. With the sheer amount of sponsors and AoC++ users I do believe that this is not quite a small 'passion project' struggling to pay the monthly subscription to a VPS. That being said, adventofcode is absolutely great and people should support it if they can. But I do think the author is doing quite well with the amount of support he is currently receiving.
- bernds74 2y agoNice to see that traditions are upheld, such as the unreadable font and colors.
- simonjgreen 2y agoAnd the timeless tradition of HN commentators cynicism
- MortyWaves 2y agoAnd the timeless tradition of criticising perfectly valid concerns. Not everyone wants to be a member of the dark mode lobby.
- block_dagger 2y agoAnd the timeless tradition of HN commentators contempt
- moffkalast 2y agoWouldn't have it any other way :)
- arp242 2y agoI had to fiddle with the colours in the web inspector to even read the page. So yeah... Of all the cynical comments I see on HN, this ranks very very low.
- matsemann 2y agoReader mode or "View -> Page Style -> High contrast" in your browser works perfectly fine.
- delta_p_delta_x 2y agoReposting a comment below: I used Stylus[1]. There are already some considerably more readable themes by the community. [1]: https://github.com/openstyles/stylus https://github.com/openstyles/stylus
- matsemann 2y agoI love AoC. You don't have to care about the AI bots solving it or people waking up earlier than you, just solve it for your own fun. Either because you like the challenges, or to try it in a new language etc. I like to do them in a functional style in Kotlin as far as possible, as that's different from what I do at work. Edit: Here's mine from today, with my utils it's not exactly plain kotlin, but part of the fun is building a library of sorts with cool functions https://github.com/Matsemann/algorithm-problems/blob/main/adventofcode2024/src/main/kotlin/com/matsemann/adventofcode2024/Day01.kt https://github.com/Matsemann/algorithm-problems/blob/main/ad...
- c-fe 2y agoNice one, i like your transpose function, as python-numpy user in past years, but kotlin this year, i really missed the transpose function the most for this day one. My code: https://github.com/charelF/AdventOfCode/blob/main/kt/src/y2024/D01.kt https://github.com/charelF/AdventOfCode/blob/main/kt/src/y20...
- matsemann 2y agoUnzip was nice, will remember that one! This is also what I like, reading other's solutions and learning new stuff. I browse the subreddit after solving it myself to see all kinds of cool approaches.
- librasteve 2y agoother advents are available… https://raku-advent.blog/2024/12/01/day-8-rendering-down-for-christmas/ https://raku-advent.blog/2024/12/01/day-8-rendering-down-for... https://news.ycombinator.com/item?id=42286954 https://news.ycombinator.com/item?id=42286954
- Enk1du 2y agoand more advents... https://pdl.perl.org/advent/index.html https://pdl.perl.org/advent/index.html
- librasteve 2y agoyes perl was the original advent of code iirc
- sundarurfriend 2y agoI was looking for a puzzle in the first link until I saw the home page: "One article on Raku per day, until Christmas." I vaguely remember these from my Perl days (a decade ago) now. AoC usually loses my interest around day 6 or so, but a PDL journey for the advent sounds a lot more appealing. Time to dust off my Perl skills and see if I find it as fun today as I did back then.
- moffkalast 2y ago[flagged]
- deleted 2y ago[deleted]
- penguin_booze 2y ago[flagged]
- deleted 2y ago[deleted]
- ArcHound 2y agoI love AoC. I made a CLI client in python for me (and a lib for common tasks, especially the 2d grid maps). Repo: https://github.com/ArcHound/advent_of_code https://github.com/ArcHound/advent_of_code Writeup: https://blog.miloslavhomer.cz/p/advent-of-code-cli-client-and-library https://blog.miloslavhomer.cz/p/advent-of-code-cli-client-an... Good luck to y'all in 2024 and enjoy!
- peanut-walrus 2y agoI love AoC, but I hate the timing. December is always the busiest month of the year, so I really almost never find the time for it :(
- criddell 2y agoYou don’t have to do it in December. I was still working on last years in March.
- deleted 2y ago[deleted]
- NamTaf 2y agoI've never done AoC but I've done other programming-related challenges before. I come from a non-IT background (mech eng), and I'm currently away for work for the first several days with only their locked-down laptop. Normally I'd break out Python for this, but given the constraints maybe I should try to see how far I can get through this in Excel. It'd be a fun little challenge :)
- andai 2y agoMy approach here would be to make an index.html file with a script tag and drag it onto whatever browser is available. Then again I have made peace with JavaScript! (I think you could even use typescript with this method with the on the fly babel transpiler (you just include a script tag) but I haven't tried that.)
- cube00 2y agoYou'll lose the benefit of the TypeScript compiler picking up mismatched types if you only use a transpiler.
- andai 2y agoInteresting, the in-browser one doesn't do type checking? They're actually adding that to JS itself as far as I can tell -- the ability to strip TS types and run it as-is.
- Cruncharoo 2y agoI use Excel for the first few as well! I actually find it to be easier than using Python/Javascript, at least early on.
- ducdetronquito 2y agoI will try to do it with F# and Gleam this year, but like every year I won’t have time (and brain) to do more than 10/12 days ^^ For the pythonists around here, give F# a try: it can feels very close to scripting and it has a wonderful REPL too :)
- andrelaszlo 2y agoHow's linux support? :)
- neonsunset 2y agoIf almost 9 years were not enough to make this question seem silly, perhaps DuckDuckGo/Kagi/Perplexity could answer this?
- plagiarist 2y agoSure those can answer it. That person is perhaps trying to be social on a social network by inviting comments instead?
- neonsunset 2y agoThis specific question posed in this specific way usually implies a negative interaction. I have seen maybe one exception here so far. And after providing detailed answers for so many times, I don't think it's worth it.
- samatman 2y agoYou guaranteed it would be a negative interaction when you negatively interacted with the post. You're allowed to skip the ones you don't want to reply to.
- davidgl 2y agoPerfect, run loads of f# and c# on Linux, and have for years
- neonsunset 2y agoI can't explain why but doing AoC is always interesting, and doing LeetCode which is supposed to be similar is always very depressing. Wishing everyone a fun challenge. This year I will be practicing F# and hope some of you will give it a try too :) https://github.com/neon-sunset/AOC24/blob/master/day1.fsx https://github.com/neon-sunset/AOC24/blob/master/day1.fsx
- andai 2y agoThat's actually a very important question I think, and sorely neglected by most educators! (and book authors, etc)
- sailorganymede 2y agoAoC would be more stressful if you had to solve a problem in 30 minutes for a highly competitive job.
- acomjean 2y agothose exist. except I think the one I did was an hour(? it was ten years ago). I got the interview, but that didn't go well, so I went to work elsewhere. they have part of the site that has lessons for developers: https://app.codility.com/programmers/ https://app.codility.com/programmers/ I haven't used it for a long time, but they also have contests with some small prizes: https://app.codility.com/programmers/challenges/ https://app.codility.com/programmers/challenges/
- codr7 2y agoI had 3 of those 1 hour interviews for a position at Apple, with people watching every move and thinking of ways to break the solution. I don't think I could do it again, no matter what.
- foooorsyth 2y agoThe Christmas theme is fun and it’s nice to do one problem per day with a large community. With leetcode you’re off in the woods by yourself. Stuck on a problem? Here’s a cold write up. Finished a problem? Do another, monkey.
- criddell 2y ago> You don't need a computer science background to participate - just a little programming knowledge and some problem solving skills will get you pretty far. The use of “pretty far” gives them a bit of an out, but I think this statement is a little disingenuous. Last year, at least, a bunch of the problems needed fairly sophisticated algorithms to find the solution in a reasonable amount of time. To me, a little programming knowledge is what somebody who is six weeks into their introduction to programming class has. They know variables, loops, lists, and maybe associative arrays.
- wenderen 2y agoAnecdote to support your comment: The Chinese Remainder Theorem has featured in Advent of Code at least twice IIRC. Not an algorithm the average programmer (average is a very fuzzy term, yeah) would know.
- Jtsummers 2y ago> The Chinese Remainder Theorem has featured in Advent of Code at least twice IIRC Fortunately it's never been needed. Every time it's come up the problem has been solvable with high school algebra level math skills (you need to know what the lcm is and that's covered in middle school in many places). If you knew the CRT you could jump straight to a solution, but a solution was easily derived using algebra and a couple loops.
- deleted 2y ago[deleted]
- nucleardog 2y agoGot some specific references for the days that was required? I think a lot of people are so focused on "optimal" solutions they fail out or burn out quickly, ignoring the ugly "just loop a bunch of things" option. I'm by far an expert on AoC, but the number of people I see every year on day 2 or 3 saying "IT'S TOO MUCH" because they were trying to implement some crazy algorithm when basic array operations and for loops would solve it... I flunked out of high school. I don't even properly understand algebra, never mind any sort of complex math. I have no CS degree. I've completed most of it in some gross PHP that completed before next year on a single core in an old laptop. If "knowledge of obscure algorithms" is a requirement either I'm a once in a generation genius or... it's not a requirement.
- NoelJacob 2y agoOther challenges (in advent and not in advent) like advent of code: https://github.com/NoelJacob/advent-and-other-calandars https://github.com/NoelJacob/advent-and-other-calandars Compiled by myself.
- smcl 2y agoNot a challenge, but it may be of interest anyway - Sergey Tihon's F# Advent Calendar: https://sergeytihon.com/2024/10/26/f-advent-calendar-in-english-2024/ https://sergeytihon.com/2024/10/26/f-advent-calendar-in-engl... I think there's a few of these for different languages/tech. I think they may be good for HN'ers seeking some kind of little daily advent-y fix without the potential emotional/mental investment of AoC.
- MortyWaves 2y agoThat’s an impressively broken website on mobile. Really, I haven’t seen a site I wasn’t able to scroll horizontally before.
- remram 2y agoThis is great, thanks! I usually do AoC to learn a new programming language but there's no more language I care to learn right now.
- rikroots 2y agoDo you want to add Genuary to your list? A month of daily prompts to get you producing some generative / creative coding art. Starts Jan 1. Website here: https://genuary.art/ https://genuary.art/ I've promised myself that one year I will move beyond the first seven prompts ... who knew creativity could be so taxing?
- vidyesh 2y agoHey! Thank you. I have updated mine to include the ones from your list. https://github.com/vimode/Advent-Calendars-For-Developers https://github.com/vimode/Advent-Calendars-For-Developers
- atribecalledqst 2y agoLast year I got stuck on Day 12 for a full week, and thinking about how to solve it consumed my every waking moment. I think this year, I'm going to be kind to myself and not participate so I can really enjoy the winter break from work.
- orra 2y agoSounds sensible. It's important to set boundaries, and enjoy time off. For me Advent of Code is a slippery slope. The difficulty ramps up so at first it's easy, then it's rewardingly difficult. But then before I know it, it takes wayyyyy too much time. The danger is being emotionally invested by then.
- matsemann 2y agoThere's a graph here of the "hardness" of each day/task, based on how long the 100th place on the leaderboard used. https://aoc.xhyrom.dev/ https://aoc.xhyrom.dev/ So it's not linear, and also based on your own knowledge. So perfectly fine to skip some days and still it's possible to solve some of the next ones!
- ruuda 2y agoCool, it would be nice if that one aligned the days which were on weekends, as those tend to have harder problems.
- SketchySeaBeast 2y agoIf I understand correctly, and I'm not sure if that graph proves that, they try to put longer puzzles on weekends.
- wjholden 2y agoRight, Eric Wastl addresses exactly this in his talk. He considers weekends and burnout in the pacing of the event. I think this is the right video: https://youtu.be/bS9882S0ZHs https://youtu.be/bS9882S0ZHs
- azhenley 2y agoI’m attempting to make my own language for solving the puzzles as I go along.
- lolinder 2y agoI'd pretty much decided I wasn't going to participate because it would take up too much time, but now you've both made it way more complicated and way more appealing...
- nemo1618 2y agoI did this, and it's been very satisfying! Here's where I'm at now: https://www.youtube.com/watch?v=r99-nzGDapg https://www.youtube.com/watch?v=r99-nzGDapg
- orra 2y agoI would love it if the first star of the day was required, but the second was a bonus. I love Advent of Code, but I don't have the time to get 50 stars.
- andix 2y agoNo stars are required at all. You can also skip some days if you don't want to do them. Or only to the first stars. However you like. First/silver stars will also increase your score in the leader boards.
- 4hg4ufxhy 2y agoI think you need all stars to do the final puzzle.
- andix 2y agoThat might be true, I've only completed it once a few years ago. But if you don't want to the more complicated parts, then you want to skip the last one for sure.
- lancebeet 2y agoI might be mistaken but I believe the final day has only one puzzle, but the 50th star (a.k.a., the second star of December 25th) is given for having solved everything else. I don't think any puzzles are "locked".
- SketchySeaBeast 2y agoYou're right. The second star is a freebie for completing the rest.
- linhns 2y agoSame. Especially when it gets really hard later on. Despite studying CS, I still struggle with it.
- anonzzzies 2y agoOne of the things I look forward to. It is a lot of fun.
- BlueTemplar 2y ago[flagged]
- deleted 2y ago[deleted]
- setopt 2y agoThe tiny thin gray font on black background is impossible to read on a mobile device :(
- MattRix 2y agoOn iOS you can switch to Reader view, and I imagine Android has something similar.
- technofiend 2y agoYes on Android it's already readable in Firefox, but that may be due to ad-blocking plugin. Even so, Firefox reader mode makes it even better.
- goodlinks 2y ago*browser not os feature :)
- setopt 2y agoI tried that, but it broke all navigation links (including to the actual exercises).
- 0xEF 2y agoColor aside they also ignore a number of solutions for font resizing that follow the users accessibility settings. I can think of at least three easy ways to do this with html/css alone, and yet hear we are; a site that is unreadable to me. I love what Advent of Code does, but when your site is all text, there's just no excuse to not let the user resize it by default.
- scrivna 2y agoAoC day one challenge… make website responsive
- sebtron 2y agoIt is terrible for me on my desktop too :(
- SleepyMyroslav 2y agoAm I alone in thinking that measuring time to get answer is the worst possible metric? I have not participated because of that (yet). If there is a community for those who use other rules to compare actual solutions instead of answers I would be interested to hear about it. I am coming from low level C++ gamedev side so I understand that most people here use different tools to solve different problems.
- dingensundso 2y agoI think most people don't participate for the competition. I did it several times to increase my coding skills, have fun or get more practice in a new programming language.
- SleepyMyroslav 2y agoIt is normal for coding to seek feedback from others to your solution. Even if it is automated. Looking at 'competing' solutions after you spent time on yours can teach how others think. Improving code after you learned new facts is huge part of coding fun at least for me. People mentioned private leaderboards in the topic few times. I just don't think time to submit an answer is relevant.
- anon22981 2y agoWhy do you care about the time so much then? Just ignore it :D
- Levitz 2y agoCan you propose other metrics that don't involve executing stuff in a whole lot of languages? The point is to let people work in whatever they want, as only the solution matters. If only the solution matters I don't really see other options beyond time.
- kibwen 2y agoHere's a website that appears to be about competing on the performance of each solution: https://codspeed.io/advent https://codspeed.io/advent
- tgv 2y agoGoing to use it to learn a bit of Ada. I've always been curious about it. It's not a popular language, and it has some serious documentation problems. Sure, there are guides for "hello, world" and other basics, but how to use a generic integer vector or even how to read lines with two numbers from stdin or a file? That was a bit of a puzzle. I saw a solution that allocates an array of 99999 elements, just to track the number of occurrences of each number in the input. Ada took me somewhere between 90-120 minutes, whereas I had the first problem done in JavaScript in about 30s-60s, just for verification.
- Jtsummers 2y agoAda.Integer_Text_IO with Get will happily read across all whitespace, including new lines, to find the next integer. This is true for most (all?) instances of Get, though that may not always be what you want. with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; procedure main is Left : Integer; Right : Integer; begin Get(Left); Get(Right); Put(Left); Put(Right); end main; If you give it any of these pairs it'll work as expected, put it in a loop and you'll get all of them: 1 2 3 4 5 6 Sometimes thinking about lines is a red herring in AoC, the lines often don't matter, only getting each value into the appropriate collection (a pair of vectors in this case since you don't know the size). For the counts, you can use a hashed map, they're built into the standard library. If you learn to use them now that'll help you out in later days, they're a commonly used collection (for me) in these challenges.
- tgv 2y agoI know that now, even though some of the details remain fuzzy (Get_Line reads 100 characters?), but it's just that the documentation is a big pile of facts with very little to guide you towards the right function/type. And then to get it to use in the rest of the code. And of course, many 'modern' helpers are simply not available, so that too takes a bit of time to find out. But that's learning.
- Jtsummers 2y agoIt stops at 100 or the length of the supplied string or the end of the line, whichever is shorter. You can also use unbounded strings which allows you to skip specifying the size for the output. with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; procedure main is Line: Unbounded_String; begin Line := Get_Line; Put_Line(Line); end main; https://learn.adacore.com https://learn.adacore.com - good source of tutorials, unfortunately a lot of the better learning materials beyond this are books, not online tutorials.
- wizrrd 2y agoYup. Advent of Code is a fun, yearly alternative to LeetCode with a Christmas theme, and it's approachable for novice developers.
- devit 2y ago[flagged]
- awkwardpotato 2y agoThis is already answered right on the about page[0]. AoC is meant to be an educational experience, feeding it directly into a LLM isn't that. > The leaderboards are for human competitors; if you want to compare the speed of your AI solver with others, please do so elsewhere. (If you want to use AI to help you solve puzzles, I can't really stop you, but I feel like it's harder to get better at programming if you ask an AI to do the programming for you.) [0] https://adventofcode.com/2024/about https://adventofcode.com/2024/about
- criddell 2y agoUsing an AI to solve AoC is like taking an art class and complaining that the still life exercises aren’t very interesting because your camera can capture the image quickly.
- signa11 2y agoif you want to use Zig, here are some tips : https://kristoff.it/blog/advent-of-code-zig/ https://kristoff.it/blog/advent-of-code-zig/
- bradley13 2y agoI never have made it to the end of a season, just due to lack of time. It's great fun, though - already solved today's "warm up" puzzles...
- tslater2006 2y agoI maintain a joke domain which I've found sadly applicable through the years. https://adventofrealizingicantread.com https://adventofrealizingicantread.com. I try to keep it updated pointing to the current day throughout the month I've found especially as the month progresses it's just as much Advent of Reading Comprehension as it is coding :)
- makapuf 2y agoIt seems it does not work now now?
- ksymph 2y agoThis is the first time I've seen Firefox's alternate stylesheets mentioned in the wild. Interesting.
- lyxell 2y agoI’m using sqlite this year. Hoping that there won’t be any computational geometry or trie problems. Kind of hoping for a graph problem solvable with recursive CTEs, that would be cool.
- Rendello 2y agoI've been doing a lot with SQL for the first time in my life, this is tempting. I posted some SQLite CTE dark magic the other day but I certainly didn't understand it. Edit: Someone else posted an "Advent of " list which included https://adventofsql.com/ https://adventofsql.com/, perhaps those problems will be a little more pedestrian for SQL.
- shawn_w 2y agoI've solved some days in past years with sqlite + enough awk to transform the input into something that can be imported into a table. It can be a fun challenge.
- lyxell 2y agoI’m allowing myself to convert the data to a csv and read it using ’.mode csv’. I realized when solving todays problem that SQLite’s json_each("[" || T.c1 || "]") Is useful for parsing comma separated rows into (row, col)-pairs as well.
- feike 2y agoAs every year, I try to solve it with 1 sql statement for every challenge, https://gitlab.com/feike/adventofcode/-/tree/master/2024 https://gitlab.com/feike/adventofcode/-/tree/master/2024, likely going to get stuck again around day 12/13 or so!
- lyxell 2y agoAwesome! Thanks for sharing. It feels good to have some company in this, I will follow your progress! I created a repo for my solutions here: https://github.com/lyxell/aoc2024-sqlite https://github.com/lyxell/aoc2024-sqlite Update: Wow. Reading your solutions was a real eye-opener for me. It never struck me that one can exploit the fact that unmaterialized CTE's will not be evaluated for rows that is not needed by another SELECT and one can use this the same way one uses laziness in Haskell. This is great stuff, thanks again for sharing!
- ruuda 2y agoThis has been a good driver for me to add features to https://rcl-lang.org/ https://rcl-lang.org/. I just added List.sort for today’s problem.
- SushiHippie 2y agoInteresting, do you publish your AoC solutions in rcl somewhere? EDIT: nevermind, found it! https://github.com/ruuda/adventofcode/tree/master https://github.com/ruuda/adventofcode/tree/master
- fleeno 2y agoI usually get stuck about halfway through and give up. Doing it in a Lisp I’ve been writing in Ruby will have me giving up even sooner, but it will be fun!
- gavinhoward 2y agoThis is the first year that I will do AoC. I have never wanted to, but I have a working language of my own now. https://gavinhoward.com/2024/11/advent-of-code-2024-getting-started/ https://gavinhoward.com/2024/11/advent-of-code-2024-getting-...
- gucnko 2y ago[flagged]
- heelix 2y agoWoohoo! This is my favorite time of the year. As the year rolls into vacation'ish days and on call rotations, this is where I hunker down and use this to code something other than power point. Last year, solved via my primary language (Java), then ported to Rust. This year, I'm starting with Rust. I had not realized it was the first.
- codr7 2y agoI usually do AoC in Common Lisp, but this year I'm giving Swift a chance. It's not half bad at this kind of twiddling for being a statically typed mainstream language. https://github.com/codr7/aoc24/tree/main/swift/Sources/aoc https://github.com/codr7/aoc24/tree/main/swift/Sources/aoc This year is a tiny bit weird, I was just getting ramped up organizing the event at a new job; because I think it's very useful for devs to learn some real problem solving, as opposed to stitching frameworks. And then I had to leave because my new boss turned out to be someone I couldn't imagine working with. Guess it'll be just me and Emacs as usual.
- usmannk 2y agodont you find all the string parsing and manipulation to be quite painful in Swift? I tried to do AoC in Swift before and that put me off a lot. I liked doing little functional one liners but a week from now the parsing burden will be too high.
- codr7 2y agoNah, the String type is fine as far as basic functionality goes, I like adding my own convenience stuff in extensions. The language has been moving pretty fast though, I have a feeling a lot of features I find useful are relatively new.
- tarentel 2y agoI program everyday in Swift. I attempted AoC for the first time in Swift last year and gave up after about a week or so for this exact reason and switched to python for the remainder. I don't want to struggle with the awkward string API to do things other languages can do in a line.
- codr7 2y agoI'm curious, any specific examples you can remember?
- mattdw 2y agoI found the Scanner API (1) to be pretty handy for the more complex parsing in past years. It’s Foundation so hopefully also on Linux/Windows, but if not there’s also one on GitHub called SwiftScanner. 1: https://developer.apple.com/documentation/foundation/scanner https://developer.apple.com/documentation/foundation/scanner
- dwayne_dibley 2y agoIs this any good for beginners/kids?
- michaelfm1211 2y agoSure, but it starts to get hard a few days in so beginners won't be able to finish. However, I think that makes it an amazing learning opportunity. There's plenty of write-ups on solutions on the internet.
- paulb73 2y agoI can hear the elves calling me... But no, last year I lost all momentum on my side projects and my gf thought she'd lost me to the elves. Completing it on time was rewarding but I can't go back. But I can hear those elven bells a jingling...
- tmtvl 2y agoI still haven't made my way through all of the 2015 problems yet. But I don't play the game correctly any way: instead of trying to solve the problems as fast as I can, I try to write well-documented easily maintained code which runs fast. Balancing 'easily maintained' and 'runs fast' takes a little more time than 'just solve it' _and_ I'm planning on working my way through the problems chronologically, so I doubt I'll get to the 2024 problems any time this decade.
- amw-zero 2y ago[flagged]
- sokoloff 2y agoIs there really a wrong way to do it?
- nikanj 2y agoYes, with ChatGPT or similar: " Can I use AI to get on the global leaderboard? Please don't use AI / LLMs (like GPT) to automatically solve a day's puzzles until that day's global leaderboards are full." https://adventofcode.com/about https://adventofcode.com/about
- release-object 2y agoWhy not? It’s supposed to be fun. As long as you’re not cheating the global leader board - which this approach doesn’t - why not play however you want. I like go to overboard writing parsers for each day.
- mytec 2y agoFrom the about page: "... However, you should do Advent of Code in a way that is useful to you, and so it is completely fine to choose an approach that meets your goals and ignore the leaderboard entirely."
- tmtvl 2y agoHa! Yeah, imagine me streaming my working on AoC, basically anyone tuning in the stream would say 'you're doing it wrong, stop having fun!' and leave.
- the_duke 2y agoThis years challenge for me: write it in C without the standard library or an allocator. Has to be runnable on an STM32 with 32kb of SRAM. I tried doing it in Assembly two years ago, ended up spending hours and hours writing an Assembly standard library, then gave up and switched to Rust...
- BoingBoomTschak 2y agoGood luck! Personally, I'm still going with CL but decided to try it in all the languages I "know" for the first day. Including C which doesn't have hash tables (inb4 hsearch)... what a pain, let me tell you. https://git.sr.ht/~q3cpma/aoc2024/tree/master/item/01 https://git.sr.ht/~q3cpma/aoc2024/tree/master/item/01 If you could post a repo link so I can look at some of the progress, I'd be grateful.
- nickstinemates 2y agoI just want to note that Quake 3 CPMA is one of the best games ever made. No idea if the handle is in reference to that, but thanks for the :)
- schubart 2y agoPerhaps it’s a reference to the Kraftwerk song? https://www.musixmatch.com/lyrics/Kraftwerk/Boing-Boom-Tschak https://www.musixmatch.com/lyrics/Kraftwerk/Boing-Boom-Tscha...
- shawn_w 2y agoPOSIX `hsearch` is absolutely terrible and almost useless, but... it would get the job done for this problem.
- BoingBoomTschak 2y agoThe advantages of foregoing hsearch is that I don't have to understand its weird API that works only for NUL-terminated string keys and that I don't require POSIX. Remember that brute force is also a solution in the AoC; had plenty of fun using SBCL to crack some problems where Pythonistas had to be clever, last year =)
- hshshshshsh 2y agoWork on a side project this December instead of doing this. Solving advent of code just keeps you in your comfort zone. Creates a false sense of accomplishment. Redirect all the positive energy to something that will make you proud when you are old or help with an earlier retirement. This won't.
- kissiel 2y agoOr use it to practice a language that you just wanted to give a spin.
- deleted 2y ago[deleted]
- mattbaker 2y agoAdvent of Code is fun, I like having fun! I have no shortage of challenges and things to be proud of, but when I’m old I don’t want to look back and realize I didn’t take the time to find little moments of joy along the way. Everyone’s different, and it sounds like AoC isn’t for you, but remember not everyone is you :)
- hshshshshsh 2y agoThat's fair. Just sending the message out to folks who are in similiar space and might do a reconsideration.
- moomin 2y agoI used it to spend time in Haskell. You won’t win any prizes for speed, but it’s a good way to learn a bunch of new stuff.
- deleted 2y ago[deleted]
- yoyohello13 2y agoLearn to let go of the constant need to be productive.
- rubyfan 2y agoI don’t code for a living anymore so this looks fun.
- markus_zhang 2y agoDoes anyone know what is the theme of this year? If it's VM or anything low level then it's fun.
- MortyWaves 2y agoIt’s only ever elves finding and losing things
- HeavyStorm 2y agoI believe that this page should be mobile friendly. I won't be coding on mobile, but reading about it on my portable device would be great.
- dchuk 2y agoAt least on iOS, Reader mode in safari fixes it right up
- benmccann 2y agoSvelte is doing its own Advent of Code challenge with a twist this year. Instead of challenging users, the maintainers will be challenging themselves to launch one feature a day. Today's feature is error boundaries! https://bsky.app/profile/svelte.dev/post/3lcavobxn7c2k https://bsky.app/profile/svelte.dev/post/3lcavobxn7c2k
- ranger_danger 2y agoI read the entire page and I don't see anywhere that it actually lists what the puzzles are, I'm so confused.
- auselen 2y ago- https://adventofcode.com/2024/day/1 https://adventofcode.com/2024/day/1 - https://adventofcode.com/ https://adventofcode.com/
- jodrellblank 2y agoIt's an advent calendar design, one puzzle unlocks each day, the rows in the picture where the number and countdown are. You can click rows 1 and 2 now.
- barkingcat 2y agoI use it to learn new languages - this year it's Ada - https://blog.adacore.com/announcing-advent-of-ada-2024-coding-for-a-cause https://blog.adacore.com/announcing-advent-of-ada-2024-codin...
- wodenokoto 2y agoPeople here are doing it in Common Lisp and C standard library, meanwhile I’m just sitting here trying to get a curl call to download the data file.
- eddsolves 2y agoI just copy and paste into a local text file, but I bet there’s a tool if you want to do it programmatically already (unless curl’ing is your idea of fun!)
- yoyohello13 2y agoCopy your session token into .token then: curl "https://adventofcode.com/2024/day/$DAY/input https://adventofcode.com/2024/day/$DAY/input" --header "Cookie: $(cat .token)" > input.txt
- sva_ 2y agoYou could open the dev console in the browser and copy the curl command off the network tab
- hoistbypetard 2y agoThe command line tool included with this python library does just what you want once you paste your session token into an environment variable: https://github.com/wimglenn/advent-of-code-data https://github.com/wimglenn/advent-of-code-data
- ljouhet 2y agoYou can use Firefox: "Copy as cUrl" (https://superuser.com/a/1382425 https://superuser.com/a/1382425)
- Symbiote 2y agoAssuming you already opened it in a web browser, why not right click the page and choose "Save As"?
- tocariimaa 2y agoI have this script: #!/bin/sh set -e curl "https://adventofcode.com/${YEAR:?}/day/${DAY:?}/input" --cookie "session=$(cat .token)" then: YEAR=2024 DAY=1 ./aocdata
- deleted 2y ago[deleted]
- cjauvin 2y agoBecause we can assume that these problems necessarily cannot be in the training set of any current LLM (and are hard enough, i.e. they should be more than mere variations on existing problems), I'm wondering if they can be a good benchmark to get a better sense of how good they really are at problem solving?
- bufferoverflow 2y agoModern LLMs are very good at solving programming puzzles like that. As soon as it recognizes which algorithm needs to apply, it's just massaging the data to the right format.
- cjauvin 2y agoYour answer somehow suggests that solving such problems is merely "recognizing which algorithms to apply".. which is another way of saying that they are more "pattern matchers" than "true reasoners". I would think, on the contrary, that these problems (at least the tougher ones that are coming in about two weeks) require more than pattern matching, but I'm not sure exactly what are my thoughts on that.
- throwaway314155 2y agoConsider ignoring the reasoning for how/why LLM's can do this sort of thing which doesn't matter as much when you simply try it out. I wouldn't be surprised if many of these problems are in fact solved by LLM's. Just from my experience using them to solve relatively novel issues in my day-to-day. There will of course be mistakes and hallucinations, but in a proper dialogue with a motivated programmer, I bet it works >50% of the time.
- matejn 2y agoI completed last year's in Scryer Prolog and it was a joy. Some problems were almost impossible due to the lack of mutation (Karger's algorithm comes to mind), but file parsing was a breeze and I find Prolog programs generally beautiful. My favourite syntactical feature is the full stop at the end of clauses.
- Rendello 2y agoErlang lifted it as the comma, semicolon, dot convention. When I was writing a lot of Erlang I found myself wishing it was in other languages. After not writing Erlang for a long time, I wrote a few functions recently and it was jarring. Then again I usually prefer the conventions of whatever language I'm using most at the time, unless I really dislike the language (Javascript).
- prophesi 2y agoFor anyone interested in using this to learn Elixir or improve your skills with it, I saw this video[0] a while back and their AoC starter repo[1] is super slick. [0] https://www.youtube.com/watch?v=gpaV4bgEG-g https://www.youtube.com/watch?v=gpaV4bgEG-g [1] https://github.com/ChristianAlexander/advent-generator https://github.com/ChristianAlexander/advent-generator
- msmitha 2y agoThere are a few Elixir solutions fo Day 1 here, including mine: https://elixirforum.com/t/advent-of-code-2024-day-1/67786 https://elixirforum.com/t/advent-of-code-2024-day-1/67786. I'm using it as a motivator for actually learning the language/libs.
- prophesi 2y agoAwesome, in that thread I found this library[0] to make it easy to write AoC solutions with Elixir's Livebook. [0] https://hexdocs.pm/kino_aoc/KinoAOC.html https://hexdocs.pm/kino_aoc/KinoAOC.html
- ucefkh 2y agoGetting the vibe of Google code jam Pretty good tbh
- ucefkh 2y agoGetting the vibe of Google code jam, pretty good
- kazinator 2y agoI did some of it in TXR Lisp a bunch of years ago. https://www.kylheku.com/cgit/advent/tree/2021 https://www.kylheku.com/cgit/advent/tree/2021 Give it a try. The structure and recurring themes in these solutions could be used as a source of ideas for how to get started.
- mvdtnz 2y agoI haven't completed one before and I have a question for those who have. Can I treat the entire month as one code based which evolves over time, with an evolving set of unit and integration tests? Or do some days require starting from scratch? Lots of people here are talking about completing it in exotic languages but I'm more interested in using it to sharpen enterprise coding techniques.
- Jtsummers 2y agoEvery day is mostly independent of the others. I generally don't reuse code because most of the common code is easy enough to rewrite, sometimes I copy/paste earlier code in to a new solution. The main exception is 2019's Intcode VM/interpreter which was used over about a dozen days (I mentioned it elsewhere, he hasn't done anything like that since). Occasionally, beyond basic algorithms there is some continuity between 2-3 days but that's not terribly common, I don't think there were any pairs of puzzles like that last year or the year before. If you want to make one code base, you'll still have 25 or so separate solutions. You might have some continuity with common algorithms (like A*) that get used a fair bit in search problems or abstracting out the input handling when you identify common structures for parsing.
- cyberpunk 2y agoI decided to do it in Erlang in 2019, that Intcode VM was much "fun"... I really enjoyed it, I wish there were more years than that.
- seba_dos1 2y agoAoC is in this weird place where it's too easy to be fulfilling on its own, but too bothersome to just do it for leisure. I did it once (using Python with no imports for some mild challenge), waking up super early to actually start on time, then golfing my answers if I felt like it. It was a fun thing to do... once. I don't feel the need to repeat that and I don't find it engaging enough to do without time pressure, so I don't. Perhaps if you aimed at global leaderboards it would be different, but that's neither my league nor I see any fun in that - getting there requires serious effort and preparation in things that aren't directly related to solving intelectual puzzles.
- 110jawefopiwa 2y agoIt's best for me when I do something that I ordinarily don't do for AoC. I find no particular pleasure in using an everyday language like Python for it, because as you said it's too easy. I have used Haskell, Racket, and in some easier cases APL and it's been fun. Treating it more like a puzzle than an actual programming assignment. When learning new languages, it's best to do something that actually makes you think in a different shape. If you know Python, don't do Ruby. If you know Java, don't do C#.
- seba_dos1 2y agoIt goes into "too bothersome" territory in this case for me. Competing in a local leaderboard was fun and kept me engaged until the end, but it was only possible by choosing a comfortable language to be free to actually think about the puzzle itself to solve it fast. Choosing something that I'm not already familiar with (or that isn't well-suited for this type of tasks) is a great way to ramp up the difficulty and perhaps gain some bragging rights, but I can't see me doing it for longer than a few days before losing interest. Even in this "easy mode" in Python, there were four days that had me spend more than an hour (up to 5h) on the task. There's plenty of actually useful projects I could do in this time to learn new things instead after all.
- 110jawefopiwa 2y ago> There's plenty of actually useful projects I could do in this time to learn new things instead after all. I suppose. I do actually useful projects at work. AoC reminds me of why I personally loved programming in the first place - solving small technical puzzles. I don't like trying to make every single moment of my life "productive".
- dchuk 2y agoWhile I agree that just dumping the puzzle instructions into an llm and getting the right answer at least doesn’t align with the spirit of Advent of Code (though it does show how crazy good LLMs are getting), I’m using this as an opportunity to try out the new Windsurf AI IDE and am driving the AI code editing in it to help me write the code to solve each puzzle (I’m using Ruby). My goal is to develop the muscle memory for the tool so I can write code quickly. I’m still generally thinking through the puzzles, but being able to just write out plain English logic, get code generated, ask for it to be well documented, quickly refactor things to be generally reusable, etc, is just fantastic and how all software development should be done in this day and age frankly. Such an accelerator to problem solving.
- audiodude 2y agoI know a lot of people use AoC to try out/learn a new language. I tried that with Go in like 2018. However, I found it too frustrating (especially since AoC requires a lot of string parsing/regex which are difficult/verbose in Go). The past few years I've decided to stick to the same principle I've used in all of my side projects recently. Either I do something in a new language, or I get it done correctly before I get bored. I've found I can't have both.
- thepaulmcbride 2y agoI usually get to around day 10 in AoC before they get so time consuming that I give up. I still really enjoy the first week or so though!
- zanderwohl 2y agoI think I'm going to be using MicroSoft QuickBasic for System 7 this year. I might regret this pretty quickly.
- struanr 2y agoExcited to try this. I was aiming to be done by Christmas, but this is my first AoC and reading other replies makes this seem a bit unrealistic. Decided to do it in elisp to try and improve my emacs-fu and lisp knowledge.
- nvarsj 2y agoGl. I've yet to meet anyone that actually finished AoC. At some point the problems take 8+ hours to solve and people give up :).
- lowbloodsugar 2y agoNew factorio dropped. Probably be doing that with every spare minute of the day.
- cod1r 2y agoThis year I'm going to try to do this in Haskell.
- middayc 2y agoI love looking at AoC solution megathreads on reddit. So many languages and so many different approaches are hard to find and observe anywhere.
- jodrellblank 2y agoI feel like those threads would make great research opportunities. We often hear people say that code should be for people to read, incidentally for machines to execute, just be amazed at how much the readability varies from answer to answer. Skimming some, the core of Part 1 after people have parsed and sorted: Python: sum([abs(x-y) for x,y in zip(left,right)) TypeScript: list1.reduce((acc, cur, i) => { return acc += Math.abs(cur - list2[i]) }, 0) Common Lisp: (reduce #'+ (mapcar (lambda (l r) (abs (- l r))) sorted-left sorted-right)))) Julia: sum(abs.(list1 .- list2)) Rust: Ok(zip(left, right).map(|(l, r)| l.abs_diff(r)).sum() F#: Seq.map2 (fun x y -> abs (x - y)) xs ys |> Seq.sum APL: +/|-⌿ Haskell: map abs $ zipWith (-) column2 column1 and then all the submissions which don't do anything like this, and have manual loops and indexing and clunky data representations or performance-optimized data representations, etc. etc.
- bargainbin 2y agoAh here it is again, 25 days of writing increasingly complex input parsers.
- Jcampuzano2 2y agoThose are the problems I loathe the most, where the real problem is figuring out how to parse the input into something more workable. Once its parsed its ezpz.
- zelphirkalt 2y agoAre you solving all puzzles? I find usually that the parsing isn't my problem, but some of the puzzles puzzle me (ha, couldn't resist), because they expect some kind of graph knowledge or some mathematical trick or so. Last year got stuck at day 17 for example. Usually some learning in it then, but parsing, while possibly annoying day after day, wasn't usually what stopped me from completing puzzles.
- underdeserver 2y agoClaude will do it for you.
- timeon 2y agoWhy bother.
- reocha 2y agoWhat is the point in doing a programming challenge if you aren't learning anything
- ghjfrdghibt 2y agoDepends if you're really stuck on a problem. I'd rather learn by getting a look at how it's done, even if the code is incorrect, than be completely suck with no idea why or what to do.
- b5n 2y agoI've generally chosen a new (to me) or spartan lang to challenge myself, but this year I'm going easy mode with python and just focusing on meeting the requirement.
- guiambros 2y agoHere's to another year of being sleep deprived for the entire month of December.
- int0x29 2y agoSolved the whole thing. It's a business problem. Just replace the Chief Historian.
- declan_roberts 2y agoAoC is fun for learning a new language but I feel like all of us have that one "project" that we rewrite every few years in this language or that to learn it.
- izietto 2y agoWhat I hate about AoC is the tons of bullshit about Christmas elves I have to tolerate before getting to the damn point. I mean, I understand they want to make the context entertaining, but sometimes it's like reading a Jira card written by a junior product owner! BTW I love AoC for all else
- codr7 2y agoI actually enjoy it in this context, not so much in JIRA.
- jlengrand 2y agoRemarkable. Bought, sold within 2 weeks. Really underwhelmed
- zaptheimpaler 2y agoI love AoC! Did it the last 2-3 years in Rust, hanging out in a discord where we all try to make the absolute fastest solutions. Learnt all kinds of crazy performance hacks and some advanced algorithms & SIMD that way. This time I'm trying to do them in Rust and Golang in an effort to either learn to like/tolerate Golang (because we use it at work) or prove my hypothesis that it sucks and never use it unless I have to.
- makapuf 2y agoInterested by your rust speed approaches, care to share a link ?
- whalesalad 2y agoSame. I am doing rust + clojure this year. Very interested in performance hax, esp around SIMD. I know absolutely nothing at all about rust, this is my first time working with it. My day 1 rust solution: cargo solve 1 -- release Finished `release` profile [optimized] target(s) in 0.05s Running `target/release/01` Part 1: 1189304 (95.8µs) Part 2: 24349736 (120.4µs) Day 1 clojure solution: lein run 1 running all tasks for day 1 reading input from resources/day01.txt running day 1 part 1 part-fn: #'aoc.day-01/part-1 took: 5.511375 ms result: 1189304 reading input from resources/day01.txt running day 1 part 2 part-fn: #'aoc.day-01/part-2 took: 1.822334 ms result: 243497365 Code here: https://github.com/whalesalad/aoc https://github.com/whalesalad/aoc
- jodrellblank 2y agoThere's a Rust solution posted in the Reddit Day 1 answers mega thread which claims 22 microseconds part 1 and 10 microseconds part 2. (I haven't tried to verify): https://old.reddit.com/r/adventofcode/comments/1h3vp6n/2024_day_1_solutions/lzv90g1/ https://old.reddit.com/r/adventofcode/comments/1h3vp6n/2024_...
- surajrmal 2y ago
- 1a527dd5 2y agoThe first year was the best year for me. It was really fun and I think I got 22/24 days done. After that my participation rate has been shocking, I really want to do it but I get this weird anxiety that I'm not quick enough. Which is weird because that is not a thought that entered my mind when I did it for the first time. It was pure fun!
- ocschwar 2y agoJust give up on the main leaderboard. Maybe join another, preferably with people who share your time zone and schedule.
- cactusfrog 2y agoI just did this in a few lines of python with numpy. I don’t understand why the input isn’t a csv.
- Maksadbek 2y agoIt’s ssv — space separated values
- LelouBil 2y agoI'm trying Haskell this time. For this one, I learned how to write a basic parser with Text.Parsec and manipulate the tuples with bimap ! It's a very fun occasion to learn a new programming language.
- a_cardboard_box 2y agoI'm gonna try doing this on the NES (Nintendo Entertainment System) this year. Probably some problems will be impossible with limited RAM (2KiB, plus an optional 8KiB on the cartridge, maybe more if a fancy cartridge is used). But I'll try to solve as many as possible. Today's was possible, in under 4 seconds, using 4KiB extra RAM on the cartridge.
- whalesalad 2y agowhat is the dev cycle like on that? can you attach to it and operate it remotely via something like a repl or do you have to compile something to a cartridge and boot it from that?
- deaddodo 2y agoGenerally you compile to a rom and load it into an emulator. There's a certain amount of memory manipulation you can do in NES debuggers, but it's usually just easier to go through a full build cycle; especially for small programs like used in AoC.
- a_t48 2y agoVery interested in this - I have a SNES flash cart, I wonder if there's a good basic library to handle printing to the screen and such.
- plandis 2y agoCould you use a cartridge type that has enough swappable memory banks?
- calrain 2y agoI'm doing the challenges in PowerShell to see how it goes. I want to use it as a test to see how human programming can be improved by an AI, so I wrote the solution for day 1, got the right answer, and then gave my code to ChatGPT 4o to ask it to make the code faster. My version ran in ~3500 ms ChatGPT's version ran in 140 ms both worked A great example of how a common DevOps language program can be improved on by ChatGPT.
- jodrellblank 2y agoThat seems rather slow for yours, and not very fast for an optimised one. It can speed up a lot from a cold start to a warm run, my tuned code can show 8 ms in powershell 7.4 after a few runs. My hack-it-out code: https://pastebin.com/PDQhxDc9 https://pastebin.com/PDQhxDc9 Faster code: https://pastebin.com/6xwaVkwq https://pastebin.com/6xwaVkwq The hacky code uses slower techniques like: - Get-Content which adds metadata to every line. - @() arrays with += which copies the array in memory to a new one-larger memory location for every addition. - Pipeline overhead e.g. ForEach-Object and Measure-Object. - Filtering the whole second column for each number in the first column, repeated wasted work. and it's still in the region of your ChatGPT one. The faster one addresses these with: - ReadAllLines() .NET method to get plain strings. - [system.collections.generic.list[int]]::new() which don't box integers and can grow more quickly. - plain adding numbers into sum variables. - Building a hashtable [system.collections.generic.dictionary[int, int]]::new() to count each number in the second column. - Swapping -split for string split() which may have a tiny bit less overhead. - no pipelines. The code isn't completely different, it's the same blocks doing the same things, leaning more on .NET lower levels, and years of experience of the basic PowerShell performance hits.
- calrain 2y agoGreat to see your optimizations. I'm going through each day and asking ChatGPT to speed it up, it doesn't always work, but that is the way of the Gippity. The payoff is these heavy iterating operational scripts I run for work will end up running faster :) Learning when to lean on some of the .NET primitives really helps speed up PS as it likes to wrap things with unnecessary features.
- nikolay 2y agoThis is my fourth year. I'm using Go while being surprised how inadequate it is for this kind of problem. Standard libraries lack basic data structures and often Go is too slow for a compiled language!
- jnordwick 2y agoI'm doing it in K2 this year (a language that has a single data structure: a vector). If you can do it in K2, you can do it in Go.
- nikolay 2y agoI am doing it, it's just not convenient for a major language that has been around for 15 years!
- tialaramex 2y agoWhat does "Go is too slow" mean in this context? Were you expecting similar performance to Rust or C++?
- nikolay 2y agoWell, it is slow to run, because all the built-in Python magic is highly optimized. When you start implementing stuff in the bare bones Go, and you're pressed by time, you don't optimize, and the result is code that is slower than Python.
- sgarland 2y agoLast year, I spent more time coming up with a reusable framework than the challenges themselves, proven by the fact that I only solved two days. This year, I shook my head at my framework and rewrote it, but at least that only took me a day (so far). Day one was easy, which also helps. IIRC, last year’s first few days were non-trivial.
- JoshMandel 2y agoMy personal challenge last year was to solve everything on my mobile phone, using LLMs (mostly ChatGPT4 with code interpreter; I didn't paste in the problems, but rather described the code I wanted.) This year I'm declaring "Advent of Claude"! Challenge: Write a Claude custom style to solve Advent of Code puzzles within Claude's UI. Score: # adventofcode.com stars earned in 2 daily conversation turns. Fine print: web app artifacts are allowed, including paste of your custom input into the artifact UI; one click only. Per https://adventofcode.com/2024/about https://adventofcode.com/2024/about, wait until the daily http://adventofcode.com http://adventofcode.com leaderboard is full before submitting LLM-generated solutions! Of course, feel free to use ChatGPT custom instructions, static prompts, etc. Day 1: two stars, https://claude.site/artifacts/d16e6bdb-f697-45fe-930c-7f58b2b5bb16 https://claude.site/artifacts/d16e6bdb-f697-45fe-930c-7f58b2...
- hoistbypetard 2y agoWhile I personally wouldn't find it a ton of fun to solve the puzzles that way, that's pretty cool. Nice work. Is there a place where you're blogging this or at least aggregating the links so we can see how far you get with it as the puzzles get more challenging?
- JoshMandel 2y agoFair enough! I'll document my progress at https://github.com/jmandel/advent-of-claude/tree/main https://github.com/jmandel/advent-of-claude/tree/main, though I may not keep up.
- hoistbypetard 2y agoThanks for posting that. It's been entertaining to follow your progress.
- pclmulqdq 2y agoI am a bit late to the trend, but I am planning to do Advent of CUDA this year. It's been a while since I have written a lot of parallel code, and thinking about concurrent algorithms is fun.
- walis85300 2y agoThis year I will solve AoC using Gleam. My challenge is to finally learn functional programming and learn Gleam at the same time. I already solved the first problem and it was hard to get things ready, read the file, handle the data, etc. But once I had the first steps done it was easy to solve the problem
- superhoops540 2y agoNot sure if it would take away from the experience, but there's this repo which is made for AoC that handles getting the input from a text file, sets up a source file for each day, etc https://github.com/TanklesXL/gladvent https://github.com/TanklesXL/gladvent
- bas 2y agoDay 1 led me to a deep(ish) dive into the CPython implementation of the abs(...) builtin. Good times!
- xavdid 2y agoI'm excited about this! I'll be sticking to Python so I can practice writing maintainable code. I'm also looking forward to keeping up with my explanations of each puzzle, which helps me (and others!) learn a lot. Everything is here: https://advent-of-code.xavd.id/ https://advent-of-code.xavd.id/ I'm unlikely to finish it all in December (the puzzles get hard and I get busy) but I _do_ love the event.
- mattbillenstein 2y agoAiming to get all the stars this year to round it out with 500 total - all the years, all the problems. As of last week there were something around 1024 people who had all 450 stars. Only started on like day 6 of 2022, but became hooked and had some time early in 2023 to go through the previous years. Once you have a few algorithms canned, it's not too difficult and some themes repeat across years. It's fun to brush up on stuff you don't touch all the time - actual algorithms and stuff. Hats off to the volunteers and Eric - I aim to donate every year now - it's a great event.
- genericspammer 2y agoLots of people seem to be doing hardcore things like using C without libraries, limiting memory etc. And here I am doing it in Ruby instead of Java this year thinking I was giving myself a challenge.
- runeks 2y agoIf LLMs are really as good at writing code as some people say, they should write a script that fetches each challenge, as soon as it's released, and feeds it to an LLM, to produce a solution. Then run this code and submit the answer it outputs.
- Ellipsis753 2y agoThis is how most of the top of leaderboard works.
- tonymet 2y agoAOC follows "Tony's Law of Comprehending Things on the Internet": Reading the content from bottom to top is the most efficient way to grok the content.
- runeks 2y agoThis year I will run my AoC solutions on my toaster and write them in ALGOL 58 using only my feet.
- johanneskanybal 2y agoco-pilot solved day 2 in a second, kind of makes me sad. I’ll try some of the others myself though they’re kond of fun. Would be fun to use as many languages as possible or maybe some convoluted micro services architecture.
- n0id34 2y agoMkay, day 3 part 2 is making me want to step in front of a bus and never touch a computer again.
- jebarker 2y agoI always get too ambitious with AoC, e.g. trying to do it in a new to me language or abstract everything into a new library. Subsequently I never finish. So this year I'm using whatever language or tool is easiest for me and the only goal is to finish!
- calini 2y agoI have seen a couple of snarky comments about how AoC is just a competition for who can write an input parser the fastest for 25 days in a row, I'll just share the following: Just write that once, put it in a template /day0 folder that has /day0/part1, /day0/part2, and /day0/input.txt, and then just copy it and focus on the actual problem. It's all about having fun!
- hazelmae 2y ago[flagged]
- hazelmae 2y ago[flagged]