avatar

Andres Jaimes

Debian Trixie + Sway computer setup

I’ve been circling this decision for a while, trying to figure out the best setup for my day-to-day tasks. I’ve worked with multiple operating systems, including Windows 3.1, 95, 98, NT, 2000, XP, 8, 10, 11, Mac OS9 and OSX from the cats to the …

Installing bash on macOS

A quick post on how to install bash on macOS to replace zsh.

Why did Apple stop shipping with bash? Licenses. The older version of Bash was licensed under GPLv2, while newer versions are licensed under GPLv3.

Installing bash

Run the following command …

Docker cheat-sheet

Posting some common docker commands:

  • docker compose up Starts services (add –build to force rebuild)
  • docker compose down Stops and removes everything (containers, networks)
  • docker compose stop Stops containers but does not remove them
  • docker …

Creating C-API Interfaces for C++ code

At some point we’ll want our C++ code to interface with other languages, but since C is the standard, we have to find ways to adapt our C++ code to allow interaction via a C interface. A C API is a group of functions that allows other programs …

Creating a simple static library

This article describes how to create a simple static library using C++. A static library is a collection of object files that are linked with and copied into a target application at compile time. The resulting executable contains all the object code …

C++20 Modules

In this article, we’ll see how to create and use C++20 modules. We’ll use clang-16 to compile our code.

Prerequisites

OSX comes with clang-14 by default (2023). We can check its version with the following command:

1clang --version
2Apple …

Notes on C++

All the examples use C++17

Sort vector by property in class

In this example, we defined a class called open_order that has a long long open_time field, and a constructor.

To sort the vector of open_order objects based on the open_time field, we …