fzl.fish
I’ve been using the following fish alias fzl
(“fuzzy list”) to run fzf
(“fuzzy find”) in the current directory with a bat
preview. It’s just a couple of light tweaks to the examples listed in the fzf README
.
~/.config/fish/functions/fzl.fish
:
function fzl
# `bat` is aliased to `batcat` on Debian
if type -q batcat
set -f bat_command "batcat"
else
set -f bat_command "bat"
end
# Set the overall width of the `bat` preview to
# 50% the width of the current terminal
set -l bat_width $(math ceil $COLUMNS x 0.5)
# My preferred `bat` options
set -f bat_command \
$bat_command \
--style numbers \
--color always \
--italic-text always \
--wrap auto \
--terminal-width $bat_width
fzf \
--preview "$bat_command {}" \
--preview-window right,$bat_width,nowrap
end
Example below.
Learning Korean idioms with UNIX fortune
fortune is a classic UNIX program that displays random fortunes, pithy quotes, and the like:
$ fortune
If you think last Tuesday was a drag, wait till you see what happens tomorrow!
Today, I repurposed fortune (really fortune-mod) as a language study tool by scraping some Korean idioms from Wikiquote from Wikiquote):
$ fortune korean
“쇠귀에 경 읽기.”
아무리 좋은 말을 하면서 가르치려고 하여도 그 뜻을 제대로 헤아리지 못하는 사람을 두고 하는 말.
This one says “Chanting sutras into the ears of a cow,“ defined as “A phrase used when someone fails to understand what you are trying to teach them no matter how well you choose your words.”
I set fortune korean
(with some gentle text styling) as my fish greeting, so I can learn a new idiom every time I open a terminal—see below.
Applying the KISS principle to amp modeling
I’ve been playing electric guitar using only computer modeling software (without a physical amplifier) for about five years now. I started out with Garageband and Mainstage, then briefly experimented with Amplifikation Vermilion, and for the last year and half have turned to a free, open-source package called Guitarix and a small collection of impulse response files culled from guitar forums. In my experience, a good impulse response file fed into a basic convolver does a lot more for your sound than trying to optimize the countless parameters on an expensive simulator.
This year’s reading
A subset of the books I enjoyed this year:
- Barbara Kingsolver, The Poisonwood Bible, a novel about evangelical Christianity and cultural arrogance.
- 손원평, «아몬드», a novel debating whether or not emotions are a distraction.
- Walter Isaacson, The Codebreaker, a biography of biochemist Jennifer Doudna.
- Michael Lewis, The Undoing Project, a biography of behavioral economists Daniel Kahneman and Amos Tversky.
- 황보름, «어서 오세요, 휴남동 서점입니다», a slice-of-life novel about a bookstore owner overcoming the loneliness of urban life.
- Ayoko Sono, Ningen no Bunzai, a “collection of writings” (according to Wikipedia, and I cannot come up with a better description). I read the Korean translation «약간의 거리를 둔다» by 김욱.
- 김애란, «달려라, 아비», short stories about the legacy of childhood experience.
- Jia Tolentino, Trick Mirror, essays about identity, authenticity, and social media.
In progress:
- 김금희, «너무 한낮의 연애», short stories about people at the margins of society.
- David Foster Wallace, Infinite Jest.
Two truths and one lie
A puzzle based on the icebreaker game.
Two truths and one lie:
- I have a twin.
- I used a random number generator to decide whether to place a true or false statement in #1.
- I do not understand the rules of “two truths and one lie.”
Solution inside.