1. 57
  1.  

    1. 4

      I was (and still am) impressed that this was done in a single day, but it makes more sense when you see what else they’ve built https://eieio.games/

      1. 1

        Wait. This wasnt more than a day. Impressive.

        1. 1

          In the Wrapping Up section:

          This was really fun! I built this in a single day, but if I wanted to spend more time on it I might make a few tweaks…

          1. 10

            hi! I’m the author and I’m glad you were impressed!

            Maybe this is silly, but I think “building bizarre useless software projects” is a skill just like any other software skill and that, kinda to your point, doing all the other stuff I’ve done has made me way faster at projects like this! I think it would have taken me at least a week if I had built it in 2023.

            There are a bunch of funny meta skills for these projects - having good intuitions about what’s going to be hard and what’s easy, knowing what rabbit holes to jump down, having the right tricks to make performance just good enough, etc. A concrete example from this project is that if I was making it two years ago there’s no way I would have sat down and just read the vim search docs for a day-long project. But I now know that for a project like this you need to know exactly what tools you have available and so you really need to RTFM.

            I gave a talk at ITP last year about my process for these projects and I’m planning to turn it into a blog soon. The thrust of the talk was that these are real, trainable, totally useless skills that you can acquire! Seeing a comment like this makes me a little more motivated to finish it :)

            1. 2

              I’d love to read that, in case that provides any more motivation :)

      2. 3

        I wonder how well it would work to fill the buffer with 120x90 different unicode characters, configure the colours to be black-on-black normally and white-on-white for a match, then use regexes that look like abc|ijk|xyz. Then the regex engine only needs to use Aho-Corasick.

        1. 3

          (I’m the author)

          I think that this ends up with similar characteristics to the RLE implementation I added (you’d be selecting the same runs of characters). I suppose with this approach you could potentially match newlines in your regex and have one very long search string that spans multiple lines (if you wanted to match on the last character of one line and the first character of the next one)

          I don’t have much of an intuition for how performance would compare. I do think that you could end up with very very long search strings, since you’re enumerating every pixel that you want to match (and you have 10k pixels!). You could work around that with a.*?c (well, that’d actually be a.*\{-}c in vim) although wildcards might have worse performance than explicit character matches? I have no idea.