Uiua
Adapting the part one solution for part two took me longer than part one did today, but I didn't want to change much anymore.
I even got scolded by the interpreter to split the evaluating line onto multiple ones because it got too long.
Can't say it's pretty but it does it's job ^^'
Run with example input here
PartOne β (
&rs β &fo "input-8.txt"
β(β½Β¬β".\n".β΄)
βββ @\n.
:Β€β(:Β€-1β³)
β‘(β‘ββ)
β΄/βββ(β‘(-:β-Β°β)β§
β 2)
β§»β½Β¬:β(/+β+)ββ><,0
)
PartTwo β (
&rs β &fo "input-8.txt"
β(β½Β¬β".\n".β΄βΒ€
β½:ββ‘(>1β§»ββ)
)
βββ @\n.
:Β€β(:Β€-1β³)
β‘(β‘ββ)
βΈβ(
β§
β 2βΒ€
β‘(:Β€β-Β°β
β’(βββ-ββΈβ’
| β
(=0/++β><,0β’))
β‘βββ
)
)
β΄/ββ/ββ
β§»β½Β¬:β(/+β+)ββ><,0
)
&p "Day 8:"
&pf "Part 1: "
&p PartOne
&pf "Part 2: "
&p PartTwo