Conditionally Disabling Code with Comptime in Zig

Conditionally disabling code is a common pattern in software development. Here are a few very common reasons you might want to conditionally disable code: | Continue reading


@mitchellh.com | 7 days ago

Joining Polar as an Advisor

Mitchell Hashimoto About Writing Misc Mitchell Hashimoto Joining Polar as an Advisor April 4, 2024 I'm excited to share that I've joined Polar as an advisor. The opening text of the Polar website at the time of writing is "Get paid coding on your passion." This is a deeply person … | Continue reading


@mitchellh.com | 5 months ago

Ghostty Devlog 006

A program uses a single stream (a "pty") to communicate to the terminal emulator. This stream can contain either plain text or control characters. | Continue reading


@mitchellh.com | 7 months ago

Ghostty Devlog 005

In the past two months, the beta testing group has grown from 100 people to over 350 people! Whoa! Two months ago the beta was less than 50 people. I'm so thankful for the interest in this terminal project and the beta testers we have. This large and growing group of testers is r … | Continue reading


@mitchellh.com | 9 months ago

Grapheme Clusters and Terminal Emulators

Terminals operate on a grid of fixed size cells. This is fundamental to how terminal emulators operate because many control sequences programs can send to the terminal operate on cells. | Continue reading


@mitchellh.com | 11 months ago

Reorient GitHub Pull Requests Around Changesets

The lifecycle of a GitHub pull request today is effectively one giant mutable changeset. This is a mess! | Continue reading


@mitchellh.com | 11 months ago

Ghostty Devlog 004

Last week, I shared our public Discord server and I also gave a talk on Ghostty and Zig. If you missed either of those, please check it out. I distribute new beta invites through the Discord community. Also, our Discord community has grown to over 600 people. Wow! | Continue reading


@mitchellh.com | 11 months ago

Talk: Introducing Ghostty and Some Useful Zig Patterns

Mitchell Hashimoto About Writing Misc Mitchell Hashimoto Talk: Introducing Ghostty and Some Useful Zig Patterns September 12, 2023 This is the text format of a talk I did for Zig Showtime. If you'd rather watch the video, you can find it on YouTube: Zig Showtime: Ghostty. The vid … | Continue reading


@mitchellh.com | 1 year ago

Ghostty Devlog 003

I'm excited to share that we now have a public Discord server! Anyone is welcome to join, ask questions about Ghostty, talk about terminal emulators, talk about systems programming, GPU programming, etc. We're also using the discord as a way to expand the beta program, so if you' … | Continue reading


@mitchellh.com | 1 year ago

Ghostty Devlog 002

We'll dive into the tech stuff in just a second, but I want to highlight some updates on the non-tech side since there are a few really exciting things to share! | Continue reading


@mitchellh.com | 1 year ago

Ghostty Devlog 001

As this is the first devlog ever, let's talk about the tech stack behind Ghostty. Ghostty is a cross-platform (macOS and Linux today, but written in a way that Windows support will come later), GPU-accelerated terminal emulator. | Continue reading


@mitchellh.com | 1 year ago

My Approach to Building Large Technical Projects

Initially, you have some large project and you have to figure how to start. For me, this is the hardest part and I can spend hours -- sometimes days -- waffling over the right starting point. | Continue reading


@mitchellh.com | 1 year ago

Integrating Zig and SwiftUI

The high level idea: | Continue reading


@mitchellh.com | 1 year ago

Prompt Engineering is for Transactional Prompting

The nature of a process being interactive or transactional isn't nuanced enough to cleanly separate the value of prompt engineering. Another dimension that we can split is between objectivity and subjectivity. | Continue reading


@mitchellh.com | 1 year ago

Using Nix with Dockerfiles

Dockerfiles are quite easy -- you just chain together shell commands -- so understandably there is some hesitation to introduce a tool like Nix into the mix. The practical reason is that if you use Nix, you'll get always-working environments on local machines, CI, Docker, and mor … | Continue reading


@mitchellh.com | 1 year ago

Prompt Engineering vs. Blind Prompting

Feel free to skip this section if you're already very familiar with the term "prompting" or understand what a "prompt" is. | Continue reading


@mitchellh.com | 1 year ago

Growth of AI Through a Cloud Lens

The early success of cloud was marked by providing immediate value to early adopters. For small projects (initially, more on this later), EC2 was the fastest and cheapest way to get a server and S3 was the easiest and most reliable way to store and serve static assets and binary … | Continue reading


@mitchellh.com | 1 year ago

My Startup Banking Story

Mitchell Hashimoto About Writing Misc Mitchell Hashimoto My Startup Banking Story March 14, 2023 As a relatively new member of adult society, and an absolute infant of the business world, I didn't think much about bank choice. I figured: you put money in, you take money out, they … | Continue reading


@mitchellh.com | 1 year ago

Contributing to Complex Projects

Continue reading


@mitchellh.com | 2 years ago

Zig build system internals

Continue reading


@mitchellh.com | 2 years ago

Zig

My writings about the Zig programming language. | Continue reading


@mitchellh.com | 2 years ago

Zig Sema: ZIR => AIR

We can look at example AIR before diving into how AIR is structured and built internally. Here is a simple Zig program and the AIR that it produces: | Continue reading


@mitchellh.com | 2 years ago

Zig AstGen: AST => ZIR

Before diving into the internal structure of ZIR and the process for creating it, let’s take a look at a quick example of what ZIR looks like. You’re not expected to understand any of this right now. | Continue reading


@mitchellh.com | 2 years ago

Zig Parser

From parsing onwards, the Zig compiler uses MultiArrayList structures heavily. You must understand the MultiArrayList in order to understand how the parser works as well as the structure of the created AST. | Continue reading


@mitchellh.com | 2 years ago

Zig Tokenizer

The Zig language tokenizer is part of the Zig standard library and is at lib/std/zig/tokenizer.zig and exposed as std.zig.Tokenizer. The tokenizer takes a slice of bytes as input and produces one token at a time until EOF. The tokenizer performs no allocations. | Continue reading


@mitchellh.com | 2 years ago

Apple: My Key to Success

No, not the company or the fruit. APPLE is an acronym ingrained into every Apple store employee before they ever even step on the retail floor. And it has continued to guide me ever since. APPLE: Approach customers with a personalized warm welcome... | Continue reading


@mitchellh.com | 2 years ago

Comparing Filesystem Performance in Virtual Machines

First up is a sequential read of a 64 KB file, tested over various read record sizes. A real world application of a small sequential read would be loading the source files of an application to run, compile, or test. | Continue reading


@mitchellh.com | 10 years ago

Packer

Mitchell Hashimoto About Writing Misc Mitchell Hashimoto Packer June 28, 2013 For the past two months, I've been heads down working on something new. There is still a lot of work left, but I believe it's time to show everyone what I've been up to. Today, I'm announcing Packer: an … | Continue reading


@mitchellh.com | 11 years ago

The Tao of Vagrant

Mitchell Hashimoto About Writing Misc Mitchell Hashimoto The Tao of Vagrant June 18, 2013 Before even installing Vagrant or seeing how it works, it is important to understand the high-level workflow of Vagrant in an actual working environment. These principles are collectively kn … | Continue reading


@mitchellh.com | 11 years ago

Automation Obsessed

Mitchell Hashimoto About Writing Misc Mitchell Hashimoto Automation Obsessed June 6, 2013 Someone asked me recently to share some previous work I had done. As I looked back at my personal history, and reflected on what I've done successfully, it was clear to me that I'm definitel … | Continue reading


@mitchellh.com | 11 years ago

Abandoning Rubygems

Since the initial release of Vagrant in 2010, Vagrant has grown to be used by hundreds of companies and thousands of people. While I don't have hard numbers to back this up, a majority of the Vagrant users I meet are not Ruby developers. | Continue reading


@mitchellh.com | 11 years ago

APPLE: My Key to Success

Mitchell Hashimoto About Writing Misc Mitchell Hashimoto APPLE: My Key to Success March 4, 2013 No, not the company or the fruit. APPLE is an acronym ingrained into every Apple store employee before they ever even step on the retail floor. And it has continued to guide me ever si … | Continue reading


@mitchellh.com | 11 years ago

The New Normal

My first critical new normal happened when I was 12 years old. I participated in an online BBS dedicated to writing cheat programs for a popular web-based game. I would spend two to four hours per day after school on this BBS, socializing with a group of people that spent their f … | Continue reading


@mitchellh.com | 11 years ago