« first day (18 days earlier)      last day (1120 days later) » 

00:51
VICTORY!
At least on p1
This one was kinda fun
01:08
Given that my p1 solution takes ~.05s to validate a single pair, this should take... 9 minutes to execute
First time I've had to use node
(It'd work fine in browser JS, except I don't want my browser to hang for nine minutes)
maybe I'll do some multithreading
web worker ftw
¯\_(ツ)_/¯ Node's faster
i wonder if using asyncio tasks could speed up my solution
01:13
If you want speed then you might as well try picking up a fast language
i kinda doubt it cuz it feels like it'd just run each of the parallelized calculations more slowly and since it adds up to the same total computation consumed it should also take the same amount of time
WHAT
It took .16s to execute
with the whole thing
are you sure you recalculated the values
01:14
Yes, the answer was correct
or is it cached and you just ran the manhattan dist on the existing scanner points
Oh
I'm doing d18
asyncio doesn't parallelize computation
oh d18
@Bubbler does it just schedule tasks from different operations into the same thread or smth
Probably memoizatioon
01:17
seriously tho how is your d18p2 that fast tho lol
@hyper-neutrino Yes, async is single threaded
mine took a solid like 2.5 s
@Bubbler ah, ok. is it possible to speed it up using multithreading? as far as i remember asyncio and threading don't mix well but is it possible
@hyper-neutrino Try running it, idk why
Oh wait I misread the time report, it's more like 1.06s
@hyper-neutrino If your CPU has multiple cores and the computation can be done in many separate parts and your language has such thing available, yes (though it is just threading and not asyncio)
oh ok
so asyncio doesn't really contribute anything to runtime speed it's just for running multiple tasks at once without them blocking each other?
01:20
e.g. Rust has rayon which fires up multiple threads for computation, and I've seen like 5x speedup with it once
correct
okay, i see
Well, I have everything except d19 done, and I'm not doing that.
01:51
hyper-neutrino@computer-name:/directory$ time python3 src.py < input.txt
11079

real    2m26.131s
user    2m26.091s
sys     0m0.030s
my d19 kekw
bruh
d19 has the least completions
02:32
inb4 d25 makes you stitch triangular tiles (because it's the only weekend left)
though I don't think any d25 has been that hard
and last year's d20 was the last weekend so its difficulty is legit
d25 doesn't have a p2 so at least we have that going for us
Wait what? How do you know what d25 is?
at least for the past 5 years, d25p2 has always been free if you have all 49 other stars
or rather, for the ones where i've finished the rest of the year
@emanresuA I don't, I'm just cursing all of you :P
except ^^^
... which is actually only 2015 and 2020
@Bubbler ಠ_ಠ
02:36
@hyper-neutrino Well I'm not getting it then
I've done 2015 (actually not completed a day yet), 2017, and 2020
though 2017 is in my google account and the rest is on github :/
@emanresuA other than d19 what else are you missing?
Nothing
(Went and finished d17-18 which I missed)
and halfway into 2018
[2021]  6*
[2020] 50*
[2019]
[2018] 24*
[2017]
[2016] 16*
[2015] 47*
@emanresuA well then if i make a video walkthrough for d19 maybe you can get those last stars :p
@Bubbler did you type that yourself or is that format available somewhere
02:39
copypasta from Events page
oh
[2021] 38* (AoC++)
[2020] 50*
[2019] 31*
[2018] 21*
[2017] 45*
[2016] 31*
[2015] 50*
@hyper-neutrino ¯\_(ツ)_/¯ I have actual work to do
i should go back and finish the other years sometime
maybe when i make my library i will use them as fodder for spewing out builtins
 
2 hours later…
04:35
24m
18m
Counterclockwise spaghetti
04:52
Still surprised day 4 was such a massive drop in completions
I wonder if d19 will stay this low, or if by the 25th most people will have gone back and finished it
@Bubbler Wait, do weekends tend to be harder than weekdays?
More pepl
TIL I tend to do considerably worse on weekends, looking at my stats
i wonder whether friday or sunday tends to be harder then
because obviously saturday would be the hardest
er
saturday or monday with sunday the hardest i guess
because that's how midnight works
Wait we only have 6 left
dang
04:55
yerp
Time is on some hardcore drugs again
i'm probably not going to have 170 score for the third consecutive year lmao
d19 honestly quite doable
or maybe i've just improved
completions are half of d18
it was hard to do fast but not too hard yeah
damn
d18 was actually reasonable and quite fun
Which was that again?
d18 was snailfish math
the recursive explosions
04:58
Oh the snailfish
10s
04:59
glaghf
glhf
ANOTHER WRAPPED EXAMPLE
DAMN IT ERIC
It's wrapped in the puzzle input too
oh
...
uhh
my input
starts with a #
ಠ_ಠ
Same
Wait... does it end with a .?
Because after two steps...
05:07
@UnrelatedString the algorithm or the image?
algorithm
implying a yeah it ends in . so it's probably that
After two steps all the blocks of nine hashes will return to dark
also tfw you have a moore neighborhood builtin in your tinyass library but you need a different order
exactly
and you make the builtin more and more general, to the point that there's no difference from coding from scratch
and then you fully admire Eric Wastl again
how is it supposed to work if my enhancement starts with #
so like
??
oh you need to account for ending .
that's so troll
05:12
Woah 39p1
nice
meanwhile i'm getting fucking 10 on the sample input
Oh my y hod O'ma naiddiiotiti
39/29 !!????
...because i didn't update my grid
I've never done this well before
05:13
now it's 19
niiiice
This is insane
Sorry, I'm just really excited
well done!
48/46 and i lost my perfect streak rip
holy crap @emanresuA you beat hyper
it took me way too long to figure out what i was supposed to do with #
glad i checked here
05:15
Weird bugs fuck me
8
alright starring that for out-of-context value
Apparently AoC is causing programmers to overfit their skills (and libs and whatever) to AoC, this is not good
i still haven't gotten it working with the sample
at least i still ranked
05:16
I didn't expect to rank
@emanresuA oh that is probably more clever than my solution
my smaple works but the input makes little sense
@emanresuA well you realized very quickly the thing that got me stuck for a good while
the sample doesn't even have the leading # fuckery
like i just assumed the input would begin with .
and then it didn't work so i looked at the input and then had no idea what i was actually supposed to do with it
05:17
Same, it took me a while to figure out as well
I'll share code once the leaderboard's closed
assuming i don't do something seriously stupid i think my rank will just hold
or i guess unless ksun does something stupid
it's giving me fucking 25
leaderboard is closed
oh wait
i forgot to grow it
I had this instantly but a bunch of dumb bugs :(
:(
05:20
...43
what the fuck is 43 coming from now
aaaaaaaaaaa
I didn't test mine :p
Leaderboard's closed
Oh wait
05:21
2 mins ago, by hyper-neutrino
leaderboard is closed
Once agaunm works on test but not real input
woo rank 285
oh i need to grow earlier i guess mayve
05:23
my ranking is stupid speedy today
no it couldn't be
or
Whyyyyyy
Why isn't mine working on the real input
send code?
@emanresuA wtf
var enh = work.input[0].split("").map(x => ".#".indexOf(x));
var img = work.input.slice(2).map(r => [...r].map(x => ".#".indexOf(x)));

var run = (img) => {
    var out = [...Array(img.length + 2)].map(_ => [...Array(img[0].length + 2)].fill(0));

    out = out.map((r, y) => r.map((d, x) => {
        var ns = [[x, y], ...[x, y].neighbors()].sort((f, h) => f[1] - h[1] || f[0] - h[0]);

        return enh[parseInt(ns.map(n => (img[n[1] - 1] || [])[n[0] - 1] || 0).join(""), 2)];
    }));

    return out;
work.input is just the input split into lines
That should be all the library stuff there
05:24
guessing you aren't handling enh[0] == "#"?
hint: padding
@Razetime Padding works fine
@hyper-neutrino Wait what?
your padding function prolly works fine, the problem is what you're padding with
in an ideal world if my library worked well what you would do for this problem is
now it's giving me 0 on the sample
05:25
place the grid on a 2d infinite space and set the infinite generator to (x, y) => 0
i do not understand what i am doing
run this algorithm on it and it would just lazily compute all the values
and then just grab a sufficiently large slice
It works on the test case is the problem
So I have no idea what's wrong
yeah cuz test case has enh[0] == "."
from the test case and spec alone it is not very clear that you need to handle "#"..."."
05:26
correction: you would have no clue without inspecting the input
if you just coded something to pass the test and looked at your real case output there is literally no way to identify the problem
you have to manually inspect your input
like after i got it wrong i took a look, saw the leading #, and was like
wait how
But why does the leading # matter
because you have infinite #s in the void
infinity and beyond
anyway i did not need to pad outward by 10 on each side but like it worked :p
somehow i am killing everything by padding twice
maybe i need to use an actual grid
05:28
... as opposed to what
a complex-keyed dict
that's how i've done like all of the 2d stuff so far
That was it
Well, expanding grid problems usually worked by repeatedly generating expanding grids from scratch
05:29
i do that when rotations and movement are necessary but not on grid problems that just deal with the grid itself
oh yeah and i have a slices thing in my library from day 1
that would also make this easier on a grid
Dang, if I hadn't had that plus another small issue I woukd've got like top 10
Day       Time  Rank  Score       Time  Rank  Score
 20   00:29:25   601      0   00:30:42   486      0
I had the code working almost instantly, just with two bugs. This one, and one with a .map where I forgot to do out = out.map instead of just out.map
And 100th place just jumped ahead a huge number of points
Catching up will not be as easy
I'll need 71 points, plus like 20 since we can assume everyone else is moving up too
So top 50 for both parts...wish me luck tomorrow lol
I did not just throw today, I yeeted
@UnrelatedString mind you this is the only one where i used a sparse grid and the program actually terminated
Today wasn't too bad
And it didn't take three hours
05:36
Hm, p2 took me exactly one minute
p2 was pretty easy today
in the genre of aocs where p2 is just p1 but do it just a little more
It seems like it'd be hard to do this inefficiently
05:38
i'yeah
yeah the problem is just O(n^2) like there is no other way to go about it really lol
you'd have to have some big brain workarounds to somehow get it worse than that
finally got it working on the sample, wrong on the real input, time to see if inverting something in my leading # handling works or doesn't at all
@RedwolfPrograms Now that this is on the starboard I am reminded why commas are important
it didn't work
hooray for 5 minute waits
i don't think the comma would make it any better
05:44
i love not having anything to test on for the hardest part of the logic
...okay yeah so i tried cranking the padding up and there's definitely something wrong there
because it shouldn't give me different values
Done 820/1272
That was disappointing
I made so many careless errors, and had a nasty bug that only manifested in part 2
(It would have been easier if the test case had a # as its first character, as my code relies on that fact)
yeahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
I got wrong answers twice
05:48
i
i wonder if i could get away with just inverting *everything else*
I just inverted the bit it uses for padding after every iteration, so it went 0, then 1, then 0, etc.
yeah that's what i have been doing
but something is wrong with how i do it
What I did is have a set of all coordinates with #s , then in the first phase compute all coordinates with +, and then use those for the second phase to go back to all coordinates with # (repeat 25 times)
but it works fine when i can pad with 0 uniformly
This truly treats the grid as infinite
05:50
i sorta tried that
come to think of it maybe halfassing it is what got me
my full inversion bullshittery is exhibiting the same problem with scaling with the padding
:/
...so part of the issue is i got the argument order wrong for insert
that
might be the entire issue
yeah the scaling is gone
mmmmmmmm
18 seconds left
yep
that
mmm
2214/1932
still don't know what i fucked up with the non grid version but w/e
 
3 hours later…
09:15
Can someone show me a basic method for d19?
09:38
might pubish a video on it tmr but just as a general direction, it is fast enough (although still takes a while to run) to fully brute-force; that is, keep looping through all the scanners and trying to line them up by checking every possible offset
oh wasn't there some guy who wanted to get all 25 of his solutions to run in 1s total
i don't think that's happening
 
3 hours later…
12:33
@emanresuA take the first scanner as the main one, so you already have that one's origin as (0,0,0).
12:56
then you have to find out which scanner with 24 rotations has 12 equal differences with it
the equal difference is the location of that scanner
13:11
keep greedily trying to match a scanner with the existing matched ones
14:07
you can also opt for hardcore brute force if you're down to wait like 20 minutes for your solution to run on the real input
15:02
user image
2
 
4 hours later…
19:26
@Razetime Ok, I'll try that
20:17
How do you handle the rotations?

« first day (18 days earlier)      last day (1120 days later) »