News for hackers. Stuff that matters.
Re:Advent of Code 2023 is nigh by AdamH12113 on Friday December 01, 2023 @11:55AM (#38488952)
Unless the question has been edited recently, it did. There are multiple lines in the second example input that show the overlap:

> eightwothree

> 4nineeightseven2

> zoneight234

I test my AoC solutions incrementally by printing output, so I found that I was failing to produce the correct list of numbers in a line right away. I suppose if you're taking a faster approach and just trying to extract the first and last numbers that it's easier to miss. It's always a good idea to look at the example input, though.

Re:Advent of Code 2023 is nigh by Brentward on Friday December 01, 2023 @12:39PM (#38489561)
Those examples contain overlap, but not in the first or last digit that is given as the solution. So from the instructions you can't tell that the intermediate list of numbers should be 8, 2, 3, you only know that the final answer is 83.
Re:Advent of Code 2023 is nigh by philomath_mn on Friday December 01, 2023 @12:27PM (#38489409)
So are you saying that overlapped characters can be used for both numbers?

Meaning:

- eightwothree -> 823 (answer 83)

- 4nineeightseven2 -> 49872 (answer 42)

- zoneight234 -> z18234 (answer 14)

I interpreted the instructions as saying to take the first match from the left and not count the overlaps.

Unfortunately this gives the same answer as the overlap interpretation on the examples given in the problem statement: all the overlaps occurred in the middle where they didn't matter.

If they had shown

oneight -> answer: 18

then I would have understood the spec.

Re:Advent of Code 2023 is nigh by AdamH12113 on Friday December 01, 2023 @12:55PM (#38489831)
It could have been more clear. The wording from the problem is "the last digit on each line". To me, that pretty clearly implies "the rightmost substring containing a digit", but I guess I can see how someone could question that interpretation.
Re:Advent of Code 2023 is nigh by bcrosby95 on Friday December 01, 2023 @01:40PM (#38490514)
I think it strongly implies a direction with the example in part 1 where there's only a single digit resulting in "77" rather than "7".
Re:Advent of Code 2023 is nigh by philomath_mn on Friday December 01, 2023 @02:10PM (#38490854)
Right, but we read the word "eight" from left to right -- to me it is non-obvious that "eightwo" should be counted as two digits when (a) there aren't enough characters to actually make both digits and (b) there wasn't a single example showing this overlap expanded

But I suppose can see the other side as well: the wording makes it sound like any spellings of those digits _counts_ as a digit rather than should be _replaced_ by a digit.

However I think the ambiguity here made the puzzle more difficult in a non-fun way.

Re:Advent of Code 2023 is nigh by tymscar on Friday December 01, 2023 @11:59AM (#38489025)
Yes, same. I keep seeing people say this on discord and reddit, but that edge case was shown twice in the example.
Re:Advent of Code 2023 is nigh by agoose77 on Friday December 01, 2023 @12:15PM (#38489258)
It shows an overlap, but it doesn't indicate how one should parse it.
Re:Advent of Code 2023 is nigh by criddell on Friday December 01, 2023 @01:04PM (#38490002)
It showed "eightwothree" to be 83. Or is that not what you are talking about?
Re:Advent of Code 2023 is nigh by jacksontheel on Friday December 01, 2023 @01:18PM (#38490198)
If it had shown "eightwo" as the last part of a string, then people with overlap would fail the example because they'd be finding "eight" where "two" would be correct. Having it at the beginning means it was overlooked, at least for me.

Though, I have no problem with the "spec". This a code puzzle game, so figuring that out was part of the fun, in my opinion

Re:Advent of Code 2023 is nigh by mminer237 on Friday December 01, 2023 @01:15PM (#38490152)
None of those it matters that much though. The test case of `eightwo` would be the most critical and unintutive.
Re:Advent of Code 2023 is nigh by jjice on Friday December 01, 2023 @09:01PM (#38495117)
I'm not certain, but I _feel_ like those are new values. There's a very real chance (majority chance) I'm wrong and oblivious though.