89 comments

  • zaptheimpaler15 hours ago
    I 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 &amp; SIMD that way.<p>This time I&#x27;m trying to do them in Rust and Golang in an effort to either learn to like&#x2F;tolerate Golang (because we use it at work) or prove my hypothesis that it sucks and never use it unless I have to.
    • makapuf15 hours ago
      Interested by your rust speed approaches, care to share a link ?
      • whalesalad14 hours ago
        Same. 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.<p>My day 1 rust solution:<p><pre><code> cargo solve 1 -- release Finished `release` profile [optimized] target(s) in 0.05s Running `target&#x2F;release&#x2F;01` Part 1: 1189304 (95.8µs) Part 2: 24349736 (120.4µs) </code></pre> Day 1 clojure solution:<p><pre><code> lein run 1 running all tasks for day 1 reading input from resources&#x2F;day01.txt running day 1 part 1 part-fn: #&#x27;aoc.day-01&#x2F;part-1 took: 5.511375 ms result: 1189304 reading input from resources&#x2F;day01.txt running day 1 part 2 part-fn: #&#x27;aoc.day-01&#x2F;part-2 took: 1.822334 ms result: 243497365 </code></pre> Code here: <a href="https:&#x2F;&#x2F;github.com&#x2F;whalesalad&#x2F;aoc">https:&#x2F;&#x2F;github.com&#x2F;whalesalad&#x2F;aoc</a>
        • zelphirkalt48 minutes ago
          Are the timings with language runtime startup, or only the procedure calls of the actual code?
        • jodrellblank12 hours ago
          There&#x27;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&#x27;t tried to verify):<p><a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;comments&#x2F;1h3vp6n&#x2F;2024_day_1_solutions&#x2F;lzv90g1&#x2F;" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;comments&#x2F;1h3vp6n&#x2F;2024_...</a>
          • jodrellblank9 hours ago
            Can&#x27;t edit my comment, here&#x27;s another claiming 12.7 μs and 7 μs:<p><a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;comments&#x2F;1h3vp6n&#x2F;2024_day_1_solutions&#x2F;lzykfxp&#x2F;" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;comments&#x2F;1h3vp6n&#x2F;2024_...</a><p>Another claiming 30μs and 32μs:<p><a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;comments&#x2F;1h3vp6n&#x2F;2024_day_1_solutions&#x2F;lzydegd&#x2F;" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;comments&#x2F;1h3vp6n&#x2F;2024_...</a>
          • surajrmal10 hours ago
            Sure but how long did it take to compile
            • jodrellblank9 hours ago
              I &#x27;git clone&#x27; and &#x27;cargo run&#x27; and it downloaded 16 crates and compiled all the crates and built a debug version in 29.7 seconds.<p>Then &#x27;cargo build --release&#x27; took 23.3 seconds.<p>Commenting out one of the sort_unstable lines and rebuilding gave me a warning, recompiled in 1.8 seconds.
    • ManDeJan13 hours ago
      &#x27;d you be interested in sharing the discord? :)<p>I try every year to optimize for speed in zig: <a href="https:&#x2F;&#x2F;github.com&#x2F;ManDeJan&#x2F;advent-of-code">https:&#x2F;&#x2F;github.com&#x2F;ManDeJan&#x2F;advent-of-code</a>
      • wanderingmind12 hours ago
        This server seems to be active, although they are all unofficial servers from enthusiasts.<p><a href="https:&#x2F;&#x2F;discord.gg&#x2F;wYmyYsf" rel="nofollow">https:&#x2F;&#x2F;discord.gg&#x2F;wYmyYsf</a>
    • raulns8614 hours ago
      Sounds like a very interesting Discord to check :)
    • xyproto13 hours ago
      Go (not &quot;Golang&quot;) has better compilation times than Rust and does not try to combine incompatible ways of using concurrency.<p>I have the opposite dilemma to you, I want to learn to like Rust.
      • whalesalad13 hours ago
        Personally I loathe golang for the sheer fact that it was created recently enough to have included a much better design. Old languages get a pass.<p>Rust to me is what a modern take on a systems language would be. I think it’s substantially better than go.
        • neonsunset6 hours ago
          To be fair, Go was never a proper &quot;systems language&quot; (and shamefully attempted to redefine what the term means).
      • jaredklewis12 hours ago
        Let&#x27;s try to settle the Go&#x2F;Rust debate in this AoC sub-thread ^_^
        • lanstin12 hours ago
          Personally I like them both but I find the barrier to onboarding new devs is lower for Golang.<p>&#x2F;s
  • the_duke22 hours ago
    This 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.<p>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...
    • badgersnake19 hours ago
      Last year I tried C on a real Amiga 1200 (using DICE, Matt Dillon’s compiler &#x2F; runtime). I didn’t get very far, lack of memory protection makes things really hard.<p>This year the Amiga has an 060 upgrade with an MMU, so perhaps I can figure out how to use that and have another go.
      • simmonmt15 hours ago
        Forgive the dumb question... it&#x27;s been ages since I&#x27;ve done Amiga programming in C. What behaves differently? Is the lower K of memory mapped, such that null pointer deferences cause excitement rather than simply crashing your program? Or is it something else?
        • arexxbifs13 hours ago
          AmigaOS has no memory protection whatsoever. If your program crashes, so does the entire machine. And it will possibly bring your hard drive with it, too.<p>Not unworkable, but not the most relaxed environment for fast’n’fun cowboy coding. You typically have to reboot a lot.
          • galangalalgol18 minutes ago
            I thought the Amiga 1k had page protection, just not virtual memory?
        • snvzz13 hours ago
          I don&#x27;t get it either, particularly as most advent challenges can be solved using just iso c and its standard library.
      • peterashford17 hours ago
        Heh. Yeah, a memfault tanking the machine is not conducive to iterative programming :o)
        • RandomThoughts33 hours ago
          Just stop writing memfault.<p>I say it in jest but that&#x27;s actually how I used to program a few years ago when I was working on large industrial pieces of software with long compilation time. You just have to be careful and check what you wrote before sending it to the machine.<p>I think &quot;iterative&quot; programming has made people really complacent when it comes to silly errors. Slowing down can often do wonder.
        • rob744 hours ago
          Guru Meditation anyone? (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Guru_Meditation" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Guru_Meditation</a>)
        • lanstin12 hours ago
          Honestly, I forgot all about that aspect of ancient programming. It probably made one more careful, or more patient. (Source: typing 6502 programs into a hex &quot;monitor&quot; which is a way to edit memory, view memory, and issue &quot;jump to this memory address&quot;.)
    • sebtron20 hours ago
      Your restrictions sound quite challenging, good luck!<p>Last year I solved all the problems in C without <i>external</i> libraries [1] and I enjoyed it a lot. It forced me implement some low-level stuff that I had forgotten how to do (e.g. a heap) and to write some numerical routines myself (easier than you&#x27;d think!).<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;sebastianotronto&#x2F;aoc&#x2F;tree&#x2F;master&#x2F;2023">https:&#x2F;&#x2F;github.com&#x2F;sebastianotronto&#x2F;aoc&#x2F;tree&#x2F;master&#x2F;2023</a>
      • derethanhausen16 hours ago
        Fitting, given that iirc one of the problems was to implement a hashtable!
    • nine_k17 hours ago
      Symmetrically, I would consider only using sh and standard non-Turing-complete CLI tools (grep yes, awk no). About as limiting, but without devastating memory corruption bugs.
      • sudobash115 hours ago
        Awk is turing complete. You could do the challenges only in Awk if you wanted.
        • nine_k15 hours ago
          That would be too easy! :)<p>Well, awk suffices to write a first-person shooter: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34442528">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=34442528</a>
    • a_humean16 hours ago
      I think there might end up being some problems which will be very challenging to solve with those resource constraints - namely memory. You will probably have to be pretty clever with your solutions.<p>I remember one of my naive brute force solutions from last year ended up allocating gigabtyes of memory. There were obviously more efficient solutions, but some of the inputs are pretty large and so hefty allocations might be difficult to avoid.
      • the_duke14 hours ago
        Yeah I know it will be tough.<p>I do allow myself a 5Gb disk to which I can page out memory.
        • no_time6 hours ago
          How does that work irl? Do you have an SD card attached?
    • BoingBoomTschak21 hours ago
      Good luck! Personally, I&#x27;m still going with CL but decided to try it in all the languages I &quot;know&quot; for the first day. Including C which doesn&#x27;t have hash tables (inb4 hsearch)... what a pain, let me tell you.<p><a href="https:&#x2F;&#x2F;git.sr.ht&#x2F;~q3cpma&#x2F;aoc2024&#x2F;tree&#x2F;master&#x2F;item&#x2F;01" rel="nofollow">https:&#x2F;&#x2F;git.sr.ht&#x2F;~q3cpma&#x2F;aoc2024&#x2F;tree&#x2F;master&#x2F;item&#x2F;01</a><p>If you could post a repo link so I can look at some of the progress, I&#x27;d be grateful.
      • shawn_w18 hours ago
        POSIX `hsearch` is absolutely terrible and almost useless, but... it would get the job done for this problem.
        • BoingBoomTschak17 hours ago
          The advantages of foregoing hsearch is that I don&#x27;t have to understand its weird API that works only for NUL-terminated string keys and that I don&#x27;t require POSIX.<p>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 =)
      • liontwist14 hours ago
        - bsearch + qsort is a great way to implement associative tables<p>- you can implement a hash table in C in about 125 LOC and reuse it.<p>- hash tables are not the only way to solve problems. hammer&#x2F;nail
        • a-french-anon7 hours ago
          &gt; bsearch + qsort is a great way to implement associative tables<p>Only if you write&#x2F;read your table in two separate passes. A tally needs mixed read&#x2F;write to increment a counter, not just insertion, so it must be kept sorted during the table creation. Some kind of tree or linked list is probably better in this case.<p>&gt; you can implement a hash table in C in about 125 LOC and reuse it.<p>I know. Anyone who uses C and never made at least a basic FNV1A&#x2F;bucket-based hash table must be insane. But I wanted a small self-contained .c here and have become allergic to (void *); if I were to use C <i>seriously</i>, I&#x27;d fix it using a better preprocessor (à la <a href="https:&#x2F;&#x2F;github.com&#x2F;etwyniel&#x2F;c-generics">https:&#x2F;&#x2F;github.com&#x2F;etwyniel&#x2F;c-generics</a>).<p>&gt; hash tables are not the only way to solve problems. hammer&#x2F;nail<p>Eh, a tally seemed the most intuitive way for the 2nd part.
        • lanstin12 hours ago
          Also the TclHash table implementation is quite good and independent of the Tcl interpreter runtime.
      • Twirrim17 hours ago
        I don&#x27;t think there are enough entries to make it worth the cost of a hash. I know it&#x27;s not &quot;efficient&quot; exactly, but just repeatedly looping through and counting just isn&#x27;t that slow.
        • 902915 hours ago
          The numbers are so small that you can also just use a big array
      • nickstinemates19 hours ago
        I 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 :)
        • schubart18 hours ago
          Perhaps it’s a reference to the Kraftwerk song?<p><a href="https:&#x2F;&#x2F;www.musixmatch.com&#x2F;lyrics&#x2F;Kraftwerk&#x2F;Boing-Boom-Tschak" rel="nofollow">https:&#x2F;&#x2F;www.musixmatch.com&#x2F;lyrics&#x2F;Kraftwerk&#x2F;Boing-Boom-Tscha...</a>
    • foota16 hours ago
      As long as you can make an RPC call, anything is doable within 32kb of ram :-)
    • mlsu17 hours ago
      Glorious!<p>I think I&#x27;ll follow in your footsteps. STM32F7 with 320k but with bare metal Rust :)
    • 12718 hours ago
      Do you have a public repo?
    • ikiris18 hours ago
      this is like trying to solve it in a computer built in turing complete
  • bargainbin16 hours ago
    Ah here it is again, 25 days of writing increasingly complex input parsers.
    • xdavidliu21 minutes ago
      the input parsers don&#x27;t get increasingly complex over the days. The problems themselves do. Even on the most difficult days around 22 or 23, the inputs are all just lines of space separate ints or some grid of points or something, just like the trivial problems on days 1-3
    • Jcampuzano216 hours ago
      Those 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.
      • zelphirkalt45 minutes ago
        Are you solving all puzzles? I find usually that the parsing isn&#x27;t my problem, but some of the puzzles puzzle me (ha, couldn&#x27;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&#x27;t usually what stopped me from completing puzzles.
    • 6313 hours ago
      After a few days I cave and just use regex, which I of course forget every year and need to relearn.
    • reocha15 hours ago
      It&#x27;s input parsing with a fun story
    • tonymet8 hours ago
      i find ScanF and state machines are a lot more effective than split &#x2F; explode style parsers.
    • cactusfrog14 hours ago
      Why isn’t the input a csv?
      • Jtsummers13 hours ago
        Sometimes it is, or very nearly is.
    • underdeserver16 hours ago
      Claude will do it for you.
      • reocha15 hours ago
        What is the point in doing a programming challenge if you aren&#x27;t learning anything
        • underdeserver4 hours ago
          Maybe I&#x27;m interested in solving the algorithmic problem and less interested in writing input parsers...
        • ghjfrdghibt14 hours ago
          Depends if you&#x27;re really stuck on a problem. I&#x27;d rather learn by getting a look at how it&#x27;s done, even if the code is incorrect, than be completely suck with no idea why or what to do.
          • rnewme13 hours ago
            Being stuck with no idea why or what to do is what gets you exploring and figuring things out. That&#x27;s the whole point...
            • ghjfrdghibt6 hours ago
              That all well and good until you hit a brick wall you cannot pass. At this point a helping hand and&#x2F;or the answer is the only way forward or to learn.
              • miningape4 hours ago
                &gt; you cannot pass<p>This is his entire point: getting to this brick wall is _where_ the real learning happens. When you start scrambling, reading old stackoverflow posts, and breaking out the calculus text book you&#x27;re pushing the boundaries of what is possible for you.<p>Body builders don&#x27;t grow by watching other people lift weights.
                • ghjfrdghibt3 hours ago
                  Agree to disagree.<p>Don&#x27;t see any difference with finding the answers on SO, or in textbooks, and having an AI provide the same.<p>And at the start, novice body builders will of course watch other body builders to learn how it&#x27;s done.<p>Unless you&#x27;re exceptional you&#x27;re not teaching yourself anything unless it&#x27;s by learning from others. Few are the pioneers in any field.
                  • miningape40 minutes ago
                    I think the difference between the textbooks and AI is that the AI can answer exactly your question without providing the necessary context&#x2F;reasoning behind how it arrived there.<p>When you are drawing connections between SO posts, textbooks, whatever you do a fair amount of reasoning yourself.<p>Now that I think about it it isn&#x27;t AI specific (more knowledge specific) - I&#x27;d say the same if you wait a few hours and then look up the AOC solutions on github. Sure you&#x27;ll have &quot;solved&quot; the problem but you never spent the time to actually figure out the solution.<p>&gt; And at the start, novice body builders will of course watch other body builders to learn how it&#x27;s done.<p>&quot;Learn how it&#x27;s done&quot; - not get bigger. This is the important difference. If those novice body builders watched others and learned how its done without putting in the reps themselves they&#x27;d get nowhere.
                  • rnewme2 hours ago
                    How do they become pioneers? By digging into the body of knowledge. They know what books and authors are good, what blogs to read, they posted questions on SO. They don&#x27;t search for direct answers, but instead they search for the knowledge that allowed the person who made the question to make the question, and person who found solutions to find the solution.<p>Looking how it&#x27;s done doesn&#x27;t equal you doing it. It&#x27;s apples to oranges. OP was referring to needing to do work in the gym to get results. You didn&#x27;t get results if you looked at others and did the same in the advent of code etc. You are merely entertaining yourself, but you are not competitive participant. With that approach you&#x27;ll never be on top.<p>There are people who use frameworks and people who write frameworks. The first group struggles when there is no official documentation or tutorial on a topic they need. The second group when faced with the same goes through the source code and gets the answers.<p>Bottom line is the question of what you want to achieve - just go through the problems and be done with them, or deep dive into new topics ans material, to widen your knowledge?
                    • ghjfrdghibt1 hour ago
                      I don&#x27;t see much to disgree with in what you&#x27;re saying. Were clearly talking about different things.<p>What happens when you dig in and exhaust all your best efforts and still don&#x27;t find a solution? Are you a lost cause because you couldn&#x27;t figure it out for yourself? Or are you allowed to be shown the way it&#x27;s done so you can learn from that?<p>Many times in my life have I not been able to figure something out for myself, and needed shown how the thing was done. Just because I couldn&#x27;t do it on my own doesn&#x27;t mean I wasn&#x27;t capable of either doing it once shown, or that by being shown I didn&#x27;t learn anything.
                      • miningape31 minutes ago
                        Honestly use the gym analogy again:<p>You&#x27;ve spent the last hour trying to curl the 50kg dumbbell and you just can&#x27;t do it. You walk up to the yolked out guy and ask him to show you how it&#x27;s done, he picks up the weight and curls it with ease.<p>At this point its not really fair to say you curled those 50kgs, and you didn&#x27;t get much out of the experience. Maybe you noticed something about his technique that helped, or he gave you some pointers, but you still can&#x27;t lift the weight by yourself even with that information.<p>Now if you instead went back and trained some more at lower weights not only would you get more out of the experience (in terms of growth), but also seeing someone else do it is more beneficial since you can try it again yourself and directly apply what you just learned. Eventually with enough training at easier weights and progressing naturally you&#x27;ll be able to lift the 50kg weights. But that one curl you&#x27;re now getting to do for the noobie is in no way indicative of the time and effort you actually put in to be able to do that one curl.<p>Now if you&#x27;re instead in a warehouse doing your job moving heavy boxes from A to B getting the yolked out guy to help you isn&#x27;t that bad - sure you can&#x27;t do it in the future but all that matters is that it was moved from A to B. If we take that same mindset into the gym we&#x27;ll get nowhere since the gym isn&#x27;t about moving something from A to B, it&#x27;s about making you better at moving something from A to B.
      • tirpen2 hours ago
        &quot;Running a marathon is hard work, but a car will do it for you.&quot;<p>Sure, but then what&#x27;s the point?
      • talldayo13 hours ago
        So will Fiverr. Who cares?
      • timeon15 hours ago
        Why bother.
  • mattbillenstein8 hours ago
    Aiming to get all the stars this year to round it out with 500 total - all the years, all the problems.<p>As of last week there were something around 1024 people who had all 450 stars.<p>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&#x27;s not too difficult and some themes repeat across years.<p>It&#x27;s fun to brush up on stuff you don&#x27;t touch all the time - actual algorithms and stuff.<p>Hats off to the volunteers and Eric - I aim to donate every year now - it&#x27;s a great event.
  • codr723 hours ago
    I usually do AoC in Common Lisp, but this year I&#x27;m giving Swift a chance.<p>It&#x27;s not half bad at this kind of twiddling for being a statically typed mainstream language.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;codr7&#x2F;aoc24&#x2F;tree&#x2F;main&#x2F;swift&#x2F;Sources&#x2F;aoc">https:&#x2F;&#x2F;github.com&#x2F;codr7&#x2F;aoc24&#x2F;tree&#x2F;main&#x2F;swift&#x2F;Sources&#x2F;aoc</a><p>This year is a tiny bit weird, I was just getting ramped up organizing the event at a new job; because I think it&#x27;s very useful for devs to learn some real problem solving, as opposed to stitching frameworks.<p>And then I had to leave because my new boss turned out to be someone I couldn&#x27;t imagine working with.<p>Guess it&#x27;ll be just me and Emacs as usual.
    • timsneath16 hours ago
      Excellent! Come and join the Swift leaderboard here <a href="https:&#x2F;&#x2F;forums.swift.org&#x2F;t&#x2F;advent-of-code-2024" rel="nofollow">https:&#x2F;&#x2F;forums.swift.org&#x2F;t&#x2F;advent-of-code-2024</a> if you haven&#x27;t already -- it&#x27;s super interesting to compare different solutions.
    • clearing10 hours ago
      Are you writing the solutions &#x2F; compiling &#x2F; running all with Emacs? I wanted to try Swift this year as well but feels sort of silly spinning up XCode for this.
      • codr737 minutes ago
        Yep, on Linux, or WSL to be exact, I just use the internal shell though.
    • tomtom133716 hours ago
      I enjoyed reading your solutions! I’m surprised how terse they are!
      • codr715 hours ago
        Lovely! I try to strive for readability first and foremost, which is a challenge in itself.
    • usmannk16 hours ago
      dont 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.
      • codr716 hours ago
        Nah, the String type is fine as far as basic functionality goes, I like adding my own convenience stuff in extensions.<p>The language has been moving pretty fast though, I have a feeling a lot of features I find useful are relatively new.
  • Last 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&#x27;m going to be kind to myself and not participate so I can really enjoy the winter break from work.
    • rak150720 hours ago
      What&#x27;s so hard about Day 12? It&#x27;s just<p><pre><code> +&#x2F;&#x27;{x:&quot;.&quot;,x;H:(-1+;1+i-)@&#x27;+|\m*i:!#m:x=\:&quot;#.&quot; R:(x=x)({[h;d;x;y;z](z#0),+\(((-z)_~&quot;#&quot;=x)&amp;z_d&gt;z)*(*y),(-z+1)_y-0^y h}. H)[x]&#x2F;y (*|R)-R@*|0,&amp;1_*+m}.&#x27;&#x27;1({(&quot;?&quot;&#x2F;:5#,x;,&#x2F;5#,y)}.&#x27;)\@[;1;.:]&#x27;&quot; &quot;\:&#x27;0:`:i&#x2F;12.txt</code></pre>
      • meisel19 hours ago
        This is what programming languages looked like to me before I learned programming
      • jnordwick13 hours ago
        I&#x27;m doing this year in K2 (after a long hiatus from K). Is there a K4&#x2F;5 binary? ATW gave me a K2 binary, but I miss some of the K4 and later functionality):<p><a href="https:&#x2F;&#x2F;github.com&#x2F;jnordwick&#x2F;aok2024">https:&#x2F;&#x2F;github.com&#x2F;jnordwick&#x2F;aok2024</a>
        • rak150712 hours ago
          I don&#x27;t know if there&#x27;s a specific k4 binary but you can run k4 through the q binary.
      • gcanyon18 hours ago
        Any idea how close that is to valid J code?
      • Jorge1o120 hours ago
        Is this Q? or k?
        • rak150719 hours ago
          It&#x27;s k4, the underlying language behind Q. With slight modifications it also runs in ngn&#x2F;k which is FOSS.<p><a href="https:&#x2F;&#x2F;ngn.codeberg.page&#x2F;k&#x2F;#eJxVjsFugzAMhu95iiyWik1CIGPtIVGXHnvm2lA2qdLKgcsOU6C0z77QcZkt65c&#x2F;&#x2F;7ZcMu+9BgBulFE106l7lvYAeoUe&#x2F;mWideK7ZTXtJu9S&#x2F;C0xs7Jn6D9druzUNl0B8GvwWr0mc2Cst9x0uAkPVCIEQY&#x2F;SElT24&#x2F;P764cbJsvsFq3QQkV3tFgY6YzsCzpkcg5D3tsXGGzcBytAC8Ybi3EfCW+nq7u46EY3tThBRUoGRCwm6h4CRLJspu7yPlGO+UgqDaShbiyq88ivd82PdIptOTKO+dxQ0RzyuVIb0+VyuOssM3hD4UW5hfSWWmSkxCkcTs44bdtMcBGy&#x2F;hdgfU9G" rel="nofollow">https:&#x2F;&#x2F;ngn.codeberg.page&#x2F;k&#x2F;#eJxVjsFugzAMhu95iiyWik1CIGPtIVG...</a>
        • icen20 hours ago
          Looks like K to me!
    • SketchySeaBeast23 hours ago
      It ate my life for a few years in a row, I even managed to finish on Christmas eve twice. Now I don&#x27;t even look, it turns from fun to stress rather quickly.
      • ljm21 hours ago
        I re-read the intro and the fact it mentions leetcode and the like was enough for me to decide that it&#x27;s an ultimately pointless endeavour for me.<p>I have no interest at all in competitive programming or maths; I spend 40+ hours a week doing programming for work, I want games and challenges that pull me away from that so I continue to have a life outside of my job.
        • ipdashc20 hours ago
          For what it&#x27;s worth, I <i>hate</i> leetcode with a burning passion, have no real interest in math, and yet I personally find Advent of Code quite fun and enjoyable.
          • dunham19 hours ago
            I have found AoC fun, but on some of the later days time constraints make it a little stressful (full time job + kids constrain my time).<p>I&#x27;ve done it (and completed it) the last five years. I used it to try out a few languages (Haskell, Idris, Lean) and did it in python one year I was feeling lazy. I&#x27;ve got a project going now, and I probably should do that instead.<p>However, that project is a programming language, so this is a way to test practicality. But solving problems and fixing shortcomings in the underlying language at the same time may be a bit too much. (It&#x27;s a dependent typed language, so there is a lot of subtlety to deal with.)
            • pxx16 hours ago
              this strat won advent of code in 2022. <a href="https:&#x2F;&#x2F;blog.vero.site&#x2F;post&#x2F;noulith" rel="nofollow">https:&#x2F;&#x2F;blog.vero.site&#x2F;post&#x2F;noulith</a>
          • codr714 hours ago
            Same, I&#x27;ve been coding for 40 years and I still learn plenty every year.
        • gorgoiler14 hours ago
          Solving the puzzles in a REPL in a dynamic language brings a lot of joy to AOC.<p>My daily grind is like carefully scaffolding and repainting a 50 storey office building made of typed, modular, spaghetti couples Python ML code.<p>AOC in ipython, by comparison, is like doodling pictures with a brush pen!<p>It is very enjoyable and also why leetcode is a little silly for interviews: convince me you can I want to know a candidate can flawlessly paint several hundred square feet of wall, not doodle a cat cartoon.<p>(Or, away from the analogy, the software equivalents. Can you safely progress business goals as a member of a team on a legacy codebase that’s partly evolving on the cutting edge and also partly rotting on the trailing edge? I don’t care if you can build a naive implementation of our trading system… sorry I mean an Elephant Auction… in 90 minutes!)
        • ehsankia20 hours ago
          I find it useful for trying new languages. The first 10 days usually start very easily and progress quite gradually. The 2nd half definitely gets more brutal, but if you do have the self-control, you can stop whenever it stops being productive.
          • pjot20 hours ago
            I love it for these meta-type use cases that aren’t necessarily about solving the puzzles.<p>For instance I’m using it this year to dial in new neovim configs. Last year was to get comfortable with a split keyboard.
        • sureglymop19 hours ago
          How about something creative that is at the same time relaxing?<p>Some time ago I started creating mods for the game stardew valley. It still involves some programming but mainly drawing, creating animations and composing music! It&#x27;s an absolute blast and so relaxing (like the game itself).<p>I think by now I could even start working on my own game but I don&#x27;t yet have a desire to.
          • williamdclt2 hours ago
            Not the OP but as someone with the same mindset as them:<p>Sounds very fulfilling, but I explicitly want to stay as far away from tech as possible outside of working hours. I&#x27;d much rather draw and compose music outside of any tech environment.<p>Plus, creative hobbies are an amazing way to connect with people, it&#x27;s half the reason I like them. Tech hobbies are going to make me connect with tech people which isn&#x27;t what I want: I meet enough tech people at work, I&#x27;d end up talking about tech (languages, frameworks, software, AI...) outside of work which have no interest in, and I don&#x27;t really relate to tech people anyway (as a sweeping statement that obviously isn&#x27;t an absolute)
          • whoodle19 hours ago
            Not OP, but that’s really neat. What’s your process for that? What IDE for the coding? Is C# required? What software for the art?
            • sureglymop15 hours ago
              I started with something called ContentPatcher. It let&#x27;s you patch game assets and other stuff (including some logic) using a json based DSL.<p>For more complex things C# is needed as Stardew Valley is made with XNA&#x2F;MonoGame. There is a NuGet package to set it up which even includes hot reloading of the mod into the running game: <a href="https:&#x2F;&#x2F;www.nuget.org&#x2F;packages&#x2F;Pathoschild.Stardew.ModBuildConfig" rel="nofollow">https:&#x2F;&#x2F;www.nuget.org&#x2F;packages&#x2F;Pathoschild.Stardew.ModBuildC...</a><p>I use NeoVim but you can use any editor. It was a bit of a pain to get dotnet going on arch linux but I got it working after some tinkering.<p>To get started, one can install SMAPI, then unpack the game assets. Then, you can open game maps and assets in the Tiled level editor. I also use Aseprite to make the pixel art tilesets for the maps (LibreSprite would also work). I use a mix of my own tiles and tiles from the game itself for my maps. Music and sound can also be added or patched with ContentPatcher. I make all sound related stuff with Ableton Live. I haven&#x27;t done much with C# yet but SMAPI provides a pretty nice API so it should be pleasant to use.
        • Symbiote14 hours ago
          An offline version could be an &quot;Exit&quot; advent calendar game. Now that advent has started, you might find them discounted at a local board game shop.<p>Note it&#x27;s a single-use game.<p><a href="https:&#x2F;&#x2F;boardgamegeek.com&#x2F;geeksearch.php?action=search&amp;objecttype=boardgame&amp;q=Exit%20Adventskalender" rel="nofollow">https:&#x2F;&#x2F;boardgamegeek.com&#x2F;geeksearch.php?action=search&amp;objec...</a><p>(I don&#x27;t see any reference to leetcode, but people can approach Advent of Code however they like. I&#x27;m certainly not waking up at 5:50 to race for a solution.)
        • Twirrim17 hours ago
          I go in to this not caring how fast I do it, or how far behind I get. It&#x27;s just an opportunity to learn something and challenge myself a little bit.<p>At best, I tend to set myself an upper limit for runtime.
        • RandomThoughts34 hours ago
          Advent of Code is traditionally parsing heavy and very light on actual mathematics. It’s not very leetcody.<p>If you have never tried it you should definitely give it a go. It’s quite enjoyable at a moderate dosage.
        • davidcbc13 hours ago
          The don&#x27;t do it. Thanks for the update though
        • sixothree14 hours ago
          I have enough side projects on the back burner as it is. I even picked up a data processing one over thanksgiving.
        • keybored15 hours ago
          I have enough fun side project ideas that I want to do. Ones which will also be helpful for me once I’m done with them.
      • moomin23 hours ago
        Only year I ever completed it it took eight months.<p>I’m not seeing my name on a leaderboard any time soon.
        • SketchySeaBeast23 hours ago
          Oh yeah, me neither. The competition is far too intense. What takes me hours takes the competitors minutes.
          • codr714 hours ago
            I actually made somewhat of an effort this time, made sure I was awake in good coding shape when the problem was released. Had a scaffold set up for running the code based on previous years. And I&#x27;m a pretty decent all-round coder, should be by now.<p>Ended up at around spot 6500.<p>Boggles my mind to even imagine what it would take.
            • jodrellblank12 hours ago
              You can see videos of what it takes; Jonathan Paulson makes the leaderboard often with Python and puts videos of him doing it on YouTube; he made positions 25 and 40 on day 1 this year and here is his video: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ym1ae-vBy6g" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ym1ae-vBy6g</a>
      • alach1116 hours ago
        I just do the puzzles until it stops being fun. For me that&#x27;s usually around day 14.
        • codr714 hours ago
          Goes up and down for me, some I enjoy a lot, some are mostly painful details to get right.
    • orra1 day ago
      Sounds sensible. It&#x27;s important to set boundaries, and enjoy time off.<p>For me Advent of Code is a slippery slope. The difficulty ramps up so at first it&#x27;s easy, then it&#x27;s rewardingly difficult. But then before I know it, it takes wayyyyy too much time. The danger is being emotionally invested by then.
      • matsemann1 day ago
        There&#x27;s a graph here of the &quot;hardness&quot; of each day&#x2F;task, based on how long the 100th place on the leaderboard used. <a href="https:&#x2F;&#x2F;aoc.xhyrom.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;aoc.xhyrom.dev&#x2F;</a><p>So it&#x27;s not linear, and also based on your own knowledge. So perfectly fine to skip some days and still it&#x27;s possible to solve some of the next ones!
        • schneems23 hours ago
          &gt; So perfectly fine to skip some days and still it&#x27;s possible to solve some of the next ones!<p>You try telling that to my brain. That guy doesn’t listen to me.
          • tg18022 hours ago
            This is why I usually do the simpler ones and then stop... Otherwise, I just can’t skip, it’s stronger than me.
        • kwertyoowiyop18 hours ago
          Either the problems are getting easier each year, or perhaps there are just more people participating which drives down the 100th-place times.
        • roncesvalles21 hours ago
          There are some &quot;filter&quot; days for sure, usually those are when the solution needs a major leap in your approach such as concurrency, dynamic programming, or geometry equations.
          • abound21 hours ago
            It&#x27;s usually not concurrency FWIW, it&#x27;s almost always algorithmic in nature. On a modern machine, even highly concurrent* code would only execute 10-20x as fast and you could just wait a bit.<p>One common AoC trick is that you can brute-force part one (e.g. O(n^2) complexity or worse), but part two scales up `n` to make that intractable.<p>*ignore my sloppy conflating of concurrency and parallelism
            • Jtsummers20 hours ago
              I agree with you. I don&#x27;t think either concurrency or parallelism have ever been necessary. In 2019 with Intcode, it was the <i>simplest</i> approach (use multiple threads, one per VM) for a couple days, but it was never actually necessary. You could do the same thing with purely sequential code, but you had to juggle the state of multiple running systems yourself then. Threads were much easier (or coroutines, go routines, processes, etc.; some concurrency system).<p>And by design, every problem is solvable on decade old computers in a reasonable amount of time (seconds) so parallelism is great if you&#x27;re looking to minimize the runtime, but it&#x27;s never necessary.
            • codr714 hours ago
              I very much enjoy the cat and mouse game of assumptions regarding part 2, it always makes me happy when the second part is just a simple adaptation of the existing solution.
        • ruuda23 hours ago
          Cool, it would be nice if that one aligned the days which were on weekends, as those tend to have harder problems.
          • SketchySeaBeast22 hours ago
            If I understand correctly, and I&#x27;m not sure if that graph proves that, they try to put longer puzzles on weekends.
            • wjholden17 hours ago
              Right, 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: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;bS9882S0ZHs" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;bS9882S0ZHs</a>
        • mvdtnz19 hours ago
          For those just glancing at the chart do note the scale is logarithmic, so the difficulty increases exponentially.
        • torginus22 hours ago
          Ugh, I hate log scales used arbirarily, every silicon valley nerd things it makes them cool like their EE profs teaching actual science or Ray Kurzweil singularity whatever nonsense.
          • dahart19 hours ago
            Ray Kurzweil is indeed full of crap (I have a specific bone to pick with his intentional mis-use of life expectancy among other things), but what makes you think in this case the use of log is arbitrary? Did you look at the data with a linear axis? I just tried it, and the vertical space is dominated by 4 or 5 outliers, and on top of that you can’t see the trend as well when it’s linear and all the data is smooshed at the bottom. Log plots are great when your values span many orders of magnitude. That’s true in this case, and the log plot both uses less vertical space, which is nice, and it more clearly shows the trend and wastes less empty space on the small minority of outliers.
      • tails4e20 hours ago
        I usually make it Monday 18 or 19 and then I loose the will as the time taken is excessive, and obsessing about it is not good. I&#x27;ve finished a 5 years, but all after the fact. Some I am not sure I&#x27;ll ever finish....
    • pvinis1 day ago
      A friend recently shared this with me. I think you&#x27;ll like it.<p><a href="https:&#x2F;&#x2F;eli.li&#x2F;december-adventure" rel="nofollow">https:&#x2F;&#x2F;eli.li&#x2F;december-adventure</a>
      • pkd8 hours ago
        Thanks, I like this.
    • JackMorgan23 hours ago
      All things in moderation! Now if I can just make it through the winter without installing the new Factorio DLC...
      • mrwww22 hours ago
        this comment actually prompted me to finally download and install the factorio demo, been hearing so many things about how it takes over lives! :)
        • JackMorgan22 hours ago
          It really is such a great game! I got the base game, beat it a few times, then my partner and I played a few mods, currently in an Angels+Bobs playthrough. So much replay value
        • hollerith22 hours ago
          So, you <i>want</i> it to take over your life?
          • mrwww4 hours ago
            No, I want it to be great, and if it takes over lives, then surely it must be great.
      • Tyr4219 hours ago
        I&#x27;ve been playing half an hour each morning before the rest of the family wakes up. Just finally made it to the volcano world
    • oweiler1 day ago
      I will probably solve the first 7 puzzles like every year and then just stop.
      • rikroots17 hours ago
        This is my experience. After the first week I develop an intense hatred of all things Elf and start swearing at my laptop. At which point I give up to stop my mental health deteriorating any further.
    • adventofshmode21 hours ago
      I got stuck on the graph-cut puzzle for FOUR MONTHS. I had to write a force-directed graphing engine to find the longest three edges to cut.<p>After I solved it I looked at other people&#x27;s solutions and they used Meta&#x27;s proposition solver in about 10 lines. Seemed like a massive cheat to me.
      • moustachehedron18 hours ago
        Oh man, this is my best memory of last year&#x27;s AoC. After uselessly noodling for a while, I used Graphviz to draw the graph to an SVG file. It drew two messy balls of yarn neatly connected by three edges.<p>My script still says &quot;TODO: find a real solution&quot;. Good times.
      • jjnoakes18 hours ago
        I have a self-imposed goal of not using third-party libraries for any of the solve logic. It feels more satisfying to do it myself, even if it takes longer.
      • tialaramex13 hours ago
        Like Minecraft, everybody should play it however they want, it&#x27;s just a game.<p>Which one was the &quot;graph-cut puzzle&quot; ? I&#x27;ve had a few where I couldn&#x27;t do them on the day, either I was busy or I found them harder than usual or sometimes both.<p>It looks like in 2023 I took until almost New Year&#x27;s Eve to finish, but until like the 21st of December I was fine, I got thrown off by travel and other commitments in the last few days as they got more difficult.
      • wjholden17 hours ago
        What solver are you referring to? I&#x27;ve used z3 and OR-tools, but I find it so difficult to model problems in either one that I seldom get good usage of either one.
    • brightball22 hours ago
      We run a private board for Advent of Code for the Carolina Code Conference. Eligibility for prizes starts after earning only 10 of 50 possible stars precisely for this reason.
      • flanbiscuit21 hours ago
        Oh cool. I live in WNC and had just missed your last conference in August. Is it possible to join multiple private boards? I usually do one with my coworkers as well
        • brightball19 hours ago
          Yep. I’m running a little behind but the announcement will come out later today on our site&#x2F;email list.<p><a href="https:&#x2F;&#x2F;carolina.codes" rel="nofollow">https:&#x2F;&#x2F;carolina.codes</a>
        • sokoloff21 hours ago
          You can only “own” one board, but you can join many.
      • alach1116 hours ago
        That&#x27;s awesome. We do the exact same thing for prize eligibility on my work leaderboard. The whole point is for it to be fun and challenging. No need to grind to the end unless you want to.
    • anonzzzies17 hours ago
      I just have them lingering in the back of my brain the whole year. I solved the last one from last year a month ago. This is much nicer than sudokus or whatever: I sometimes dream about them and I keep finding better (in my mind) solutions for ones from years ago. It&#x27;s lovely when you sit at another dumb crap meeting&#x2F;standup so you have something to do in your head.
    • ryukoposting1 day ago
      Likewise. I did it one year in college and it became a life-consuming thing almost immediately. Not AoC&#x27;s fault - part of it was depression, part of it was the Minnesota winter. Now that I have a full-time job and a wife, I&#x27;m trying to be more careful with those things that I know will suck me in.
    • nja17 hours ago
      &gt; I can really enjoy the winter break from work<p>What line of work are you in that you can take a winter break, and furthermore, that you can actually not work during that break? I&#x27;m envious...<p>I&#x27;ve always wanted to do AoC but on top of work it is too much.
      • atribecalledqst17 hours ago
        I get the week between Christmas and New Year&#x27;s off and then I take a bunch of my PTO in December. It&#x27;s not an official break or anything.
      • __loam17 hours ago
        Lots of people (in tech at least) take time on top of mandatory vacation that can result in like 2 weeks of time.
    • smcl1 day ago
      Ah yeah I&#x27;ve been there! Having done it a few years now, I&#x27;ve found that the approach that works for me is: if it starts looking like I&#x27;ll be stuck on one for more than a few hours, I&#x27;ll skip it and move on. Otherwise I&#x27;ll accumulate an insurmountable backlog that becomes more of a depressing chore to think about, than a fun little christmas tradition. I&#x27;d rather have a <i>mostly-complete</i> set of problems by the end of the year that I can come back and clean up when I feel like it.<p>That said, if you&#x27;d have a better holiday season by just stepping back from the computer and relaxing then that sounds great too. Either way - enjoy!
      • chucksmash22 hours ago
        My main complaint the last time I did this (2022) was the havoc it wreaked on my sleep schedule. Advent of Code is not kind to East Coast participants.<p>Every year except for one has been kind of the same pattern for me:<p>Day 1: this year, I&#x27;m just going to solve the problems. No futzing around.<p>Day 3: but it would be kind of neat to turn the solutions into a reusable AoC library. Just something minimal.<p>Day 5: and I should really add a CLI harness for retrieving the problems and parsing the input files.<p>Day 6: and testing of course.<p>Day 7: maybe I&#x27;ll skip today&#x27;s problem (just for today) and keep improving the framework.<p>Day 358: oh neat, Advent of Code is coming up.
        • smcl22 hours ago
          I&#x27;m in CET so time-wise it can be ok - problems open at 6am meaning if I get up I have about an hour around before I need to walk my walk my dog and get ready for work. But switching on at that time is really hard, the amount of stupid off-by-one errors, or referring to since-renamed-but-still-present functions in my Jupyter Notebook is not even funny.<p>But I luckily managed to avoid the &quot;reusable AoC library&quot; problem around 2019 when a week beforehand I wrote down the sort of functions I wanted to have at my disposal (usually things around representing 2D&#x2F;3D grids of unknown size and pathfinding&#x2F;debugging therein, but a few other bits and pieces) and made a simple library that I will sometimes add things to after I&#x27;m done with the problem for the day.<p>I was tempted to some functions (similar to those your CLI harness provided) for retrieving test data and submitting answers but I managed to stop myself short of that! But I am sure you&#x27;re far from the only one to end up down that road.
          • Kwpolska19 hours ago
            I&#x27;m in CET too, and 6:00 is not an hour where I’m awake, and if I were, my brain functions would definitely not be at a level where I would be capable of coding.<p>Midnight would be much more acceptable.
            • smcl52 minutes ago
              I think you&#x27;d be surprised - you&#x27;ll definitely be capable of coding at that hour. But like me you&#x27;d just also be quite capable of making daft mistakes :D
          • beacon29421 hours ago
            What if you don&#x27;t get up?
            • smcl54 minutes ago
              If it&#x27;s a work day and I don&#x27;t wake up on time, I&#x27;ll pick away at it over the course of the day - usually I&#x27;ll get a chance to think about it on my tram ride to work and complete it at lunchtime<p>If it&#x27;s a weekend I&#x27;ll just do it at my leisure at some point during the day when I have some time - maybe head to a nice cafe or something.<p>I&#x27;m nowhere near the top 100 - closest has been iirc top 200 a few years back - so it&#x27;s not like I <i>need</i> to start at 6am.
        • Vivtek16 hours ago
          Stay out of my head!
    • bmitc21 hours ago
      One reason I didn&#x27;t enjoy it was that I felt the days don&#x27;t build on each other well. So you get little code reuse. It was continually changing requirements, so it was especially like work.
      • Jtsummers21 hours ago
        In 2019 he built up about 12 challenges using a VM, for Intcode, you had to construct. It was poorly received because without a working version (developed over the first few Intcode challenges), you couldn&#x27;t solve the rest of them. He hasn&#x27;t done anything like that since, though I thought it was probably the more interesting series of challenges.<p>The problem with continuity across days is that the later days can be blocked by the earlier ones, as they were in 2019. That partly defeats the purpose (or structure) of the challenge, where you can mostly pick any day and try it without regard to earlier days or prior years.
        • wjholden17 hours ago
          I agree that it wasn&#x27;t completely well-received, and I think this is a real shame. The stated goal of Advent of Code was always to make better programmers. Extending, maintaining, and testing large systems is an important part of real-world engineering efforts.<p>I thought the IntCode thing was great and I hope to see something like that again this year.
        • hoistbypetard19 hours ago
          I agree. Intcode was fun, but completely destroyed the promise of skipping a day and still having fun with later puzzles. I didn&#x27;t come to enjoy it until much later.
        • timeon14 hours ago
          People are skipping days? I usually drop out when I&#x27;m stuck on some day. 2019 was my favorite.
          • Jtsummers14 hours ago
            Most years I&#x27;ve skipped a couple days and revisit them later. Usually just because I give myself 1-2 hours limit to avoid staying up too late working on them, and unless it&#x27;s the weekend I don&#x27;t always have time during the next day to wrap them up. No reason to stop just because of a single blocker.
      • smrq19 hours ago
        There&#x27;s a lot of potential code reuse between years; whether that&#x27;s good or bad is up to you, I think. (I would personally prefer if my Chinese remainder theorem solving function got <i>less</i> use, but it seems to be called for every year or two.)
    • istjohn15 hours ago
      Heh, I just checked. That&#x27;s where I got stuck last year, too. I solved the first half.
    • danielovichdk1 day ago
      Hahaha...I love this comment. I have just been stuck for a week doing edge puzzles and backstepping recursion, keeping myself awake aye night because it bothered me I couldn&#x27;t &quot;just&quot; solve it.
    • globular-toast19 hours ago
      The year I did it I got lucky and solved them all within a reasonable amount of time until there was one that suddenly involved a lot of nontrivial linear algebra and I immediately spotted that this wouldn&#x27;t be fun and noped out. Noticed the number of people solving dropped off a cliff on that day.<p>I think as nerds we need to be quite careful not to get too drawn into this kind of thing. Sometimes it&#x27;s like a superpower, but other times it just pointlessly consumes your life. Kinda makes me think of gambling addiction: &quot;when the fun stops, you stop&quot;.
      • 9witz16 hours ago
        You can also set a time rule. For me it&#x27;s 45min, if it takes longer to solve it, I an allowed to quit.<p>It&#x27;s totally worth it, though, especially for the first week, when you look up how other people solved the thing you just solved. I always learned (or re-learned) something from that. IMHO there&#x27;s not that much value in looking up solutions before you solved it yourself, though.
  • I 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&#x2F;12 days ^^<p>For the pythonists around here, give F# a try: it can feels very close to scripting and it has a wonderful REPL too :)
    • thaliaarchi1 day ago
      I&#x27;m continuing my tradition of doing AoC in Whitespace[0]. The first year I did it, it was motivation to build out a standard library so things wouldn&#x27;t be so tedious. Now, I find myself wishing I had finished better tooling. I debug with wsjq[1], a CLI debugger like gdb written in jq, but it&#x27;s slow.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;thaliaarchi&#x2F;ws-challenges">https:&#x2F;&#x2F;github.com&#x2F;thaliaarchi&#x2F;ws-challenges</a><p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;thaliaarchi&#x2F;wsjq">https:&#x2F;&#x2F;github.com&#x2F;thaliaarchi&#x2F;wsjq</a>
    • ssernikk17 hours ago
      I&#x27;ve done last two AoCs in F# (well, only the first few days too). For a person without prior functional programming experience, it was fun! Unfortunately I won&#x27;t have time to participate this year, but if I did, I&#x27;d probably chose F# again.
    • axpy9061 day ago
      I am doing it in bash. Will see how far I can go!
    • andrelaszlo1 day ago
      How&#x27;s linux support? :)
      • davidgl1 day ago
        Perfect, run loads of f# and c# on Linux, and have for years
      • ducdetronquito17 hours ago
        Works like a charm for me with Ubuntu 24.04&#x2F;VSCode&#x2F;Ionide (F# extension) !<p>For AoC I don&#x27;t use a real project setup, just a `dayX.fsx` file and I run it like a script with `dotnet fsi dayX.fsx`, et voilà :)
      • neonsunset1 day ago
        If almost 9 years were not enough to make this question seem silly, perhaps DuckDuckGo&#x2F;Kagi&#x2F;Perplexity could answer this?
        • plagiarist1 day ago
          Sure those can answer it. That person is perhaps trying to be social on a social network by inviting comments instead?
          • neonsunset1 day ago
            This specific question posed in this specific way usually implies a negative interaction. I have seen maybe one exception here so far.<p>And after providing detailed answers for so many times, I don&#x27;t think it&#x27;s worth it.
            • samatman19 hours ago
              You guaranteed it would be a negative interaction when you negatively interacted with the post. You&#x27;re allowed to skip the ones you don&#x27;t want to reply to.
  • wodenokoto20 hours ago
    People 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.
    • yoyohello1320 hours ago
      Copy your session token into .token then:<p>curl &quot;<a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;day&#x2F;$DAY&#x2F;input" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;day&#x2F;$DAY&#x2F;input</a>&quot; --header &quot;Cookie: $(cat .token)&quot; &gt; input.txt
    • sva_19 hours ago
      You could open the dev console in the browser and copy the curl command off the network tab
    • Symbiote16 hours ago
      Assuming you already opened it in a web browser, why not right click the page and choose &quot;Save As&quot;?
    • eddsolves20 hours ago
      I 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!)
    • tocariimaa15 hours ago
      I have this script:<p><pre><code> #!&#x2F;bin&#x2F;sh set -e curl &quot;https:&#x2F;&#x2F;adventofcode.com&#x2F;${YEAR:?}&#x2F;day&#x2F;${DAY:?}&#x2F;input&quot; --cookie &quot;session=$(cat .token)&quot; </code></pre> then: YEAR=2024 DAY=1 .&#x2F;aocdata
    • hoistbypetard19 hours ago
      The command line tool included with this python library does just what you want once you paste your session token into an environment variable:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;wimglenn&#x2F;advent-of-code-data">https:&#x2F;&#x2F;github.com&#x2F;wimglenn&#x2F;advent-of-code-data</a>
    • ljouhet16 hours ago
      You can use Firefox: &quot;Copy as cUrl&quot; (<a href="https:&#x2F;&#x2F;superuser.com&#x2F;a&#x2F;1382425" rel="nofollow">https:&#x2F;&#x2F;superuser.com&#x2F;a&#x2F;1382425</a>)
  • int0x2915 hours ago
    Solved the whole thing. It&#x27;s a business problem. Just replace the Chief Historian.
  • ctur1 day ago
    Woohoo, 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!<p>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.
    • mteoharov1 day ago
      &gt; 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.<p>With the sheer amount of sponsors and AoC++ users I do believe that this is not quite a small &#x27;passion project&#x27; struggling to pay the monthly subscription to a VPS.<p>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.
  • tmtvl22 hours ago
    I still haven&#x27;t made my way through all of the 2015 problems yet. But I don&#x27;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 &#x27;easily maintained&#x27; and &#x27;runs fast&#x27; takes a little more time than &#x27;just solve it&#x27; _and_ I&#x27;m planning on working my way through the problems chronologically, so I doubt I&#x27;ll get to the 2024 problems any time this decade.
    • SkiFire1316 hours ago
      &gt; But I don&#x27;t play the game correctly any way: instead of trying to solve the problems as fast as I can, ...<p>FYI trying to solve the problems as fast as you can is not considered &quot;the correct way&quot;. The author has emphasized multiple times that going for the leaderboard is not for everyone and requires a pretty questionable coding style. The main goal is to have fun and learn something new.
      • Dansvidania16 hours ago
        doesn&#x27;t the existence of the public leaderboard beg to differ? :)
        • rbits13 hours ago
          The fact that there are only 100 spots means it&#x27;s not intended for everyone
    • zach_miller21 hours ago
      That’s one of the many ways to do Advent of Code.
    • empath7521 hours ago
      I try to do everything in a single pure functional expression no matter how dumb and unreadable that makes the code look.
    • amw-zero22 hours ago
      [flagged]
      • release-object21 hours ago
        Why not?<p>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.<p>I like go to overboard writing parsers for each day.
      • mytec21 hours ago
        From the about page: &quot;... 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.&quot;
      • sokoloff22 hours ago
        Is there really a <i>wrong way</i> to do it?
        • nikanj20 hours ago
          Yes, with ChatGPT or similar: &quot; Can I use AI to get on the global leaderboard? Please don&#x27;t use AI &#x2F; LLMs (like GPT) to automatically solve a day&#x27;s puzzles until that day&#x27;s global leaderboards are full.&quot;<p><a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;about" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;about</a>
      • tmtvl20 hours ago
        Ha! Yeah, imagine me streaming my working on AoC, basically anyone tuning in the stream would say &#x27;you&#x27;re doing it wrong, stop having fun!&#x27; and leave.
      • xdavidliu20 hours ago
        my guess is that the creator would almost certainly disagree with you
  • NoelJacob1 day ago
    Other challenges (in advent and not in advent) like advent of code:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;NoelJacob&#x2F;advent-and-other-calandars">https:&#x2F;&#x2F;github.com&#x2F;NoelJacob&#x2F;advent-and-other-calandars</a> Compiled by myself.
    • rikroots17 hours ago
      Do you want to add Genuary to your list? A month of daily prompts to get you producing some generative &#x2F; creative coding art. Starts Jan 1. Website here: <a href="https:&#x2F;&#x2F;genuary.art&#x2F;" rel="nofollow">https:&#x2F;&#x2F;genuary.art&#x2F;</a><p>I&#x27;ve promised myself that one year I will move beyond the first seven prompts ... who knew creativity could be so taxing?
    • vidyesh7 hours ago
      Hey! Thank you. I have updated mine to include the ones from your list.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;vimode&#x2F;Advent-Calendars-For-Developers">https:&#x2F;&#x2F;github.com&#x2F;vimode&#x2F;Advent-Calendars-For-Developers</a>
    • smcl1 day ago
      Not a challenge, but it may be of interest anyway - Sergey Tihon&#x27;s F# Advent Calendar: <a href="https:&#x2F;&#x2F;sergeytihon.com&#x2F;2024&#x2F;10&#x2F;26&#x2F;f-advent-calendar-in-english-2024&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sergeytihon.com&#x2F;2024&#x2F;10&#x2F;26&#x2F;f-advent-calendar-in-engl...</a><p>I think there&#x27;s a few of these for different languages&#x2F;tech. I think they may be good for HN&#x27;ers seeking some kind of little daily advent-y fix without the potential emotional&#x2F;mental investment of AoC.
      • MortyWaves21 hours ago
        That’s an impressively broken website on mobile. Really, I haven’t seen a site I wasn’t able to scroll horizontally before.
    • remram18 hours ago
      This is great, thanks! I usually do AoC to learn a new programming language but there&#x27;s no more language I care to learn right now.
  • tgv1 day ago
    Going to use it to learn a bit of Ada. I&#x27;ve always been curious about it. It&#x27;s not a popular language, and it has some serious documentation problems. Sure, there are guides for &quot;hello, world&quot; 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.<p>Ada took me somewhere between 90-120 minutes, whereas I had the first problem done in JavaScript in about 30s-60s, just for verification.
    • Jtsummers22 hours ago
      <i>Ada.Integer_Text_IO</i> with <i>Get</i> will happily read across all whitespace, including new lines, to find the next integer. This is true for most (all?) instances of <i>Get</i>, though that may not always be what you want.<p><pre><code> 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; </code></pre> If you give it any of these pairs it&#x27;ll work as expected, put it in a loop and you&#x27;ll get all of them:<p><pre><code> 1 2 3 4 5 6 </code></pre> Sometimes thinking about lines is a red herring in AoC, the lines often don&#x27;t matter, only getting each value into the appropriate collection (a pair of vectors in this case since you don&#x27;t know the size). For the counts, you can use a hashed map, they&#x27;re built into the standard library. If you learn to use them now that&#x27;ll help you out in later days, they&#x27;re a commonly used collection (for me) in these challenges.
      • tgv15 hours ago
        I know that now, even though some of the details remain fuzzy (Get_Line reads 100 characters?), but it&#x27;s just that the documentation is a big pile of facts with very little to guide you towards the right function&#x2F;type. And then to get it to use in the rest of the code. And of course, many &#x27;modern&#x27; helpers are simply not available, so that too takes a bit of time to find out. But that&#x27;s learning.
        • Jtsummers15 hours ago
          It 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.<p><pre><code> 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; </code></pre> <a href="https:&#x2F;&#x2F;learn.adacore.com" rel="nofollow">https:&#x2F;&#x2F;learn.adacore.com</a> - good source of tutorials, unfortunately a lot of the better learning materials beyond this are books, not online tutorials.
  • Am I alone in thinking that measuring time to get answer is the worst possible metric? I have not participated because of that (yet).<p>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.<p>I am coming from low level C++ gamedev side so I understand that most people here use different tools to solve different problems.
    • Jcampuzano223 hours ago
      The vast majority of people are doing it for fun or learning purposes and not to compete on the leaderboard, and it wouldn&#x27;t quite be fair to compare much else in a competitive setting but time of completion and correctness, since you&#x27;d be at a disadvantage just by language choice in many other metrics. Unless you are someone with experience competing in competitive programming you almost certainly won&#x27;t make the leaderboard anyway.<p>If your goal is to compare solutions, lots of that happens on the subreddit for it where people post solutions in their language of choice on the daily threads.<p>I just do it for fun. When I was younger I&#x27;d actually do them at release (11pm in my timezone), now I don&#x27;t even bother and just used them as sort of a brain teaser to start my days and compare with coworkers who also do it, a lot of us in different languages.
    • dunham19 hours ago
      I try to get it done within a day, so they don&#x27;t back up, but I&#x27;ve never tried to compete. I am PST which opens at 9PM. I try to get through part 1 then, so I can sleep on part 2.<p>The subreddit &#x2F;r&#x2F;adventofcode contains discussions of solutions with lots of different skill levels.<p>I&#x27;ve done AoC for five years to learn new languages and try solve all of them myself during the month of December. (Dunno if I&#x27;ll run the whole thing this year - I have another project.) Others try to get on the leaderboard, and some will implement solutions that they&#x27;ve seen sketched on reddit.<p>Last year a few people used Z3 for one of the problems, and I went back and tried that to get some experience with Z3. And I&#x27;ve occasionally gone back and tried another approach or new trick that I saw on the subreddit. (In the years that I&#x27;ve used Lean, I&#x27;ve sometimes gone back and added proofs for termination or array indices, too.)
    • dingensundso1 day ago
      I think most people don&#x27;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.
      • It is normal for coding to seek feedback from others to your solution. Even if it is automated. Looking at &#x27;competing&#x27; 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&#x27;t think time to submit an answer is relevant.
        • anon2298115 hours ago
          Why do you care about the time so much then? Just ignore it :D
    • Levitz1 day ago
      Can you propose other metrics that don&#x27;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&#x27;t really see other options beyond time.
    • mhitza20 hours ago
      &gt; 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.<p>Generally you have the main community on reddit (memes, questions, daily thread for sharing solutions), then the language specific subreddits or hosted forums where you will see solutions discussed and shared, plus a couple of new users asking questions.<p>Also, within the daily main community thread you will see the niche sub community of people posting their code-golfing attempts.
    • kibwen23 hours ago
      Here&#x27;s a website that appears to be about competing on the performance of each solution: <a href="https:&#x2F;&#x2F;codspeed.io&#x2F;advent" rel="nofollow">https:&#x2F;&#x2F;codspeed.io&#x2F;advent</a>
      • SleepyMyroslav22 hours ago
        &gt;Participants have 36 hours<p>Looks like it is for young people who have dedicated time for it everyday.<p>Personally I would like to do anything like this with no time limit and probably no monetary prizes. I think the only value of those puzzles is to fire up rarely used neurons that hopefully are still there after another year of shipping corporate products xD. I might appreciate fresh point of view from young people and new programming languages though.
        • o_bender18 hours ago
          Then you may like <a href="https:&#x2F;&#x2F;highload.fun&#x2F;" rel="nofollow">https:&#x2F;&#x2F;highload.fun&#x2F;</a> No time limits, no monetary prizes, fastest solutions win.
        • _se22 hours ago
          Because only young people can make time for things.<p>There are plenty of professionals with jobs and families making time for AOC because they enjoy it. Doing the problems at the same time as everyone else is a VERY different experience from doing them whenever you&#x27;d like.<p>If you don&#x27;t want to make the time for it, power to you. I&#x27;d recommend most people to drop off after the first 10ish days. But don&#x27;t delude yourself by ascribing this as the domain of &quot;young people&quot; or those without responsibilities. You&#x27;re making a decision. Own it.
          • SleepyMyroslav22 hours ago
            I appreciate your perspective and it is correct. I should have phrased it differently.<p>Imho: I worked with code that has long history for my entire career. If the goal is to look at some objective quality of solution then I do not believe in time limits. The longer I work the more things getting patches&#x2F;updates&#x2F;remasters and value of better code goes up and value of arriving at any kind of solution overnight goes down.
            • _se22 hours ago
              For software that&#x27;s meant to be maintained for long periods, especially by others, I agree with you.<p>The thing about AOC is that it&#x27;s really less about the code that you generate, and more about the process of solving the problem. The challenge is really what you make of it. Some people will golf it, some will go for speed, other for performance, etc.<p>That&#x27;s why it&#x27;s so different to solve the problems in &quot;real time&quot;. There&#x27;s a huge community of people solving the same problem that you can interact with and bounce ideas off of. Even just a few days after the problem is released, most of that active discussion has dried up, so you can no longer participate in that discourse.<p>So, again, I don&#x27;t think there&#x27;s anything wrong at all with what you&#x27;re saying, but there are other elements to consider beyond maintainable code and pristine solutions.
          • criddell22 hours ago
            &gt; Doing the problems at the same time as everyone else is a VERY different experience from doing them whenever you&#x27;d like.<p>I agree and I happen to think the experience of doing it later than everybody else is significantly better. If I search for “AoC 2024 day 12 hint”, I’ll get better results on Jan 12 than Dec 12.
    • sebtron20 hours ago
      I also don&#x27;t like it, last year we had a private leaderboard at work and I realized being crazy enough to wake up at 5:50 every and solve at least part 1 would give me an edge. But the &quot;wake up at 5:50&quot; part is what I enjoyed the least.<p>However, there are other ways to rank yourself against others. You can order your private leaderboard by number of stars, or make your own leaderboard using their APIs.
    • nikanj20 hours ago
      That&#x27;s like saying you don&#x27;t want to go for a run, because professional marathon runners are so focused on time
    • clbrmbr22 hours ago
      It could be interesting to find the shortest solution. But the site is not set up for verifying solutions in various languages.
    • criddell22 hours ago
      I wouldn’t use an AI to solve the problems, but I wonder if an AI could give good feedback on a solution I cook up?
      • yoyohello1321 hours ago
        That&#x27;s what I&#x27;ve been doing with some older AOC puzzles. I solve it, then paste my solution into Claude and ask for tips on making it more idiomatic. It&#x27;s been pretty nice so far. I learned about Haskell Arrows which I would probably have never come across otherwise.
  • paulb7322 hours ago
    I can hear the elves calling me...<p>But no, last year I lost all momentum on my side projects and my gf thought she&#x27;d lost me to the elves.<p>Completing it on time was rewarding but I can&#x27;t go back.<p>But I can hear those elven bells a jingling...
  • matejn20 hours ago
    I completed last year&#x27;s in Scryer Prolog and it was a joy. Some problems were almost impossible due to the lack of mutation (Karger&#x27;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.
    • Rendello7 hours ago
      Erlang 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&#x27;m using most at the time, unless I really dislike the language (Javascript).
  • heelix23 hours ago
    Woohoo! This is my favorite time of the year. As the year rolls into vacation&#x27;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&#x27;m starting with Rust. I had not realized it was the first.
  • NamTaf1 day ago
    I&#x27;ve never done AoC but I&#x27;ve done other programming-related challenges before. I come from a non-IT background (mech eng), and I&#x27;m currently away for work for the first several days with only their locked-down laptop.<p>Normally I&#x27;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&#x27;d be a fun little challenge :)
    • andai1 day ago
      My 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!<p>(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&#x27;t tried that.)
      • cube0023 hours ago
        You&#x27;ll lose the benefit of the TypeScript compiler picking up mismatched types if you only use a transpiler.
        • andai7 hours ago
          Interesting, the in-browser one doesn&#x27;t do type checking? They&#x27;re actually adding that to JS itself as far as I can tell -- the ability to strip TS types and run it as-is.
    • Cruncharoo23 hours ago
      I use Excel for the first few as well! I actually find it to be easier than using Python&#x2F;Javascript, at least early on.
  • setopt1 day ago
    The tiny thin gray font on black background is impossible to read on a mobile device :(
    • 0xEF1 day ago
      Color 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&#x2F;css alone, and yet hear we are; a site that is unreadable to me.<p>I love what Advent of Code does, but when your site is all text, there&#x27;s just no excuse to not let the user resize it by default.
    • scrivna21 hours ago
      AoC day one challenge… make website responsive
    • sebtron20 hours ago
      It is terrible for me on my desktop too :(
    • MattRix1 day ago
      On iOS you can switch to Reader view, and I imagine Android has something similar.
      • setopt1 hour ago
        I tried that, but it broke all navigation links (including to the actual exercises).
      • technofiend21 hours ago
        Yes on Android it&#x27;s already readable in Firefox, but that may be due to ad-blocking plugin. Even so, Firefox reader mode makes it even better.
      • goodlinks20 hours ago
        *browser not os feature :)
  • signa111 day ago
    if you want to use Zig, here are some tips : <a href="https:&#x2F;&#x2F;kristoff.it&#x2F;blog&#x2F;advent-of-code-zig&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kristoff.it&#x2F;blog&#x2F;advent-of-code-zig&#x2F;</a>
  • JoshMandel12 hours ago
    My personal challenge last year was to solve everything on my mobile phone, using LLMs (mostly ChatGPT4 with code interpreter; I didn&#x27;t paste in the problems, but rather described the code I wanted.)<p>This year I&#x27;m declaring &quot;Advent of Claude&quot;!<p>Challenge: Write a Claude custom style to solve Advent of Code puzzles within Claude&#x27;s UI.<p>Score: # adventofcode.com stars earned in 2 daily conversation turns.<p>Fine print: web app artifacts are allowed, including paste of your custom input into the artifact UI; one click only.<p>Per <a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;about" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;about</a>, wait until the daily <a href="http:&#x2F;&#x2F;adventofcode.com" rel="nofollow">http:&#x2F;&#x2F;adventofcode.com</a> leaderboard is full before submitting LLM-generated solutions!<p>Of course, feel free to use ChatGPT custom instructions, static prompts, etc.<p>Day 1: two stars, <a href="https:&#x2F;&#x2F;claude.site&#x2F;artifacts&#x2F;d16e6bdb-f697-45fe-930c-7f58b2b5bb16" rel="nofollow">https:&#x2F;&#x2F;claude.site&#x2F;artifacts&#x2F;d16e6bdb-f697-45fe-930c-7f58b2...</a>
    • hoistbypetard12 hours ago
      While I personally wouldn&#x27;t find it a ton of fun to solve the puzzles that way, that&#x27;s pretty cool. Nice work.<p>Is there a place where you&#x27;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?
      • JoshMandel11 hours ago
        Fair enough! I&#x27;ll document my progress at <a href="https:&#x2F;&#x2F;github.com&#x2F;jmandel&#x2F;advent-of-claude&#x2F;tree&#x2F;main">https:&#x2F;&#x2F;github.com&#x2F;jmandel&#x2F;advent-of-claude&#x2F;tree&#x2F;main</a>, though I may not keep up.
  • HeavyStorm21 hours ago
    I believe that this page should be mobile friendly. I won&#x27;t be coding on mobile, but reading about it on my portable device would be great.
    • dchuk20 hours ago
      At least on iOS, Reader mode in safari fixes it right up
  • a_cardboard_box13 hours ago
    I&#x27;m gonna try doing this on the NES (Nintendo Entertainment System) this year.<p>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&#x27;ll try to solve as many as possible.<p>Today&#x27;s was possible, in under 4 seconds, using 4KiB extra RAM on the cartridge.
    • whalesalad13 hours ago
      what 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?
      • deaddodo13 hours ago
        Generally you compile to a rom and load it into an emulator. There&#x27;s a certain amount of memory manipulation you can do in NES debuggers, but it&#x27;s usually just easier to go through a full build cycle; especially for small programs like used in AoC.
    • a_t4811 hours ago
      Very interested in this - I have a SNES flash cart, I wonder if there&#x27;s a good basic library to handle printing to the screen and such.
  • runeks3 hours ago
    If 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&#x27;s released, and feeds it to an LLM, to produce a solution. Then run this code and submit the answer it outputs.
    • Ellipsis7533 hours ago
      This is how most of the top of leaderboard works.
  • azhenley23 hours ago
    I’m attempting to make my own language for solving the puzzles as I go along.
    • lolinder23 hours ago
      I&#x27;d pretty much decided I wasn&#x27;t going to participate because it would take up too much time, but now you&#x27;ve both made it way more complicated and way more appealing...
    • nemo161821 hours ago
      I did this, and it&#x27;s been very satisfying! Here&#x27;s where I&#x27;m at now: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=r99-nzGDapg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=r99-nzGDapg</a>
  • ksymph23 hours ago
    This is the first time I&#x27;ve seen Firefox&#x27;s alternate stylesheets mentioned in the wild. Interesting.
  • genericspammer6 hours ago
    Lots of people seem to be doing hardcore things like using C without libraries, limiting memory etc.<p>And here I am doing it in Ruby instead of Java this year thinking I was giving myself a challenge.
  • lyxell23 hours ago
    I’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.
    • Rendello10 hours ago
      I&#x27;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&#x27;t understand it.<p>Edit: Someone else posted an &quot;Advent of &quot; list which included <a href="https:&#x2F;&#x2F;adventofsql.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;adventofsql.com&#x2F;</a>, perhaps those problems will be a little more pedestrian for SQL.
    • shawn_w9 hours ago
      I&#x27;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.
      • lyxell5 hours ago
        I’m allowing myself to convert the data to a csv and read it using ’.mode csv’.<p>I realized when solving todays problem that SQLite’s<p><pre><code> json_each(&quot;[&quot; || T.c1 || &quot;]&quot;) </code></pre> Is useful for parsing comma separated rows into (row, col)-pairs as well.
  • gavinhoward23 hours ago
    This is the first year that I will do AoC. I have never wanted to, but I have a working language of my own now.<p><a href="https:&#x2F;&#x2F;gavinhoward.com&#x2F;2024&#x2F;11&#x2F;advent-of-code-2024-getting-started&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gavinhoward.com&#x2F;2024&#x2F;11&#x2F;advent-of-code-2024-getting-...</a>
  • orra1 day ago
    I 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&#x27;t have the time to get 50 stars.
    • andix1 day ago
      No stars are required at all. You can also skip some days if you don&#x27;t want to do them. Or only to the first stars. However you like. First&#x2F;silver stars will also increase your score in the leader boards.
      • 4hg4ufxhy1 day ago
        I think you need all stars to do the final puzzle.
        • lancebeet23 hours ago
          I 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&#x27;t think any puzzles are &quot;locked&quot;.
          • SketchySeaBeast22 hours ago
            You&#x27;re right. The second star is a freebie for completing the rest.
        • andix23 hours ago
          That might be true, I&#x27;ve only completed it once a few years ago. But if you don&#x27;t want to the more complicated parts, then you want to skip the last one for sure.
    • linhns22 hours ago
      Same. Especially when it gets really hard later on. Despite studying CS, I still struggle with it.
  • fleeno23 hours ago
    I usually get stuck about halfway through and give up.<p>Doing it in a Lisp I’ve been writing in Ruby will have me giving up even sooner, but it will be fun!
  • middayc16 hours ago
    I love looking at AoC solution megathreads on reddit. So many languages and so many different approaches are hard to find and observe anywhere.
    • jodrellblank8 hours ago
      I 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.<p>Skimming some, the core of Part 1 after people have parsed and sorted:<p>Python:<p><pre><code> sum([abs(x-y) for x,y in zip(left,right)) </code></pre> TypeScript:<p><pre><code> list1.reduce((acc, cur, i) =&gt; { return acc += Math.abs(cur - list2[i]) }, 0) </code></pre> Common Lisp:<p><pre><code> (reduce #&#x27;+ (mapcar (lambda (l r) (abs (- l r))) sorted-left sorted-right)))) </code></pre> Julia:<p><pre><code> sum(abs.(list1 .- list2)) </code></pre> Rust:<p><pre><code> Ok(zip(left, right).map(|(l, r)| l.abs_diff(r)).sum() </code></pre> F#:<p><pre><code> Seq.map2 (fun x y -&gt; abs (x - y)) xs ys |&gt; Seq.sum </code></pre> APL:<p><pre><code> +&#x2F;|-⌿ </code></pre> Haskell:<p><pre><code> map abs $ zipWith (-) column2 column1 </code></pre> and then all the submissions which don&#x27;t do anything like this, and have manual loops and indexing and clunky data representations or performance-optimized data representations, etc. etc.
  • criddell1 day ago
    &gt; You don&#x27;t need a computer science background to participate - just a little programming knowledge and some problem solving skills will get you pretty far.<p>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.<p>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.
    • kadoban23 hours ago
      &quot;Participate&quot; doesn&#x27;t mean &quot;win&quot;. You can look things up as well. I haven&#x27;t done a ton of AoC, but the harder ones from it I&#x27;ve seen were not very hard to search&#x2F;research for the correct algorithm (even avoiding &quot;what&#x27;s the answer for day X&quot; searches).
    • seba_dos118 hours ago
      AoC doesn&#x27;t require any particular algorithmic knowledge to solve its problems. Sometimes knowing algorithms is useful to quickly write your solution, but IME it&#x27;s never a requirement. Unlike leetcode-style challenges, AoC tasks usually don&#x27;t even try to punish you for solutions that are specific to your particular input. You can get some stars with just pen and paper.<p>It&#x27;s more like a set of logic puzzles. Programming and algorithms are only incidental.
    • wenderen1 day ago
      Anecdote 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.
      • Jtsummers22 hours ago
        &gt; The Chinese Remainder Theorem has featured in Advent of Code at least twice IIRC<p>Fortunately it&#x27;s never been needed. Every time it&#x27;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&#x27;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.
  • xavdid9 hours ago
    I&#x27;m excited about this! I&#x27;ll be sticking to Python so I can practice writing maintainable code. I&#x27;m also looking forward to keeping up with my explanations of each puzzle, which helps me (and others!) learn a lot.<p>Everything is here: <a href="https:&#x2F;&#x2F;advent-of-code.xavd.id&#x2F;" rel="nofollow">https:&#x2F;&#x2F;advent-of-code.xavd.id&#x2F;</a><p>I&#x27;m unlikely to finish it all in December (the puzzles get hard and I get busy) but I _do_ love the event.
  • prophesi20 hours ago
    For 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.<p>[0] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=gpaV4bgEG-g" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=gpaV4bgEG-g</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;ChristianAlexander&#x2F;advent-generator">https:&#x2F;&#x2F;github.com&#x2F;ChristianAlexander&#x2F;advent-generator</a>
    • msmitha19 hours ago
      There are a few Elixir solutions fo Day 1 here, including mine: <a href="https:&#x2F;&#x2F;elixirforum.com&#x2F;t&#x2F;advent-of-code-2024-day-1&#x2F;67786" rel="nofollow">https:&#x2F;&#x2F;elixirforum.com&#x2F;t&#x2F;advent-of-code-2024-day-1&#x2F;67786</a>. I&#x27;m using it as a motivator for actually learning the language&#x2F;libs.
      • prophesi17 hours ago
        Awesome, in that thread I found this library[0] to make it easy to write AoC solutions with Elixir&#x27;s Livebook.<p>[0] <a href="https:&#x2F;&#x2F;hexdocs.pm&#x2F;kino_aoc&#x2F;KinoAOC.html" rel="nofollow">https:&#x2F;&#x2F;hexdocs.pm&#x2F;kino_aoc&#x2F;KinoAOC.html</a>
  • ruuda23 hours ago
    This has been a good driver for me to add features to <a href="https:&#x2F;&#x2F;rcl-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rcl-lang.org&#x2F;</a>. I just added List.sort for today’s problem.
    • SushiHippie20 hours ago
      Interesting, do you publish your AoC solutions in rcl somewhere?<p>EDIT: nevermind, found it! <a href="https:&#x2F;&#x2F;github.com&#x2F;ruuda&#x2F;adventofcode&#x2F;tree&#x2F;master">https:&#x2F;&#x2F;github.com&#x2F;ruuda&#x2F;adventofcode&#x2F;tree&#x2F;master</a>
  • ArcHound1 day ago
    I love AoC. I made a CLI client in python for me (and a lib for common tasks, especially the 2d grid maps).<p>Repo: <a href="https:&#x2F;&#x2F;github.com&#x2F;ArcHound&#x2F;advent_of_code">https:&#x2F;&#x2F;github.com&#x2F;ArcHound&#x2F;advent_of_code</a> Writeup: <a href="https:&#x2F;&#x2F;blog.miloslavhomer.cz&#x2F;p&#x2F;advent-of-code-cli-client-and-library" rel="nofollow">https:&#x2F;&#x2F;blog.miloslavhomer.cz&#x2F;p&#x2F;advent-of-code-cli-client-an...</a><p>Good luck to y&#x27;all in 2024 and enjoy!
  • struanr18 hours ago
    Excited 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.
    • nvarsj31 minutes ago
      Gl. I&#x27;ve yet to meet anyone that actually finished AoC. At some point the problems take 8+ hours to solve and people give up :).
  • walis8530011 hours ago
    This year I will solve AoC using Gleam. My challenge is to finally learn functional programming and learn Gleam at the same time.<p>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
    • superhoops54034 minutes ago
      Not sure if it would take away from the experience, but there&#x27;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<p><a href="https:&#x2F;&#x2F;github.com&#x2F;TanklesXL&#x2F;gladvent">https:&#x2F;&#x2F;github.com&#x2F;TanklesXL&#x2F;gladvent</a>
  • jlengrand15 hours ago
    Remarkable. Bought, sold within 2 weeks. Really underwhelmed
  • tmountain1 day ago
    It 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.
    • uludag1 day ago
      I&#x27;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.<p>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.
    • Retr0id1 day ago
      Even before AI I was never fast enough for a respectable global rank, but it&#x27;s still fun to compare solutions with friends.
    • Barrin921 day ago
      The global leaderboard is so fast that any AI assistance would literally slow them down, here&#x27;s one of the guys who tends to score highly solving today&#x27;s puzzle. (<a href="https:&#x2F;&#x2F;youtu.be&#x2F;ym1ae-vBy6g" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;ym1ae-vBy6g</a>), and on the more complicated days that&#x27;s even more pronounced because anyone who is even somewhat decent doesn&#x27;t need to ask chatgpt how to write Dijkstra.<p>Obviously if you&#x27;re doing it recreationally you can cheat with AI but then again that&#x27;s no different than copying a solution from reddit and you&#x27;re only fooling yourself. I don&#x27;t see it having an impact.
      • Kiro1 day ago
        The &quot;winner&quot; solved it in 9 seconds using AI so I don&#x27;t understand how you can claim that.<p><a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;leaderboard&#x2F;day&#x2F;1" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;leaderboard&#x2F;day&#x2F;1</a>
        • dialogbox12 hours ago
          I&#x27;m curious to know how did you know the winner used AI?
          • Kiro6 hours ago
            See <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42287377">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42287377</a><p>I also don&#x27;t see how it would be possible otherwise.
      • anonu23 hours ago
        Python looks excruciatingly slow to me. If you want fast I believe you need to think and write in vector languages like kdb+&#x2F;q. I am not a kdb+ expert by any means and my code can probably use more q primitives, but here was my solution in ~2 minutes:<p><pre><code> i1:(&quot;I I&quot;;&quot; &quot;)0: `:1.txt; sum {abs last deltas x }each flip asc each i1 &#x2F; answer 1 sum {x * sum x = i1[1]}each i1[0] &#x2F; answer 2</code></pre>
        • vjerancrnjak18 hours ago
          Everything autocompletes in Python.<p><pre><code> from collections import * xys = list(map(int, open(0).read().split())) xs = xys[::2] ys = xys[1::2] xs.sort() ys.sort() print(sum(abs(x-y) for x,y in zip(xs,ys))) yc = Counter(ys) print(sum(((yc[x])*x for x in xs)))</code></pre>
          • acters9 hours ago
            this is the least amount of loc I can think of rn<p><pre><code> data = { i+1 : sorted([ x for x in list(map(int, open(&#x27;input&#x27;).read().split()))[i::2]]) for i in range(2) } total_distance = sum(list(map(lambda x: abs(x[0]-x[1]), zip(data[1], data[2])))) print(&quot;part 1:&quot;, total_distance) similarity_score = sum(list(map(lambda x: (x*data[2].count(x))*data[1].count(x), set(data[1]).intersection(data[2])))) print(&quot;part 2:&quot;, similarity_score)</code></pre>
        • eddsolves20 hours ago
          That’s cool, but horribly ugly! What does production kdb+ look like? Is it similarly terse, maybe Perl-ish, or was this purely for speed?<p>What does each flip asc do?
          • anonu19 hours ago
            i1 is Nx2. asc each i1 sorts each N in ascending order. flip transposes to 2xN.
      • MattRix1 day ago
        The thing is that the AI can read a puzzle faster than a human can. If someone put any effort towards an AI-based setup, it would easily beat human competitiors (well, up until the point the puzzles got too difficult for it to solve).
        • petercooper23 hours ago
          I&#x27;ve always done AoC &quot;properly&quot; but this year I&#x27;ve decided to actually use it as a learning experience for working with LLMs (and I don&#x27;t get up early so will never sully the leaderboard) and trying some experiments along the way.<p>I think the strategy for the harder puzzles is to still &quot;do&quot; them yourself (i.e. read the challenge and understand it) but write the solution in English pseudocode and then have an LLM take it from <i>there</i>. Doing this has yielded perfect results (but less than perfect implementations) in several languages for me so far and I&#x27;ve learnt a few interesting things about how they perform and the &quot;tells&quot; that an LLM was involved.
    • wiseowise1 day ago
      All the people I know already participate on private boards. AI enshitification will only speed up the process of moving there.
      • andix1 day ago
        It also doesn&#x27;t make any sense for most of the people to compete with the geniuses on the public leader board. It&#x27;s like signing up for the Olympics as an amateur athlete.
      • danielbln1 day ago
        Are we using enshittification for everything we don&#x27;t like these days? We invented calculators, those really enshittified manual arithmetic puzzles. Private boards for this stuff makes sense anyway, it&#x27;s the Internet afterall.
        • wiseowise1 day ago
          Using LLM for this kind of thing is like using cheats or aim assist for online games. So yes, this is prime example of enshifittication.
          • ikesau22 hours ago
            enshittification isn&#x27;t &quot;things become worse&quot; - it&#x27;s the specific process of how services worsen in 3 stages:<p>&gt; Here is how platforms die: first, they are good to their users; then they abuse their users to make things better for their business customers; finally, they abuse those business customers to claw back all the value for themselves. Then, they die. I call this enshittification, and it is a seemingly inevitable consequence arising from the combination of the ease of changing how a platform allocates value, combined with the nature of a &quot;two-sided market&quot;, where a platform sits between buyers and sellers, hold each hostage to the other, raking off an ever-larger share of the value that passes between them.
            • davidcbc13 hours ago
              Just because that&#x27;s how it was defined in a blog post doesn&#x27;t mean that it&#x27;s the only way to use it
              • Terr_12 hours ago
                We already have plenty of words for the ancient and generic concept of things-getting-worse, like &quot;ruining&quot;.
          • petercooper23 hours ago
            I think the intent is important. Using LLMs to do well on the public leaderboard is like using cheats&#x2F;aim assist. But learning how to use LLMs to solve complex puzzles independent of any sense of &quot;competition&quot; is more like when people train neural networks to drive a car in GTA or something - it&#x27;s not hurting anyone and it can be a real learning experience that leads to other interesting byproducts.<p>But, yeah, don&#x27;t use LLMs to try and get 9 second solve times on the public leaderboard, it&#x27;s not in the spirit of the thing and is more like taking a dictionary to a spelling bee.
        • davidcbc20 hours ago
          Just the shitty things like using LLMs to spoil a fun competition
        • ktaqhg1 day ago
          No, we do not. Calculators are a whole different issue from LLMs, which plagiarize and spoonfeed whole paragraphs of thought.<p>Enshittification occurs when previously good or excellent things are replaced by mediocre things that are good enough for those susceptible for advertising and group think.<p>Examples are McDonalds vs. real restaurants, Disney theme parks vs. Paris, the interior of modern cars, search engine decline, software bloat etc.
  • barkingcat21 hours ago
    I use it to learn new languages - this year it&#x27;s Ada -<p><a href="https:&#x2F;&#x2F;blog.adacore.com&#x2F;announcing-advent-of-ada-2024-coding-for-a-cause" rel="nofollow">https:&#x2F;&#x2F;blog.adacore.com&#x2F;announcing-advent-of-ada-2024-codin...</a>
  • sgarland13 hours ago
    Last 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.<p>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.
  • anonzzzies1 day ago
    One of the things I look forward to. It is a lot of fun.
  • 1a527dd514 hours ago
    The first year was the best year for me. It was really fun and I think I got 22&#x2F;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&#x27;m not quick enough.<p>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!
    • ocschwar14 hours ago
      Just give up on the main leaderboard. Maybe join another, preferably with people who share your time zone and schedule.
  • audiodude19 hours ago
    I know a lot of people use AoC to try out&#x2F;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&#x2F;regex which are difficult&#x2F;verbose in Go).<p>The past few years I&#x27;ve decided to stick to the same principle I&#x27;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&#x27;ve found I can&#x27;t have both.
  • pclmulqdq11 hours ago
    I am a bit late to the trend, but I am planning to do Advent of CUDA this year. It&#x27;s been a while since I have written a lot of parallel code, and thinking about concurrent algorithms is fun.
  • cactusfrog14 hours ago
    I just did this in a few lines of python with numpy. I don’t understand why the input isn’t a csv.
    • Maksadbek14 hours ago
      It’s ssv — space separated values
  • thepaulmcbride18 hours ago
    I 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!
  • nikolay13 hours ago
    This is my fourth year. I&#x27;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!
    • jnordwick13 hours ago
      I&#x27;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.
      • nikolay7 hours ago
        I am <i>doing it</i>, it&#x27;s just not convenient for a major language that has been around for 15 years!
  • neonsunset1 day ago
    I can&#x27;t explain why but doing AoC is always interesting, and doing LeetCode which is supposed to be similar is always very depressing.<p>Wishing everyone a fun challenge. This year I will be practicing F# and hope some of you will give it a try too :) <a href="https:&#x2F;&#x2F;github.com&#x2F;neon-sunset&#x2F;AOC24&#x2F;blob&#x2F;master&#x2F;day1.fsx">https:&#x2F;&#x2F;github.com&#x2F;neon-sunset&#x2F;AOC24&#x2F;blob&#x2F;master&#x2F;day1.fsx</a>
    • sigbottle16 hours ago
      Think it&#x27;s because certain topics, such as dynamic programming or graph algorithms, are just not something you can attack from first principles for most mortal people. I certainly wouldn&#x27;t have invented binary trees. So there is quite a bit of things to read up on (though it should all be covered in an algorithms course).<p>Then once you do get that context... like LeetCode problems often aren&#x27;t very inspiring? A lot of the time it&#x27;s &quot;just apply this technique here&quot;.<p>Whereas in AoC, at least in the first few weeks, it&#x27;s mostly just, do the task, attack it from first principles.
    • AoC would be more stressful if you had to solve a problem in 30 minutes for a highly competitive job.
      • codr714 hours ago
        I 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&#x27;t think I could do it again, no matter what.
      • acomjean23 hours ago
        those exist. except I think the one I did was an hour(? it was ten years ago). I got the interview, but that didn&#x27;t go well, so I went to work elsewhere.<p>they have part of the site that has lessons for developers:<p><a href="https:&#x2F;&#x2F;app.codility.com&#x2F;programmers&#x2F;" rel="nofollow">https:&#x2F;&#x2F;app.codility.com&#x2F;programmers&#x2F;</a><p>I haven&#x27;t used it for a long time, but they also have contests with some small prizes: <a href="https:&#x2F;&#x2F;app.codility.com&#x2F;programmers&#x2F;challenges&#x2F;" rel="nofollow">https:&#x2F;&#x2F;app.codility.com&#x2F;programmers&#x2F;challenges&#x2F;</a>
    • BitterAmethyst22 hours ago
      I’m also doing them in F# (again). Hoping to best my past attempts, never gone beyond day 12 before!<p>I’m never gonna do it fast but I enjoy using fparsec to get the input text in whatever format I need each time, even if writing and debugging the parsers sometimes takes up way too much of my time!
    • kadoban23 hours ago
      The community is most of the difference. That and the problems aren&#x27;t very similar to leetcode.
    • foooorsyth1 day ago
      The Christmas theme is fun and it’s nice to do one problem per day with a large community.<p>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.
    • jacamera21 hours ago
      Have you ever tried the LeetCode live competitions? I found those to be really fun with a great community. Just grinding problems in isolation can definitely be depressing.
    • andai1 day ago
      That&#x27;s actually a very important question I think, and sorely neglected by most educators! (and book authors, etc)
  • benmccann21 hours ago
    Svelte 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&#x27;s feature is error boundaries!<p><a href="https:&#x2F;&#x2F;bsky.app&#x2F;profile&#x2F;svelte.dev&#x2F;post&#x2F;3lcavobxn7c2k" rel="nofollow">https:&#x2F;&#x2F;bsky.app&#x2F;profile&#x2F;svelte.dev&#x2F;post&#x2F;3lcavobxn7c2k</a>
  • rubyfan21 hours ago
    I don’t code for a living anymore so this looks fun.
    • akkad3320 hours ago
      What do you do then?
  • kazinator20 hours ago
    I did some of it in TXR Lisp a bunch of years ago.<p><a href="https:&#x2F;&#x2F;www.kylheku.com&#x2F;cgit&#x2F;advent&#x2F;tree&#x2F;2021" rel="nofollow">https:&#x2F;&#x2F;www.kylheku.com&#x2F;cgit&#x2F;advent&#x2F;tree&#x2F;2021</a><p>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.
  • cjauvin20 hours ago
    Because 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&#x27;m wondering if they can be a good benchmark to get a better sense of how good they really are at problem solving?
    • bufferoverflow20 hours ago
      Modern LLMs are very good at solving programming puzzles like that. As soon as it recognizes which algorithm needs to apply, it&#x27;s just massaging the data to the right format.
      • cjauvin20 hours ago
        Your answer somehow suggests that solving such problems is merely &quot;recognizing which algorithms to apply&quot;.. which is another way of saying that they are more &quot;pattern matchers&quot; than &quot;true reasoners&quot;. 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&#x27;m not sure exactly what are my thoughts on that.
        • throwaway31415516 hours ago
          Consider ignoring the reasoning for how&#x2F;why LLM&#x27;s can do this sort of thing which doesn&#x27;t matter as much when you simply try it out. I wouldn&#x27;t be surprised if many of these problems are in fact solved by LLM&#x27;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 &gt;50% of the time.
  • LelouBil13 hours ago
    I&#x27;m trying Haskell this time.<p>For this one, I learned how to write a basic parser with Text.Parsec and manipulate the tuples with bimap !<p>It&#x27;s a very fun occasion to learn a new programming language.
  • wizrrd1 day ago
    Yup. Advent of Code is a fun, yearly alternative to LeetCode with a Christmas theme, and it&#x27;s approachable for novice developers.
  • bas10 hours ago
    Day 1 led me to a deep(ish) dive into the CPython implementation of the abs(...) builtin. Good times!
  • markus_zhang21 hours ago
    Does anyone know what is the theme of this year? If it&#x27;s VM or anything low level then it&#x27;s fun.
    • MortyWaves21 hours ago
      It’s only ever elves finding and losing things
  • b5n16 hours ago
    I&#x27;ve generally chosen a new (to me) or spartan lang to challenge myself, but this year I&#x27;m going easy mode with python and just focusing on meeting the requirement.
  • declan_roberts15 hours ago
    AoC is fun for learning a new language but I feel like all of us have that one &quot;project&quot; that we rewrite every few years in this language or that to learn it.
  • librasteve1 day ago
    other advents are available…<p><a href="https:&#x2F;&#x2F;raku-advent.blog&#x2F;2024&#x2F;12&#x2F;01&#x2F;day-8-rendering-down-for-christmas&#x2F;" rel="nofollow">https:&#x2F;&#x2F;raku-advent.blog&#x2F;2024&#x2F;12&#x2F;01&#x2F;day-8-rendering-down-for...</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42286954">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42286954</a>
    • Enk1du1 day ago
      and more advents...<p><a href="https:&#x2F;&#x2F;pdl.perl.org&#x2F;advent&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;pdl.perl.org&#x2F;advent&#x2F;index.html</a>
      • I was looking for a puzzle in the first link until I saw the home page: &quot;One article on Raku per day, until Christmas.&quot; I vaguely remember these from my Perl days (a decade ago) now.<p>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.
      • librasteve1 day ago
        yes perl was the original advent of code iirc
  • matsemann1 day ago
    I love AoC. You don&#x27;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.<p>I like to do them in a functional style in Kotlin as far as possible, as that&#x27;s different from what I do at work.<p>Edit: Here&#x27;s mine from today, with my utils it&#x27;s not exactly plain kotlin, but part of the fun is building a library of sorts with cool functions <a href="https:&#x2F;&#x2F;github.com&#x2F;Matsemann&#x2F;algorithm-problems&#x2F;blob&#x2F;main&#x2F;adventofcode2024&#x2F;src&#x2F;main&#x2F;kotlin&#x2F;com&#x2F;matsemann&#x2F;adventofcode2024&#x2F;Day01.kt">https:&#x2F;&#x2F;github.com&#x2F;Matsemann&#x2F;algorithm-problems&#x2F;blob&#x2F;main&#x2F;ad...</a>
    • c-fe1 day ago
      Nice 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: <a href="https:&#x2F;&#x2F;github.com&#x2F;charelF&#x2F;AdventOfCode&#x2F;blob&#x2F;main&#x2F;kt&#x2F;src&#x2F;y2024&#x2F;D01.kt">https:&#x2F;&#x2F;github.com&#x2F;charelF&#x2F;AdventOfCode&#x2F;blob&#x2F;main&#x2F;kt&#x2F;src&#x2F;y20...</a>
      • matsemann21 hours ago
        Unzip was nice, will remember that one!<p>This is also what I like, reading other&#x27;s solutions and learning new stuff. I browse the subreddit after solving it myself to see all kinds of cool approaches.
  • cod1r16 hours ago
    This year I&#x27;m going to try to do this in Haskell.
  • calrain13 hours ago
    I&#x27;m doing the challenges in PowerShell to see how it goes.<p>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.<p>My version ran in ~3500 ms ChatGPT&#x27;s version ran in 140 ms<p>both worked<p>A great example of how a common DevOps language program can be improved on by ChatGPT.
    • jodrellblank9 hours ago
      That 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.<p>My hack-it-out code: <a href="https:&#x2F;&#x2F;pastebin.com&#x2F;PDQhxDc9" rel="nofollow">https:&#x2F;&#x2F;pastebin.com&#x2F;PDQhxDc9</a><p>Faster code: <a href="https:&#x2F;&#x2F;pastebin.com&#x2F;6xwaVkwq" rel="nofollow">https:&#x2F;&#x2F;pastebin.com&#x2F;6xwaVkwq</a><p>The hacky code uses slower techniques like:<p>- Get-Content which adds metadata to every line.<p>- @() arrays with += which copies the array in memory to a new one-larger memory location for every addition.<p>- Pipeline overhead e.g. ForEach-Object and Measure-Object.<p>- Filtering the whole second column for each number in the first column, repeated wasted work.<p>and it&#x27;s still in the region of your ChatGPT one.<p>The faster one addresses these with:<p>- ReadAllLines() .NET method to get plain strings.<p>- [system.collections.generic.list[int]]::new() which don&#x27;t box integers and can grow more quickly.<p>- plain adding numbers into sum variables.<p>- Building a hashtable [system.collections.generic.dictionary[int, int]]::new() to count each number in the second column.<p>- Swapping -split for string split() which may have a tiny bit less overhead.<p>- no pipelines.<p>The code isn&#x27;t completely different, it&#x27;s the same blocks doing the same things, leaning more on .NET lower levels, and years of experience of the basic PowerShell performance hits.
  • zanderwohl18 hours ago
    I think I&#x27;m going to be using MicroSoft QuickBasic for System 7 this year. I might regret this pretty quickly.
  • bradley1323 hours ago
    I never have made it to the end of a season, just due to lack of time. It&#x27;s great fun, though - already solved today&#x27;s &quot;warm up&quot; puzzles...
  • dchuk19 hours ago
    While 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).<p>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.
  • dwayne_dibley22 hours ago
    Is this any good for beginners&#x2F;kids?
    • michaelfm121122 hours ago
      Sure, but it starts to get hard a few days in so beginners won&#x27;t be able to finish. However, I think that makes it an amazing learning opportunity. There&#x27;s plenty of write-ups on solutions on the internet.
  • izietto15 hours ago
    What 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&#x27;s like reading a Jira card written by a junior product owner!<p>BTW I love AoC for all else
    • codr714 hours ago
      I actually enjoy it in this context, not so much in JIRA.
  • tslater200623 hours ago
    I maintain a joke domain which I&#x27;ve found sadly applicable through the years. <a href="https:&#x2F;&#x2F;adventofrealizingicantread.com" rel="nofollow">https:&#x2F;&#x2F;adventofrealizingicantread.com</a>. I try to keep it updated pointing to the current day throughout the month<p>I&#x27;ve found especially as the month progresses it&#x27;s just as much Advent of Reading Comprehension as it is coding :)
    • makapuf17 hours ago
      It seems it does not work now now?
  • seba_dos119 hours ago
    AoC is in this weird place where it&#x27;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&#x27;t feel the need to repeat that and I don&#x27;t find it engaging enough to do without time pressure, so I don&#x27;t.<p>Perhaps if you aimed at global leaderboards it would be different, but that&#x27;s neither my league nor I see any fun in that - getting there requires serious effort and preparation in things that aren&#x27;t directly related to solving intelectual puzzles.
    • 110jawefopiwa19 hours ago
      It&#x27;s best for me when I do something that I ordinarily don&#x27;t do for AoC.<p>I find no particular pleasure in using an everyday language like Python for it, because as you said it&#x27;s too easy.<p>I have used Haskell, Racket, and in some easier cases APL and it&#x27;s been fun. Treating it more like a puzzle than an actual programming assignment.<p>When learning new languages, it&#x27;s best to do something that actually makes you think in a different shape. If you know Python, don&#x27;t do Ruby. If you know Java, don&#x27;t do C#.
      • seba_dos118 hours ago
        It goes into &quot;too bothersome&quot; 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&#x27;m not already familiar with (or that isn&#x27;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&#x27;t see me doing it for longer than a few days before losing interest. Even in this &quot;easy mode&quot; in Python, there were four days that had me spend more than an hour (up to 5h) on the task. There&#x27;s plenty of actually useful projects I could do in this time to learn new things instead after all.
        • 110jawefopiwa12 hours ago
          &gt; There&#x27;s plenty of actually useful projects I could do in this time to learn new things instead after all.<p>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&#x27;t like trying to make every single moment of my life &quot;productive&quot;.
          • seba_dos111 hours ago
            Who does?<p>When I said &quot;useful&quot;, I meant &quot;useful to me&quot;. I figure I&#x27;d prefer to solve some problem to scratch a personal itch, or play some instrument, or make a funny game, whatever. Even spending that time on resting would probably be useful. Solving a technical puzzle is nice, but my point was that collecting stars to finish the advent calendar isn&#x27;t particularly useful or rewarding on its own, and if I need to be motivated internally to do it by adding some artificial challenges, then I can find more enjoyable ways to make myself busy as well.<p>But that&#x27;s just me. I just don&#x27;t think AoC could motivate me into learning something I wouldn&#x27;t learn otherwise. It just doesn&#x27;t provide enough incentive to keep going. Tasks are mostly too easy to be rewarding on their own, but some are too hard to just do casually. I can&#x27;t imagine spending as much time as I did on it - about 30 hours in total, not counting time spent on golfing and browsing other people&#x27;s solutions etc. - if I had a regular job at the time, and once you skip days it just becomes a random set of challenges that could be tackled at any time anyway.
      • neonsunset17 hours ago
        C# allows for terser and very functional-y implementations thanks to differences between LINQ and Java’s Streams.
        • 110jawefopiwa12 hours ago
          I guess, but it&#x27;s not really a fundamentally different programming paradigm, which is what I was getting at.
          • neonsunset4 hours ago
            It doesn&#x27;t do: partial application, currying, structurally constrained generics and gradual typing (and of course much more small details that e.g. F# can do)<p>It does do: higher order functions and functional composition, monads and monadic comprehensions, records, list comprehensions and iterators.<p>You are correct that it&#x27;s not going to &quot;push&quot; you into that direction aside from APIs that are already popular, but it&#x27;s unfortunate it keeps getting bundled together with Java. C# and Java are languages with differing priorities, paradigm support and target scenarios. There is great overlap, but the differences are significant.
  • ucefkh20 hours ago
    Getting the vibe of Google code jam<p>Pretty good tbh
  • ucefkh20 hours ago
    Getting the vibe of Google code jam, pretty good
  • lowbloodsugar18 hours ago
    New factorio dropped. Probably be doing that with every spare minute of the day.
  • mvdtnz19 hours ago
    I haven&#x27;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&#x27;m more interested in using it to sharpen enterprise coding techniques.
    • Jtsummers19 hours ago
      Every day is mostly independent of the others. I generally don&#x27;t reuse code because most of the common code is easy enough to rewrite, sometimes I copy&#x2F;paste earlier code in to a new solution.<p>The main exception is 2019&#x27;s Intcode VM&#x2F;interpreter which was used over about a dozen days (I mentioned it elsewhere, he hasn&#x27;t done anything like that since). Occasionally, beyond basic algorithms there is some continuity between 2-3 days but that&#x27;s not terribly common, I don&#x27;t think there were any pairs of puzzles like that last year or the year before.<p>If you want to make one code base, you&#x27;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.
      • cyberpunk17 hours ago
        I decided to do it in Erlang in 2019, that Intcode VM was much &quot;fun&quot;... I really enjoyed it, I wish there were more years than that.
  • guiambros15 hours ago
    Here&#x27;s to another year of being sleep deprived for the entire month of December.
  • ranger_danger21 hours ago
    I read the entire page and I don&#x27;t see anywhere that it actually lists what the puzzles are, I&#x27;m so confused.
    • auselen20 hours ago
      - <a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;day&#x2F;1" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;day&#x2F;1</a><p>- <a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;</a>
  • arjvik1 day ago
    9 seconds to get both stars is absolutely insane - there had to be some AI assistance here.<p>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&#x27; problem in 9 seconds.
    • emadb1 day ago
      I participate almost every year but I don&#x27;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.
    • fuglede_1 day ago
      Yep, there was; they even wrote so in their commit message before removing it: <a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;comments&#x2F;1h3w7mc&#x2F;2024_day_1_no_llms_here&#x2F;" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;comments&#x2F;1h3w7mc&#x2F;2024_...</a>
    • nneonneo1 day ago
      It was, of course, an AI-generated solution; they posted it here: <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20241201052156&#x2F;https:&#x2F;&#x2F;github.com&#x2F;qianxyz&#x2F;advent-of-code&#x2F;commit&#x2F;6458076f5782790f8878a957add96093e72ce5a2" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20241201052156&#x2F;https:&#x2F;&#x2F;github.co...</a><p>Later, after being called out on it, they posted an apology to their GitHub profile (<a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20241201064816&#x2F;https:&#x2F;&#x2F;github.com&#x2F;qianxyz" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20241201064816&#x2F;https:&#x2F;&#x2F;github.co...</a>): &quot;If you are here from the AoC leaderboard, I apologize for not reading the FAQ. Won&#x27;t happen again.&quot;<p>Both the repo and that message are now gone.
    • Almondsetat1 day ago
      Caring about the leaderboards is the problem. Are you (impersonal) seriously doing AoC for clout or something?
      • aithrowawaycomm22 hours ago
        The 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.<p>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.
      • thinkingemote1 day ago
        If people are concerned about leaderboards there are private leaderboards: <a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;leaderboard&#x2F;private" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;leaderboard&#x2F;private</a><p>Personally I don&#x27;t do it to compete, I just like puzzles.
      • nicce1 day ago
        I did it without AI last year and planning to do it again, for fun.
      • zwnow1 day ago
        True. Leaderboards are and always have been full of cheaters.
    • dsissitka1 day ago
      For comparison, here&#x27;s how long it took in past years:<p><pre><code> 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 </code></pre> And this year&#x27;s second place was 0:54.
      • fuglede_1 day ago
        Note that regarding the outliers, in 2015 and 2016 the puzzles weren&#x27;t as widely known, and in 2020, AWS&#x27; load balancers crashed and the puzzle was unavailable to most people for 6 minutes, then solved in a few minutes. <a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;2020&#x2F;leaderboard&#x2F;day&#x2F;1" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;2020&#x2F;leaderboard&#x2F;day&#x2F;1</a> -- postmortem: <a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;comments&#x2F;k9lt09&#x2F;postmortem_2_scaling_adventures&#x2F;" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;adventofcode&#x2F;comments&#x2F;k9lt09&#x2F;postmo...</a>
    • hmottestad1 day ago
      OpenAI 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.<p>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<p>So I guess all I want for Christmas is a massive compute cluster and infinite OpenAI credits :P
    • isoprophlex1 day ago
      AI coding assistants ruined the global leaderboard experience. AoC might as well nerf it by discarding the quickest x percent of submissions, or something...
      • fuglede_1 day ago
        It&#x27;s not that bad. I&#x27;m sure there are more LLM&#x27;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.<p>Compare <a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;leaderboard&#x2F;day&#x2F;1" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;leaderboard&#x2F;day&#x2F;1</a> to e.g. <a href="https:&#x2F;&#x2F;fuglede.github.io&#x2F;aoc-full-leaderboard&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fuglede.github.io&#x2F;aoc-full-leaderboard&#x2F;</a><p>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.
      • gorgoiler1 day ago
        I have a rule in life: no summary statistics without showing the distribution.<p>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.
      • exitb1 day ago
        Potentially 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.
      • WithinReason1 day ago
        They should check that LLMs can&#x27;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&#x27;s toolkit as syntax highlighting or autocomplete or Stack Overflow, and pretending otherwise is not useful.
        • martin-t1 day ago
          Not gonna happen. AoC always starts with beginner level problems. That&#x27;s why it&#x27;s so commonly used for learning the basics of new languages.<p>A problem that wouldn&#x27;t be immediately solvable by LLMs would either be too advanced or simply too large to be fun.<p>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.<p>Either LLMs will peak out at the current level and be often useful but very error prone and not-quite-there. Or they&#x27;ll get better and we&#x27;ll be just checking their output and designing the general architecture.
        • Retr0id1 day ago
          The first few days are supposed to be beginner-accessible, it&#x27;s practically impossible to have something beginner accessible but GPT-inaccessible.
        • zwirbl1 day ago
          And 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.
          • falcor841 day ago
            &gt; allow aimbots for counterstrike<p>I&#x27;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&#x27;s a new mix of strategies evolving, with a higher focus on the macro movement planning?
            • &gt; are there matches where everyone uses aimbots?<p>Yes<p>&gt; What does the game look like then?<p>I have only observed the games, it requires a lot of hiding.<p>Most of the time the winning method is to act at the very last second and hope the other player is distracted.
          • WithinReason1 day ago
            False 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&#x27;t take away tools from the programmer.
            • jbjbjbjb1 day ago
              You’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.
        • matsemann1 day ago
          That&#x27;s like going out for a run and taking an electrical scooter around the park instead. The point isn&#x27;t finishing, the point is doing the activity.
          • WithinReason1 day ago
            Then why have a leaderboard?
            • matsemann1 day ago
              Because 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.
    • exitb1 day ago
      I wonder how many seconds could be won by the organizers if the challenge included a blant prompt injection breaking the result.
    • rich_sasha1 day ago
      Without 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&amp;P may not have done it.<p>Perhaps there is a scope for an alternative AoC type competition aimed at AI submissions...<p>...though of course that would be experimenting to get us all out of work. Hmm.
      • zwnow1 day ago
        If 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_sasha1 day ago
          &quot;Write me a snippet that does X&quot; is a step behind &quot;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&quot;.
    • tags2k1 day ago
      As with real life, the speed generally doesn&#x27;t matter as long as you get a working solution and you find it fun. If you find &quot;copy and paste into an LLM and then copy and paste the answer back out&quot; fun, then I suppose you do you.<p>I didn&#x27;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.
    • rvz1 day ago
      At 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.<p>RIP Advent of Code.
      • abenga1 day ago
        Why? Solving interesting problems to learn is a worthwhile goal. Why should it matter to you that others are &quot;cheating&quot;?
        • zwirbl1 day ago
          Because competing against other people is the fun part for some people. Why not allow everyone to use stockfish at chess tournaments?
          • graynk1 day ago
            “For _some_ people” is at odds with “_completely_ worthless”, don’t you think?
            • dakiol21 hours ago
              To be fair, I read it as &quot;_completely_ worthless for _some_ people&quot;
          • zwnow1 day ago
            This 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.
      • wiseowise1 day ago
        Sarcasm?
  • peanut-walrus1 day ago
    I 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 :(
    • criddell1 day ago
      You don’t have to do it in December. I was still working on last years in March.
  • bernds741 day ago
    Nice to see that traditions are upheld, such as the unreadable font and colors.
    • simonjgreen1 day ago
      And the timeless tradition of HN commentators cynicism
      • MortyWaves1 day ago
        And the timeless tradition of criticising perfectly valid concerns. Not everyone wants to be a member of the dark mode lobby.
      • arp2421 day ago
        I had to fiddle with the colours in the web inspector to even read the page. So yeah...<p>Of all the cynical comments I see on HN, this ranks very very low.
        • matsemann1 day ago
          Reader mode or &quot;View -&gt; Page Style -&gt; High contrast&quot; in your browser works perfectly fine.
      • block_dagger1 day ago
        And the timeless tradition of HN commentators contempt
        • moffkalast1 day ago
          Wouldn&#x27;t have it any other way :)
    • lpapez1 day ago
      It&#x27;s a simple webpage. If you don&#x27;t like it, you can customize the CSS with a few custom rules in your browser.
    • Reposting a comment below: I used Stylus[1]. There are already some considerably more readable themes by the community.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;openstyles&#x2F;stylus">https:&#x2F;&#x2F;github.com&#x2F;openstyles&#x2F;stylus</a>
    • bberrry1 day ago
      Personally I love the esthetic and hope they never change it.
    • xPaw1 day ago
      Yeah, I made a userscript for myself to fix that up: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;xPaw&#x2F;4fffaf776fe14d15c9602991f51dbfa1" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;xPaw&#x2F;4fffaf776fe14d15c9602991f51dbfa...</a>
  • BlueTemplar1 day ago
    [flagged]
  • moffkalast1 day ago
    [flagged]
  • penguin_booze1 day ago
    [flagged]
  • gucnko23 hours ago
    [flagged]
  • Is 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&#x27;d like to change it to `sans-serif`.
    • Self-response: Stylus is useful here[1]. There is a list of already more readable styles than the default that the community has prepared.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;openstyles&#x2F;stylus">https:&#x2F;&#x2F;github.com&#x2F;openstyles&#x2F;stylus</a>
    • 90291 day ago
      I have used Stylus for CSS tweaks: <a href="https:&#x2F;&#x2F;addons.mozilla.org&#x2F;firefox&#x2F;addon&#x2F;styl-us&#x2F;" rel="nofollow">https:&#x2F;&#x2F;addons.mozilla.org&#x2F;firefox&#x2F;addon&#x2F;styl-us&#x2F;</a>
    • You can hit the &quot;Reader&quot; button on Firefox (ctrl-alt-r), I think Chrome also has that? Or an extension that does the same thing would probably work.<p>Bit simpler than writing an override or fetching the HTML.
    • babo1 day ago
      There are CLI tools to fetch and submit solutions. At least one of them allows you to download the puzzle description as markup: <a href="https:&#x2F;&#x2F;github.com&#x2F;scarvalhojr&#x2F;aoc-cli">https:&#x2F;&#x2F;github.com&#x2F;scarvalhojr&#x2F;aoc-cli</a>
    • riffraff1 day ago
      On thing you can do is fetch the html and extract the main content to display it in your favorite way, it&#x27;s been stable for years, and you can use the (stable) session_id cookie, it&#x27;s how many people approach the challenge.
    • mcintyre19941 day ago
      I&#x27;d just create a bookmarklet or run JS in devtools: `document.body.style.fontFamily = &quot;sans-serif&quot;;` etc
  • devit1 day ago
    [flagged]
    • criddell19 hours ago
      Using 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.
    • awkwardpotato21 hours ago
      This is already answered right on the about page[0]. AoC is meant to be an educational experience, feeding it directly into a LLM isn&#x27;t that.<p>&gt; 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&#x27;t really stop you, but I feel like it&#x27;s harder to get better at programming if you ask an AI to do the programming for you.)<p>[0] <a href="https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;about" rel="nofollow">https:&#x2F;&#x2F;adventofcode.com&#x2F;2024&#x2F;about</a>
  • hshshshshsh22 hours ago
    Work 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&#x27;t.
    • mattbaker21 hours ago
      Advent 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.<p>Everyone’s different, and it sounds like AoC isn’t for you, but remember not everyone is you :)
      • moomin21 hours ago
        I 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.
      • hshshshshsh21 hours ago
        That&#x27;s fair. Just sending the message out to folks who are in similiar space and might do a reconsideration.
    • grayhatter21 hours ago
      &gt; Redirect all the positive energy to something that will make you proud when you are old or help with an earlier retirement. This won&#x27;t.<p>So if some activity [work] doesn&#x27;t contribute to your ability to never have to work again [retirement], you shouldn&#x27;t do it?<p>What if I&#x27;ve retired, am I allowed to do AOC then? Or then does the first rule of, only do something the future you would be proud of apply?<p>What if all of the things I&#x27;m proud of are just a false sense of accomplishments? How do I know when I&#x27;m actually allowed to be proud of it, or if it&#x27;s just a false sense of pride?
    • kissiel21 hours ago
      Or use it to practice a language that you just wanted to give a spin.
    • hombre_fatal20 hours ago
      Yet you&#x27;re on HN instead of working on your sideproject.
    • yoyohello1321 hours ago
      Learn to let go of the constant need to be productive.
    • keybored15 hours ago
      I’m gonna do a side project because it’s more fun and useful to me.
    • timeon13 hours ago
      &gt; help with an earlier retirement.<p>Like car accident?