Category: Programming
-
“How to stick with your projects, even when they’re janky”
There’s a lot to reflect on from this 2025 talk from Jeaye Wilkerson, creator of jank, a Clojure dialect targeting C++ interop: “How to stick with your projects, even when they’re janky”: I’ve not really done his talk full justice, but in the spirit of focusing on shipping, I’m publishing this as is. 🙂
-
Parsing “Pollinator Post”
May Chen runs a treasure of an e-mail newsletter, the “Pollinator Post”, where she shares macro shots of insects and plants, mostly local natives, from her hikes around the East Bay, along with commentary drawing on her decades of experience as a docent. Until recently, these posts were available only via an invite-only e-mail group,…
-
KmpMatcher + links
In an earlier post, I talked about extracting attachments from .eml files, which I was doing in pursuit of a half memory of having implemented the Knuth-Morris-Pratt algorithm. That turned out to be a dead end so I ended up consulting a lot of other sources and glomming together something new from those. You can…
-
Errors you might see if you forget `bazel_dep(name = “protobuf” …)
If you forget to include the dependency on protobuf in your MODULE.bazel file while including a cc_proto_library target, you may see errors like the following when you try to build that target: ERROR: /private/var/tmp/…/external/abseil-cpp+/absl/utility/BUILD.bazel: no such target ‘@@abseil-cpp+//absl/utility:if_constexpr’: target ‘if_constexpr’ not declared in package ‘absl/utility’ defined by /private/var/tmp/…/external/abseil-cpp+/absl/utility/BUILD.bazelERROR: /private/var/tmp/…/external/protobuf+/src/google/protobuf/BUILD.bazel:483:11: no such target ‘@@abseil-cpp+//absl/utility:if_constexpr’: target ‘if_constexpr’…
-
Extract attachments from .eml files
I have a need for an implementation of the Knuth-Morris-Pratt algorithm (or similar) handling streaming input. I’m pretty sure I’ve implemented this previously and thought I might my find my code in an old .zip file I’d sent someone in e-mail. But Gmail refuses a direct download of the attachment, I guess due to it…
-
Telling g++ about homebrew-installed lib
I’ve been having fun looking at some code created by a friend/ex-coworker, including https://github.com/hfgong/walker_vose. It makes use of the beloved to me GoogleTest C++ test framework. I guess probably the right thing to do is to set things up via one of the methods mentioned in the GoogleTest docs, Bazel or CMake. (I was very…
-
Undoing perspectival distortion
I have a lot of photos containing a sign or other rectangular object where I’d like to undo the distortion that comes from having the plane of the camera not exactly parallel to the plane of the rectangle. I’ve also been wanting to play with Tauri, a framework for creating apps, for a while. So,…
-
Fun with Xorshift
I’ve been hacking on an old game I wrote for the school paper I founded: Hangman. (Code: https://github.com/fadend/hangman.) One feature I like: the ability to create your own games with a shareable link. Here’s one for you: https://revfad.com/hangman/?w=JVFUVAT+LBH+N+JBAQRESHY+QNL. Since I didn’t want the URL parameter to give away the answer, I have the game run…
-
Julia sets in Julia
I decided to draw some Julia sets for my first little project in Julia: https://github.com/fadend/JuliaSetCycle Example output: I’m pretty happy with that, at least for a start. One thing that has surprised me is the focus on running things via the REPL, which on second thought reminds me of R. See, e.g., How do I…
-
“use of `continue` for control flow is discouraged”
This comment caught my attention: https://github.com/scikit-agent/scikit-agent/pull/19#discussion_r2112768829 use of continue for control flow is discouraged. Is it? I see Guido cautions against using continue in a finally block in https://peps.python.org/pep-0008/: Use of the flow control statements return/break/continue within the finally suite of a try…finally, where the flow control statement would jump outside the finally suite, is…