posts

Longer thoughts on documentation, tools, and engineering.

My zsh got slow again: from 130 ms to 36 ms

My zsh took 130 ms to start. hyperfine and a timestamped xtrace found five culprits, and now it starts in 36 ms.

Mi zsh volvió a engordar: de 130 ms a 36 ms

Mi zsh tardaba 130 ms en arrancar. Con hyperfine y un xtrace con marcas de tiempo encontré cinco culpables, y ahora arranca en 36 ms.

Drowning in Claude Code sessions (and how I survive)

I run more than 20 Claude Code sessions in tmux. They survive restarts, the status bar flags the one that needs me, and a dedicated Claude sorts them.

Inundado de sesiones de Claude Code (y cómo sobrevivo)

Llevo más de 20 sesiones de Claude Code en tmux. Sobreviven a reinicios, la barra avisa de la que me necesita y un Claude dedicado las ordena.

SwiftBar + GitHub: your PRs in the menu bar

Your open PRs and pending review requests in the macOS menu bar. SwiftBar runs a bash script with gh and jq, and the second script adds CI status.

SwiftBar + GitHub: tus PRs en la barra de menús

Tus PRs abiertas y las reviews pendientes en la barra de menús de macOS. SwiftBar ejecuta un script de bash con gh y jq, y el segundo script muestra el CI.

Python 3.15, explained with short examples

The Python 3.15 changes worth knowing, and where they help.

Bash Process Substitution

Practical examples of bash process substitution for everyday tasks.

Kubernetes resources to train on servers

Where I practice Kubernetes on real servers, like the iximiuz and sadservers labs, plus a challenge, official courses and videos.

yaml indentless arrays

yamlfmt indents list items one level too deep. indentless_arrays fixes that, and conform.nvim runs it on save in Neovim.

podman compose up credentials error

How to fix podman compose up credentials error

[NOTES] Emotions: An Indian Perspective

Some notes about this paper.

start/stop jobs in background

Two Bash functions start and stop a looping background job with nohup, a PID file and a log, and noti tells you on the desktop.

How to debug a pod

Attach netshoot to a pod with kubectl debug, then work through ss, curl and ps to find saturation, leaked sockets and slow endpoints.

New Python 3.14

The Python 3.14 features I like most are the new interpreter, incremental GC and zstandard. Miguel Grinberg's benchmark says it is the fastest Python yet.

El sesgo de selección y tests unitarios

Si escribes los tests de tu propio código, heredan tu sesgo de selección. Aun así merecen la pena, porque protegen el comportamiento cuando cambies algo.

Notas sobre la música

Un short con una pieza en varios estilos me llevó a la techné, praxis y poiesis de Aristóteles, y a lo que Kant, Hegel y Schopenhauer decían de la música.

Una apología sobre la competencia en la era de la IA

Si delegas en la IA todo lo aburrido, pierdes competencia. Repaso la idea con Sócrates y propongo cinco hábitos para usarla sin depender de ella.

Optimizing zsh on macOS

My zsh took about a second to start on macOS. zprof showed why, and dropping oh-my-zsh and my own functions got it to 0.05 seconds.

UV is Shaking Up the Production Game

Inline script dependencies (PEP 723) in uv ended my venv chores. I show it with a newsletter script and by running a script straight from a gist.

I Wish I Had a Simple Calculator in My Bash

I wanted quick math like 245 / 71 without leaving the terminal. A tiny Bash function and a Neovim command hand it to python -c.

I found an issue on uv: llvmlite

uv 0.5.4 failed to build llvmlite 0.36.0 on uv add numpy statsforecast. I share a minimal repro and a workaround that adds the packages in another order.

Makefile based on uv

My Makefile for Python projects on uv. It has targets to install, lock, test, lint, fix, check coverage, build docs and package.

Reviewing UV: The Quirkiest Python Package Manager Ever

I moved from poetry to uv and installs went from 15s to 1s. I list the commands I use to scaffold a project and pin Python.

Some useful github actions

GitHub Actions I keep reaching for, like setup-uv, release-please and semantic-version, plus a release workflow you can copy. The list keeps growing.

Vim Tips: Running Commands

Neovim runs shell commands with :!, :.!sh and :w !sh, and can swap a line or selection for its output. Handy when writing docs.

Docker Compose Env Var Adventures

MYVAR came out empty in my Docker Compose command. Compose expands it before the container does, and $$ plus sh -c fixes that.

Makefile

The Makefile I start Python projects with. It builds a venv, prints its own help, installs and tests, and lints and formats with ruff.

Uv: Quickstart

Five shell lines to install uv, fetch Python versions, pin one, create a venv and install a requirements.txt.

Markdown preview PDF friendly

To print markdown-preview.nvim pages to PDF, add a few @media print rules to two of the plugin's CSS files. I include a Mermaid diagram to test with.

Cambiando el formato de un archivo

Copié un script con scp y bash respondía command not found. La culpa era de los saltos de línea DOS, y :set ff=unix en Neovim lo arregla.

Reflexiones sobre el Eterno retorno

El Eterno Retorno de Nietzsche pregunta si vivirías tu vida otra vez, idéntica. Lo cruzo con el Amor Fati, el estoicismo, el budismo y Sartre.

Diagramas en NeoVim made easy

Escribo el grafo en dot y Neovim lo convierte en un diagrama ASCII con dot-to-ascii, un pequeño script de Python y el comando Dot2Ascii.

Implementando pipx con conda en macOS

pipx me fallaba en macOS con entornos activos, así que escribí cx. Usa conda y pip para instalar cada CLI con la versión de Python que elijas.

Neovim for ML

I run Python from Neovim in notebook-style chunks with vim-slime and jupytext. This is my LazyVim setup, with IPython, plotly and pdbpp.

Crea proyectos python minimalistas con un comando

py-here es una función de Bash que crea un proyecto Python con pyproject.toml, Makefile y .gitignore. Las plantillas viven en un gist.

Acelerando la repetición de teclas en macOS

Tres comandos defaults write en macOS. Dos aceleran la repetición de teclas y el tercero quita el press and hold, así te mueves más rápido con las flechas.

Optimización de zsh y nvm en macOS

nvm frenaba el arranque de zsh en macOS. Mido el tiempo con zprof y lo arreglo cargando nvm en lazy con el plugin de oh-my-zsh.

Cambiando el explorador predeterminado en Linux

Para que Linux abra las carpetas con Thunar basta un archivo .desktop y una entrada en defaults.list. Con xdg-open compruebas que funciona.

Guía sencilla para iniciar un proyecto Python desde cero

Un proyecto Python desde cero con pyproject.toml, un Makefile y setuptools-scm, que saca la versión de los tags de Git. El ejemplo es takt.

Cómo ser un programador longevo

Los consejos de ThePrimeagen para durar en esta profesión. Profundiza en los conceptos, domina tus herramientas, resuelve problemas y defiende tus opiniones.

Y si empezamos documentando los ejemplos

Empiezo a documentar escribiendo ejemplos en los docstrings. Si añades el resultado se vuelven doctests, un punto medio entre no tener nada y tener tests.

Explorando pdb++

pdb++ añade comandos al depurador de Python, como display, edit y break_on_setattr. Cuento cómo lo uso y cómo lo configuro en .pdbrc.

La Ley de Hofstadter: ¿por qué los programadores nunca terminan a tiempo?

Siempre tardas más de lo previsto, incluso contando con la Ley de Hofstadter. Explico por qué pasa y cómo partir las tareas para no agobiarte.

Takt: A Simple and User-Friendly Time Tracker

Takt is my time tracker for the terminal. You check in and out from the console, and the records stay local in a file you can edit by hand.

Using i3 WM on MacOS with Yabai and Skhd

yabai and skhd give macOS i3-style tiling. Install both with brew, start the services and grant the permissions they ask for.

Creating Custom Keybindings in i3 for ChatGPT CLI

Bind Win+g in i3 to open the ChatGPT CLI in a floating st terminal, centered on screen, so a question is one keystroke away.

Have you heard of rich?

With rich, Python's print, logging and tracebacks come out formatted and in color. Its sibling textual builds TUIs that also run in a browser.

Configurando red mesh usando 2 routers AX3600

Monté una red mesh con dos routers Xiaomi AX3600. Hizo falta un reseteo de fábrica, configurar la red 5G y el script MiWiFi_Mesh_Node_Adder.

Graphic Tablets

xsetwacom commands to pin a graphics tablet to one screen, chosen with xrandr and fzf, and to remap the stylus buttons.

Huberman sobre la sal

Mis notas del episodio de Huberman sobre la sal. Habla de la sed, la presión arterial, el sodio en el cerebro y su efecto en el rendimiento.

Using Hugo for my website

This blog started on Hugo. These are the three links I used, for the meme theme, extra pages and a notice shortcode for callouts.

How to set up DNS using GH Pages and Google Domains

Point a Google Domains domain at GitHub Pages with A, AAAA and CNAME records, then check them with dig.

¡Respira!

Cuatro ejercicios de respiración, entre ellos el suspiro cíclico y la respiración en caja. Según un estudio, cinco minutos al día mejoran el ánimo.

Clean code es horriblemente lento

Un vídeo acusa al clean code de hacer lento el software. Me parece obvio que lo haga, pero cuánta mantenibilidad sacrificar depende de cada proyecto.

I wrote my first vim plugin

dbee.nvim, my first Neovim plugin, runs the SQL inside your Python code through SQLAlchemy and pandas. No need to open DBeaver.

La ley de Hotelling

Simulo en Python la ley de Hotelling. Cuatro jugadores mueven su posición para ganar más, y pandas y matplotlib muestran dónde acaban.

Display issues on i3

My laptop screen lagged and processes hung on i3 with Pop!_OS. One gsettings command from System76 that turns off HiDPI fixed it.

Maximizing productivity, physical and mental health

My notes from Huberman on work and health. Get morning light, sleep in a cool dark room, work in 90-minute blocks and try NSDR.

¿No escribes unit tests?

ThePrimeagen y Theo discuten si escribir unit tests. Para mí sirven sobre todo para que los errores que ya cometiste no vuelvan.