RSSAmplifier

Blog

Lambda Land

Lambda: The Ultimate Blog Post—a blog mostly about programming languages, academia, and Emacs

lambdaland.orgRSS feed ↗108 posts

Latest posts

Writing with AI is Stupid

Regardless of how you feel about generative AI—love it or hate it—the worst thing you can do with it is use it to write for you. Imagine, for the sake of argument, that there was an LLM entirely free from any ethical, ecological, or economic baggage: it had been trained on public domain text using fusion energy and could run inference on Raspberry Pi-tier hardware. Everyone in the world had access…

Semantics of Slideshow Animations

If you add animations to slideshows, they should serve some semantic or rhetorical purpose. Animations should reduce cognitive load, not increase it by being a distraction. When should you add animations? I like adding animations to my presentations when they serve a purpose, but they need to be use intentionally. Animations can easily become a distraction when are there are too many of them or…

Explainer: Tree-sitter vs. LSP

I got asked a good question today: what is the difference between Tree-sitter and a language server ? I don’t understand how either of these tools work in depth, so I’m just going to explain from an observable , pragmatic point of view. Tree-sitter Tree-sitter is a parser generator . What this means is that you can hand Tree-sitter a description for a programming language and it will create a…

Running

I guess I’m a runner now. I never liked running. I did swim team in high school and that was pretty much the only sport I enjoyed. During the pandemic I started running a little bit, but I didn’t know very much and when I moved to Salt Lake City to start my PhD I pretty much stopped running entirely because everywhere was so hilly. Last year I moved again and I saw that I had a nice, flat route I…

Typst for Your Code Blocks

I started using Typst about a month ago to write my dissertation proposal. I had seen Typst before and decided to keep an eye on it as it matured. While it still is very much in development, it is mature enough that I was able to rewrite my dissertation proposal from an org-mode → LaTeX pipeline to pure Typst in about an hour with no major hiccups. In fact, most things got simpler as a consequence…

Federate Away From GitHub

The past few weeks have seen major AWS, Azure, and Cloudflare outages. I predict Google Cloud will have a major outage sometime soon as well. Each time one of these massive systems goes down, it takes a sizable chunk of the internet with it. This is troubling: the internet should be more robust against partial outages.

How I Organize the Papers I Read

I got asked how I manage papers, notes, and citations for doing research. I started writing out a very long Slack message, but it quickly passed the threshold where I ought to just turn it into a blog post. The short of it: I’m an incorrigible Emacs user, so I do a lot through my editor of choice on my laptop. That said, Zotero is a fabulous piece of technology, and I rely on it heavily to get my…

Getting Started With Lock Picking

There are few sounds as satisfying to me as a lock popping open, especially when it’s a well-machined lock that makes a nice, crisp “chink!” sound as the shackle releases. This post is some suggestions I gave to a friend of mine who wanted to get started in lock picking. Please consult your local laws to know the ins and outs around the hobby. Nothing here is legal advice. Also, while I do link to…

AI stands for “Artificial Inanity”

There’s something icky about LLM-generated text when you think it’s written by a human. I think I finally put my finger on one reason why I feel this way.

Bedrock Version 1.5.0 Released

I just released version 1.5.0 of Emacs Bedrock —a super minimal starter kit for Emacs. This is a minor change: I’ve fixed a few bugs and added a package or two to some of the optional config files under extras/ .

How I Take Notes for Research

The key principle I follow is this: how I take my notes will evolve over time . I do not stick to any system too dogmatically. That said, I’ve settled on a system that’s been fairly robust and stable for the past few years. I have tweaked it here and there to make it easier for me to find what I need.

Programmers and Their Monospace Blogs

Many developers seem to have a fanatic obsession with monospace fonts and using them to make their blogs look “cool”. I won’t call out anyone’s blog specifically, but you don’t have to look to hard to find some. As an example theme using a monospace font by default, look at hugo-theme-terminal , which has over 2,400 stars on GitHub. If you have a blog or are thinking about starting one, and you…

Real Programmers

There’s been an explosion of tools for software development. At the same time there’s a growing sense that software quality isn’t what it used to be—or that developers these days don’t understand what it takes to be a “real” programmer, whatever that means. I’m not that old, but I have some old-school tool preferences. Some tools I really like; in other cases I feel that by not adopting particular…

TV Shows for Kids

When I was in my early 20s, I vowed that I would keep my kids from watching any amount of television. Turns out, sometimes you really need a break as a parent. A good show can keep your kid entertained while you perform necessary tasks like preparing a meal, doing the dishes, or getting just enough extra sleep to not blow your top or doze off in the car while you drive your kid to preschool. So, I…

A Quick Guide to LaTeX

LaTeX is a powerful typesetting system hamstrung by a few decades-old decisions and some… ahem… questionable design decisions. Nevertheless, its ability to typeset technical documents remains unmatched, and it enjoys wide support across STEM fields. Learning LaTeX is a worthy use of your time, if you intend to pursue a career in science. This is meant as a short and simple how-to guide for…

What's New in Emacs: Last Decade Edition

Emacs has come a long way in the past decade. This is meant as a guide to anyone who’s been using stock or near-stock Emacs for some years and wants a quick update on the new shiny stuff that comes bundled with Emacs.

Should Programming Languages be Safe or Powerful?

Should a programming language be powerful and let a programmer do a lot, or should it be safe and protect the programmer from bad mistakes? Contrary to what the title insinuates, these are not diametrically opposed attributes. Nevertheless, this is the mindset that underlies notions such as, “macros, manual memory management, etc. are power tools—they’re not supposed to be safe.” If safety and…

Towards the Fastest Brainf*** Implementation Ever

In my last post I described how I made a very fast BF interpreter. Well, there’s a lot more speed to be had with an optimizing compiler. This post is a write-up of my assignment for a compilers class, so the post a little rougher than normal.

How to Make Racket Go (Almost) As Fast As C

I recently wrote about using first-class functions to help make a BF interpreter . This is a follow-up post to describe a nifty solution to a tricky problem that made my program go 2–5× faster and put it about on-par with an interpreter written in pure C. A basic interpreter works by walking down the AST and evaluating nodes recursively: when the interpreter encounters an expression, it dispatches…

Why You Should Resist Surveillance

I got to visit the Stasi museum in Berlin this week, and it gave me a newfound appreciation for why it’s important to resist surveillance. Interestingly, surveillance is not exclusively limited to one kind of government: it can appeal to both left- and right-wing governments, and corporations in the digital age use surveillance to make money. In every form, surveillance is evil and must be…

First-Class Helper Functions

We’re going to be writing a BF compiler for a class I’m in. Last night I threw together a little interpreter for the program in about an hour; it doesn’t do input—that should be easy to add—but it’s enough to handle some benchmarks for the language, albeit slowly. You can see my repository on Codeberg for the source code. I needed one function to do two closely related jobs—the logic was…

Fancy lightweight prompts for Eshell and Zsh

I started using the Zsh a few years ago and I’ve liked its completion features. I tried out Oh-my-zsh for a while and I liked the stock Robby Russel prompt. It gave me all the information I cared about: the status of the last command, current directory, and the state of the current Git repository. However, I didn’t like how slow Oh-my-zsh was making my shell startup. This mattered especially, I…

Notes on Zero-Knowledge Proofs and Secure Remote Password (SRP) Protocol

Today I learned about using zero-knowledge proofs in the context of passwords. These are my rough-and-ready notes from reading. Apparently OpenSSL has an implementation of the SRP algorithm.

How, Where, and Why I Take Notes

I take a blend of digital and hand-written notes. It’s a bit of a hodgepodge, but it’s working. I used to lean heavily into full-digital notes, but I started drifting towards a mixture of digital and hand-written notes. Initially it was complicated, but I think I’m converging on a good setup. What I describe here will continue to evolve I am sure, but I am enjoying where it’s currently at.

Evolving Languages Faster with Type Tailoring

Programming languages are too slow! I’m not talking about execution speed—I’m talking about evolution speed. Programmers are always building new libraries and embedded DSLs, but the host programming language—particularly its type system—doesn’t understand the domain-specific aspects of these things.

Skills That I Needed When I Started My PhD

I’m starting my third year as a PhD student. I thought it would be good to look back on some of the things that have helped me to this point. I study programming languages, but I imagine these things will help anyone in computer science—and some might have application to other STEM fields as well. There are many softer skills that you need as a PhD student: curiosity, good work ethic,…

I Probably Hate Writing Code in Your Favorite Language

The Tao gave birth to machine language. Machine language gave birth to the assembler. The assembler gave birth to the compiler. Now there are ten thousand languages. Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao. But do not program in COBOL if you can avoid it. The Tao of Programming I probably hate…

Lessons From Writing My First Academic Paper

I got a paper published at ECOOP this year! This is my first big paper published at a big conference. As such, I wanted to write down some things that I learned so that in the future I can remember a bit better what was hard for me. That way, should I one day advise PhD students working on their first papers, I can help them through the learning curve better. For us, this artifact took the form of…

Chorex: Guaranteeing Deadlock Freedom in Elixir

Chorex is a brand-new Elixir library for choreographic programming [ 3 ]: Chorex provides a macro-based DSL that lets you describe how processes communicate to perform a computation. This top-down description of interacting processes is called a choreography . From this choreography, Chorex creates modules for each process that handle all the message-passing in the system. The interactions…

My Top Emacs Packages

If you ask anyone what the best Emacs packages are, you’ll almost definitely hear Magit (the only Git porcelain worth using) and Org Mode (a way to organize anything and everything in plain text) listed as #1 and #2. And they’re right! I use those packages extensively every day. Besides those two powerhouses, there are a handful of packages that make using Emacs a delight. If I had to ever use…

Boilerplate Busting in Functional Languages

This is the story of how I solved a problem (ugly, cumbersome boilerplate code) that I ran into while writing a program in a functional language (Elixir). Functional programming languages often pride themselves on expressiveness and elegance; but occasionally they are not amenable to the most obvious solutions to the problems we wish to solve. In this case, the simplest solution to my problem…

Building a Text Editor in Haskell, Part 1

I am building a little text editor in Haskell. 1 Why would I do such a thing? Because I’m in a class and this fulfills the requirement, and building a text editor is the kind of thing that I’ve always wanted to take a crack at. This is part 1, and I will describe how to build a rope data structure in Haskell. A rope is a bunch of strings (literally, and in the CS sense) and is optimized for cheap…

Functional Languages Need Not Be Slow

Somewhere in my adolescence I got stuck with the notion that functional languages were slow while languages like C were fast. Now, a good C programmer can eke more performance out of their code than probably anyone else, but the cost you pay to keep your code correct goes exponential as you get closer and closer to the machine. Functional languages abstract a lot away from the machine. Higher…

Towards Fearless Macros

Macros are tricky beasts. Most languages—if they have macros at all—usually include a huge “here there be dragons” warning to warn curious would-be macro programmers of the dangers that lurk ahead. What is it about macros that makes them so dangerous and unwieldy? That’s difficult to answer in general: there are many different macro systems with varying degrees of ease-of-use. Moreover, making…

Why Don't More Languages Have a call/cc Operator?

Something I’ve wondered about for a little while: why don’t more languages have a call/cc operator? Having first-class continuations in your programming language gives your programmers a powerful construct. So why do only a handful of languages have it? The short answer is: it’s tricky to implement efficiently. One way to get call/cc is to convert your code into continuation-passing…

Deriving Recursion from First Principles

These are some of my class notes. Learning to derive the Y Combinator from first principles is something I’ve always wanted to do. This isn’t quite the Y Combinator, but it’s very close and it still gets you recursion without relying on recursive structures to begin with. In the beginning, we write a recursive function to compute the length of a list: ( let* ([ len ( λ ( lst ) ( if ( null? lst ) 0…

My Commitment to Intellectual Integrity

I got a strange email the other day. Here it is, with parts redacted: Hi there, My name is G—, I am the main editor at —————. While browsing your site, I noticed you have an amazing article from this page: Link to an extremely old post of mine My team actually just published a comprehensive article on “ Semi-related title ” which I think your visitors would truly appreciate and add value to your…

Reflections one year into a PhD program

I started my PhD program about a year ago. In my first year I have: Taken 4 “normal” 3-credit-hour classes Participated in 3 seminars Switched advisors Attended 2 conferences (PLDI @ FCRC, JuliaCon) Presented my work at JuliaCon It’s been a lot of work, and there’s been a lot of stress. I’m in a much better place now than when I started, and over all I’m happy where I’m at and where I’m headed.…

Warp Factor Refactoring in Emacs

Here’s a nifty Emacs workflow for doing a project-wide search-and-replace on steroids. While I do use refactor tools that come with language servers, 1 sometimes those aren’t enough. Consider the case where you not only need to change the name of a function, but also e.g. need to swap the order of two of its arguments. Or you’ve broken one function out into two that need to be chained together.…

Hike up Desolation Trail

I hiked up Desolation Trail with Scott Wiersdorf . It had rained a little bit the night before, so the trail was neither dusty nor muddy—perfect for hiking. Hike overview Lots of pretty plants on the way. This flower is called Arrow Leaf Some pretty ground cover A neat old tree that got split The way up was nice and scenic. View from the trail looking at Church Fork or Grandeur Peak—I forget which…

Writing Racket Macros: define-syntax and phases

There are a bunch of different ways of writing a macro in Racket. There are also some tricky things around phases to keep in mind. This is to help me keep them all straight.

Meta: Update should fix RSS feeds

I recently made an update to how I build my blog. I like writing my posts with Org-mode because it provides a richer markup language than Markdown. Plus, more Emacs = more good. Hugo has support for Org files, but there was a problem with the RSS feed generation: all of my posts written in Org got truncated at some point. I don’t know if the fault lies with Hugo itself or with some problem in the…

The kind of thinking computer science enables

I believe computer science plays as integral of a part to a well-rounded liberal arts education as does mathematics and linguistics. Why? A liberal arts education is designed to help you think in new and better ways. Computer science teaches novel ways of thinking, reasoning, and approaching problems that are hard to get anywhere else. I took a class on pedagogy when I encountered this puzzle. I…

Using a Real Mail Client with Outlook

I recently managed to get access to my Outlook email from Emacs. This took some doing as my university had disabled app passwords. I consider Outlook to be harmful , but inasmuch as companies and schools continue to enforce OAUTH-only authentication with email systems, it is good to find workarounds. This is how I set up email sending/receiving on my computer running macOS with DavMail . I…

Delimited Continuations

I’ve talked at some length about continuations and what they can do. In short, continuations let us manipulate the control flow programmatically. Among other things, it lets us implement generic non-deterministic backtracking search constructs, exception handlers, and cooperative threading—all without changes to the runtime or standard library! If you need a refresher, see my previous post on…

The Case for Picking a Non-Mainstream Programming Language

How many JavaScript developers are there? A lot. What are your odds that a given candidate is a good programmer? Not great. Identifying with a single language is rather myopic, in my view. Languages evolve, new ones arise, and old ones get discarded. It’s true that you can make a killing as a COBOL developer—I had a professor once who said that he took a COBOL job and made a good amount of money…

Praise for the pragmatic third camp

Some years ago I came across a blog post that described programmers as being in one of three camps. It’s a fun, short post, so I encourage you to go read that real quick, but the gist of it is that programmers generally fall into one of three categories according to what they primarily value: Applied mathematicians, who appreciate elegant solutions to problems. Program execution on von Neumann…

Metric Worship, or: How a bad manager wrecked a (small) company

I once worked as a part of a company with four employees, all of us programmers. We formed a sort of daughter company with a bigger—though still modest-sized—company that handled our payroll and whatnot. Our work directly helped the parent company, but we were organizationally independent development-wise. I really liked working with that small team: we had a one-hour meeting each week to plan out…

What is a type system, really?

Background This is a question I’ve been wrestling with for a little bit. My first experience with a type system was with Java, and I didn’t like it. It just felt like an annoying constraint on the kinds of programs I could write. I was coming from Perl, which sports weak dynamic typing, so Java’s rigidity came as a bit of a shock. After Java I learned some C, which too has types. C’s types are…

Make an Emacs Buffer Open the Way You Want

Are you tired of having a particular buffer pop open in the wrong direction? Do you wish, for example, that the Racket REPL buffer showed up on the right in a vertical split, rather than below in a horizontal one? Look no further. I give you, display-buffer-alist : ( add-to-list ' display-buffer-alist '(" \\*Racket REPL <&#x2F;>\\* " ( display-buffer-in-direction ) ( direction . right ))) That…