This is a followup to the previous post about spinlocks. The gist of the previous post was that spinlocks has some pretty bad worst-case behaviors, and, for that reason, one shouldn’t blindly use a spinlock if using a sleeping mutex or avoiding blocking altogether is cumbersome.
I want a better shell.
There are exciting projects to improve data-processing capabilities of shells, like nushell. However, I personally don’t use this capability of shell a lot: 90% of commands I enter are simpler than some cmd | rg pattern.
I primarily use shell as a way to use my system, and it is these interactive capabilities that I find lacking. So I want something closer in spirit to notty.
I usually shy away from new syntax discussions, but this bit seems interesting to me.
A similar idea was discussed previously, but I think that post missed a rather crucial detail.
Add ?: (elvis) operator to Rus…
This is a short note about yet another way to look at Rust’s unsafe.
Today, an interesting bug was found in rustc, which made me aware just how useful unsafe is for making code maintainable. The story begins a couple of months ago, when I was casually browsing through recent pull requests for rust-lang/rust. I was probably waiting for my code to compile at that moment :] Anyway, a pull request caught my attention, and, while I was reading the diff, I noticed a usage of unsafe. It looked roughly like this:
One of my favorite blog posts about Rust is Things Rust Shipped Without by Graydon Hoare. To me, footguns that don’t exist in a language are usually more important than expressiveness. In this slightly philosophical essay, I want to tell about a missing Rust feature I especially like: constructors.
Over time I have accumulated a number of tricks and hacks that make “linux desktop” more natural for me. Today I’ve discovered another one: a way to minimize Firefox on close. This seems like a good occasion to write about things I’ve been doing!
I’ve spend years looking for a good tool to make slides. I’ve tried LaTeX Beamer, Google Docs, Slides.com and several reveal.js offsprings, but neither was satisfactory for me. Last year, I stumbled upon Asciidoctor.js PDF (which had like three GitHub starts at that moment), and it is perfect.