aliquote.org

Micro posting in August

August 29, 2025

2025-08-02: I just noticed that Neovim now allow for full case-insensitive tab completion in command mode, which means I can now enter path as I do in Zsh. #vim
2025-08-10: 10 new zsh tricks you may not know….
2025-08-13: /me is listening to “There is a light that never goes out” by The Smiths
2025-08-13:

“Generally speaking, if you want to have very very good performance, we should avoid cache misses as much as possible.” But Python is prone to having a memory layout that is cache-unfriendly. — Python performance myths and fairy tales

2025-08-13: Rich’s sh (POSIX shell) tricks: lots of little details indeed. #unix
2025-08-13: journaling system cobbled together with nix, vim, coreutils. How to make things simple. See also I Tried Every Todo App and Ended Up With a .txt File. #vim
2025-08-14: Apparently, external evaluation cells in Wolfram 14.3 are in trouble with personal .Renviron file. If I remove mine, everything goes well, otherwise I get a permission issue with renv. My $HOME/.Renviron only modifies the path for renv cache:

R_LIBS_USER="~/.local/lib/R/library"
R_PROFILE="~/.config/R/Rprofile"
RENV_CONFIG_USER_PROFILE=TRUE
RENV_PATHS_ROOT="~/.cache/org.R-project.R/R/renv"

Once R virtual environment is created, I can reinstate my personal config file, and everything is okay, but I guess next time if an R expression that requires to install external dependencies I will face a similar issue. Otherwise, external evaluation cell and the whole ExternalEvaluate stuff looks pretty interesting.
img
2025-08-18: TIL about doxx, which is a MS docx viewer for the terminal that preserves formatting and provides an interactive experience.
2025-08-19: /me is listening to “Facility Girls” by Soft Cell
2025-08-19: Are you looking for an online NBT editor for minecraft? https://offroaders123.github.io/Dovetail/
2025-08-19: I got tired of NNW and I’m back with Newsboat. The bug I mentioned earlier on was due to a problem with my config file (probably related to multi-threading).
2025-08-19: I tried them all (recently, Ghostty, for a day). My preferred terminal emulator was probably foot, back when I was on Linux.

» ls .config/archived
alacritty/         ghostty/           kitty/             matterbridge.toml  tig/               zed/
foot/              helix/             lazygit/           psql/              wezterm/

2025-08-19: TIL about Doppler. Drag’n drop and just press play. #apple
2025-08-19: TIL we can open multiple PDF files as tabs in Preview.app (h/t Burkhard Schmidt). On Sequoia, the corresponding setting is now in the Desktop and Dock panel. #apple
2025-08-20: I recently switched to vi keymap for Zsh. Here are some useful remapping to make it feels smoother:

bindkey -M vicmd '~' vi-swap-case
bindkey -M vicmd 'u' undo
bindkey -M vicmd 'U' redo
bindkey -M vicmd "?" history-incremental-pattern-search-backward
bindkey -M vicmd "/" history-incremental-pattern-search-forward

bindkey -M viins '^?' backward-delete-char # backspace
bindkey -M viins '^[[Z' reverse-menu-complete # shift-tab
bindkey -M viins '^a' beginning-of-line
bindkey -M viins '^e' end-of-line
bindkey -M viins '^h' backward-delete-char
bindkey -M viins '^k' kill-line
bindkey -M viins '^n' down-history
bindkey -M viins '^p' up-history
bindkey -M viins '^u' backward-kill-line
bindkey -M viins '^w' backward-delete-word
bindkey -M viins '^y' yank

autoload -U edit-command-line
zle -N edit-command-line
bindkey '^f' edit-command-line

I don’t use ^r for backward search since it is managed by Fzf directly.And in Tmux:

bind -T copy-mode-vi u send-keys -X halfpage-up
bind -T copy-mode-vi d send-keys -X halfpage-down
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi C-l send-keys -X clear-selection
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind -T copy-mode-vi 'C-v' send-keys -X rectangle-toggle \; send -X begin-selection
bind -T copy-mode-vi n send-keys -X search-forward "» "
bind -T copy-mode-vi p send-keys -X search-backward "» "
bind -T copy-mode-vi / command-prompt -i -I "#{pane_search_string}" -p "(search down)" { send -X search-forward-incremental '%%%' }
bind -T copy-mode-vi ? command-prompt -i -I "#{pane_search_string}" -p "(search up)" { send -X search-backward-incremental '%%%' }
%if "#{!=:$EDITOR,}"
set editor $EDITOR
bind -T copy-mode-vi C-f send-keys -X pipe-and-cancel 'xargs -I% tmux send-keys $EDITOR Space % Enter'
%endif

Which means in both case you can edit a command or a visual selection in your $EDITOR using ^f.
2025-08-21:

More importantly, though, feed readers put your subscriptions under your control. There’s no risk that the administrator of an RSS feed sells your details to spammers, or accidentally leaks them like the aforementioned world renowned expert on account information leaks, because there’s no administrator. If you decide you don’t want to see a particular feed any more, you just instruct your reader to stop fetching it. There’s no sending of mail or clicking of unsubscribe links. Nothing changes in the content creator’s system; they don’t even need to know it happened. — Really Simple Syndication

2025-08-21: No more Python or Bash or Javascript to fetch title or other metadata from Youtube link required if you have yt-dlp installed on your system:
img
2025-08-21: Recently I settled on glow and doxx. See also Terminal Trove.
2025-08-21: Mavericks Forever. This reminded me that I still have my old MacBook Pro from late 2013, which came with Mavericks pre-installed. I ended up my Apple journey with Mojave running on a Macbook 12”, which has always been my preferred version of OSX, and one of the best laptop I used to use over the years. Now the MBP is waiting for Ubuntu to upgrade thousand of packages (I haven’t used it for two years now) before I perform a do-release-upgrade.
2025-08-25: Tonight I updated my default colorscheme (quiet) in Neovim when I noticed there was a monochrome version. Since we cannot set t_Co in Neovim, I create a user colorscheme named morequiet using these specs only. I added a few tweaks for diff mode (I like the look’n feel of the quiet colors in this case) and TODO-like @comment.* identified by Treesitter. So far so good. #vim
2025-08-25: Everything Is Correlated. Great article, as always, full of historical references.
2025-08-25: Managing Local and Remote Filesystems with Vim and netrw. #vim
2025-08-27: I don’t use Cabal that often, and I manage almost everything with Stack. I accidently installed a package (bhoogle) that adds nothing to Hoogle, but there’s no cabal delete or cabal uninstall, you know. So I simply nuked the whole $HOME/.cabal directory that GHCup installed for me with an older version of Cabal. And now I can’t get it back. Instead, Cabal now follows the XDG Base Directory Specification, which means compiled stuff will end up in $HOME/.local/state. Let’s go for another env variable (CABAL_DIR) then. #haskell
2025-08-27: Now playing from Apple Music right into Tmux status line!
imgPut this script somewhere in your $PATH:

#!/bin/sh
unset title

title=$(osascript -e 'if application "Music" is running then' -e 'tell application "Music" to get name of current track' -e 'end if')
artist=$(osascript -e 'if application "Music" is running then' -e 'tell application "Music" to get artist of current track' -e 'end if')

if ${title+"true"}; then echo "$artist$title"; fi

If you don’t mind using the -e switch as your line separator; otherwise just write a .scpt file and load it directly.See this gist for a more elaborated solution that accounts for both Cmus and Apple Music.
2025-08-27: Rust Language Cheat Sheet. #rust
2025-08-28: A Flexible Minimalist Neovim for 2024. I wish people favor builtin stuff more often, as does the author here, rather than installing every single plugin available on GitHub. #vim
2025-08-29: While preparing a short tutorial on using Stack to manage Haskell projects, I noticed that my screenshots include drop shadow from macOS screenshot builtin app. I was reminded that the key is to ⇧⌘4, then press the Space bar as usual, but before clicking hold down the option () key. #apple

See Also

» Micro posting in July » Micro posting in June » Micro posting in May » Micro posting in March » Micro posting in February