RSSAmplifier

Blog

g.p. anders

Personal website for Gregory Anders

a731295c.gpanders-com.pages.devRSS feed ↗28 posts

Latest posts

What's New in Neovim 0.11

Neovim 0.11 was just released. As in previous installments in this series, let’s talk a bit about some of the big highlights! As always, the full list of changes can be found in the release notes (use :h news to read inside of Neovim). Table of Contents Breaking Changes LSP Simpler LSP setup and configuration Builtin auto-completion Improved hover documentation Putting it all together…

Ghostty Is Native—So What?

Ghostty is a new terminal emulator by Mitchell Hashimoto. While a lot has been said about Ghostty’s performance , less discussed is its native platform 1 integration which is, in my opinion, its most distinctive and underrated feature. Despite being listed as a key motivating factor in Mitchell’s original introduction , online discussions about Ghostty rarely mention its native…

What's New in Neovim 0.10

Neovim 0.10 was the longest release cycle since the heady days of the 0.5 release. There are a ton of new features in this release (as well as some breaking changes), so be sure to check the full release notes . You can view the release notes directly in Nvim with :h news . The news file includes information on new features, deprecations, and breaking changes. I especially urge plugin authors to…

Making ijq Fast

I recently received an issue report that ijq was performing slowly. The issue claimed that, when used on a large (16 MB) JSON file, ijq was “too slow to be usable”. I downloaded the test file which was (helpfully) provided in the issue and tried it myself. Even using the most charitable definition, I agree that this classifies as “unusably slow”. Note that in this screen…

State of the Terminal

This is a companion article to my talk at Neovimconf 2023 . I have been using Vim/Neovim as my full time text editor for close to 10 years. I’ve spent a lot of time in the terminal and have become very aware of the many flaws and idiosyncrasies of this bizarre platform. But I also think it gets a lot of things right! And I’m not alone in this belief: terminal based tools are still…

What's New in Neovim 0.7

Neovim 0.7 was just released, bringing with it lots of new features (and of course plenty of bug fixes). You can find the full release notes here , but in this post I’ll cover just a few of the new additions. Table of Contents Lua everywhere! Distinguishing modifier keys Global statusline filetype.lua Client-server communication Looking ahead to 0.8 Lua everywhere! Neovim 0.5 saw the…

Exploring Mach-O, Part 4

This is part 4 of a 4 part series exploring the structure of the Mach-O file format. Here are links to part 1 , part 2 , and part 3 . When we started this series we didn’t know anything about Mach-O other than some vague idea that it’s a binary file format used by macOS. By now, we have a much better understanding of how Mach-O is laid out and how the operating system uses the…

Exploring Mach-O, Part 3

This is part 3 of a 4 part series exploring the structure of the Mach-O file format. Here are links to part 1 , part 2 , and part 4 . We left off with a basic parser that is able to parse the Mach-O header from our file. Now that the bones of our parser are fleshed out, it should be fairly straightforward to parse the rest of the file. Load commands Let’s take a look at our header again: $…

Exploring Mach-O, Part 2

This is part 2 of a 4 part series exploring the structure of the Mach-O file format. Here are links to part 1 , part 3 , and part 4 . Last time, we created our own tiny Mach-O executable. This program doesn’t do anything useful, it’s simply the smallest executable we can use to examine what the Mach-O file format looks like. From here on, we’ll write our own primitive parser to…

Exploring Mach-O, Part 1

This is part 1 of a 4 part series exploring the structure of the Mach-O file format. Here are links to part 2 , part 3 , and part 4 . I recently read a great article from Amos over at fasterthanli.me that explored the ELF format for Linux executables. Digging into these kinds of topics in a deep and thorough way has always been super interesting to me, not to mention educational. So, I thought…

The definitive guide to using tmux-256color on macOS

UPDATE : macOS 14 (Sonoma) updated its bundled ncurses version to 6.0. This version ships with a tmux-256color entry by default, so the workaround below is no longer needed. macOS ships with an old and very out-of-date version of ncurses (5.7). This version does not contain a terminfo entry for tmux-256color , the preferred TERM value when using tmux . If you installed tmux via Homebrew or…

The Zettelkasten

I have always been a bit of a nerd about note taking and knowledge management systems. I read David Allen’s Getting Things Done with relish, and I’ve obsessively experimented with every iteration of note taking apps and tools mankind has created. Trello, Todolist, Evernote, Bullet Journal, you name it. I think my obsession in this area is mostly driven by the combination of my love of…

Introducing ijq, an Interactive jq Tool

If you’re unfamiliar with the tool jq , it describes itself as the “sed for JSON”. It’s a powerful command line tool that lets you do complex parsing and manipulation of JSON documents and is extremely useful for testing APIs or analysing JSON datasets. One challenge with jq, however, is finding just the right filter. The query language that jq uses is not always obvious,…

Managing Dotfiles With Git

Managing so-called “dotfiles” (config files starting with a . in your home directory) in git is a fairly common practice. There are many write-ups on this topic already, but I wanted to share my own workflow as well as some potentially useful tips and tricks. For those unaware, dotfile management basically consists of adding files such as your .vimrc , .tmux.conf or other files in a…

Building Site Search With Hugo

Search is a handy feature you might want on your Hugo static site. Hugo does not have any built-in way to provide a search function, but they do offer some suggestions on how to do it yourself. The difficulty with implementing a search function is that it usually requires some kind of server side logic, which is obviously missing when using a static site like Hugo. So any search implementation…

Books for Beginner Economists

I am not an economist by any definition of the word: I haven’t taken a formal economics class since high school. But in the last few years I’ve read a few books that have introduced me to the wonderful, fascinating world of economics, which I now consider one of my favorite subjects. Two books that provide a good grasp on foundational economics are Naked Economics by Charles Wheelan…

Creating Your Own Git Server

Ever considered setting up and running your very own git server? It’s actually quite easy! In this post, I’ll outline the steps I took to set up my own so that you can give it a try yourself. But first, why might you even want to go through the trouble of setting up your own server? After all, there are a wide array of excellent and free to use choices out there, such as GitHub,…

Caching LDAP Queries in Mutt

You can use the lbdb tool to query an LDAP server within Mutt using the query_command setting. Setting up lbdb is out of scope for this article, although you can find plenty of documentation and examples online ( here and here , for instance). One drawback to this approach, however, is that everytime you want to look up a recipient in Mutt you have to query your LDAP server, which can be quite…

Git Plumbing

Porcelain and Plumbing git commit Plain English : Create a new tree object from the current index and create a new commit object from that tree. The commit object combines a commit message, parent, date, author, committer, and the tree. Update the ref pointed to by HEAD with the hash of the new commit object. Plumbing Once files are in the index (using git add or git update-index ) use git…

You Don't Want a Tax Refund

Tax time is approaching and this year, like every year, it is common to hear people excited about receiving their tax return discussing the exciting purchases they plan on making with this perceived windfall. I want to challenge this conventional wisdom by stating a true but unpopular fact: getting a tax return is not necessarily a good thing and, in most cases, is actually the least desirable…

Using Xilinx Vitis for Embedded Hardware Acceleration

Xilinx recently released their new Vitis tool, which aims to ease the process of accelerating high-level algorithms in applications in an FPGA. It is an ambitious tool with a lot of potential. This guide will help you get started. The guide is targeted toward the Zynq Ultrascale+ MPSoC using a command line (as opposed to a GUI) flow because that is what I use. However, where possible, I’ve…

Archive the Internet

As the Internet continues to grow and age, we are seeing more and more of a phenomenon called “link rot”. Link rot is the all-too-familiar experience of returning to a bookmark or link only to find that it’s no longer maintained, been taken down, or even changed to something else. What can we do about this? Sites like archive.org were created to combat this exact problem. That…

2019 Reading Review

In 2019, I read 27 books. This was less than last year’s 40 and is not an overly impressive quantity for any serious reader, yet I’m happy with both the amount and the content that I read this year. Below, I’ll give a brief summary of my favorites. In January, I read Daniel Kahneman’s Thinking, Fast and Slow . This is an extraordinary book written by one of the…

Evaluating Markdown Code Blocks in Vim

When writing Markdown it is common to have code blocks within your document that look something like this: This is a code block: ```bash echo "Hello, world!" ``` One of the great features of Emacs’ Org mode is its ability to evaluate blocks of code from within the editing environment. I always appreciated this feature about Org mode which got me to thinking about implementing something…

Write Your Own Man Pages

This post was inspired by the tool um . I decided to try my hand at making my own lightweight implementation using just a shell function. I decided to name my tool ual as a nod to the fact that it complements man . I wanted to be able to write quick, simple notes in Markdown and be able to view them in a man-page style format from anywhere on the command line. Additionally, I wanted to be able to…

Tutorial: Booting Linux on the ZCU102

This post contains a step-by-step walk through on booting Linux on Xilinx’s ZCU102 MPSoC evaluation board. Installing Linux on the Zynq MPSoC board is fairly straightforward if you take Xilinx’s advice and use their PetaLinux tool; however, I wanted to try my hand at getting a working Linux installation up and running without using PetaLinux, for a variety of reasons. Firstly,…

The Birthday Problem

The “Birthday Problem” is a classic in introductory probability theory, and it never fails to impress the newly initiated. The problem goes like this: How many people do you need to have in one room for the probability that at least 2 people in that room share a birthday to be 50%? The answer may surprise you. Before we get to the answer though, let’s go real briefly into the…

Make Your Mac Clean Itself

Update (6/18/2019): Since writing this post I have released a tool called pushbroom that should make all of this easier and a bit more robust. The original solution in the post below is, frankly, a rather unsophisticated way of solving this problem. If you don’t want to use pushbroom , Thoughtbot has another solution that utilizes Apple’s launchd utility. If you use the Internet ever,…