Nixers Advent of Code Leaderboard - Community & Forums Related Discussions
Users browsing this thread: 3 Guest(s)
|
|||
It's time for Advent of Code!
EDIT: 2021 edition! I created a leaderboard for us to join and compete between us: Code: 994189-7bd24833 Code: 1) 22* *********** (anonymous user #1632100) [X] (movq) Git repos: movq seninha venam Dworin Let's use this post to discuss Advent of Code, the puzzles and their solutions. |
|||
|
|||
It's been almost 24h so I guess we should update this thread!
Code: 1) 43 points phillbush phillbush still in the lead, while neeasade has overtaken me by a single point. This is going to be a tough race! ;) |
|||
|
|||
! I did the last problem after getting home from "Thanksgiving 2". This is the first time I'm doing the problems "live"/as the days pass so I'm interested to see how it goes
|
|||
|
|||
Updated!
s0kx passed neeasade by 1 point! |
|||
|
|||
(05-12-2020, 12:14 PM)phillbush Wrote: [*] 4) 32 points: eyenx my solutions (haskell): https://github.com/eyenx/advofcode/tree/main/2020/ |
|||
|
|||
How exactly are the points calculated?
|
|||
|
|||
(07-12-2020, 07:09 AM)eye Wrote: How exactly are the points calculated? I guess our leaderboard is using this: Quote: - Local Score, which awards users on this leaderboard points much like the global leaderboard. If you add or remove users, the points will be recalculated, and the order can change. For N users, the first user to get each star gets N points, the second gets N-1, and the last gets 1. This is the default. |
|||
|
|||
Another update since 24 hours has passed and I'm bored.
Code: 1) 75 points phillbush Btw, who's #1003619? |
|||
|
|||
Okay this makes sense. Uff haven't done day 7 and 8 yet. No motivation to look at it. I'm not the a dev at all.
|
|||
|
|||
day 7 was super annoying, just did it
|
|||
|
|||
Yeah it sure was, couldn't even get part B with the time I had available yesturday :P Today's puzzle was much more interesting.
|
|||
|
|||
day 7 was the shit.
|
|||
|
|||
I'm going to join the leaderboard this year. It's a fun way to hone my rusty algorithms skills.
For those wondering, the leaderboard code above is still valid, so reuse it. |
|||
|
|||
I've joined - first Advent of Code ever and an excuse to write more Go ;)
|
|||
|
|||
Might be fun. Joined the leaderboard as “(anonymous user #1632100)”.
|
|||
|
|||
I updated the original post with the current leaderboard points.
Doing in awk again just because I don't want to spend time parsing input. If you are pushing your solutions to a git repository or some other place, post here and I'll update the OP with a link to it. |
|||
|
|||
Oh, right, the repo: https://uninformativ.de/git/AoC-2021/ – doing it in Rust for now (because I want to keep learning … I think), probably terrible quality.
Your awk snippets are certainly a lot shorter. :) |
|||
|
|||
Ha, I joined the board as henkmet.
I'm using octave because I'm really not a coder. You can see my code at https://github.com/henkmet/aoc2021 |
|||
|
|||
It’s the first time that I’m doing this, so I’m a bit surprised that there’s a completely different task each day. I was expecting that the tasks build on each other. But now, you write a completely new program every day. This really promotes “quick and dirty” solutions. Hmm.
(03-12-2021, 10:00 AM)Dworin Wrote: I'm using octaveOof! I wasn’t aware that Octave could do all that. Then again, I only used it in the past to do some very basic matrix stuff. :-) Some guys at work (not programmers, either) started doing it in Excel. I’ll have to check how far they made it … |
|||
|
|||
|
|||
I have spent an unreasonable amount of time (I would definitely not get hired!), mainly because I had to figure out how to read data from a file into my variables. Should be quicker from here on out as the actual algoritms are straightforward.
|
|||
|
|||
(05-12-2021, 08:03 AM)Dworin Wrote: I have spent an unreasonable amount of time (I would definitely not get hired!), mainly because I had to figure out how to read data from a file into my variables. Should be quicker from here on out as the actual algoritms are straightforward. Some languages may be harder to read and parse input. That's why most people use python. Also awk and perl are good languages to do parsing, especially to format the input into something that you can give to the actual program that solves the puzzle. |
|||
|
|||
(05-12-2021, 05:54 AM)movq Wrote: Some guys at work (not programmers, either) started doing it in Excel. I’ll have to check how far they made it …Someone did it in excel: https://0x0.st/-hIh.png |
|||
|
|||
It took me forever to understand how you have to look at today’s problem (at least part 2). I OOM-ed my 32 GB a couple of times. Gah.
Then I had a look at your repos and saw that you completed this super fast. What the heck, I feel dumb. (05-12-2021, 02:49 PM)seninha Wrote:(05-12-2021, 05:54 AM)movq Wrote: Some guys at work (not programmers, either) started doing it in Excel. I’ll have to check how far they made it …Someone did it in excel: https://0x0.st/-hIh.png This qualifies as crazy – or extremely bored. :-) |
|||
|
|||
(06-12-2021, 06:09 PM)movq Wrote: Then I had a look at your repos and saw that you completed this super fast. What the heck, I feel dumb.Frankly, this has nothing to do with "smartness", most of these are about tricks. Once you know or have seen before the "trick" then the problem becomes easy. It's fun to find the trick on your own, but most people just memorize them for interviews these days. |
|||
|
|||
The puzzled are moving towards mathematics more than algorithmic programming. Today's (day 7) puzzle can be solved by formula. I feel like I'm cheating that way.
|
|||
|
|||
(07-12-2021, 02:44 AM)venam Wrote: most people just memorize them for interviews these daysI wonder: If you know a lot of those tricks, it might still be helpful in real life. 🤔 (But I have no idea, really. Neither do I work as a dev, nor have I done a lot of these interview-like quizzes before … Maybe it’s just garbage that accumulates in one’s brain.) After having done today’s quiz, I had a look at your solution – and I’m glad that there was no trick this time. :-) So I guess we all had to stare at that stuff for an hour and, in our head, try to find a way to determine the mapping. (07-12-2021, 04:58 AM)Dworin Wrote: The puzzled are moving towards mathematics more than algorithmic programming. Today's (day 7) puzzle can be solved by formula. I feel like I'm cheating that way.That’s the perfect solution in my book. You have a formula to solve a problem in just a few steps? Great! Oh, you don’t? Well, then you have to do it the hard way and write some algorithmic solution. :-) |
|||
|
|||
Well, my goal was to learn more about Rust, but so far, there’s mainly one thing I’ve learned: Rust is not the best tool for simple programs like the AoC. :-)
The reason is that Rust doesn’t have exceptions. I actually like this about Rust, because it means there are no (or at least fewer) surprises during runtime. For example, consider getting the minimum element of a vector/list. This function is undefined if the vector is empty, so it returns an “Option”, meaning it can fail. To be completely honest, I hadn’t considered this case when I wrote my code. It’s obvious in hindsight, but I really just wanted to get the minimum element and be done with it. You often don’t think about these corner cases, if we’re being honest. Maybe you use an IDE that warns you about uncaught exceptions (which isn’t even possible for all languages). Still, in general, it’s tempting to ignore exceptions or just let them bubble up. Everybody knows that you shouldn’t do that, but well. So, Rust makes it harder for you to be lazy, you’re pretty much forced to deal with these error cases in some way. But for a tiny 20-line program, this just adds a ton of noise to your code without any real benefit. So I guess unless the AoC programs need to be longer, I’ll be switching to Python for now. |
|||
|
|||
(11-12-2021, 04:55 AM)movq Wrote: So I guess unless the AoC programs need to be longer, I’ll be switching to Python for now.I understand. I have been rewriting some of my C programs into higher-level languages. The agenda/todolist/event reminder thing I had in C is now just a couple awk and shell scripts. They are now easier to maintain and to handle errors (which are fewer, since the code size is smaller). |
|||
|
|||
(11-12-2021, 06:25 AM)seninha Wrote: I have been rewriting some of my C programs into higher-level languages. I think normally, in a perfect hypothetical scenario, people would go the opposite route. They do quick PoCs in high level languages then, when they're sure the idea is nice and will work properly, they translate it into a more "robust" and "fast" low level language and add all edge cases to it. |
|||