News for hackers. Stuff that matters.
Re:Advent of Code 2021 by Torkel on Saturday November 20, 2021 @07:43PM (#29293125)
Best advent of code I’ve done was the ”int-code computer” one. So good - one recurring theme of making a computer and in the end running games on it! Super excited for this year’s edition :)
Re:Advent of Code 2021 by wodenokoto on Sunday November 21, 2021 @04:02AM (#29295060)
Having never written anything close to a parser or a compiler, I totally crashed on that one. I often misunderstood subtleties in the problem formulation and had to read solutions in order to figure out the question and ended up with such a mess of if-else statements for compiling int-codes that it just became impossible to extend my program.
Re:Advent of Code 2021 by nikanj on Sunday November 21, 2021 @07:58AM (#29295993)
But now you have written one, which might come in handy at some point in your career.
Re:Advent of Code 2021 by wodenokoto on Sunday November 21, 2021 @10:58AM (#29297121)
Well, I guess I know now how not to write one ;)
Re:Advent of Code 2021 by wbc on Sunday November 21, 2021 @01:59PM (#29298731)
way to sum up my coding career :D
Re:Advent of Code 2021 by viceroyalbean on Saturday November 20, 2021 @08:33PM (#29293409)
One of my favorite things about the intcode computer was implementing the extendable memory by just appending an infinite list of zeros using haskell's lazy evaluation.

Unfortunately my implementation was incredibly slow (probably because of the linked lists) and I only made it about halfway through.

Re:Advent of Code 2021 by CornCobs on Saturday November 20, 2021 @10:53PM (#29294065)
I also did that year in haskell! My favorite part was using knot tying to feed the output of my intcode machine into itself! Lazy evaluation allowed me to continue expressing my intcode machine as a pure function of [Int] -> [Int] without having to restructure the entire machine to allow getting an output, then adding the next input to the machine in a step-wise manner usually accomplished with generators of some sort in other languages
Re:Advent of Code 2021 by gameswithgo on Saturday November 20, 2021 @08:49PM (#29293478)
my fun thing was running my intcode computers in parallel
Re:Advent of Code 2021 by 1-more on Sunday November 21, 2021 @07:29AM (#29295877)
Was this 2019? I did half of it in elm. Simulating a processor with the core states of read, eval, and write was very cool. Using setTimeout to send it clock signals was very slow until I realized I could compose the processor step function to run a few thousand clock cycles per timeout. Wild time.
Re:Advent of Code 2021 by dunham on Saturday November 20, 2021 @10:45PM (#29294039)
That was my first and my favorite so far. I did it in Haskell, barely knowing Haskell, which made things a bit interesting. I ended up learning/using STArray for the memory.
Re:Advent of Code 2021 by breckenedge on Saturday November 20, 2021 @08:23PM (#29293349)
I agree. That year was the only one in which I completed all of the puzzles the day they came out.
Re:Advent of Code 2021 by a20eac1d on Sunday November 21, 2021 @04:28AM (#29295133)
That sounds amazing, is there any way to access this material right now?
Re:Advent of Code 2021 by NLips on Sunday November 21, 2021 @04:33AM (#29295147)
You can see any year by changing the url: https://adventofcode.com/2021

I think it started in 2015.

On the AoC website you need to provide solutions for each day in a given year to see the next day’s problem, so you can’t instantly see all the problems from a given year unless you’ve previously completed them.

You may be able to find the problems elsewhere on the net.

Re:Advent of Code 2021 by forgotpwd16 on Sunday November 21, 2021 @04:39AM (#29295168)
All problems are available as long as their day has come even while the event is running. But the part 2 of each problem requires solving part 1 first.
Re:Advent of Code 2021 by NLips on Sunday November 21, 2021 @05:36AM (#29295343)
Hah - I’ve assumed for years that days weren’t accessible because the section of ASCII art for them is greyed out!
Re:Advent of Code 2021 by wodenokoto on Sunday November 21, 2021 @08:21AM (#29296076)
you write the intcode computer in AoC 2019

https://adventofcode.com/2019

Not everyday is about intcodes, but day 2, 5 and 7 are the first 3 days with intcodes and they built on top of eachother.

Re:Advent of Code 2021 by guavaNinja on Sunday November 21, 2021 @04:46AM (#29295189)