« first day (4892 days earlier)      last day (225 days later) » 

12:00 AM
@murgatroid99 Yeah, was just taking a look at your code. I get the concept, I have to map input ranges onto output ranges instead of an input value onto an output value.
@MBraedley yeah that's the solution I've started on in C#
My idea with the backward approach was you would start with 1, and then map it backwards to see if you have a seed matching it. Then 2, 3, et cetear. As soon as you find a single matching seed, you're done. However, I think doing the input ranges to output ranges would be much faster.
Yeah, it's hundreds of small ranges vs 100 mil values
sorry, small should be in quotes there, the ranges are still likely to be in the thousands of values long.
12:38 AM
From my output, it looks like it's more like tens of ranges
 
3 hours later…
3:34 AM
anyone with powershell experience want to look at my Day 1 - Puzzle 2 solution and see what line of my input.txt is not being processed correctly? - github.com/Memor-X/advent-of-code/tree/main/2023/01-Puzzle2
the result i'm getting is 56009 but that's wrong. and i tested against the example and it worked fine
 
1 hour later…
4:53 AM
@Memor-X Do you handle overlapping number words? You can get the example right without handling them correctly.
@murgatroid99 i should be. i got 2 functions that search through a line for the first and last instance of a word number and only replaces them, or atleast it should be
eg
xtwone3four => x2ne34
zoneight234 => z1ight234
5
Q: Does becoming a warlock mean said warlock will become a "Soul Coin" upon death?

ZchesusNote: All of this pertains to the Baldur's Gate (3) universe. I never got that deep into the lore, but a friend of mine claims that Wyll is in the wrong for because, and I quote him, "his soul is not his own". He claims that all souls return to the "pool of souls" upon death, after which they ca...

5:31 AM
@murgatroid99 ahhh crap, yeh i see what you mean now
crvhlfone7xsqhkshpsix2nine73oneighttq => crvhlf17xsqhkshpsix2nine731ighttq
it would have picked up oneight separately but the substring replacement i'm doing would only do one or the other
I'm turning off payday 3 crossplay until they figure out how to send console players text chat
I'm tired of this
 
2 hours later…
7:50 AM
@SPArcheon youtube.com/shorts/r-8e2BzGyJ4?si=lAjUxa9NLdm9u0ns Apparently all of the scene setting shots from the trailer are based on real life videos recorded in Florida
 
1 hour later…
8:58 AM
Please, almighty devs who gave us our cute Half-Genie, make this good too.
For now, I will be content enough with the fact that you actually added Probotector as a character :P
9:43 AM
Twitter again turning to a dumpster fire around the gaming awards...
It is quite funny seeing the reactions of the BG3 fans every time they call Genshin "gambling scam" and get an answer mentioning "bears"...
 
4 hours later…
1:33 PM
So day 6 was really easy. You could probably even brute force it all if you wanted.
1:45 PM
Yeah, it was a bit mathsy with needing to realise you don't need to check every number
Also I did used a binary search in my part 2 to make it even faster
@Ronan I just used the quadratic formula.
For both parts. Fastest way to do it I'm sure.
@Wipqozn Ooh I didn't consider that
@Ronan I didn't at first, but as soon as I mapped out the equation in my head I realized it was quadratic.
See kids, your teacher was right, the quadratic formula IS important!
In this house we use numerical methods only
@Ronan WWMJD? (What Would Mathematical Jesus Do)
1:56 PM
Mathematical Jesus, otherwise known as Newton
Although I didn't use Newton's method, so that joke doesn't work
@Ronan Pythagoras would probably be more akin to a Mathematical Jesus
or wait, would Pythagoras be old testament and Newton would be new testament (aka Jesus). I could probably do these analogies better if I was christan.
or at least studied theology.
2:47 PM
I had read that as Protagoras for a second.
3:00 PM
> //brute forcing because it's probably going to be fast enough
literal comment in my code for 6.1
I have a feeling I'm going to have to be a bit smarter for part 2
@MBraedley I still say you should just brute force 5.2 by letting it run while you're at work.
You can be clever later.
I think 5.2 is going to have to wait until the weekend
My first stab at it failed (and I basically know why), but it's a major refactor of what I wrote for part 1.
3:20 PM
I just did a linear search today and it's basically instant
@murgatroid99 Yeah I was definitely doing overkill to save a few ms
 
2 hours later…
5:37 PM
@murgatroid99 Yeah, I'm still doing a linear search, but I'm not checking every value for part 2, just counting the number of failures starting with t=0, then subtracting twice that from max time + 1
So my 5.2 solution works on the sample and for part 1, but not for part 2 :(
@MBraedley Right, you can just stop when you find the first one that works (or last one that fails), because that gives you all of the information to get the answer
oh, FFS, I know what I'm missing. If my input range is a strict superset of mapping source range, I'm not doing the mapping. Because the first value fails, and the last value fails, so I just assume every value fails.
I was talking about day 6, not day 5
my first response was about 6.2
OK, now that I'm following, how can your 5.2 solution work for part 1? You should be getting a different answer
5:48 PM
@murgatroid99 I'm using the updates I made for 5.2 but passing in each seed value with a range of 1
Oh. Yeah, I guess that works
@MBraedley Do you handle the case where a single input range intersects multiple mapping source ranges?
@murgatroid99 yes, I think so. I handle mapping ranges individually
6:10 PM
woo, handling that case fixed it!
 
5 hours later…
11:12 PM
Okay finally
DAy 5 part 2 is finished in a non-shitty manner
Another range based one.
I just completely redid the whole thing in C#.
Wasn't that hard to do in C#. Way easier to troubleshoot C# than Python, at least that's what I've always found.
Plus this is very similar to a few puzzles from previous years. All the splitting and what not.
I could've finished it earlier if it wasn't for pesky work getting in the way. Silly work.

« first day (4892 days earlier)      last day (225 days later) »