News for hackers. Stuff that matters.
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.