adventofcode

Happy Advent 2020! Please put answers in the pinned threads or create one if it does not exist yet. | https://github.com/adventofcode-clojurians/adventofcode-clojurians | Join the private leaderboard with code 217019-4a55b8eb
erwinrooijakkers 2019-12-11T02:16:03.066400Z

Rough night after Ajax and a few beers

erwinrooijakkers 2019-12-11T02:16:51.066500Z

2
erwinrooijakkers 2019-12-11T21:48:09.081600Z

😁 1
Average-user 2019-12-11T02:37:39.067300Z

Those are the answers to my input too

misha 2019-12-11T04:08:05.067600Z

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.

misha 2019-12-11T04:11:13.067800Z

took me awhile and a bunch of printing too

fellshard 2019-12-11T06:28:49.068200Z

More intcode fusion fun!

🦜 2
Average-user 2019-12-11T06:53:25.069400Z

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 ...

uneman 2019-12-11T08:59:37.071Z

yeah, it's about time to break purity of intcode functions (maybe with core.async)

Average-user 2019-12-12T03:56:52.087400Z

> Yeah, especially since he calls it 'complete' now

Average-user 2019-12-12T03:56:56.087600Z

how do you mean?

fellshard 2019-12-12T04:00:16.087800Z

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.

Average-user 2019-12-11T06:53:46.069600Z

I'll do it tomorrow though

fellshard 2019-12-11T07:11:36.069900Z

Yeah, especially since he calls it 'complete' now

2019-12-11T07:24:29.070100Z

what did you write it on? πŸ˜‰

misha 2019-12-11T07:40:51.070300Z

even fewer reasons to touch that sht again :kappa:

misha 2019-12-11T07:41:35.070500Z

just require day05 :as cpu

fellshard 2019-12-11T07:47:12.070800Z

Add a couple of helper fns for extracting outputs and injecting inputs; honestly, may be worth converting fully to core.async

uosl 2019-12-11T09:18:46.071500Z

if I hear "intcode" one more time this december santa is gonna pay

😡 1
😫 1
2019-12-11T09:21:20.071800Z

loooool πŸ˜€

mpcjanssen 2019-12-11T09:31:42.072300Z

my part 2 text makes no sense

mpcjanssen 2019-12-11T09:44:40.072600Z

ah partition count error

mpcjanssen 2019-12-11T10:03:28.073800Z

still a bit magical to see the asciiart appear

mpcjanssen 2019-12-11T10:03:55.074400Z

cant wait to see the quill version from @fellshard

mpcjanssen 2019-12-11T10:06:18.075600Z

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.

2019-12-11T10:59:56.077800Z

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

πŸ‘ 1
rjray 2019-12-11T18:05:36.079500Z

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.

rjray 2019-12-11T19:04:42.080100Z

Nvm. Found it, was a lurking error in my input opcode that just hadn't been triggered in a previous day.

πŸ™‚ 1
uosl 2019-12-11T20:09:02.081100Z

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 πŸ˜ͺ

erwinrooijakkers 2019-12-11T21:48:20.082Z

Kind of hard to keep up with aoc during a work week πŸ˜‰

erwinrooijakkers 2019-12-11T22:12:47.082500Z

Such awesome puzzles πŸ™‚