Rough night after Ajax and a few beers
https://github.com/transducer/adventofcode/blob/master/src/adventofcode/2019/day10.clj
Those are the answers to my input too
I left it to Math/atan2
:
> * <li>If the first argument is positive and the second argument is
> * positive zero or negative zero, or the first argument is positive
> * infinity and the second argument is finite, then the result is the
> * {@code double} value closest to <i>pi</i>/2.
took me awhile and a bunch of printing too
More intcode fusion fun!
https://github.com/Average-user/adventofcode-clj-2019/blob/master/src/adventofcode_clj_2019/day11.clj
Until today I just used day5 code, modify it a little and so on, but I've decided to make intcode.clj
its own file ...
yeah, it's about time to break purity of intcode functions (maybe with core.async)
> Yeah, especially since he calls it 'complete' now
how do you mean?
The beginning of 9-2, in highlights: > You now have a complete Intcode computer. So the relative base + mode + instruction were the last pieces. From here on out, I expect if the Intcode computer is used, it'll be composed with some other system, e.g. the amplifiers and paintbot we've already seen.
I'll do it tomorrow though
Yeah, especially since he calls it 'complete' now
what did you write it on? π
even fewer reasons to touch that sht again :kappa:
just require day05 :as cpu
Add a couple of helper fns for extracting outputs and injecting inputs; honestly, may be worth converting fully to core.async
if I hear "intcode" one more time this december santa is gonna pay
loooool π
my part 2 text makes no sense
ah partition count error
https://github.com/mpcjanssen/aoc2019/blob/master/day11.ipynb
still a bit magical to see the asciiart appear
cant wait to see the quill version from @fellshard
talk about synchronisity. Currently reading the joy of clojure. Just read: > To demonstrate this, let's build a robot object that has functions for moving it around a grid based on its current position and bearing.
Kind of hard to keep up with AoC on vacation :simple_smile: . I canβt be bothered to refactor my code π . Iβm happy my core.async intcode solution works with n inputs, m outputs is any order https://gitlab.com/dmarjenburgh/adventofcode/blob/master/src/adventofcode/year_2019.clj#L254-275
Hmmm. I'm getting a "bad opcode" when I run part 1 on the real data, as it moves the PC (jumps) to a location whose value is not a valid opcode.
Nvm. Found it, was a lurking error in my input
opcode that just hadn't been triggered in a previous day.
I finally completed day 7 part 2 after finding out > All signals sent or received in this process will be between pairs of amplifiers except the very first signal and the very last signal. To start the process, a 0 signal is sent to amplifier A's input exactly once. didn't mean that the 0 signal should be sent before the phase signal πͺ
Kind of hard to keep up with aoc during a work week π
Such awesome puzzles π