# Hi

I'm Lennart Landsmeer. I write here sometimes about things I find interesting, problems I come across and how I solve 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 enrolled in a premaster Nanobiology at the TU Delft, and like kiteboarding in my spare time.

# Posts

• ## 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

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 way...

• ## Converting 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 convert...

• ## 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 a 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 domintate 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 queued...

• ## 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

• ## 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 linker...

• ## Recursive sata structures: Catamorphism with context

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 single value, while...