• 0 Posts
  • 36 Comments
Joined 1 year ago
cake
Cake day: June 21st, 2023

help-circle


  • The fact that the loop is doing “find first driver matching these strange criteria” seems most obviously obscured by the pattern of assigning a value, then killing the loop or not. This strikes me as the part that makes the algorithm tedious to test, since it forces us to use a collection to test the intricacies of the inner conditions.

    Once we isolate “find first driver matching condition” from computing the condition for each driver, I consider the rest a question of personal taste. Specification pattern, composition of filters, something like that. Whatever you find easier to follow.










  • Computers don’t directly understand the code that humans write. Humans find it extremely difficult to directly write the code that computers understand.

    Compiling is how we convert the code that humans write into the code that computers can run. (It’s more complicated than that, but that explanation is probably enough for now.)

    Different computers understand different flavors of computer code. Each kind of computer can compile the same human code, but they produce the flavor of computer code specific to that kind of computer. That’s why you sometimes need to compile the human code on your computer: it’s easier for your computer to know how to compile human code than for a human to know how to compile human code for every kind of computer that exists now and might exist in the future. There are some common kinds of computer and many projects pre-compile human code so that you don’t have to, but that’s not always easy. Also, some people insist on compiling the code themself, rather than trust someone else to correctly compile the code for their computer.

    As for how to compile, that can be complicated. When you find the human code (“source code”) for a software project, the README often gives you instructions for how to compile that project’s code. Many of the instructions look familiar, because they are similar between projects, but the detail can vary a lot from project to project. Moreover, different human programming languages have very different instructions for how to compile their flavor of human code into computer code.







  • I needed to install a plugin to select objects delimited by characters, which I infer provides some of the basic behavior of tree-sitter, but since I forget the details, I guess that means there’s no fiddling involved. Set it and forget it.

    Kakoune has a welcoming and helpful community, so when I struggled to understand the basics of configuration and installing plugins, I got the help I needed. It’s been a few years since I needed help, so perhaps that means I’m not adventurous enough and perhaps that means everything has simply kept working with little maintenance.

    I have vague memories of putting in effort to set things up, but evidently that didn’t traumatize me.



  • I adopted ranger as my file manager and there is a way to enable preview that works for text files, PDFs, and images (plugin). It’s not Quick Look, but you might not hate it.

    I like it primarily for reasons of using the keyboard to navigate, search, copy, move, delete, and open files. It helped me miss Alfred less.

    Someone else has mentioned nnn, which has similar aims.