Ben O'Neill's Blog: 2020

[linkstandalone]

I installed 9front on qemu and it is strange, but very intriguing. After playing with Plan 9’s structural regular expressions in the vis and sam editors, I decided it would be cool to try installing a Plan 9 system for real. Well, not on real hardware, but sometime soon I hope to try that out.

Thu, 16 Apr 2020 21:31:10 -0400

[linkstandalone]

I am now self-hosting my git repositories here. I will still push commits to my GitHub and GitLab for the time being, though. I am using stagit for the web pages.

Sat, 04 Apr 2020 21:31:17 -0400

[linkstandalone]

I will be speaking about the importance of free software in the realm of environmental sustainability at LibrePlanet 2020. I will probably write a summary of the conference soon after it ends as a new post. I’m very excited!!

Thu, 05 Mar 2020 21:31:13 -0400

[linkstandalone]

Notmuch is a very powerful tool for managing email, and I had an issue I have been dealing with for a little while now that I realized I could use Notmuch for, so I will go through the process I took to solve it in this article. I get loads of emails from colleges, and I wanted to separate those emails from everything else. Now, I’ve heard Gmail has this feature, but since I don’t use Gmail on my primary email address (unfortunately I have a Gmail account for school), I decided to figure out how to separate emails from colleges into their own mailbox in my mail client, Neomutt.

First off, when syncing mail, it should automatically tag new mail if it matches given queries, like in my case the words “college” and “university”. I have a script that downloads new mail every five minutes in a cronjob, so I added this:

# ~/.local/bin/mailsync
...
notmuch new # update notmuch db
notmuch tag +college "university" and in folder:xyz/INBOX
notmuch tag +college "college" and in folder:xyz/INBOX

Now every time mail is synced, it will be tagged appropriately. If you wanted to perform a Notmuch query for all mail that does not contain those phrases, you could type the following:

$ notmuch search not tag:college

This query can also be used in Neomutt by using virtual mailboxes like so:

# ~/.config/mutt/muttrc
...
set nm_default_uri="notmuch:///home/ben/.local/share/mail" # replace with your mail dir
set virtual_spoolfile=yes
virtual-mailboxes \
    "Inbox" "notmuch://?query=folder:xyz/INBOX and not tag:college and not tag:spam"\
    "College" "notmuch://?query=folder:xyz/INBOX and tag:college"\
    "Sent" "notmuch://?query=folder:xyz/Sent"\
    ...

This is a super helpful thing for me and it was an interesting learning experience setting this up. I hope this can be helpful to somebody. Thanks for reading!

Thu, 05 Mar 2020 21:31:11 -0400

[linkstandalone]

RSS is an amazing format for listing news articles, blog posts, podcasts, and pretty much anything else. But with Google News, Snapchat’s news platform, and other news “hubs”, RSS has become more important than ever for preventing the spread of misinformation, discrimination based on opinions, and overreliance on corporate services.

RSS readers provide the basis for decentralization of information received on the internet. If you use an RSS reader, chances are you have multiple feeds from different sites on it. This means that you are not relying on the same service for all your news. The RSS reader you use is hopefully free software; in that case you don’t have to worry about it disrespecting your freedom, so think of it like a mailbox. It takes all the mail you get from these different places and puts it in one place. A mailbox doesn’t say “no” to people with certain opinions. It can’t discriminate, and neither should your news outlet.

RSS readers also happen to be very convenient. Once you copy your favorite feeds' URLs into it, it will list the content of all of them in a hopefully clean and simple way (I know Newsboat for GNU/Linux and spaRSS for Android do). This reason alone is not good enough of course, as the aforementioned points are much more important, but it does help greatly.

RSS is a great platform for many reasons, so if you’re not using it yet, a great place to start would be downloading a free app like spaRSS or Feeder for Android (in F-Droid for Replicant) or Liferea for GNU/Linux. My blog is available on RSS as well under this URL. Happy hacking!

Tue, 26 Feb 2020 21:31:07 -0400

[linkstandalone]

Libreboot allows one to free his/her computer from the shackles of proprietary boot firmware, which can restrict the operating systems that can be booted or the hardware peripherals that can be used with the computer. However, Libreboot is only available on older machines. Purism’s Librem 5 smartphone and Raptor Computing Systems‘ Talos II desktop are the only machines I know of that have a completely free boot firmware from the factory. The Thinkpad X200 sells for way cheaper than both of those, and is also a very portable, lightweight laptop.

My Specs

I currently have an Intel Core 2 Duo P8400, a 480GB SSD, and 4GB of DDR3 RAM installed in this machine, although it can hold up to 8GB DDR3 RAM. I also have a 2TB SSHD in the ultrabase dock’s disc drive bay. The machine runs fast enough for what I do. It doesn’t compile code as fast as I wish it could, but that is a sacrifice I must make for my freedom.

I also have a 9-cell battery in the machine, which holds charge for about 5-6 hours. I can change out the battery if it runs out, as well, which is very useful. I have two spare batteries: one 6-cell and one more 9-cell. Finally, I have a wireless card installed that can be used with drivers on the linux-libre kernel, as well as an ExpressCard 3x USB 3.0 port card.

The Ultrabase

The ultrabase is very useful. I have it plugged in to my external monitor, mouse, keyboard, so when I get home I can plug it in and use it as a desktop in a few seconds. It is also plugged into a power source, and like I said before, there is a 2TB SSHD in the disc drive bay.

Should You Buy It?

Yes. It is not very expensive, and it is very modular. You can replace or upgrade parts as needed, and it can run a fully free operating system and Libreboot supports it. It is one of the few ethical technology items you can purchase. If you find one in decent condition for a good price (they range from around $50-250), I’d recommend buying it.

Wed, 18 Feb 2020 12:00:30 -0400

[linkstandalone]

Using the shell effectively in a Unix-like environment must show a certain flow, which is comparable to poetry. According to former AT&T Bell Labs employee Brian Kernighan in his book “Unix: A History and a Memoir”, many of the hackers who developed and utilized Research Unix at Bell Labs in the early days were extremely fond of literature. Of course, the arts and sciences are typically viewed as polar opposites, but it is no where more prevalent than in computing that those who create must learn from the work of the past, and must adapt that past work to fit their present task. This is key because at the time, people were in the early stages (not that the world is anywhere close to finished today) of finding out how to effectively develop software, and how to use computers to help with everyday tasks and to solve problems that would be much more difficult to solve had computers not existed.

With these ideas in mind, it is important to think about the idea that is engrained in the minds of programmers since that era; an idea that has stuck with programmers, even if they fail to live up to it: the Unix philosophy of “do one thing, and do it well”. Grep and Sed, incredibly simple yet incredibly useful in an immense, seemingly infinite range of scenarios, are prime justifications for the Unix philosophy that have stood the test of time.

Variants of many Unix programs are still in wide use today, but why do we still use Grep and Sed so often if there are so many programs out there that we don’t use anymore that can do so much more? It’s a testament to the rock solid stability and the ability to put trust in a program that you know will do what you ask it to do promptly and with minimal effort. That is one reason. Another is the universal nature of these programs. Only when these are combined together, a program will continue to be useful for many years.

Grep is admittedly much simpler than Sed, and in fact, the basic functionality of Grep is easily replicable in Sed. However, Grep, which is named after the Ed command g/re/p (which does exactly what Grep does as well), is only Grep. It doesn’t try to do anything else but read a file and print the lines that match the given pattern to standard output. Sed, which stands for “Stream EDitor”, is the same way. All it does is edit the inputted stream of text. That’s all it is meant to do, and that is all it will do.

These useful programs can be applied in many different scripts as well as be used in interactive shells due to their simple nature. It is easy to find a case where you may want to “grep” a certain piece of text from a source file (maybe to find a function definition or to check if a header file is included). You could also want to print all the lines of a file until a certain pattern is found, which can be easily accomplished with sed /re/q. Learning Sed and Grep is a very common and beneficial investment for command line users and hackers in general. It really is no wonder they survived this long.

Tue, 18 Feb 2020 21:31:09 -0400