💾 Archived View for ayushnix.com › microgemlog captured on 2024-03-21 at 14:59:23. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-08)

🚧 View Differences

-=-=-=-=-=-=-

MicroGemlog

A Long Break and Learning Programming

I know, it's been too long since I made a post on this microblog. I won't say I'm not at fault but there were a few reasons why I stopped posting.

First, I have become increasingly disenchanted with using Markdown (and its various incompatible dialects) as my primary mode of documentation. I know the treesitter parser I was using in neovim at the time has probably been improved now but for better or worse, I'm no longer interested in writing Markdown. This makes the theme this microblog uses, kangae, an abandoned project which will not be developed anymore.

my microblog about frustrations with Markdown

kangae, a theme for the zola static site generator

Second, I became interested in the idea of moving my (infrequent) microblog posts to the Fediverse and I started interacting with people on it. However, I noticed that my replies often get ignored by some people. I'm not sure what's wrong and I no longer care to ask. I'm not the kind of person who would troll others or talk in bad faith. I realized that writing posts on my own website, something which I own, is still important and sometimes better, even if no one reads it. This is one of the reasons I started posting (infrequently) on my gemini website. I plan to make both HTTP and gemini versions of my website in the near future.

My Fediverse Account

My gemini Website

Third, I have been working on some personal workflow optimizations which aren't worth talking about unless they're finished but many of them aren't. For example, after successfully building my ZFS NAS on my desktop, I decided to organize my music library containing mostly FLACs using the software beets. However, using beets turned out to be an infuriating experience to the point that I started questioning myself about what the hell I've been doing since the past 5 years. Why can't I fix obvious flaws and issues when I encounter them in projects, flaws that other people seemingly don't give a shit about? Why do these flaws become showstoppers and productivity killers? Why can't I simply go into full NIH mode and make something of my own rather than expecting others to do something for me?

beets

I've decided that I've had enough of becoming frustrated whenever I encounter these roadblocks. I've started teaching myself how to write code and I've begun with the book Simply Scheme by Brian Harvey and Matthew Wright. I'll follow it up with Structure and Interpretation of Computer Programs. I know, it'll take some time for me to become compentent enough but I'm patient and can put stuff on hold until I can do it right. And I won't quit this time.

Simply Scheme by Brian Harvey and Matthew Wright

Structure and Interpretation of Computer Programs

Thank you beets, for making me frustrated enough to question myself and for making me go down this path.

---

Created: 2024-02-19

Permalink

Unable To Switch to ColemakDH

I tried switching to Colemak-DH but it turns out that it's too painful to discard decades of muscle memory. I went from 80 words per minute to less than 10 words per minute for 2 days after switching to Colemak-DH. I'm not sure if you've ever experienced something like this but it feels as if your hands have suffered partial paralysis. The last time something like this happened to me was when I switched from a traditional staggered keyboard to my Moonlander, an ortholinear split ergonomic keyboard. I went from approximately 100 words per minute to less than 15 for almost a week. Why did I do it? Mostly because I wanted a more comfortable typing experience and I'd say that I was successful in seeking that from my Moonlander.

The Moonlander Keyboard

After switching to Colemak-DH, I didn't really like the new positions of the H, J, K, and L keys because I've used vi, vim, and neovim for almost a decade now and the relocation of these keys made life ... extremely difficult, to say the least. I use the same keys for navigation on sway and my terminal file manager, lf.

SwayWM, a Wayland Compositor

lf, a terminal file manager

There's lots of content on YouTube about how alternative keyboard layouts are a godsend and how outdated and inefficient QWERTY is. One of the videos that stands out to me is from the channel JellyOsaurus titled "Do Not Switch to Colemak (from a Colemak User)".

Do Not Switch to Colemak (from a Colemak User)

Do I still plan on switching away from QWERTY? Perhaps. In the short time that I used Colemak-DH, I realized that it would definitely be a more comfortable typing experience, assuming I could have the same typing speed (approximately 80 words per minute) that I have right now. I guess it'd be easier to start using Colemak-DH rather than QWERTY as a kid but in any other case, the transition will definitely be painful. The issue of using neovim keybindings still remains though. I'll need to either find out or design a custom keyboard layout that retains the neovim navigation keys and changes as few keys as possible. I guess I'll start with moving just a single key and gradually change other keys as well. This idea comes from the Minimak keyboard layout.

Minimak Keyboard Layout

---

Updated: 2023-09-05

Created: 2023-09-04

Permalink

Writing Ansible Playbooks Is Tedious

This might sound insane but I bought a new desktop back in October 2022 and I haven't been able to set it up since then. Although I was dealing with some personal issues till the end of February 2023, I could've set up my desktop the usual way (write and execute the usual commands like a boring sysadmin) after February 2023 but I decided that I would use this opportunity to learn how to use Ansible. I didn't really start writing Ansible playbooks after that though and my desktop ate dust for several months.

I started learning Ansible in the beginning of August 2023 and since then, I haven't finished installing and configuring my desktop. I recently finished writing roles to install Arch Linux on my desktop with the caveat that the LUKS community module doesn't support detached headers so I created a LUKS container manually. I want to submit a patch to add support for detached headers in "community.crypto.luks_device" in the near future when I'm comfortable with Python.

the community.crypto.luks_device Ansible module

I hope that writing these playbooks will help me build a (somewhat) declarative configuration for installing and configuring Arch Linux, and possibly Alpine and Chimera Linux in the future, but writing YAML for Ansible feels tedious as hell. I've been vomiting YAML since the past few weeks and it feels like I'm spending too much time on it.

Alpine Linux

Chimera Linux

Sure, there's NixOS but that's an entirely different can of worms that I don't want to open unless there are major changes focused toward:

NixOS

I've come across alternative configuration formats like CUE and Dhall and I was wondering if they could reduce the tediousness of writing YAML for Ansible. Consider role argument validation, a feature added in Ansible 2.11, which seems like a great idea but the amount of YAML that you may need to write for it will probably seem annoying. Would it be necessary if we used something like CUE or Dhall?

CUE Lang

Dhall Lang

---

Created: 2023-08-29

Permalink

Moving Back To GrapheneOS and Buying and iPhone

A lot has happened since I wrote a microblog post. I moved back to GrapheneOS after missing the feature to disable network access from applications on Android. I was using a Pixel 4a and although it's a great phone, its performance wasn't really great and its battery life took a turn for the worse after several years of usage. I became increasingly frustrated by the lack of small form factor smartphones on the market and in a moment of temptation and annoyance, I went ahead and bought a 3rd generation iPhone SE.

To be fair, it's a decent phone and I really like

Unfortunately, and unsurprisingly, I didn't end up liking how iOS is a closed walled garden ecosystem. I can't use Firefox with uBlock Origin, apps like NewPipe and Tachiyomi, and can't turn off network access from apps.

I'll probably buy a Pixel 8 and move back to GrapheneOS in a few months.

---

Created: 2023-08-15

Permalink

Moving Back To Stock Android From GrapheneOS

Of all the things that could've made using GrapheneOS a deal breaker for me, I didn't expect that the absence of Digital Wellbeing would be it. Unsurprisingly, it isn't a part of AOSP (Android Open Source Project) and GrapheneOS has refused to add it. I tried installing the APK (Android Package) file of this app but that didn't really work as expected.

GrapheneOS

Digital Wellbeing

GrapheneOS' refusal to add Digital Wellbeing

I know it's kinda ironic that the absence of a digital wellness app made by Google would make me switch back to the stock Pixel ROM but this app helped me become less interested in my smartphone and enabled me to focus on my work without being interrupted. I used the Focus Mode feature to pause most apps and turn off all notifications at a specified time. I also used the Focus Mode quick tile to turn it on at unscheduled times. When Focus Mode was on, the opacity of the paused app icons was also lowered. I could also temporarily turn off Focus Mode when I took a short break and then turn it back on. Unfortunately, since I've installed GrapheneOS, I haven't been able to focus on my work or be productive during my work sessions.

I tried using the Do Not Disturb Schedules, ActionDash, and a few other alternatives but none of them do what I want. No, I don't want to use Do Not Disturb for this. I still want to receive calls but no notifications. I don't want to change the Do Not Disturb settings every time to simulate Focus Mode and the actual Do Not Disturb Mode. It's a pity that I have to go back because one of the things I really liked about GrapheneOS was the ability to restrict network access in apps.

---

Created: 2022-09-08

Permalink

GNU Make and bmake

I was trying to create a Makefile for a personal project when I recalled that bmake exists, a portable version of make from NetBSD. bmake seems quite similar to OpenBSD's make as well. I was interested in making my Makefile portable and compatible with both GNU Make and bmake but I quickly ran into a roadblock.

bmake

OpenBSD make man page

GNU Make uses "$^" as an automatic variable to expand into the list of all prerequisites (sometimes called dependencies or sources) provided to a target but bmake uses "{body}gt;" to do the same thing. Here's a simple Makefile.

myfile: file1 file2
	cat file1 file2 > myfile

automatic variables in GNU Make

The second line of this Makefile can be rewritten as "cat $^ > $@" for GNU Make. However, it needs to be written as "cat {body}gt; > $@" for bmake. "$@" is the name of the target, which is myfile.

It looks like I can either

Am I missing something?

---

Created: 2022-09-08

Permalink

Don't Use Font Weight Less Than 400

As I'm working on a CSS side project which has ended up taking more of my time than I would've liked, I frequently come across blogs where website authors use "font-weight" values less than 400 on some HTML elements.

I don't claim to be an expert myself but maybe a blog post that talks about accessibility shouldn't assume that a user will definitely download a web font that makes headings look fine at a font weight of 100, which is extremely unusual, to say the least?

"<h2>" element with a "font-weight" of 100

I mean, the value of "font-family" should have a fallback value like "sans-serif" for a reason — to use system fonts in case web fonts are not loaded. Even if a user doesn't block web fonts like I do, Flash of Unstyled Text (FOUT) is a possibility that should be considered when using web fonts, assuming the website author has chosen not to completely hide text until a web font loads, which sounds worse. If FOUT happens, unstyled text should, at the very least, be reasonably similar to the web font in question. I don't think any system font is going to look usable at a "font-weight" value of 100.

Flash of Unstyled Text

Please stop using "font-weight" lesser than 400 on your websites, unless there's an excellent reason.

---

Created: 2022-09-04

Permalink

Promoting Web Browser Monoculture

It's interesting to notice that some people actually argue in favor of web browser engine monoculture on a certain popular forum. The arguments in favor were that a web browser monoculture favors "rapid innovation" and introduction of "actual features" rather than "wasting time on interop".

The Certain Popular Forum

Is "rapid innovation" worth it if people have no privacy while they browse the web? Is it worth it if we're bombarded by targeted advertising and tracked by a feature that's actually called "Privacy Sandbox"? It doesn't just waste time and data which, believe it or not, is still a precious resource for many people, it also damages people psychologically. The days of efficient and effective ad blocking are numbered in Chrome and many other Chromium derived web browsers and for those who don't like this scenario, there's Firefox. But hey, I guess some people care more about "rapid innovation" than mental peace and sanity while browsing the modern web.

An article by ArsTechnica on Google's Privacy Sandbox

Content blockers and Chrome's Manifest V3

I guess I empathize with people who're creating protocols like Gemini to try and create a niche for themselves in the face of this authoritarian centralization.

The Gemini Protocol

---

Created: 2022-08-21

Permalink

Fixing OCSP Must Staple Error on Firefox

I have enabled OCSP Must-Staple on my TLS certificates that I get from Let's Encrypt for my internal LuCI web portal for my OpenWrt router. However, I've been unable to access this website for the past few months on Firefox. Considering this is an internal website, I didn't think much about it, especially because it was working fine on Chromium.

OCSP Must-Staple

LuCI Web Portal on OpenWrt

I was browsing a thread on Lobsters when I came across a comment with the same issue. For some reason, I remembered that OCSP responses need to be fetched by the server. In my case, I'm running LuCI on nginx.

A comment on Lobste.rs with similar issue

I installed AdGuard Home on a RaspberryPi 4B a few months ago and created some firewall rules in my router to intercept all DNS plaintext traffic and redirect it to my RaspberryPi. I went back to my nginx configuration on my router and realized that I had set option resolver to a public DNS IP. Once I changed the value to my RaspberryPi's IP, Firefox was able to open my LuCI website as expected.

AdGuard Home

Looks like no major web browser except Firefox honors OCSP Must-Staple which is why my website kept on working on Chromium. There was an issue open about this on the Chromium issue tracker but it has been closed with the WONTFIX status. Interestingly, the Chromium project has mentioned in their Chrome Security FAQ document that "Stapled OCSP with the Must Staple option (hard-fail if a valid OCSP response is not stapled to the certificate) is a much better solution to the revocation problem than non-stapled OCSP."

Chromium refused to honor OCSP Must-Staple

Why Chromium doesn't support OCSP Must-Staple

(ノ_<。)

---

Created: 2022-06-26

Permalink

Footnotes Are Annoying

I've always found footnotes in blogs and wikis to be annoying but I wasn't aware of a better alternative. I discovered Chris Morgan's blog several months ago and the first thing that I really liked about his website were sidenotes instead of footnotes. Instead of jumping to the end of the page by clicking a link and then jumping back (approximately) to where you were before, sidenotes are simply present either on the left or right side of the body text. You don't need to click anywhere, you don't need to adjust to the disorienting page jumps, you can read the sidenote and carry on.

Chris Morgan's Blog

I'm working on creating my own blog and my own wiki using the Zola static site generator. A microblog doesn't need sidenotes but a blog and a wiki does. If you're interested in using sidenotes on your website instead of footnotes, there's an extremely helpful blog post by Gwern Branwen called Sidenotes In Web Design.

Zola Static Site Generator

Sidenotes in Web Design by Gwern

---

Created: 2022-06-26

Permalink

Voting On Internet Forums Considered Harmful

Reply to "Better vote-enabled forums" by Seirdy and "On votes, and Indieweb forums" by Florian Maury

Better vote-enabled forums by Seirdy

Seirdy's Website

On votes, and Indieweb forums by Florian Maury

Florian Maury's Website

I don't consider voting systems on online forums to be an effective tool to promote meaningful discussions. A voting system assumes that collective populations of humans are capable of objective judgement which would ultimately outweigh judgement clouded by prejudice. Nobody is free from prejudice and I would include myself in that categorization. This inherent prejudice leads to the formation of filter bubbles where prevailing popular opinions are made more popular and unpopular opinions are made obscure. Florian has expressed similar ideas in this post on lemmy.ml.

Should scores be hidden by default?

Yet, from what I observe, the tool is mostly used for communities to self-administer filter bubble. Some communities seem to behave like a hive mind, massively upvoting or downvoting until either the dissident is assimilated in a very Borg way, or excommunicated. — Florian Maury (@X_Cli@lemmy.ml)

I don't remember if I read about this somewhere or if it's an original thought but it's been on my mind for quite some time now. I think voting systems should be completely removed, including upvotes and downvotes. The typical sorting methods on Lemmy and on Reddit — Hot, Top, New, Old — should be removed as well. These flawed methods should be replaced by randomized sorting of both posts and comments on a post on each page reload for each individual user.

When it comes to post discovery, forum admins can decide the duration that a post is visible on the first page containing n number of posts. Until that duration expires, the order of the posts should be randomly sorted for each individual on each page reload. When it comes to comments, each top level comment, while maintaining the level of its direct child comments, should be randomly sorted on each page reload. The order of the 2nd level child comments, while maintaining the level of their own child comments, should be randomly sorted as well. If this is confusing to understand, I can summarize by saying that the structure and the level of comment trees should be preserved but their order should be randomized.

This will ensure that popular opinions don't appear at the top of the page and unpopular opinions aren't made obscure. It also incentivizes people to actively seek out quality comments rather than just skimming the top level comments. What about posts and comments that are spam, low quality, or just low effort? The flagging system should be retained and anyone can flag a post or a comment provided a reason is mentioned. Of course, to prevent unnecessary flagging, the username should be sent to the forum admins so that they can judge if the flag was legitimate and appropriate.

---

Created: 2022-06-17

Permalink

Eliminate Layout Shift Due To Scrollbar - Part 2

I wrote about using scrollbar-gutter to eliminate layout shift when browsing across pages that may or may not need a vertical scrollbar. I was, however, avoiding using it because Safari doesn't support it yet. Well, that's not necessary anymore because today I learned about @supports in CSS. Here's a piece of code that should probably be part of all popular CSS reset/normalize projects.

my earlier post about layout shift due to scrollbar

Safari and @supports

html {
  overflow-y: scroll;
}

@supports (scrollbar-gutter: stable both-edges) {
  html {
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
  }
}

If you don't care about symmetry, you can remove "both-edges".

---

Created: 2022-06-11

Permalink

The Problem With Dark Mode

I've often felt that the WCAG 2.0 guidelines for colors don't make sense when choosing colors for dark mode but I couldn't articulate my issues until I found a twitter thread by Adam Wathan a few weeks ago. I discovered WCAG 3.0 APCA while creating the theme for this website and I assumed that maybe APCA will finally solve the issue of terrible dark mode colors on websites. I was wrong.

A post showcasing flawed contrast ratio calculations

I really hope we see some new research come out around calculating contrast ratios soon because I'm seriously unconvinced that the formulas we follow today are actually creating the best results for users. Current guidelines say you should be using black text on this button:

the image showcasing issues in contrast ratio calculation

I don't mean to disparage anyone but I was browsing Wolfgang Müller's blog looking for inspiration to create my own blog. I tried reading one of the articles on his blog in dark mode but couldn't continue after a few lines because of the uncomfortably high contrast. The white text started causing halation in my eyes. Sure enough, f0f0f0 as the text color and 000000 as the background color passes both WCAG 2.0 and WCAG 3.0 APCA. I'm pretty comfortable with the OneDark colors in my terminal so I've used them for the dark mode on this website as well. Unfortunately, abb2bf as the text color and 282c34 as the background color fails WCAG 2.0 AAA and scores a 0 rating in WCAG 3.0 APCA, for body text at 18px font size with the font weight set to 400.

Wolfgang Müller's Blog

I don't mean to imply that my choice of colors is better for everyone compared to white text on a black background but it is certainly better for me. At this point, either web browsers should provide an easy switch to temporarily change the value of prefers-color-scheme for a specific website or website owners should bite the bullet, use JavaScript, and provide a switch to let the reader change prefers-color-scheme themselves. The best solution I've come across to solve this issue is providing multiple theme options in a dropdown menu like mdbook does, although this option is probably reprehensible to some folks (cough GNOME cough). No, using Dark Reader isn't an option for me because of significant perfomance issues.

mdBook

---

Created: 2022-05-26

Permalink

Improving Sway PKGBUILD For Arch Linux

The PKGBUILD file for the sway wayland compositor on Arch Linux had a hard dependency on polkit which didn't really make sense because sway doesn't depend on polkit. However, systemd does depend on polkit to provide access to seat hardware devices and the user session to sway. The alternative is using seatd, a lightweight seat and session management daemon that can act as a replacement of systemd-logind for this specific task.

seatd

I raised a bug report on the Arch Linux bugtracker and Brett Cornwall made several improvements to the sway PKGBUILD since sway 1:1.7-2 was released. I also updated the Arch Linux wiki to highlight these changes.

bug report on Arch Linux to use seatd

replacing polkit with seatd for sway in Arch Linux

Updated Arch Linux wiki page on Sway

If you're using Arch Linux and sway, you can now uninstall polkit and use seatd which should already be installed.

---

Created: 2022-05-21

Permalink

Generating HTML-only Twitter and Mastodon Posts

There's this thing called oEmbed which advises using iframes to embed content posts. The problem is that on a static website such as this, iframes seem like an abomination. I wanted to retrieve a tweet or a toot in its HTML form and add it to my post.

A few hours of reading API docs of Twitter and Mastodon and writing messy shell script code and here's the result

"Aha! This is exactly what I was talking about!"
(Article has nothing to do with what he was talking about)
Remember folks, random clickbait YouTubers are not a reliable source of technology information. https://t.co/wThF0VdrFt
— Hector Martin (@marcan42) May 14, 2022

my messy shell script code to post toots from a shell

Here's a toot from mastodon

Work-in-progress book on Linux kernel internals by 0xAX https://github.com/0xAX/linux-insides/blob/master/SUMMARY.md
#linux #kernel #linuxkernel
- BayLibre (@baylibre@fosstodon.org) May 16, 2022

Oh, the script also helps crosspost this post to Mastodon. Maybe I'll add the Twitter and Mastodon icons near the blockquote to showcase the embeds.

All that's left is to somehow add a 'discuss on mastodon' link which points to the crossposted mastodon toot although I'm not sure if that's possible because of the context limitations of Tera templating engine.

EDIT: After receiving a suggestion on Mastodon, I updated the toot generation code to mention the name of the mastodon instance as well. The URL that the date in the toot points to has been updated to point to the actual instance rather than the instance I'm copying links from.

---

Created: 2022-05-21

Permalink

Absence of Decent Terminal File Manager

I quit using GUI file managers on Linux ever since I found ranger more than 5 years ago. However, ranger is written in Python and it's noticeably slower than alternatives like lf, which is what I've been using for the better part of the year. Unfortunately, using lf has become a source of surprise and frustration due to this bug. This bug was noticeable in r26 but has made lf unusable in r27. I don't know why but I got turned off looking at joshuto's home page. nnn has made some design decisions which I despise with a passion, heavy use of environment variables being one of them.

ranger

lf

a bug when using lf

joshuto

nnn

I'll go ahead and use xplr for now but in my opinion, the lack of dual panes (or better yet, miller columns) in a terminal file manager is a fundamental flaw. You end up wasting time going in and out of directories and files you may not want to rather than glancing over their contents in a preview pane. If there are no better ranger-like terminal file managers available in the near future, I'll probably create my own.

xplr

---

Created: 2022-05-21

Permalink

Absent Right Padding In Firefox

I'm not entirely sure why this is happening but if I use overflow-x: auto; for the pre and code elements, Firefox ignores the padding on the right side of the code block if the content inside code overflows horizontally. Chromium does not seem to have this issue.

I found this discussion on GitHub going all the way back to 2016.

csswg-drafts: clarify padding in overflow content

---

Created: 2022-05-21

Permalink

Published My Microblog Theme

After several weeks of learning HTML and CSS, I've finally published my first frontend project, the kangae microblog theme for the zola static site generator. I'm not a web developer and I don't intend to be one either. However, I really wanted to learn HTML and CSS and create my own blog and websites. Plus, I also learned how to use jinja templates (technically, tera templates although they're pretty similar).

kangae microblog theme for zola

Go ahead and use kangae to create your own microblog website. Optionally, raise a pull-request in the kangae git repository if you want to showcase your own website.

---

Created: 2022-05-21

Permalink

Eliminate Layout Shift Due To Scrollbar

I've noticed this issue before on many websites, including GitHub. If you have a web page open with a scrollbar and go to another web page on the same website without a scrollbar, layout shift happens. I think we can safely agree that layout shift is annoying as fuck and should never happen. The popular solution to this fix this problem seems to be

html {
  overflow-y: scroll;
}

This will always show a scrollbar, even if it isn't required. There are some hacks with viewport units as well. However, the "proper" solution to this issue is

html {
  scrollbar-gutter: stable both-edges;
}

hacks with viewport units

Unsurprisingly, as of 2022-04-28, Safari doesn't support this. Oh well,

¯\_(ツ)_/¯ .

---

Created: 2022-05-21

Permalink

Markdown Is A Necessary Evil

Markdown, no matter what the specification is, is a deceptively simple markup language to understand and write documentation with. I've written my entire personal wiki using markdown because that's what mkdocs uses. However, it's apparently a shitty markup language for anyone who wants to parse it or develop a parser for it. A blog post by Eric Holscher and a blog post on undeadly provide more details on why markdown is a shitty language for a developer. Here's another forum discussion about possible ideas to reduce ambiguities in CommonMark. Perhaps this is why the treesitter parser for markdown slows down neovim to a crawl to the point where writing documentation is no longer fun. Oh, and this parser was merged after another markdown parser kept crashing neovim.

mkdocs static site generator

don't use markdown for technical docs

a blog post by Peter Hansteen about Markdown being abominable

Beyond Markdown by John McFarlene

a tree-sitter parser for CommonMark

a tree-sitter parser crashing neovim

Alternatives? Unfortunately, I don't think there are any decent alternatives. A blog post by Karl Voit convinced me about Org Mode being a reasonable markup language but, as expected, there's no ecosystem for Org Mode outside Emacs. Maybe I can write articles in Org Mode but convert them into markdown before using them? Maybe neorg or orgmode.nvim can work?

a blog post by Karl Voit about using orgmode as a markup language

neorg

orgmode.nvim

---

Created: 2022-05-21

Permalink

Successful Recovery of EAP225

I tried to solder the pads and the resistors in the EAP225 myself but things didn't work out as expected. A friend suggested that I should get the soldering done from a local electronics repair shop. I had almost given up on recovering my access point but the guy in the repair shop I visited finished soldering pretty quickly. I installed picocom, gained access inside my router, uploaded a vanilla sysupgrade image using the HTTP server built into python, and flashed it. PaulFertser from the #openwrt IRC channel on OFTC helped me out a lot during this process. Thanks Paul!

picocom

Will I build custom images for my OpenWrt devices after this experience? I probably won't mess around with custom images if the device in question doesn't provide easy access to the serial console or doesn't have a recovery mode like the EAP225. However, the original problem that got me started down this path is still present. Yeah, sysupgrade is still painful.

---

Created: 2022-05-21

Permalink

Bricked TP-Link EAP225 v3 WiFi Access Point

While trying to make OpenWrt sysupgrades easier, I started experimenting with the OpenWrt imagebuilder program, which is really just a bunch of scripts and a giant Makefile. Unfortunately, my AP didn't boot properly after I flashed a custom image on it. I tried to go into failsafe mode but encountered a bug where openssh-server fails in failsafe mode. Turns out, the bootloader of my EAP225 doesn't have a HTTP server or a TFTP recovery mode, unlike EAP245. I realized that my AP is soft-bricked.

openssh-server fails to start in failsafe mode

My older self would have complained about this but I've realized that the OpenBSD motto of "shut up and hack" applies when you're using open source software in a way that mere mortals aren't supposed to. Looks like I may need to learn how to solder and use the serial console to install OpenWrt.

---

Created: 2022-05-21

Permalink

Building Custom OpenWrt Images

I've been using OpenWrt on my routers for several years at this point but one of the things that has always bothered me is sysupgrades. A typical sysupgrade will always be a fresh installation and although you can restore your packages and configuration, this isn't an automatic process.

I started creating a script to make sysupgrades less painful but then I discovered OpenWrt image builder. There's also OpenWrt buildroot, which is basically compiling the entire project from scratch and the SDK which can be used to compile OpenWrt for a specific target.

OpenWrt image builder

OpenWrt buildroot

OpenWrt SDK

The image builder should hopefully make OpenWrt sysupgrades pretty smooth. In my opinion, if you install a few packages or make significant configuration changes on your OpenWrt installation, you should probably create custom images using the image builder.

---

Created: 2022-05-21

Permalink

cargo-update Is Slow, Doesn't Respect XDG

I tried to install greetd from the Arch AUR but, suprisingly, a cargo registry update started happening at less than 100Kbps on my 200Mbps fiber connection. I waited for a few minutes hoping that the speed might improve but that didn't happen. It seems this is a known issue. Okay, I guess I just need to create a config file for cargo and tell it use to "git-fetch-with-cli = true". Wait, it seems like cargo is dumping all of its crap inside "~/.cargo"? You can change the location of this directory with the "$CARGO_HOME" environment variable but does it really make sense to dump this data in "$XDG_CONFIG_HOME"? "$XDG_DATA_HOME"? This issue has been open for more than 5 years now.

greetd

known issue about cargo-update being exceedingly slow

I guess I'll just set "$CARGO_HOME" to "$(mktemp -d)" for now. If you want to compile a rust software on your system, you may need this in "$CARGO_HOME/config.toml"

[net]
git-fetch-with-cli = true

[source.crates-io]
registry = "git://github.com/rust-lang/crates.io-index.git"

---

Created: 2022-05-21

Permalink

Enterprise Business Class TP-Link EAP 225

I bought the TP-Link EAP225 v3 access point a few years ago to extend my WiFi range. At the time I bought this device, official OpenWrt support didn't exist for it. I recently noticed that official support is available and I decided to flash OpenWrt on it. Before I could do that, I had to SSH into the device.

TP-Link EAP225

I was greeted with a sight which has increased my skepticism and cynicism against software/hardware which are targeted towards "enterprise" customers. The busybox version on the access point was "1.20.2" and the Linux kernel version was "3.3.8", both of which were released almost a decade ago back in 2012. What's even more funny is that unlike usual consumer routers, this access point has been receiving regular firmware updates, which helps build the illusion that TP-Link really does care about the security of the device.

Are you using a router or an access point with its stock firmware?

---

Created: 2022-05-21

Permalink

Use mandoc Instead Of man-db On Linux

Although I discovered and switched to mandoc a few months ago, I've had a tab open in Firefox for several months and I finally got around to reading it. I'm impressed by the amount of work that was put into mandoc. I'm obsessed with reducing latency of the tools on my terminal and mandoc is much more snappier than man-db, at least in my experience. If you live inside the terminal for most of your tasks and read man pages, try using mandoc instead of man-db. If your distribution doesn't package mandoc, you should use a different distribution.

mandoc

forget usability, aim for perfection: new lessons from mandoc development

I want to write man pages in mandoc too but, for now, scdoc is significantly more convenient to use.

scdoc

---

Created: 2022-05-21

Permalink

A Month With The Moonlander

I'm happy to report that I don't regret buying the Moonlander. Although I haven't regained my original typing speed (still at ~40-60 WPM), I'm able to type with much more comfort than a typical keyboard. I can confidently say that I won't use a typical keyboard as my primary keyboard ever again. I'm also glad that I got the Kailh Box White keycaps. I really like how they require lesser actuation force but are clicky at the same time. I no longer feel pain in my fingers after long typing sessions but I also don't lose the tactile and clicky response that I love.

Was the transition painful? Yes. However, it was worth it.

However, I don't think that the Moonlander is a perfect keyboard. The thumb clusters are poorly designed and aren't ergonomic at all. You have to deliberately move your fingers to press keys on the thumb clusters. The irrational obsession with RGB backlighting is also a turn off although this issue is quite pervasive among pre-built mechanical keyboards. I also ordered MT3 /dev/tty keycaps from Drop because they seem preferable to type on than the uniform OEM row 3 keycap profile that the Moonlander comes with by default. I'm not using a laptop keyboard and I don't intend to switch to Colemak DH or Workman anytime soon so I don't really need uniform keycaps.

I hope the Moonlander lasts for a long time and turns out to be worthy investment.

---

Created: 2022-05-21

Permalink

5 Days With The Moonlander

I got tired of using my shitty Redragon K561 mechanical keyboard. It doesn't have hotswappable switches and some of its switches don't generate any sort of feedback or click anymore. I bought the K561 back in 2017.

I've been looking for a high quality ready-to-use 65% replacement but couldn't find anything easily obtainable and worth buying. For some reason, I decided to go ahead and buy a ZSA Moonlander. After losing $30 dollars because ZSA and Shopify decided to flag me as suspicious, I spent approximately $480 ($365 for the keyboard, $115 went to thieves in New Delhi and I was told that I was lucky they didn't get more) to get the Moonlander delivered on 14th December.

ZSA Moonlander

Although the improvement in my body posture, especially my back, has been noticeable, my typing speed reduced from around 80-90 wpm to 15-20 on the first day. This is the 5th day and I've barely crossed more than 40 wpm.

I hope I don't regret spending all that money on the Moonlander.

---

Created: 2022-05-21

Permalink

Regexes Are Awesome

Let's say you download a useful bash script that uses bubblewrap to sandbox electron bloat like Signal. The script is great but, unfortunately, it uses "function blah { }" to define functions instead of "blah() { }". There are 19 such "functions" in this script. You could manually change all of them to the latter format. Or, you could use a regex in vim and change it in a few seconds.

:%s:^function \([[:alpha:]_]\+\) {:\1() {:g

"[[:alpha:]_]" matches an alphabet and the _ character. The "\+" ensures to match multiple letters of this pattern. The ^ at the beginning ensures that the line starts with function.

We've surrounded the pattern we wrote with \( and \) which is called "grouping". All we did is "capture" that pattern because we'll need it later when we make the substitution we want. We didn't capture function and "{" because we want to remove them.

All that's left is to make the substitution with \1, our captured pattern, and () {.

Awesome.

---

Created: 2022-05-21

Permalink

Use git archive To Create Releases

I've been creating releases of one of my projects on GitHub like an idiot by manually copy-pasting the folder and creating a tar.gz file. I was considering automating the entire thing using a script but then I found git archive.

git archive --format=tar.gz -o tessen-1.2.3.tar.gz --prefix=tessen-1.2.3/ HEAD

Now I just have to automate creation of a SHA256 checksum file and sign it using GPG and signify.

---

Created: 2022-05-21

Permalink

Shopify Flagged My Transaction As Fradulent

I ordered a ZSA Moonlander on 2021-11-28. I assumed everything would go well but ZSA informed me the next day that my order has been cancelled because Shopify flagged my order as "high-risk". ZSA gave me this link which lists the parameters that Shopify uses to judge if an order is fradulent. This includes

ZSA Moonlander

how shopify labels fraudsters

I guess people don't live on rent and change addresses after a few years. If they do, surely they always remember to change their registered address on their credit card.

The most ridiculous criteria, which probably got my order flagged, seems to be

My ISP has assigned me an IP address with a location that's more than a thousand kilometers from my actual location. I guess I can't order anything from merchants that use Shopify if I use my broadband connection.

---

Created: 2022-05-21

Permalink

4K Resolution In QXL

If you want to enable 4K resolution in a virtual machine, you'll have to make some changes in the XML file of QXL settings when using libvirt/virt-manager.

ram='131072' vram='131072' vgamem='32768'

I tested this on a Windows 10 virtual machine.

---

Created: 2022-05-21

Permalink

---

Home