https://codeberg.org/ngn/k/src/branch/master/a21
- Paste in a small amount of ASCII text from the clipboard (no scrolling)
- Edit it at will (insert, arrow keys, backspace)
- Always show the character count
- Anywhere the text contains some delimiter, treat it as a chunk boundary, show character count for the previous chunk.
Amazing how difficult this is to get right.
I've built multiple text editors but still can't figure this out. Data structure this time: just a raw string.
I figured out the problem! I didn't have tests in Teliva! Now I do.
It turns out my brain only works when embedded in an exo-brain of tests.
Throwing in the towel. My solution works for the test input.
I get this message for the answer: "Curiously, it's the right answer for someone else; you might be logged in to the wrong account or just unlucky. In any case, you need to be using your puzzle input."
No hints just yet, please.
Let's see if this is going to work..
I'm getting some neat visualizations, at least. But I think they're just showing me how screwed I am.
Oh, just needed to print less often. It's going faster now. But still exponential..
https://www.lua.org/pil/11.6.html
So I need to rethink how Teliva displays run-time errors. Now I hazily remember Turbo Pascal having a "press any key to continue" prompt on run-time error.
I did finish after all. An hour into the day, after doing other stuff (going over review jam feedback with Teliva, creating a list of bugs), it occurred to me to get "press any key" by adding just one line of code to Teliva and recompiling. That got me debugging again.
But this video is going to be useless. Across two sessions, I have an hour of me umming and aahing, muttering and swearing.
http://akkartik.name/post/silfen-paths
Many thanks again to https://compudanzas.net for play-testing it and making it 10x more hospitable a road to travel.
Watch me (slowly and laboriously) work through a problem from last year with Teliva
https://archive.org/details/akkartik-teliva-2021-11-30 (video; 15 minutes)