avatar

Andres Jaimes

Instalando Debian Trixie y Sway

Llevo algún tiempo pensando en el sistema operativo que quiero para uso diario. He trabajado con sistemas que van desde Windows 3.1 a HPUX, pasando por OS9, OSX, Slackware y Ubuntu.

Cuando me inicié, disfrutaba de teclear comandos en DOS y de …

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 …