HN user

roylez

172 karma
Posts0
Comments66
View on HN
No posts found.

I recently find my solution to this on desktop Linux:

+ The machine has "Do not Disturb" on, forever.

+ My todo is a never ending text file. Every appointments are laid out on previous day with the following format:

  *- 09:00 do something*
+ There is a script that runs periodically that checks updates of my todo file, and creates systemd timers that will trigger "critical" level notifications that are not blocked by "Do not Disturb".
  *systemd-run --user --on-calendar="$trigger_time" --unit=$unit_name sh -c 'paplay "$1" && notify-send -u critical Appointment "$2"' _ "$SOUND" "$title"*

The ones that I use the most are designed to reduce context switching, like:

Mutt, personal wiki (fzf searching and neovim editing) and todo (a long never ending markdown file), they all have dedicated shortcut (cmd+m/cmd+z/cmd+d) to open(switch to) their window. These applications, always reside in the first tab with stack layout. For example, I can press cmd+m to switch to mutt (or open it), and press cmd+m again to switch back to the previously focused window.

Depending on which repl is running, I can usually open up vim to edit the line with the same cmd+e shortcut, which sends C-X C-E in bash/zsh, ESC O in iex, C-O in aichat ... Also vertical split in tmux and kitty tab share the same shortcut, cmd+|.

Kitty does not have a command palette, and I use fzf to search some of my frequently used operations and make this my command palette.

My kitty configuration has grown too much and I could hardly memorise all the customisations. I use its remote control heavily for my workflow. Before kitty, I usually use xterm or urxvt, which are still cool and fast but I cannot go back to the days without those terminal customisations.

I started by reading Michael LaFargue version, and it is pretty good delivering a basic understanding of the text. I can understand acient Chinese text pretty well, and the original, somehow still feels different from all these translations, but I guess this does not matter that much to a taoist.

The gameplay was too short, but still it was a better game than any Diablo releases later. I still remember the horror when confronting the Butcher for the first time. Butchers from later releases are all boring.

Later I learned to cheat by duplicating stuff with a pile of coins, and the difficulty of the game was lowered so much.

I thought about this a while back.

Virtual reality is still reality. The early internet that we experienced in 90s felt so different from real world, because it was a new media and real world powers had not yet expand their influence into it yet, but eventually they will. Censorship, speech control, propaganda, commercialization, etc and etc, everything will be there. To the point the new media/platform/reality becomes no different from outside world.

People are excited about VR technology recently. I am not. It would be the same damn story again.

Enterprises have different priorities from individual users who use Linux as a "daily driver". The last thing they would like to see is an upgrade disrupting their production, and many of them postpone upgrades unless required to. Enterprise Linux are expected to be predicable and companies like version numbers and golden images, and obviously a rolling release is not good at this. In short, Linux used by enterprises are treated as cattle that require minimum attention, but rolling release distros are like pets, which certainly are more delicate and fancy but at the same time require a lot more effort to care for.

There is no better or worse either way. Each distro has its own target audience. Arch is good as a personal work horse, but to charge money from enterprise users, LTS releases are needed.

Have you tried `ledger xact` command? This helps to create new transactions based on previous ones. I have a small wrapper[1] for this, namely "la", which enables me to do something like "la coles 5" to create a new transaction like previous supermarket transaction with the today as date, same from and to accounts, and $5 as amount. If I want to change something, it could be as complete as "la [YYYY.MM.DD/M.D/D] coles grocery 5 credit". If someone has tens of transactions per day it is very likely they are all similar and only little extra adjustment is needed.

Also I use a credit card for most of my expenses, and there are only a handful of bank transfers per month from my access account. Every first day of the month I pull out last month's credit card statement and log all the transactions. It usually takes less than 30 minutes.

[1] https://github.com/roylez/dotfiles/blob/master/misc/bin/la

ZSH Aliases 6 years ago

My personal favourite

alias -g NF='./*(oc[1])'

This points to the newest file/dir in my current dir, and it is very easy for me to untar a downloaded file and then cd into it without caring about the name of the file/dir.

tar xf NF; cd NF

This is good stuff and makes me rethink about one of my personal projects.

However, I have reserved opinion about the idea that a module should only access its direct children. More than often, I find modules interact with each other forming a loop, either by direct function calls or by message passing. If having to organize all modules into tree structure, I sometimes find it is hard to decide which modules should act as parents without introducing additional layers of abstraction. Also, what if I would like to pass a message from children to their parent? As according to the article, it is better to make children swappable and do not rely on parents' code, either direct calling parental functions or passing message to parent's pid looks bad, all I can think of is to use an event bus, which is extra complexity. Not to mention after so many abstractions module names could be too long to be clear.

Personally now I am good with parent, children, and siblings talking to each other, beyond these is probably too far. Not every module needs to be swappable, and too much abstraction makes stuff harder to understand and not always easier to maintain. Erlang thrived probably even before TDD was there with its "let it crash" philosophy. I do not mind not having 100% test coverage, as long as every crash scenario has been fixed along the way and possibly test guarded.

My experience is different here.

Every time when I am about to lose a streak, I would try hard not to be influenced emotionally, and would regard an opportunity to keep my ego in check. I have lost streaks many times, 50+ maybe three times, 100+ one time, and I still feel fine with myself.

Normally I would practice Duolingo in the morning before coffee everyday, like a ritual.