Skip to content

Instantly share code, notes, and snippets.

@anordal
anordal / pytest is so upside down.md
Last active March 18, 2021 22:00
Simple things that pytest makes difficult

Simple things that pytest makes difficult

Pytest is doing so many things automagically, and seems to have its own ways of doing everything.

You know this when you encounter one problem after another, simple & common as they all seem, that can not be solved the simple & common ways they would in any normal program, and you instead find yourself either pulling your hair out or pasting a magic solution from Stack Overflow.

Solutions in this domain tend to be rather more optimized for convenience than understandability. Not great when they add problems of their own. Let's formally define magic:

@anordal
anordal / lessons-from-meson-to-cmake.md
Last active July 26, 2023 08:06
Lessons from Meson to CMake

Lessons from Meson to CMake

If you are using CMake, you can have some of the niceties of Meson by reimplementing them yourself.

Dependency download fallback

This is in my opinion the killer feature of Meson: Be nice, both to users who just want to build the thing, who may have a hard time satisfying your dependencies, and to packagers, your CI and others,

@anordal
anordal / main.c
Created February 25, 2018 22:29
Meson: Unconditionally generate source file
#include <stdio.h>
extern const char versionstring[];
int main(){
puts(versionstring);
return 0;
}