September 12, 2024

evil-mode in terminal without Alt/Meta

This morning I found the following post on reddit /r/emacs: Evil mode on a vt100 and I recalled having the same issue with terminal Emacs in xterm. By default, xterm emulates VT102, and behaving like VT100, will not send Alt/Meta key to Emacs without this workaround.

In short, the workaround to send M-x in evil-mode even if Alt/Meta doesn't work is to use this combo: \ Esc-x. \ will temporarily suspend evil-mode and Esc-x is the same as M-x. The same will work with C-u M-x: type \ C-u Esc-x.

I wasn't satisfied with this, we are using Emacs, after all ;) How about we can call M-x directly as evil-mode ex command? Sure, run this:

Continue reading →

August 24, 2024

Fixing docker-compose stalled containers

This is the first post after almost two years. Yay! I've been busy with various projects and gigs, and I'm hoping I'll have a chance to write about them in future. But for now, let's focus on my issue with docker-compose.

First of all, let's check my setup:

  1. I'm running vanilla docker (sorry, no podman yet in my books).
  2. Docker runtime is crun.
Continue reading →

December 14, 2022

Named let in Clojure

As you might (or might not) know, Clojure does not have support for named let expressions. Those who used (or still using) Scheme knows that named let is a cool construct to express recursion cleanly, and to be precise, the only way to do iteration in Scheme.

So, how are they used in Scheme? Here is one example you can test in Racket or Guile:

(define lst '(1 2 3 4 5))

(let loop ((lst lst))
  (when (not (null? lst))
    (display (car lst))
    (newline)
    (loop (cdr lst))))
Continue reading →