Garrison Hinson-Hasty on Systems Programming with Zig

A conversation about simplicity, memory, strings, graphics APIs and working with C.

GHGarrison Hinson-Hasty게스트
채널
GOTO Conferences
게시일
2026년 10월 9일
영상
38:07
읽기
5분
원문
영어
YouTube에서 열기
스크롤하면 영상이 오른쪽 아래로 작아져 계속 재생됩니다. 자막은 읽기 언어를 따릅니다.
읽기 언어2개 언어로 읽을 수 있음
이 글은 아직 한국어 번역이 없어 영어 원문으로 표시합니다.
요약

30초 요약

Zig contributor and author Garrison Hinson-Hasty joins Trevor Berrange Sanchez to discuss his systems programming book. They examine the language’s design philosophy and practical approaches to memory, unfamiliar APIs and C interoperability.

  1. 1A book for a moving languageGarrison updates the book as pre-1.0 Zig evolves.
  2. 2Simplicity relative to the machineCHIP-8 illustrates data and operations close to the machine.
  3. 3Strings as bytes and slicesZig provides general tools while leaving encoding choices to applications.
  4. 4Memory by program phaseAllocators can help reason about a whole phase rather than each node.
  5. 5Learning an unfamiliar APIGraphics work teaches programmers to understand an API’s assumptions.
  6. 6Calling C from ZigC headers, defer and optional wrappers make interoperability practical.

핵심 정리

  1. Garrison updates the book as pre-1.0 Zig evolves.
  2. CHIP-8 illustrates data and operations close to the machine.
  3. Zig provides general tools while leaving encoding choices to applications.
  4. Allocators can help reason about a whole phase rather than each node.
  5. Graphics work teaches programmers to understand an API’s assumptions.
  6. C headers, defer and optional wrappers make interoperability practical.
전문

챕터별로 다듬은 전문 읽기

원본 자막만 보기
01

A book for a moving language

Garrison introduces his background and explains the challenge of keeping a Zig book current.

Trevor Berrange Sanchez introduces himself as a member of the Zig community. Garrison Hinson-Hasty says he has contributed to the compiler, helped people in the community and used Zig since about 2021. His earlier interest in C, memory allocation and data-oriented programming led him to Zig.

Trevor asks why Garrison wrote a systems guide for a pre-1.0 language that changes frequently. Garrison says it is a real challenge: at the time of the conversation, he is updating the last seven chapters for Zig 0.16 and tries to choose projects and concepts that will remain useful.

Garrison sees the slow path to 1.0 as deliberate. Using the language while it evolves helps people understand the decisions behind it, and he likes the opportunity to guide readers onto a moving train even though the book takes extra maintenance.

Asked what drew him to Zig, Garrison calls its attitude countercultural. In his view, much modern software builds layers of abstraction over complexity; he acknowledges that frameworks have good reasons to exist but prefers software designed for quality and longevity.

02

Zig and simplicity

The speakers discuss well-tested ideas and what simple code means relative to the machine.

Garrison says Zig moves forward with well-tested ideas, rather than treating an idea as valuable merely because it is old. Reliability, performance and serving users are lessons the field has accumulated over decades. Trevor sees a similar preference in parts of the community for trimming overhead and complexity.

Trevor points to the book’s CHIP-8 interpreter: it starts with integers, buffers and simple operations rather than elaborate managers, then combines those pieces into an interpreter. He asks what makes Zig good at expressing this kind of simplicity.

Garrison says “simple” means different things to different programmers. His interpretation of the Zig community’s usage is simplicity relative to what the computer actually does: integer and pointer types can map closely to how data is represented at the machine level.

CHIP-8 itself offers a small model of computation, Garrison explains. It lacks many complexities of modern processors, but its memory, instructions and subroutines still provide a way to think about concepts that appear in contemporary computers.

He wants readers to ask where the memory for a string comes from, where it goes and how long it lives. In his view Zig takes useful ideas from C and later systems languages while trying not to add unnecessary layers.

The two compare C’s preprocessor with Zig’s compile-time facilities. Trevor notes that the C preprocessor runs before compilation, while compile-time computation is woven into Zig’s language. Garrison sees this as part of reconsidering language features as a coherent whole.

03

Strings and encoding

Garrison compares Zig’s byte and slice tools with richer string abstractions.

Trevor asks about Zig’s lack of a built-in string abstraction. Garrison starts with the C view of a string as bytes and contrasts it with Zig’s common use of a pointer and length. The question opens a discussion of encoding, memory and what a standard library should commit to.

Garrison traces some of the historical context: C grew up when ASCII was common, while UTF-8 was designed to work with much existing ASCII-oriented software. Today UTF-8 is widespread, though other encodings still matter in some environments.

Other languages offer abstractions around code points and strings. Garrison likes Zig’s decision to provide general slice-processing tools and leave applications free to work with UTF-8, code points or another representation as needed, instead of making one comprehensive string abstraction mandatory.

He contrasts this with Rust’s richer set of string types for different encodings and memory situations. He appreciates that these types address real complexity, but argues that maintaining the whole abstraction surface is a continuing burden. This is his design preference, not a claim that one approach suits every application.

04

Allocators and data orientation

The discussion moves from individual objects to managing memory across phases.

Trevor turns to allocators, which are explicit in Zig’s standard-library conventions, and observes that the book uses little dynamic allocation. Garrison says that is largely a consequence of representing data in a flat, data-oriented way rather than an independently pursued rule.

Garrison notes that beginners in manual memory management may reproduce the object-by-object model they know from higher-level languages, allocating each object separately. He describes a shift from thinking about one request or object to thinking about batches of requests and data.

For him, the biggest benefit of allocators is reasoning about memory for a phase of a program rather than tracking each object independently. A compiler parser, for example, can be considered as a unit instead of focusing on the lifetime of every individual syntax-tree node.

05

Graphics and unfamiliar APIs

OpenGL illustrates the broader skill of learning a system’s assumptions.

Trevor brings up the graphics chapter, “Shader Heck.” It contains a lot of material about graphics and external APIs rather than Zig syntax alone. He asks why that belongs in a systems programming book.

Garrison says OpenGL has a history and design that can be confusing, so programmers must read documentation and external material even for basic tasks. Over time they learn the API’s model of the world and what it expects from them.

That skill transfers to other systems: unfamiliar hardware, software and bespoke interfaces each impose their own assumptions, and a ready-made tutorial may not exist. He contrasts committee-designed APIs with libraries built around one person’s aim of making a task easier to understand.

Garrison says his favorite part of the chapter is not OpenGL itself but demonstrating how to analyze an unfamiliar domain outside one’s comfort zone. Trevor agrees that the key question is often simply: what does this API want from me?

06

Interoperability with C

The speakers discuss headers, cleanup and wrappers.

On interoperability, Trevor asks what Zig does particularly well with C. Garrison says that, in many cases, calling C requires relatively little extra work compared with setting up interfaces from some other languages, although the programmer still has to account for C-compatible types and conventions.

Zig can use a C header while still letting code use features such as defer for cleanup. Garrison sometimes writes a small Zig wrapper around C functions with awkward error returns or output parameters so that the surrounding code can use Zig’s error handling.

Garrison emphasizes that wrapping is optional and says C interoperability is a first-class part of Zig. Trevor agrees that defer changes how he thinks about using C APIs. They close by recommending Garrison’s book.

같은 채널의 다른 글

슬라이드 3장39:12EN
GOTO Conferences· 2026년 10월 28일Cate Huston: How Rigour Supports AI-Assisted Development VelocityCate Huston · TwillA two-person team’s experience with release gates, automated checks, prioritization and the cost of shipping faster.AI 엔지니어링 리더십Software engineeringAI agents
슬라이드 4장22:33EN
GOTO Conferences· 2026년 10월 26일William Schor: From Unit Tests to Synthetic Canaries at NetflixWilliam Schor · NetflixHow generated workloads and production-like infrastructure help test a distributed key-value service.Software engineering
슬라이드 5장34:11EN
GOTO Conferences· 2026년 10월 23일Anatoliy Bilenko and Alberto Carretero: Making Database Protocols Reliable with Formal Methods and AIAnatoliy Bilenko, Alberto Carretero · CanonicalCanonical’s database engineers connect executable specifications, model-based tests, failure exploration, and reconstructed execution histories—and explain why none of these techniques proves a real system correct on its own.개발 워크플로와 테스트Code review & verification관측 가능성과 안정성+2
28:15EN
GOTO Conferences· 2026년 10월 22일Steve Poole on Open-Source Security and AI’s Maintenance ChallengeOlimpiu Pop, Steve PooleWhy faster vulnerability discovery increases pressure on maintainers, dependency users and upgrade processes.Software engineeringAI security
슬라이드 5장46:36EN
GOTO Conferences· 2026년 10월 21일Don Syme: Building Agentic Automation Around Human CollaborationDon Syme · GitHubContinuous AI, repository workflows and the guardrails needed for unattended software maintenance.Agent orchestrationSoftware engineering코딩 에이전트
28:23EN
GOTO Conferences· 2026년 10월 19일Learning Ash: Declarative Elixir Apps, Testing and ExtensibilityChristian Alexander, Rebecca Le, Zach DanielRebecca Le and Zach Daniel explain how their book and the framework evolved together.Software engineering