• The last bit – Part 3

    In the first instalment of this series, we saw a few alternatives to compute the last bit of a mask. Turns out there is yet another way to do compute it, but it relies on a policy of RVV. Let’s see this approach and use it to talk about why RVV has policies.

    Read on →

  • The last bit – Part 2

    In the previous part we ended with a nifty way of computing the last bit of a mask using the prefix sum. The key of the approch is based on the fact that the last element of the prefix sum of a mask is either the population count or population count minus one.

    Let’s prove that using Lean.

    Read on →

  • The last bit – Part 1

    The RISC-V Vector Extension (RVV) includes several instructions to operate on masks and compute interesting things. One of them is vfirst.m that computes the lowest-numbered element of the mask that is set.

    However, there is no vlast.m instruction that computes the highest-numbered element of the mask that is set.

    Read on →

  • Migrate from VirtualBox to libvirt

    In my day job sometimes I need to edit documents using tools that are only available on Windows. As such, I have a virtual machine with Windows 10 running on VirtualBox.

    Recently I upgraded to Debian 13 and I took the opportunity to migrate to a libvirt-based solution. I explain here the steps that I followed.

    Read on →

  • A caveat with statically linked language runtimes

    Most programming languages, including C and C++, provide language runtime libraries that implement parts of the language itself. These libraries must be linked in the final program or shared library.

    Today we are going to see how an unfortunate default in the way shared libraries work in Linux can make our lives a bit more complicated than they have to if the language runtimes are in static libraries.

    Read on →