• Home
  • Blog
  • Contact
  • Projects
  • Content Mirror
  • Matrix Guide

  • UNIX At The University

    August 31, 2022

    My goal for this year as I study computer science and music is to use minimal software whenever possible. That means vi(1) for my notes, calendar, and to-do lists, and a basic set of packages for typesetting documents. With the exception of a browser that doubles as a PDF viewer, which is required to access my university's garbage pile of a content management system, as well as viewing syllabi and previewing papers before I submit them, all my software is fully command-line based. When I'm not trying to access my university's online resources, and I'm just doing local work, I can do it all in a terminal. I don't even have LibreOffice installed; literally everything happens on the command line for me.

    My quest for software minimalism doesn't end just beyond GUI software though. I specifically want to make sure the command line tools I use are also minimal in comparison to others. This means using Groff instead of TeX, for example. In many ways, I'm trying to use my laptop like I would use an old UNIX mainframe, if the year were 1985 and the only computer on campus was the one in the university library. By this I really mean that I want to use old software that performs well, and does exactly what it needs to, but is also very lightweight. TeX, for example, is not as lightweight as Groff, so Groff wins. Likewise, the Mutt email client is an additional dependency that can be eliminated by using OpenBSD mail(1). Instead of using Calcurse for my calendars and to-do lists, I juse calendar(1), and a plain text file to store tasks. I've already explained those in previous blog posts though.

    In this post, I'm going to explain how I use minimal software to get the assignments for my courses done. I consider homework to be mission-critical; that is, at the end of the day, it just has to work. I need to be able to do it in a reasonable amount of time, and do it well. These are the tools I use to accomplish that end. They work on the terminal, which means I can use them over SSH if I wanted to. I usually never do, given the reliability of my university's WiFi, but it's always nice to have the option.

    For typesetting speeches, essays, and other writings, I use Groff. Anything a "normal" word processor would typically be used for, I can accomplish in Groff. I can also render equations, chemistry formulas, and more. I'm slowly but surely building up some templates for the various types of writings that are required of me. Unfortunately though, I can't engrave music in Groff yet. I found an old 1 C program that supposedly was able to acomplish the task of embedding music in a Troff document back in the day, but even though I was able to get it compiled with a few Makefile and code modifications, I couldn't get it to compile its own documentation without segfault-ing. I was able to use it to compile a few sample works, but they all came out rather crude. The font wasn't quite right, and the stems didn't even line up.

    So for typesetting music, I use LilyPond. LilyPond is TeX-based, but it installs and runs without a full TeX engine, making it lighter than TeX. I have a few basic templates for LilyPond as well, so that I can take notes in my music theory class, or transpose some music for church. For spreadsheets, I use sc. At the moment, I haven't yet had to do any presentations, but if I do, I imagine I'll have to figure out how to render them with Groff. I've seen some examples of slideshow presentations, so I know it is possible, but I am not looking forward to putting in the time to that project when it comes. That beind said, I'd put the time into a solid Groff template and macro package before I used LibreOffice again. Not that I have anything against LibreOffice in particular; I despise pretty much all GUI software. It just doesn't always work how I expect, and a lot of things break and get lost in translation.

    Pandoc is a really neat tool, but I wish it wasn't necessary. I wish everything could be distributed as PDF or as Groff sources. But, unfortunately, some of my professors make their syllabus a Microsoft Word document. I thought these would be rather tricky to read without an office suite of any kind, not even LibreOffice. But I was peasantly surprised to find that Pandoc can convert .docx files into a flavor of troff that Groff can read, which means I can use of Groff to render Word documents as PDFs. The resulting PDF is anything but pretty, but it does technically get the job done. All the information I need is readable, and as a bonus, links are clickable.

    The only time I really use GUI software in the traditional sense is when I'm helping my girlfriend troubleshoot issues with her computer, and it is interesting to find that all the issues she has are not with the kernel or the userspace utilities, but the GUI wrapper on top of them.

    Now, I still use unformatted plain text whenever possible and practical. As you'll notice, my blog posts are still entirely plain text. The only formatting I do is run fmt(1) to wrap the lines. That's it. There's no use in employing Groff here. My goal really is to only employ non-OpenBSD tools when they're absolutely necessary for school. If a project isn't for school, then I try whenever possible to stick to base software, or software I wrote. I'm inspired by Donald Knuth, the author of TeX, who doesn't even use email. He just writes books, and probably a bit of code too. Granted, Knuth is a lot older than I am, by probably almost 4 times, but I think his ideas about the internet align with mine rather well.

    1. By old I mean 1987, before the first C standard. 

    © 2019-2024 Jordan Bancino.