This is a valid RSS feed.
This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
help]
[<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Entropy</title><link>http://arusahni.net/</link><description>Aru Sahni's personal blog.</description><atom:link href="http://arusahni.net/blog/rss.xml" type="application/rss+xml" rel="self"></atom:link><language>en</language><lastBuildDate>Sat, 07 Jun 2025 13:53:51 GMT</lastBuildDate><generator>https://getnikola.com/</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Persisting a Default Kernel with systemd-boot</title><link>http://arusahni.net/blog/2025/05/systemd-boot-default-kernel.html</link><dc:creator>Aru Sahni</dc:creator><description><div><p>I use <a href="https://wiki.archlinux.org/title/Systemd-boot">systemd-boot</a> instead of
Grub. It's pretty barebones, which I like. It simply presents a boot menu and
then gets out of the way. Like other boot managers, it allows you to set the
default boot entry. I just need to set the <code>default=</code> key in
<code>/efi/loader/loader.conf</code> to reference one of the <code>.conf</code> files in
<code>/efi/loader/entries/</code> (e.g.,
<code>00000000000000000000000000000000-6.14.6-arch1-1.conf</code>). This setup works well.
However, in a rolling-release distro like Arch, where kernel packages are
frequently updated, there's an issue to address.</p>
<p>Arch provides two kernel packages: <code>linux</code>, which tracks the latest stable
kernel, and <code>linux-lts</code>, which tracks the latest LTS kernel version. Having the
LTS kernel installed simultaneously gives me a handy fallback if a new mainline
kernel makes it so I can't boot. The problem arises when updating <code>linux</code> or
<code>linux-lts</code> packages. The <code>.conf</code> filenames change, invalidating the <code>default=</code>
value. Ideally, I could make the default entry track either the mainline or LTS
kernels regardless of explicit version.</p>
<p>Well, I can! The <code>default=</code> field accepts patterns. So, instead of
<code>00000000000000000000000000000000-6.14.6-arch1-1.conf</code>, you can use
<code>00000000000000000000000000000000-*-arch?-?.conf</code> and, boom, you're always on
the latest stable version.</p>
<p>You may be wondering what the field <code>00000000000000000000000000000000</code>
represents - that's your <a href="https://www.freedesktop.org/software/systemd/man/latest/machine-id.html">machine
ID</a>.
It's a 32-character hexadecimal ID. You can see yours via <code>cat
/etc/machine-id</code>.</p></div></description><category>linux</category><guid>http://arusahni.net/blog/2025/05/systemd-boot-default-kernel.html</guid><pubDate>Sat, 07 Jun 2025 02:02:40 GMT</pubDate></item><item><title>Installing a Release Candidate Kernel in Arch Linux</title><link>http://arusahni.net/blog/2024/12/arch-rc-kernel.html</link><dc:creator>Aru Sahni</dc:creator><description><div><p>I recently received a shiny new Thinkpad for my shiny new job. I had the option
to select what I wanted from Lenovo (or Apple, but I dislike MacOS) and chose a
machine that wouldn't have the same issues <a href="http://arusahni.net/blog/2024/04/arch-crash-recovery-chroot.html">my other workstation
had</a>. I made it a point to avoid Intel
chipsets (due to webcam issues) and stayed far away from discrete Nvidia
graphics. I settled on a nice AMD Ryzen-based system. It had a very new
Qualcomm radio, but I saw people online saying that Wi-Fi and Bluetooth worked
fine. I took the plunge and selected that as my workstation.</p>
<p>It arrived, I popped in my live USB, and a few hours later, I had a fully
provisioned Arch Linux system. Wi-Fi worked fine, and I was able to scan for
Bluetooth devices. Success! Or was it?</p>
<p>The next morning, I sat down at my desk, clocked in, and grabbed my Bluetooth
headphones to listen to some morning tunes. I initiated pairing from the
headphones, selected them from my laptop's device list, and... nothing. It
timed out. I tried again, and again, and again, messing with timeouts and using
<code>bluetoothctl</code> to manually negotiate things, but no luck.</p>
<p><a href="http://arusahni.net/blog/2024/12/arch-rc-kernel.html">Read more…</a> (3 min remaining to read)</p></div></description><category>linux</category><guid>http://arusahni.net/blog/2024/12/arch-rc-kernel.html</guid><pubDate>Fri, 20 Dec 2024 01:33:03 GMT</pubDate></item><item><title>Repairing a Botched Arch Linux Kernel Upgrade</title><link>http://arusahni.net/blog/2024/04/arch-crash-recovery-chroot.html</link><dc:creator>Aru Sahni</dc:creator><description><div><p>I made the jump to Arch Linux on my personal and work computers a few years
ago. Ubuntu was a dependable experience, but a combination of issues with the
Debian way of life (slow progress) and Canonical's stewardship of the project
(e.g., Snaps) convinced me it was time to try another distribution.</p>
<p>It's been a great experience. Pacman is a wonderful package manager, and AUR is
everything I wanted PPAs to be. I get the latest versions of packages
(including the Linux kernel) shortly after they're released. Of course, that
isn't <em>always</em> a good thing, but rolling back to an older version is
straightforward.</p>
<p>I recently stubbed my toe in a way that's unique to Arch - my computer crashed
while I was in the middle of upgrading my kernel. What's great is I was able to
recover with only an hour or so of downtime. What happened?</p>
<p><a href="http://arusahni.net/blog/2024/04/arch-crash-recovery-chroot.html">Read more…</a> (5 min remaining to read)</p></div></description><category>linux</category><guid>http://arusahni.net/blog/2024/04/arch-crash-recovery-chroot.html</guid><pubDate>Sun, 07 Apr 2024 02:00:00 GMT</pubDate></item><item><title>Migrating my Neovim Config to Lua</title><link>http://arusahni.net/blog/2022/10/neovim-lua-config.html</link><dc:creator>Aru Sahni</dc:creator><description><div><p>I've been a happy <a href="https://neovim.io">Neovim</a> user for the past several years.
The pace of development, quality of the product, and energy of the community
have made it enjoyable to use. Recently, the project has introduced
<a href="https://en.wikipedia.org/wiki/Lua_(programming_language)">Lua</a> as a first-class
citizen in the editor. In places where you may otherwise be forced to wrangle
the mess that is VimL (aka Vimscript), you can instead use a saner, faster
scripting language.</p>
<p>I initially refrained from making the jump over to Lua as I held the ideal of
being able to return to Vim whenever I wanted. With the release of Vim version
8, which doubled down on VimL, I realized my folly. Vim wasn't going to
suddenly adopt the good parts of Neovim, nor was that community going to
change overnight. With that, I sat down one Saturday to get to porting. After a
few weeks of on-and-off experimentation (and exploring both /r/neovim and
GitHub to see how other people did things) , I landed on a stable, Lua-first
config that's been humming along for several weeks now.</p>
<p>Let's dive in!</p>
<p><a href="http://arusahni.net/blog/2022/10/neovim-lua-config.html">Read more…</a> (6 min remaining to read)</p></div></description><category>vim</category><guid>http://arusahni.net/blog/2022/10/neovim-lua-config.html</guid><pubDate>Sun, 20 Nov 2022 23:04:45 GMT</pubDate></item><item><title>How Git Checkout's Previous Branch Shortcut Works Under the Hood</title><link>http://arusahni.net/blog/2021/04/git-revisions.html</link><dc:creator>Aru Sahni</dc:creator><description><div><p>One piece of Git shorthand I use all the time is <code>git checkout -</code>. Much like
<code>cd -</code>, it references the previous item in your history. In the case of <code>cd</code>,
it will change your current directory to the previous one you were in. So,</p>
<pre class="code literal-block"><span class="nv">$ </span><span class="nb">echo</span> <span class="nv">$PWD</span>
/home/aru
<span class="nv">$ </span><span class="nb">cd </span>code/git-req
<span class="nv">$ </span><span class="nb">echo</span> <span class="nv">$PWD</span>
/home/aru/code/git-req
<span class="nv">$ </span><span class="nb">cd</span> -
~
<span class="nv">$ </span><span class="nb">echo</span> <span class="nv">$PWD</span>
/home/aru
</pre>
<p>Git has its own version of this:</p>
<pre class="code literal-block"><span class="nv">$ </span>git branch --show-current
master
<span class="nv">$ </span>git checkout my-new-feature
Switched to branch <span class="s1">'my-new-feature'</span>
Your branch is up to date with <span class="s1">'origin/my-new-feature'</span>.
<span class="nv">$ </span>git checkout -
Switched to branch <span class="s1">'master'</span>
Your branch is up to date with <span class="s1">'origin/master'</span>.
</pre>
<p>Handy! But how does it work? I poked through the files in <code>.git</code> (and even
watched the filesystem for changes, but nothing jumped out).</p>
<p><a href="http://arusahni.net/blog/2021/04/git-revisions.html">Read more…</a> (3 min remaining to read)</p></div></description><category>tech</category><guid>http://arusahni.net/blog/2021/04/git-revisions.html</guid><pubDate>Mon, 26 Apr 2021 22:02:51 GMT</pubDate></item><item><title>Elixir Development with Vim</title><link>http://arusahni.net/blog/2020/08/elixir-vim.html</link><dc:creator>Aru Sahni</dc:creator><description><div><p>I love Vim (more specifically, <a href="http://neovim.org">the NeoVim fork</a>). Modal
editing as part of my
<a href="https://sanctum.geek.nz/arabesque/unix-as-ide-introduction/">Unix IDE</a> brings
an immense amount of productivity and enjoyment to my day-to-day development
activities. As such, whenever I take up a new language or framework, I enjoy
experimenting with how best to integrate it into my existing workflow.</p>
<p>Having started programming in Elixir, I've started the customization journey
for the language. Much as with Maslow's Hierarchy of Needs, there's a
hierarchy of editor support required for an fulfilling programming experience.
Let's get there with Elixir!</p>
<p><a href="http://arusahni.net/blog/2020/08/elixir-vim.html">Read more…</a> (3 min remaining to read)</p></div></description><category>elixir</category><category>tech</category><category>vim</category><guid>http://arusahni.net/blog/2020/08/elixir-vim.html</guid><pubDate>Tue, 25 Aug 2020 17:41:20 GMT</pubDate></item><item><title>Kicking the Tires with Elixir, Part 1 - Pipes</title><link>http://arusahni.net/blog/2020/08/elxir-intro-01.html</link><dc:creator>Aru Sahni</dc:creator><description><div><p>Lately I've been playing with Elixir, a functional language that sits over
<a href="https://www.erlang.org/">Erlang</a> and
<a href="https://learnyousomeerlang.com/what-is-otp">the OTP framework</a>. It's exciting
because it handles embarrassingly scalable problems with aplomb, enabling a
high level of parallelism and concurrency with a great developer experience.
While I think Rust shines at the system programming level, Elixir seems like a
perfect candidate for web services - balancing power with ergonomics.</p>
<p>There are plenty of well-written posts about the language and its associated
libraries. I wanted to touch on what stood out to me as a Pythonista, web
developer, and nerd. I don't know how many posts will comprise the series, but
I have at least a few topics in mind.</p>
<p>First up: pipes.</p>
<p><a href="http://arusahni.net/blog/2020/08/elxir-intro-01.html">Read more…</a> (2 min remaining to read)</p></div></description><category>elixir</category><category>tech</category><guid>http://arusahni.net/blog/2020/08/elxir-intro-01.html</guid><pubDate>Wed, 12 Aug 2020 21:41:11 GMT</pubDate></item><item><title>Migrating from Gmail to Fastmail</title><link>http://arusahni.net/blog/2020/08/gmail-to-fastmail.html</link><dc:creator>Aru Sahni</dc:creator><description><div><p>In 2004, Google launched Gmail. This service changed everything. You didn't
have to worry about running over your few megabytes of quota - your storage
space was "unlimited" (with a ticker and everything)! Deletion was a thing of
the past, you now archive! Folders were so ninety-ninety-late, there
were labels! I got an invite within the first two weeks of it launching, and it
was good.</p>
<p>A decade or so later, Google launched Inbox, which brought innovations like
bundles, snoozing, highlights, pinning, sweeping, and smart filtering to the
deluge of email that flooded your account each day. I switched from Gmail to
Inbox, and it was better.</p>
<p>Then, in true Google fashion, it was sacrificed at the altar of project
mismanagement (or whatever the lack of product strategy is called). And it
was bad.</p>
<p>Since being forced back to Gmail, I've constantly lamented the death of a
service that made dealing with email less painful for me. Gmail is not only
without new innovation, but it's also slow; It regularly fails to load new
messages, or seemingly loses track of what it should be showing, necessitating
a hard refresh. Sure, Google has thrown a few bones at it, like smart replies,
but I respond to so few emails that spending a few seconds to formulate a
response has never been an issue.</p>
<p>Given these concerns, I realized that the "stickiness" of Gmail was gone.
I have the means to pay for service, and nothing is keeping me on Gmail
(other than the fact that everyone's been using my Gmail address for 16 years).
Leaving Gmail sounded doable, and I owned a personal domain on that I'd love to
use for email. The only question was: where do I go for hosting?</p>
<p><a href="http://arusahni.net/blog/2020/08/gmail-to-fastmail.html">Read more…</a> (4 min remaining to read)</p></div></description><category>tech</category><guid>http://arusahni.net/blog/2020/08/gmail-to-fastmail.html</guid><pubDate>Sun, 02 Aug 2020 21:47:35 GMT</pubDate></item><item><title>Optimizing Rust Binary Size</title><link>http://arusahni.net/blog/2020/03/optimizing-rust-binary-size.html</link><dc:creator>Aru Sahni</dc:creator><description><div><p>I develop and maintain a git extension called
<a href="https://arusahni.github.io/git-req/">git-req</a>. It enables developers to check
out pull requests from GitHub and GitLab by their number instead of branch
name. It initially started out as a bash script that invoked Python for harder
tasks (e.g., JSON parsing). It worked well enough, but I wanted to add
functionality that would have been painful to implement in bash. Additionally,
one of my goals was to make it as portable as possible, and requiring a Python
distribution be available flew against that. That meant that I needed to
distribute this as a binary instead of a script, so I set about finding a
programming language to use. After surveying what was available, and
determining what would be the best addition to my toolbox, <a href="https://www.rust-lang.org/">I selected
Rust</a>.</p>
<p>The programming language has a steep learning curve, but has been fun to learn
and immerse myself within. The community is great, and I'm excited to find
more opportunities to use Rust in the future.</p>
<p>The rewrite took a while to accomplish, but when all was said and done,
everything worked, and worked well. I was able to implement some snazzy new
features as well as polish some rough edges. However, for how "simple" I felt
the underlying program to be, it clocked in at 13 megabytes. That felt like a
lot. So, I decided to see what could be done.</p>
<p><a href="http://arusahni.net/blog/2020/03/optimizing-rust-binary-size.html">Read more…</a> (5 min remaining to read)</p></div></description><category>code</category><category>rust</category><guid>http://arusahni.net/blog/2020/03/optimizing-rust-binary-size.html</guid><pubDate>Tue, 31 Mar 2020 00:00:05 GMT</pubDate></item><item><title>Elasticsearch Frustration: The Curious Query</title><link>http://arusahni.net/blog/2017/04/elasticsearch-frustration.html</link><dc:creator>Aru Sahni</dc:creator><description><div><p>Last year I was poking at an Elasticsearch cluster to review the indexed data
and verify that things were healthy. It was all good until I stumbled upon this
weird document:</p>
<pre class="code javascript"><a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-1"></a><span class="p">{</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-2"></a> <span class="s2">"_version"</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-3"></a> <span class="s2">"_index"</span><span class="o">:</span> <span class="s2">"events"</span><span class="p">,</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-4"></a> <span class="s2">"_type"</span><span class="o">:</span> <span class="s2">"event"</span><span class="p">,</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-5"></a> <span class="s2">"_id"</span><span class="o">:</span> <span class="s2">"_query"</span><span class="p">,</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-6"></a> <span class="s2">"_score"</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-7"></a> <span class="s2">"_source"</span><span class="o">:</span> <span class="p">{</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-8"></a> <span class="s2">"query"</span><span class="o">:</span> <span class="p">{</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-9"></a> <span class="s2">"bool"</span><span class="o">:</span> <span class="p">{</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-10"></a> <span class="s2">"must"</span><span class="o">:</span> <span class="p">[</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-11"></a> <span class="p">{</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-12"></a> <span class="s2">"range"</span><span class="o">:</span> <span class="p">{</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-13"></a> <span class="s2">"date_created"</span><span class="o">:</span> <span class="p">{</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-14"></a> <span class="s2">"gte"</span><span class="o">:</span> <span class="s2">"2016-01-01"</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-15"></a> <span class="p">}</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-16"></a> <span class="p">}</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-17"></a> <span class="p">}</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-18"></a> <span class="p">]</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-19"></a> <span class="p">}</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-20"></a> <span class="p">}</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-21"></a> <span class="p">}</span>
<a name="rest_code_3814aff0c34b44b7b018cbf67463a7b7-22"></a><span class="p">}</span>
</pre><p>It may not be immediately obvious what's going on in the above snippet.
Instead of a valid <code>event</code> document, there's a document with a query as
the contents. Additionally, the document ID appears to be <code>_query</code>
instead of the expected GUID. The combination of these two irregularities makes
it seem as if someone accidentally posted a query to the wrong endpoint. No
problem, just delete the document, right?</p>
<pre class="code text"><a name="rest_code_234788fd6e054f2fbde1a47c78d4131c-1"></a>DELETE /events/event/_query
<a name="rest_code_234788fd6e054f2fbde1a47c78d4131c-2"></a>ActionRequestValidationException[Validation Failed: 1: source is missing;]
</pre><p>Wat.</p>
<p><a href="http://arusahni.net/blog/2017/04/elasticsearch-frustration.html">Read more…</a> (1 min remaining to read)</p></div></description><category>elasticsearch</category><category>tech</category><guid>http://arusahni.net/blog/2017/04/elasticsearch-frustration.html</guid><pubDate>Sun, 23 Apr 2017 20:23:28 GMT</pubDate></item></channel></rss>
If you would like to create a banner that links to this page (i.e. this validation result), do the following:
Download the "valid RSS" banner.
Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)
Add this HTML to your page (change the image src
attribute if necessary):
If you would like to create a text link instead, here is the URL you can use:
http://www.feedvalidator.org/check.cgi?url=http%3A//arusahni.net/blog/rss.xml