Latest TILs:
Zig exercise: using std types to implement a basic shell calculator
21 Jul 2024Today I decided to get some practice using Zig’s data structures from the
standard library, building an old friend: a bc style calculator, implementing
the algorithms to evaluate reverse Polish
notation expressions
and converting from infix to that notation.
Simple stdin/stdout text processing with Zig
20 Jul 2024In my Zig learning journey, I’ve managed to not use allocators for anything yet.
I’ve watched this great video of Dude The Builder explaining the basics of allocators in Zig. Side note: I am finding the videos from this Youtube channel really great, indispensable to understand how to use the stuff from the standard library.
About Zig structs and using @ptrCast for getting Zig data in C callbacks
16 Jun 2024In the previous post, I went about my experiments with Zig and the FluidSynth Sequencer API.
I wasn’t fully happy with my Zig code, because I was resorting to global variables and didn’t quite know how to organize it.
The basics of the FluidSynth Sequencer API
15 Jun 2024Today I learned the basics of the FluidSynth Sequencer API. It is not super complicated, but it took me some time to understand the concepts, as not everything is explained in great detail. As often is the case when learning a new API, the best way to learn it is to read through the code of the provided examples, and check the API reference docs as needed.
About Bitmap Heap Scan on Postgresql query plan
11 Jun 2024Today I was looking for the culprit of the performance issue that was affecting a Django Admin page that wasn’t loading. I know from experience that most of the time this is a problem of unoptimized queries, and the best weapon I know to have a look into those in a Django app is to use the Django Debug Toolbar.
How to override the browser's location
09 Dec 2023In a web application, it’s a common pattern to have the backend to send a UTC timestamp, which the frontend will later display in the user’s timezone. In these situations, you may want to spoof your browser’s location in order to verify that things are working as you’d expect.
How to use PipeWire for music production with Reaper on Linux
15 Nov 2023Note: If you’ve just installed Reaper on Ubuntu and you’re seeing an error about opening the Audio device, it’s probably because your system isn’t configured to use PipeWire replacing JACK libs.
How to add extra log context with loguru
07 Nov 2023Loguru is a Python library that provides a neat logging API, and I recently learned how to add extra context to the logs.
How to call fluidsynth C API from Zig
05 Nov 2023I find quite cool how quickly you can start using a C library from Zig! No need to write bindings or to fiddle with a FFI, it provides direct integration with C libraries.
How to define a healthcheck for a Docker container
01 Nov 2023Today I learned that you can define a health check for a Docker container, directly on the Dockerfile.