Programming

Control-Flow Analysis

27 Jul 2021

Control-Flow Analysis is a popular technique for performing static analysis of many different kinds of programming languages. It’s most often needed in cases where you have some kind of dynamic dispatch: either where you have first-class functions or when you have objects and you call one of their methods.

...

Marked Man

24 Jan 2019

Marked Man (mm) is a little program I wrote to view Markdown files like UNIX man pages. (Because who wants to leave their terminal just to open a file?)

It uses Pandoc to convert between Markdown and the groff format. As a happy side-effect, this program can read basically anything as a man page: HTML, LaTeX, Word files (seriously), ePub, etc. Anything that Pandoc can read, Marked Man can handle.

Installing #

I’m working on getting this set up with Homebrew. For now, check out my GitHub repository here.

...

Editors, or The Tools of my Trade

6 Dec 2018

I spend a fair portion of every day writing programs. As with all professions, using the right tools makes a huge difference in my productivity and general happiness. Having good tools helps me keep my gumption up.

One of my favorite books is Zen and the Art of Motorcycle Maintenance. Contrary to what the title suggests, this book is actually not about motorcycles. It’s about a lot of things; one topic is about tools and caring about your trade.

...

Induction and Side-Effects

8 Oct 2018

Today in my proofs class (MATH 290 at BYU) we talked about the concept induction. I like this, because it sounds a lot like recursion.

On the Wikipedia article, there’s an excerpt from a book that illustrates the principle with an analogy using a ladder:

Mathematical induction proves that we can climb as high as we like on a ladder, by proving that we can climb onto the bottom rung (the basis) and that from each rung we can climb up to the next one (the step). — Concrete Mathematics, page 3 margins

...

Rapid Website Development with Mojolicious and Polymer

9 Nov 2017

My girlfriend works for BYU SA—it’s the division of BYU that’s responsible for planning and running events. As part of her job, she has to review song lyrics and make sure that the song is okay to play at BYU functions.

This can get rather irksome. Imagine reading text looking for vulgar words or phrases. Yuck. I took some time this evening to write a little website that checks MetroLyrics for any vulgar words or phrases. I have an extensible blacklist which gets initialized at server start by some phrases from FrontGate.

...

Emacs Tips and Tricks

23 Sep 2017

Emacs Tips and Tricks #

To Learn About #

  • ☒ Company-mode (completion framework for lots of stuff)
  • ☒ YASnippets (templates)
  • ☒ Auto-YASnippets (something like that—I installed it for temporary templates)
  • ☒ Alchemist mode (integrates with company mode—tooling for Elixir)
  • ☐ What do M-. and M-, do?
  • font-lock-add-keywords would let me add new keywords to a language
  • ☐ hi-lock
  • ☐ highlight-phrase, unhighlight-regex
  • Registers
  • ☐ Auto-loading packages to make startup time shorter

Things that make me happy #

  • Undo in region (just highlight something and hit undo)
  • Generate Backus-Nauer Forms with a slightly modified syntax with ebnf-eps-buffer

Helm #

You can filter buffers by pattern with Helm. Type: @pattern to find buffers matching pattern. If you want to have spaces in the pattern, you must escape them with a backslash.

...

Mastodon