# Hi

Hi, I'm Lennart. I write here sometimes about things I find interesting, problems I came across and how I solved them or just when I feel like writing :). My interests are centered around complex systems; taking examples from biology, methods from physics and simulations from computer science to marveling at their beauty through art). I'm currently pursuing a master's degree in nanobiology at the TU Delft, studying motor control and learning at the NeuroComputingLab for my end project. For the UMC Utrecht I'm helping with bioinformatics analyses for cardiovascular health research, and I like kiteboarding in my spare time.

# Posts

• ## Advent of Code 2021 : Writing less code

This is a continuously updated post of my progress during Advent of Code 2021.

• ## Printing p-values using unicode superscripts in R

This is a pretty simple one. I wanted to show some nicely formatted p-values on a plot by an external library, but it wasn’t possible to pass anything else than a character vector as labels. So I built this function that formats any p-value using unicode characters. Hopefully it’s of...

• ## No, the ESP32-S2 is not faster at floating point operations (and how do you actually speed up division on the ESP32?)

For my master’s thesis I’m working on computational models of the inferior olivary nucleus, a region in the brain involved in motor control and learning. The lab already produced multi-CPU, multi-GPU and multi-FPGA brain simulators, and another student and me thought it would be a cute to add a...

• ## Online presenting in front of your slides with a transparent GTK window and OpenCV

Today I had to give a presentation on my research for a course to improve my presenting skills. I thought it would be nice to recreate an in-person presenting environment, instead of my regular share-slides-and-hear-my-voice-but-don’t-see-my-face online presentation. A bit like how Daniel Shiffman presents The Coding Train :).

• ## Automatically send all Matplotlib plots to your phone via telegram-send

So I’m not actually sure if this is actually a good idea, but at least its a fun one :). For my research I usually run long (>20mins) simulations using quickly written scripts and it would be nice if those scripts automagically notified me when they where ready. Of course...

• ## Running SLURM locally on Ubuntu 18.04

Today I found myself needing to set up a minimal SLURM cluster on my laptop for simple testing purposes. As always, there were some challenges along the way and I had to consult multiple installation guides and stackoverflow questions to make everything fit together. Here is what worked for me.

...

• ## Fast searching in a sorted genetics file & the curse of gzip compression

As a bioinformatician, how often have you found yourself staring at the screen waiting for grep to find a certain gene or chromosome-basepair location in a gargantuan vcf, bed or gwas file? And then realize you forgot adding a field delimiter to your pattern so your search included...

• ## Aligning a GWAS to a genetic reference with gwas2cojo.py

Dealing with a gazillion different undocumented notations and conventions for writing down variant information is a common problem in bioinformatics. Different effect/other alleles, variant names, reference genome build, chromosome name conventions or just different column names all prevent easy comparison between genetic variants. gwas2cojo.py is there to automatically...

• ## Nonlinear dissocation constant?

As you learn fairly early in chemistry, for some particles A and B that are able to form a complex AB, we have the equilibrium equation

• ## Serving precompressed static sites using NGINX to save disk space

I had this idea to build my next app website as a completely static site, including all user specific content. So no C# ASP / Flask or React, just static files that get regenerated every so often with a cron job. The main advantage would be an extremely simple server...

• ## Building an UEFI x64 kernel from scratch: A long trip to userspace

When I just started programming, one of my first major projects was building my own kernel. Of course, I failed misserably. But I learned a lot. Back then, x64 didn’t dominate the market and I never even heard about UEFI. Copy pasting code bits from tutorials and forum posts I...

• ## Fixing the posix Batch job scheduler by updating its load average limit

batch(1) is a little known posix command that supposedly takes a list of jobs/shell scripts and executes them when the load average of the computer drops below a certain level. It’s far from an ideal scheduler, but it’s builtin and does what is should do. Problem is, the...

• ## A minimal Extended Kalman Filter in python

The extended Kalman filter is a state estimator for non-linear systems with noisy transitions and incomplete noisy observations. In a way, its a magically how with so little and noisy information it is able to reconstruct a complete system state. I’m no expert on this matter, but as I...

• ## Numerical solution of linear PDEs: Computing the Crank-Nicolson matrix automatically

The Crank-Nicolson method rewrites a discrete time linear PDE as a matrix multiplication $$\phi_{n+1}=C \phi_n$$. Nonlinear PDE’s pose some additional problems, but are solvable as well this way (by linearizing every timestep). A major advantage here is that going $$k$$ steps into the future is just $$\phi_{n+k}=C^{k}\phi_n$$, and calculating...

• ## Overwrite an existing C/C++ function without LD_PRELOAD hacks

In a failed attempt to speed up CPython using a C++ extension, I found myself looking for a solution to overwrite (monkey patch) a function in the compiled C code. On linux, this is normally possible with LD_PRELOAD, which enables you to prepend a library in the dynamic...

• ## Recursive sata structures: Catamorphism with context

In haskell, the Fix f data type allows you to specify a recursive datatype from its fixpoint. Folds and unfolds, as catamorphisms and anamorphisms, come for free. With these recursion schemes, functions can be specified over the data type without explicit recursion. A catamorphism folds bottom-top to a...

subscribe via RSS