« first day (14 days earlier)      last day (1124 days later) » 

04:40
@hyper-neutrino For heappush, is index supposed to not change? It looks like it's always just the length of the heap
04:51
9m
8.25m
closer to 8 smh
Hoping today's not another algo-implementing one lol
@RedwolfPrograms oops, that's a bug
just put index = half after the swap lol
Learning about heaps rn, they seem cool
04:54
My code for day 14 only worked in firefox
anyway, shameless self promo
cuz why not
I'll watch that as soon as this AoC's over
Shameless djikstra library cuz why not
I would say that's sort of cheating to use a djikstra library, but if the AoC challenge is literally as uncreative as "implement dijkstra", they're asking for it :p
04:55
video's a... bit long :p and audio quality is pretty bad, sorry
3.5m
3m
3m
.at(-1)m
2.25m
Geometric series like yesterday?
1.66666666666666m
04:58
please oh please don't let there be anything that requires spatial thinking
I do not spatial thinking
1.49999999m
1m
Space is cool, thinking is cool, so spatial thinking is cool
Today's goal: get ahead of ascii-only
04:59
Mine's to not drop off the leaderboard
glagahf everyone
yeah glhf!
.5m
mine's to get 2 stars lol
.25m
5s
05:00
gah frick what do they think this is? the web tech course I did this semester?
what the fuck is this spec
idfk
Probably doable with regex
05:14
When your input ends in 420
Lyxal, have you been hacking AoC again?
@emanresuA m...maybe....
I'm somewhat glad that hyper isn't done yet
Because it reinforces how slow I am at this
it reinforces how sh*tty the specs are
i'd have vtc'd this as lowkey unclear/needing clarity by now
have these guys never heard of the sandbox?
6
28/17
it took me way too long to debug
I have a bug
05:17
turns out i was dropping a leading 0 off of my real input :/
My one works for all but one testcase
and the real input
because bin(int(input(), 16))[2:] only works if the input starts with 89ABCDEF
reading today's took me forever
Oh great trailing zeros
@hyper-neutrino wait what
fuck
wait does that also apply to 0x
because i'm actually evalling with 0x
and SOMETHING is going horribly wrong tht i can't discern for the life of me
oh yeah of course the leading 0
just eats shit
fuck
WTF 85 p1
05:20
dropped 26 points :/
I have points on global
f
i literally made a typo in my hex digit list
your what now
i ended up just doing "".join(bin(int(c, 16))[2:].zfill(0) for c in input()) lol
0x...n.toString(2).split('')
HbvS∑:L:4%+$∆Zf⌊ in vyxal got me feeling like yeet
05:26
My worst bug here was overflow :/
@lyxal that's to just account for 0s
functional lang for this seems super hard
i always do parsing problems by just mutating
leaderboard is closed; took 27:29
I'm not sure how the trialing zeroes are meant to be handled
Done 168/127
My code just ignores them
that is, it will happily accept any trailing bits that aren't used by the code
05:30
Yeah but how?
Wdym not used?
What is wdym?
How are they not just parsed as the start of another operator?
just ignore them
you only parse one thing
there is only one top-level packet in the transmission
> The BITS transmission contains a single packet at its outermost layer which itself contains many other packets. The hexadecimal representation of this packet might encode a few extra 0 bits at the end; these are not part of the transmission and should be ignored.
05:31
What was the point of specifying the puzzle input in hex, not binary?
Oh no mine's really rboken
I'm not on the leaderboard anymore :(
(it's not to make it shorter, since there was a 30,000-character puzzle input one year)
I've really screwed this one up
@TheFifthMarshal because what's an AOC challenge without unnecessary complications
05:35
I'm doing recursion
smh, they should really sandbox these so we can iron out things like difficult I/O format
i can't believe it took me that long to figure out i was literally skipping the last four bits of every literal
oh
i see how one might do that
183/250 :(
I had a more bizarre bug at one point: I was including the last 4 bits, but then treating that as part of the next subpacket as well
05:36
Ojh, an off-by-one
o mine
i very consciously decided not to parse the values on star 1 which led to looping in a way that kind of isn't built to parse the values
i also lost a ton of time on star 1 by completely skipping the total-length-given subpackets because i forgot that i still had to evaluate them for the version sum
600/400 :(
I had a weird bug in p1 that took wayyy too long to debug
Great, infinite loop
@hyper-neutrino the approach i used would translate pretty well to a functional language
Copy code and abandon ship
05:40
mutated index variables and various accumulators but in a pretty straightforward way
Still uses some library functions, but most of the meat of it is vanilla
I'm only 11 points off of the leaderboard, so I can easily get back on
Of all the things I didn't expect to do today, it was implement a whole programming language at 11 o'clock in half an hour lol
At least there's not much else they can add to this, so intcode 2.0 is unlikely
Well, making the operator ids 4 bits and adding some control flow could get interesting
05:43
And there's even a version field for back compat
This spec sucks
It's like it was intentionally written to be a game of hide-and-seek for the information you really need
it's so fucking long and they don't tell you what you're looking for until the end
At least the test cases were convenient
yeah it was nice to actually have multiple
even if you can't parse them visually because they're in hex
05:45
TIL you put a limiter on a loop and it turns out it's recursion
the thing is like
this is literally just a really long impl
there was, at least to me, nothing hard about this challenge, just really tedious to read the spec and implement
the only reason this challenge isn't just trivial "look at the task description and type" is because the description is unnecessarily convoluted and filled with useless flavortext
Yeah. And if you have a bug, it's a nightmare.
virtually impossible to debug without heavy guesswork
05:47
i like challenges like day 14 where you have to actually think about a good approach and come up with optimizations, and there are multiple approaches
and you can build an intuition for some part of it quickly
Yeah I liked that one a lot
yeah
easy to understand, challenging to solve
here you can intuit broadly what's going on but there's so fucking much that you're going to mislead yurself trying
Yesterday's was too textbook-algo-implementation, and today's was too cluttered
(Don't run, infinite recursion)
newd...pretty hot variable naming lol
@emanresuA you are gonna run into issues with your parsing method if you're not careful
05:48
imagine having variable names longer than two characters
Yeah I know, it's a bit of a mess
because if your input doesn't start with 8/9/A/B/C/D/E/F, it will drop leading 0s
I know, that was the problem with p1
I have a variable named subpacket_bits in my code. That's 13 characters
05:49
I'm too lazy to zfill it :P
wait i could've just prepended a 1 and dropped a bit lol
@emanresuA next can be replaced with splice, for future reference
(is "for future reference" a thing that makes sense in english? too tired to tell)
@emanresuA Global variables
That's one of your issues
Recursion with global variables in functions does not work, you need to use var
var spammed everyywhere
Might ask for more help later
Did it stop the recursion error?
05:53
Yep
6 * 9 = 15
Wait no that's just a typo
Now it's mostly working
The test cases are really helpful
I've been super tired all day today from last night's AoC, so I'm going to go to sleep now o/
goodnight o/
Yeah :p
06:00
good idea
@RedwolfPrograms this is pretty much exactly how networking do be
I have bugs
06:43
For some reason number literals are being added even though their parents have been parsed
as in their parents have finished parsing?
This is for the last testcase
(value is when pushing a number literal)
And they're getting double-pushed
probably a reference copy issue
Probably...
Code's still here
07:31
it took me embarrassingly long to figure out that the mode setting thing was in a loop
when i saw that most of your code was in a function i assumed it was recursive
It is, mostly
oh wait it is
I've made anotther version which seems to work but doesn't evaluate the final expression
oh so you're using the modes as like
states
as you parse a single packet
Pretty much
07:35
...and there aren't any breaks except in the switch so it doesn't terminate until it's actually exhausted the data?
that can't go well
and it actually relies on parsing multiple packets in one call
if (pc++ == packetCount) return packets
I kinda want to rewrite it from scratch
yeah i think the easiest way is just mutating recursion
just have a parse function that takes a list
and returns one packet, consuming tokens as needed
07:52
hi there
i returned the number of bits parsed which was nice for the bit length of subpackets given type
I just parsed the next in bits
yeah this looks like a really messed up recursive problem
and then i guess with hyper's mutating approach you'd just remove that much from what you have then parse it until it's empty
It's really annoying how there are two ways to determine the number of packets
Ugh this is pain
08:09
gotta be much easier to do this manually after converting to bits
08:39
Great, today's gonna end up like day 4
(In that I completely fail p2)
08:54
Ok, time to compile it into a js expression
09:25
This is proving a little harder than I thought
e(s(1,3)p(2,2)undefined(
haha gottemmmm
Didyou finish
10:04
It's probably simpler to compile to lisp
Of course, my code has a meltdown as soon as I run it on full input.
> CE00C43D881120 -> M(7,8,9) => 9
> my input -> parenthetical syntactically invalid mess
10:37
all of my code is failing horribly.
I've been working on this for five and a half hours and I'm pretty much back to where I started.
I have three different versions of the code, all with different bugs... sighs
11:08
Time to make #4
11:50
Aight, I gave up and used Redwolf's because after seven hours of debugging, rewriting etc, all four attempts still refused to work.
And now, I'm going to sleep because it's 1am.
85/8126, that's gotta be a record

« first day (14 days earlier)      last day (1124 days later) »