HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Zig: A programming language designed for robustness, optimality, and clarity –  Andrew Kelley

Recurse Center6 HN recommenders · recommended in 7 months, 2018-2024
YouTube
75K views · 8 years ago · talk · dated

Andrew Kelley, creator of Zig, introduces the language at the Recurse Center's Localhost series in 2018. He covers its goals of robustness, optimality and clarity, C interop, cross-compilation and explicit allocators.

HN repeatedly recommends it as the definitive introduction to Zig straight from its author, and links to it whenever Zig's design choices come up.

C, C++, Rust, Go & systems languagesProgramming language design#zig#systemsprogramming#allocators#cross-compilation#languagedesign

12 comments from Hacker News

@AndyKelley2024 · in “Zig's new CLI progress bar explained”

▶ this video Software Should Be Perfect - A journey of questioning assumptions and building a new programming language This has been my goal since the beginning. I wasn't kidding

CitesView on HN
@jorangreef2021 · in “Why Zig when there is already C++, D, and Rust?”

Zig does however go a long way towards memory safety, to be fair, and if you wanted to, you could also argue similarly that Rust does not guarantee 100% OOM safety whereas Zig does: ▶ this video I would also say that for "very large long lived projects", memory safety is not actually the most important issue, but rather correctness, followed by (in no particular order) safety, performance, explicitness, readability and exhaustive fine-grained error handling, the latter also not found in too many languages besides Zig.

CitesView on HN
@MaxBarraclough2021 · in “How Tail Call Optimization Works”

> So I assume you could make a standard compliant compiler that doesn't nothing but immediately overflows the stack. Interesting thought. I imagine just about every language spec (with the possible exception of assembly languages) states something like If memory is exhausted, a handler is executed or If memory is exhausted, the behaviour is undefined , and it's always going to be up to the compiler/interpreter to make reasonable use of the available memory on the specific target platform. Would a C compiler be non-compliant if it generated code that used 100x the memory that would be used by code generated by typical C compiler? How about 1,000,000,000x so that its generated programs always failed immediately? Java is an interesting case for this, as it famously doesn't require that a garbage collector needs to be included at all (unlike .Net which does). In Java, not only are you permitted to have a conservative GC, you're permitted to have no GC whatsoever (something OpenJDK now offers [0]). Apparently [1] Java requires that the collector (if it exists) will run before the JVM throws OutOfMemoryError . I imagine the formal methods folks must have done some thinking on this topic, as their whole field is about doing better than just go ahead and test it out . Could a standards-compliant C compiler used in a safety-critical domain generate code that, only very occasionally, uses a billion times the memory it typically uses? Somewhat related: one of the motivations behind the

CitesView on HN
@lsh2019 · in “Game Boy Advance “Hello World” Using Zig”

This is the introduction to Zig from the language author that I watched when it was first posted here a while ago: ▶ this video (good watch)

Strongly recommendsView on HN
@lsh2019 · in “Zig 0.4.0 Released”

The Zig language has a great premise, it's worth reading the above link or watching a bit of this video ▶ this video just to question our assumptions that certain language features need exist at all.

RecommendsView on HN
@cellularmitosis2019 · in “Zig Is Great”

(and one continuous paragraph harms readability) edit: here's a great talk on zig from the recurse center: ▶ this video

Strongly recommendsView on HN
@komuW2018 · in “Ask HN: What are some of the best technical talks you've heard?”

1. Why Do Keynote Speakers Keep Suggesting That Improving Security Is Possible? - James Mickens link 2. James Mickens on JavaScript - James Mickens link 3. Creating containers From Scratch - Liz Rice link 4. 2013 Isaac Asimov Memorial Debate: The Existence of Nothing - Panelists: J. Richard Gott, Jim Holt, Lawrence Krauss, Charles Seife, Eve Silverstein. Moderator: Neil deGrasse Tyson link 5. 2016 Isaac Asimov Memorial Debate: Is the Universe a Simulation? - Panelists: David Chalmers, Zohreh Davoudi, James Gates, Lisa Randall, Max Tegmark Moderator: Neil deGrasse Tyson link 6. Zig: A programming language designed for robustness, optimality, and clarity – Andrew Kelley ▶ this video 7. Concurrency Is Not Parallelism - Rob Pike link

Strongly recommendsView on HN
@MaxBarraclough2018 · in “Zig 0.3.0 Released”

I don't know of an 'objective' thorough evaluation of Zig as it stands, but I hope these are of interest: Previous HackerNews discussion on Zig: link Also, perhaps not as objective as you'd like but still good resources: Whirlwind tour of the basic thinking behind Zig: link A ~50 minute talk on Zig, by its creator: ▶ this video

RecommendsView on HN
@MaxBarraclough2018 · in “Pointers Are More Abstract Than You Might Expect in C”

Obviously Zig's output (courtesy of its LLVM backend) can be expressed and distributed as assembly code, but it's not hand-tuned, it's compiler-generated. Whether the hand-tuned assembly code they used was the fastest out there, I'm not sure. I'd hope so, or they're being misleading. I might get time to re-watch the relevant part of the video - it's around the 21 minutes mark - ▶ this video

CitesView on HN
@MaxBarraclough2018 · in “Pointers Are More Abstract Than You Might Expect in C”

> I think there's room for other languages to occupy a similar space but they're need to focus on no-std-lib no-runtime operation (not always the sexiest target). You're describing the Zig language! It aims to be as fast as C, and unlike most languages that say this is a goal, it means it. There's no "almost as fast as C if you ignore the garbage-collector and the array-bounds-checking", it's actually as fast as C. Its author values the minimalism of C, but wants to create a far better language for doing that sort of work. [0] They're doing surprisingly well. They even managed to make a faster-than-C (faster even than hand-tuned assembly) SHA-2 [1] [0] link , link [1] link , it's also mentioned somewhere in this talk ▶ this video

CitesView on HN
@wlkr2018 · in “I Quit My Job to Live on Donations to Zig”

Looking for more on Zig I found a talk [0] (~1 hour) on the language by Andrew Kelley from just a few months ago. Edit: I see there already questions about Rust in this thread. There's an audience question on Rust in the talk [1] and the creator states that Rust is Zig's biggest competitor. [0] ▶ this video [1] ▶ this video

RecommendsView on HN
@Boulth2018 · in “Big Integers in Zig”

Zig is really interesting, and the explicit allocators is a feature I miss in many other system languages (like Rust). Presentation by the Zig author is a good introduction to the concept ▶ this video

RecommendsView on HN
The Road to Zig 1.0 - Andrew Kelley59:48

The Road to Zig 1.0 - Andrew Kelley

ChariotSolutions
168K views • 7 years ago
[#36] Zig Roadmap 2024 - Andrew Kelley1:00:23

[#36] Zig Roadmap 2024 - Andrew Kelley

Zig SHOWTIME
66K views • 2 years ago
Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains1:13:11

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains

JetBrains
979K views • 5 months ago
Andrew Kelley: A Practical Guide to Applying Data Oriented Design (DoD)46:40

Andrew Kelley: A Practical Guide to Applying Data Oriented Design (DoD)

ChimiChanga
415K views • 2 years ago
Zig Roadmap 2023 - Andrew Kelley43:20

Zig Roadmap 2023 - Andrew Kelley

Zig SHOWTIME
77K views • 4 years ago
Modeling Data Concurrency w/ Asynchronous I/O in Zig - RedisConf 202049:20

Modeling Data Concurrency w/ Asynchronous I/O in Zig - RedisConf 2020

Redis
11K views • 6 years ago
ElixirConf 2021 - Isaac Yonemoto - Zig (heart) Elixir48:11

ElixirConf 2021 - Isaac Yonemoto - Zig (heart) Elixir

ElixirConf
4K views • 5 years ago
Writing a Wayland Compositor in Zig - Isaac Freund42:20

Writing a Wayland Compositor in Zig - Isaac Freund

Zig SHOWTIME
26K views • 6 years ago
What's a Memory Allocator Anyway? - Benjamin Feng48:30

What's a Memory Allocator Anyway? - Benjamin Feng

Zig SHOWTIME
89K views • 6 years ago
2021: Year of the Linux Gaming Desktop - Andrew Kelley42:38

2021: Year of the Linux Gaming Desktop - Andrew Kelley

Zig SHOWTIME
15K views • 5 years ago
Lang NEXT 2014 Panel  Systems Programming in 2014 and Beyond1:05:56

Lang NEXT 2014 Panel Systems Programming in 2014 and Beyond

25msr
3K views • 8 years ago
Rob Pike about the target group of the Go programming language (golang)0:27

Rob Pike about the target group of the Go programming language (golang)

f8C4G86p KbqEFe47
7K views • 6 years ago
Google I/O 2012 - Meet the Go Team1:00:29

Google I/O 2012 - Meet the Go Team

Google for Developers
108K views • 14 years ago
GopherCon 2014 Inside the Gophers Studio with Blake Mizerany48:19

GopherCon 2014 Inside the Gophers Studio with Blake Mizerany

Confreaks
8K views • 12 years ago
Sydney Golang Meetup - Rob Pike - Go 2 Draft Specifications1:07:00

Sydney Golang Meetup - Rob Pike - Go 2 Draft Specifications

Macquarie Group
57K views • 7 years ago
Stanford Seminar - Concatenative Programming: From Ivory to Metal1:04:45

Stanford Seminar - Concatenative Programming: From Ivory to Metal

Stanford Online
14K views • 8 years ago
Effective Programs - 10 Years of Clojure - Rich Hickey1:14:52

Effective Programs - 10 Years of Clojure - Rich Hickey

ClojureTV
176K views • 9 years ago
Elements of Programming Style - Brian Kernighan1:10:42

Elements of Programming Style - Brian Kernighan

Institute for Advanced Study
138K views • 9 years ago
Rust: A Language for the Next 40 Years - Carol Nichols55:08

Rust: A Language for the Next 40 Years - Carol Nichols

ChariotSolutions
367K views • 7 years ago
Effective ML1:09:24

Effective ML

Jane Street
30K views • 10 years ago