Author: David Faden

  • __builtin_popcountg

    Looking at https://en.cppreference.com/cpp/utility/bitset/count, I was intrigued to see popcount mentioned in the “See also” section. Handy. That made me curious to see how the stdlibs choose to implement it. Here it is for Clang: libcxx/include/__bit/popcount.h For gcc: libstdc++-v3/include/std/bit So, there’s at least one configuration where they end up both calling something called __builtin_popcountg. What are…

  • Progressive rescaling does make a difference

    My dad learned calculus from this book: Practical mathematics, theory and practice with applications to industrial business and military problems. I wanted to include a photo of the title page from his copy of it in a little biography we’re working on for him, but I ended up with jaggies when using my scaleimage tool.…

  • Still life

    A moment of peace and joy. Finishing up a good book. Appreciating the soft light. A pile of grapes. Brewing coffee. A hug. Mesmerized by ripples. Mesmerized by steam. One command to strip audio and metadata and resize: Last night we kayaked on Tomales Bay with a guided tour with Blue Waters Kayaking. The recent…

  • Santa Clara precincts, an appreciation

    Thanks to a quick, gracious reply from the GIS Mapping team at County of Santa Clara – Registrar of Voters, I have a shapefile with the precincts for Santa Clara County. You can ask for it too. I’m struck by the beauty of it: A combination of artificial and natural, driven by people’s choices —…

  • “Do not panic”: -stable maintainer on LLM security impact

    Greg Kroah-Hartman, “Fellow at the Linux Foundation… responsible for the Linux kernel stable releases… maintainer of a variety of different kernel subsystems (USB, char/misc, tty/serial, driver core, staging, etc.)”, has a couple of interesting talks on the impact of LLMs on security: Linux in the Land of LLMs (August 11, 2026) and Kernel Recipes 2026…

  • Where is zip?

    Download a copy of CPython’s source: Where is zip implemented? Looks promising! This looks like a good start point — defining it along with the other builtins inside _PyBuiltin_Init in Python/bltinmodule.c: where _PyBuiltin_Init gets called in Python/pylifecycle.c here: where pycore_init_builtins called in Python/pylifecycle.c here: where pycore_interp_init gets called in Python/pylifecycle.c here: where new_interpreter gets called…

  • ^r, remembering

    I enjoyed this article on Small Programming Tricks. It mentions using Ctrl + r to search backwards in shell history. (There are a lot of other useful Readline commands to learn.) I remember learning about Ctrl + r. I was sitting in the cubicles for the Spelling team in Building 43. This was soon after…

  • Eating society garlic (Tulbaghia violacea)

    Today at a workday at the local school, one of the volunteers thinned the society garlic (Tulbaghia violacea) plantings. They were threatening to crowd out some plants added to the beds by students (not pictured in the photo below). I’d heard from another volunteer that society garlic are edible so I asked to grab some.…

  • Getting text from some seed packet labels

    I’ve been enjoying following along with Simon Willison as he plays with LLMs via his llm tool but haven’t tried it out yet. Now I have a small task in mind — I recently planted some seeds, taking a photo of each seed packet while I was at it. I’d like to extract the plant…

  • Extracting Google Scholar metadata

    I wanted to find the number of citations per year for a paper from my dad, at least per Google Scholar. Hacking around, here’s a little JavaScript to get it per results page: How would you do this? Is there a nicer way to do it? There were 12 results pages. I was paranoid about…