#adventofcode2023 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #adventofcode2023, aggregated by home.social.
-
Finished my last #AdventOfCode2023 solution writeup! Finally using this neat line-labels feature.
I'll have to call it here before starting with the ones from 2024, or else I won't be on time for #AdventOfCode this year! I just gotta figure out how to make it auto-update...
-
Finished my last #AdventOfCode2023 solution writeup! Finally using this neat line-labels feature.
I'll have to call it here before starting with the ones from 2024, or else I won't be on time for #AdventOfCode this year! I just gotta figure out how to make it auto-update...
-
CW: mild spoilers for Advent of Code 2023 Day 24
Still writing my #AdventOfCode explainer #blog . To make it easier to explain the #algebra of one puzzle, I'm using #SymPy in as succinct and limited a way I can.
-
CW: mild spoilers for Advent of Code 2023 Day 24
Still writing my #AdventOfCode explainer #blog . To make it easier to explain the #algebra of one puzzle, I'm using #SymPy in as succinct and limited a way I can.
-
Qui a fait quoi lors de l'Advent of Code 2023 ?
-
A few weeks ago I decided to start doing the #AdventOfCode2023 exercises in #CommonLisp. Despite barely knowing anything about Lisp I managed the first star without too much trouble beyond having to look a lot of things up. Then for the second star I almost immediately figured out how to do it but spent several days finding out how to express that solution in Lisp without making it too confusing.
-
A few weeks ago I decided to start doing the #AdventOfCode2023 exercises in #CommonLisp. Despite barely knowing anything about Lisp I managed the first star without too much trouble beyond having to look a lot of things up. Then for the second star I almost immediately figured out how to do it but spent several days finding out how to express that solution in Lisp without making it too confusing.
-
I'm super stuck with part 2 of Day 10 of #AdventOfCode2023 but at least I created this cool visualisation of the pipes loop/labyrinth I got in Part 1
-
I'm super stuck with part 2 of Day 10 of #AdventOfCode2023 but at least I created this cool visualisation of the pipes loop/labyrinth I got in Part 1
-
I've almost completed all of Advent of Code 2015 (only 9 years too late!). Day 21 was super fun, but Day 22 is possibly going to be oof.
-
I've almost completed all of Advent of Code 2015 (only 9 years too late!). Day 21 was super fun, but Day 22 is possibly going to be oof.
-
Crazy how much difference the right data structure / #algorithm for a task makes.
This week I learned about #Deterministic #Finite #Automata and #Nondeterministic Finite Automata just to redo my clunky #AdventOfCode2023 day 12 challenge, written in #Rust #RustLang
Runtime for part 1 dropped from 1-2secs to milliseconds. Part 2 also milliseconds 😮
Are there any good Rust crates for DFAs/NFAs?
Many people solved that problem with #Dynamic #Programming - something else for the learn list 😉
-
Crazy how much difference the right data structure / #algorithm for a task makes.
This week I learned about #Deterministic #Finite #Automata and #Nondeterministic Finite Automata just to redo my clunky #AdventOfCode2023 day 12 challenge, written in #Rust #RustLang
Runtime for part 1 dropped from 1-2secs to milliseconds. Part 2 also milliseconds 😮
Are there any good Rust crates for DFAs/NFAs?
Many people solved that problem with #Dynamic #Programming - something else for the learn list 😉
-
On the Criteo Engineering blog, I shared, along others, my experience of participating in Advent of Code 2023.
https://medium.com/criteo-engineering/advent-of-code-2023-sharing-our-experiences-badac4bfd530
-
On the Criteo Engineering blog, I shared, along others, my experience of participating in Advent of Code 2023.
https://medium.com/criteo-engineering/advent-of-code-2023-sharing-our-experiences-badac4bfd530
-
Trying to do #AdventOfCode2023 Day 25 to be close to wrapping it up.
Apparently the "Stoer–Wagner algorithm" finds the minimum cut to split a graph.
Except the Wikipedia example code is apparently broken, and all of the other examples I've found are REALLY shit with their naming.
It's easier to teach a mathematician to code than it is to teach a programmer maths. But that doesn't mean the mathematician can be trusted to write readable code with sensible variables 😐
-
Trying to do #AdventOfCode2023 Day 25 to be close to wrapping it up.
Apparently the "Stoer–Wagner algorithm" finds the minimum cut to split a graph.
Except the Wikipedia example code is apparently broken, and all of the other examples I've found are REALLY shit with their naming.
It's easier to teach a mathematician to code than it is to teach a programmer maths. But that doesn't mean the mathematician can be trusted to write readable code with sensible variables 😐
-
On to Day 24 of #AdventOfCode2023 and… UGH! Is there any way to make this not horribly maths-y? I've yet to find anyone online giving a clear approach (and I took maths through to A Level… 20 years ago!)
None of this is made easier by Google being "helpful" and putting lots of "intersection of sets/arrays" content at the top when searching for intersection of vectors in a given programming language 🧐
-
On to Day 24 of #AdventOfCode2023 and… UGH! Is there any way to make this not horribly maths-y? I've yet to find anyone online giving a clear approach (and I took maths through to A Level… 20 years ago!)
None of this is made easier by Google being "helpful" and putting lots of "intersection of sets/arrays" content at the top when searching for intersection of vectors in a given programming language 🧐
-
Hey, look! It's another #AdventOfCode2023 where the sample is correct, everything seems to make sense, and yet my answer is too high. But the full input is so complex and there's no ground truth and so I have no way of finding out which corner case I'm apparently not handling 😐
-
Hey, look! It's another #AdventOfCode2023 where the sample is correct, everything seems to make sense, and yet my answer is too high. But the full input is so complex and there's no ground truth and so I have no way of finding out which corner case I'm apparently not handling 😐
-
I think I've worked out where my limit is with #AdventOfCode2023.
Got to optimise an implementation and use the right data structures? Fine.
Got to plot things out to find patterns and mathematical shortcuts (especially if it's a shortcut that you've got to know rather than find)? Screw that and leave the boredom for the mathematicians!
-
I think I've worked out where my limit is with #AdventOfCode2023.
Got to optimise an implementation and use the right data structures? Fine.
Got to plot things out to find patterns and mathematical shortcuts (especially if it's a shortcut that you've got to know rather than find)? Screw that and leave the boredom for the mathematicians!
-
Time to wrap up last year's #AdventOfCode. It was a lot of fun, I learned a lot of new thing and finished with 36/50 stars.
I solved puzzles with #Python, writing explanations and educational tidbits along the way while discussing them and reading solutions from a wide variety of people using different programming languages.
This retrospective includes a couple of spoilers but is mostly conversational and not about the solutions directly.
https://hamatti.org/posts/advent-of-code-2023-retrospective/
-
Time to wrap up last year's #AdventOfCode. It was a lot of fun, I learned a lot of new thing and finished with 36/50 stars.
I solved puzzles with #Python, writing explanations and educational tidbits along the way while discussing them and reading solutions from a wide variety of people using different programming languages.
This retrospective includes a couple of spoilers but is mostly conversational and not about the solutions directly.
https://hamatti.org/posts/advent-of-code-2023-retrospective/
-
Day 19 of #AdventOfCode2023 wasn't too bad. I even found a generalised way to turn "<" and ">" into operations and call them in Ruby!
But I'm just glazing over on Day 20. As much as I hate being defeated by coding challenges, and as much as I enjoyed doing Seven Languages in Seven Weeks, I think I need to call it quits with this.
It has gone from "interesting distraction and challenge" to "you're being so obscure that I just can't bring myself to care".
-
Day 19 of #AdventOfCode2023 wasn't too bad. I even found a generalised way to turn "<" and ">" into operations and call them in Ruby!
But I'm just glazing over on Day 20. As much as I hate being defeated by coding challenges, and as much as I enjoyed doing Seven Languages in Seven Weeks, I think I need to call it quits with this.
It has gone from "interesting distraction and challenge" to "you're being so obscure that I just can't bring myself to care".
-
Trying to catch up on #AdventOfCode2023. Working on Day 18. Almost had it, but the inside count was missing some conditions. Restructured it so it worked with Day 10s "inside the loop" area finding algorithm. Success!
Then got to part 2. Parsing is trivial. The sample took impossibly long, so the full input is right out.
Read up online. Shoelaces and Pick's theorem? WTF? I'm a programmer, not a bloody mathematician 😐
There's "interesting challenge" and there's "teaches you nothing useful".
-
Trying to catch up on #AdventOfCode2023. Working on Day 18. Almost had it, but the inside count was missing some conditions. Restructured it so it worked with Day 10s "inside the loop" area finding algorithm. Success!
Then got to part 2. Parsing is trivial. The sample took impossibly long, so the full input is right out.
Read up online. Shoelaces and Pick's theorem? WTF? I'm a programmer, not a bloody mathematician 😐
There's "interesting challenge" and there's "teaches you nothing useful".
-
D’éirigh liom an t-#AdventOfCode a chríochnú roimh teacht don Bhliain Úr! 🎉
Mo chuid réiteach in #Rust:
-
Managed to finish #AdventOfCode before the New Year! 🎉
My solutions in Rust:
-
@jasonekratz Heh, yeah, I know. I did a ton of COBOL in the late 80s and early 90s, and for some unknown reason, I've gotten a little nostalgic for it. I've been playing with GNU COBOL the last few days, and actually rewrote Day 1, Part 1 of #AdventOfCode2023 in it. 🤣
-
@jasonekratz Heh, yeah, I know. I did a ton of COBOL in the late 80s and early 90s, and for some unknown reason, I've gotten a little nostalgic for it. I've been playing with GNU COBOL the last few days, and actually rewrote Day 1, Part 1 of #AdventOfCode2023 in it. 🤣
-
Me: I was too distracted and busy before Christmas. I'll get back to the #AdventOfCode2023
Me: I've got an idea for better pruning on the route finding for day 17. I'm sure it'll work.
*implements*
*runs*Me: That's nice and fast. And the sample still gives the right answer.
Advent of Code: Nope, still too high.
Me: 😑
-
Me: I was too distracted and busy before Christmas. I'll get back to the #AdventOfCode2023
Me: I've got an idea for better pruning on the route finding for day 17. I'm sure it'll work.
*implements*
*runs*Me: That's nice and fast. And the sample still gives the right answer.
Advent of Code: Nope, still too high.
Me: 😑
-
Day 10 didn't interest me as a puzzle, so I decided to have some fun generating visualizations of the input
https://github.com/lambdasierra/adventofcode2023/blob/dc2e1b589fb663eb6be838383f8da3f8b706c874/clojure/src/advent/day10/visualize.org -
Day 10 didn't interest me as a puzzle, so I decided to have some fun generating visualizations of the input
https://github.com/lambdasierra/adventofcode2023/blob/dc2e1b589fb663eb6be838383f8da3f8b706c874/clojure/src/advent/day10/visualize.org -
So the follow up on #adventofcode2023
I did finish but with about 20ish stars with of “cheating”. Why? From an earlier post, I was using C and that is a huge disadvantage by the time you get your day 15.
So I went to c++ to gain maps and other libs to get it done. But at some point with the holiday upon me, I started slacking off and found my checking using a great python programmers repo (@johnathanpaulson on GitHub) I learned a few more libraries to solve things. Particularly day 24, where z3 solver was introduced once I could bloody get it installed. Geeze.
As I am coding less day to day and driving vision for my team, this was a nice reminder of how to break down problems into something solvable. It’s an important skill even if you are a shit programmer.
Also the language you use matters. Python clearly is powerful in expediency and clarity. It would take 50-100lines for me to just take in the input file!
Side note, some of the days I simply could not understand the sample or the goal but a vast majority of the days the story and explanations were great.
Like many programmers, I’m shy about sharing code until it’s ready. But it will be under @rebelbot on GitHub AdventofCod2023 repo… just need to switch to public. But aren’t we all hear to learn?
-
So the follow up on #adventofcode2023
I did finish but with about 20ish stars with of “cheating”. Why? From an earlier post, I was using C and that is a huge disadvantage by the time you get your day 15.
So I went to c++ to gain maps and other libs to get it done. But at some point with the holiday upon me, I started slacking off and found my checking using a great python programmers repo (@johnathanpaulson on GitHub) I learned a few more libraries to solve things. Particularly day 24, where z3 solver was introduced once I could bloody get it installed. Geeze.
As I am coding less day to day and driving vision for my team, this was a nice reminder of how to break down problems into something solvable. It’s an important skill even if you are a shit programmer.
Also the language you use matters. Python clearly is powerful in expediency and clarity. It would take 50-100lines for me to just take in the input file!
Side note, some of the days I simply could not understand the sample or the goal but a vast majority of the days the story and explanations were great.
Like many programmers, I’m shy about sharing code until it’s ready. But it will be under @rebelbot on GitHub AdventofCod2023 repo… just need to switch to public. But aren’t we all hear to learn?
-
CW: Advent of Code spoilers
I didn't even get to solving #AdventOfCode2023 Day 25 until after Christmas, but luckily it wasn't too bad.
However, I did have to install networkx first. Most people seem to have used that.
-
CW: Advent of Code spoilers
I didn't even get to solving #AdventOfCode2023 Day 25 until after Christmas, but luckily it wasn't too bad.
However, I did have to install networkx first. Most people seem to have used that.
-
CW: Advent of Code spoilers
Plenty of folks used external libraries to solve this, like sympy, z3, and numpy. I decided to use sympy myself for the sake of convenience.
However, some other folks rolled out their own equation solvers to use for this problem! I think that takes dedication.
-
CW: Advent of Code spoilers
Plenty of folks used external libraries to solve this, like sympy, z3, and numpy. I decided to use sympy myself for the sake of convenience.
However, some other folks rolled out their own equation solvers to use for this problem! I think that takes dedication.
-
CW: Advent of Code spoilers
#AdventOfCode2023 Day 24 is the first day where I actually used an external library.
For Part 1, I wrote my own code to get the hailstones' crossing points. But for Part 2, I used sympy to solve a series of equations that ensure the rock and hailstones collide.
-
CW: Advent of Code spoilers
#AdventOfCode2023 Day 24 is the first day where I actually used an external library.
For Part 1, I wrote my own code to get the hailstones' crossing points. But for Part 2, I used sympy to solve a series of equations that ensure the rock and hailstones collide.
-
back at it with day 9. Kind of neat how part 2 is basically the same as part 1 by using lists instead of vectors
-
#AdventOfCode 2023 Day 25: Snowverload
Done. Done! DONE! All 50 stars.
This is the first year I have completed all the puzzles. I am very happy and a bit exhausted. Many, many thanks to the creator, @ericwastl, for giving us this wonderful gift.
https://adventofcode.com/2023/day/25
Code is here:
https://github.com/nharrer/AdventOfCode/blob/main/2023/day25/solve_day25.py -
CW: Advent of Code spoilers
I know of a linear time algorithm for Part 1, but in the end, I went with the same brute-force algorithm for both parts. Most folks seem to have done the same.
And some folks even made libraries like networkx do the work for them. (I wonder how it finds longest paths...)
-
CW: Advent of Code spoilers
The two most prevalent approaches to this problem were building the stack of bricks from the bottom-up, and building the stack from the top-down.
By "bottom-up", I mean keeping track of the heights at each point.
By "top-down", I mean moving the bricks down until they collided.