All Posts
Gorging
- 28 April 2024
When I tried to search for the demand version of dumping, I found a lot of articles about regular dumping. A few of those had good definitions, so here’s one:
Don’t Lie To Your Build System
- 14 April 2024
Yesterday, in Make Concepts, I talked about what Make does. Today, I’m going to talk about how Make gets abused.
Make Concepts
- 13 April 2024
There are many resources out there for how to use make and some of them are very good. However, they mostly focus on details of syntax and how to spell the different text manipulation functions. This document is not that. This document is about why Make is the way it is, and how to help it do its job.
Why I like Zig
- 11 February 2024
I’ve been writing C code professionally since about 2006, and while I look at a lot of languages (I have varying levels of familiarity with Python, Erlang, Ada, Haskell, Go, Rust, C++, OCaml, D, Javascript, Prolog, Lua, Lisp, Bash, Perl, Forth…you get the idea) I have yet to find one that I would rather use in cases where C is appropriate. Part of this inclination is that I mainly write for embedded systems where a lot of the features of higher level languages either don’t help or cost too much.
Memory Management With Zig
- 01 December 2023
This post is aimed at people who come from languages with automatic garbage collection and want to get a sense for how to approach memory management in a lower level language. I’ll be using Zig (and a bit of Python) to demonstrate, but the concepts apply to C and other languages where you have to care if your data is going on the stack or the heap.
Pointers in Zig
- 18 December 2020
This post is going to explain how pointers, arrays, and slices work in Zig, without depending on knowledge of other languages that use pointers. If you’re trying to learn Zig and your only programming experience is in a language with managed memory, this is for you. If you’re struggling to understand pointers in C, this might help. If you’re coming from C or C++ and just want to know the differences, you might be better off reading the official documentation for arrays, slices, and pointers. zig.guide is another good resource.
Extending C with Zig
- 18 December 2020
This guide was last updated in March of 2024 with an 0.12.0-dev build. Zig is a moving target, and stuff written about it may fall out of date. If you find something broken about this, feel free to let me know.
Interfaces, or: Runtime Polymorphism in Zig
- 26 June 2020
Update: April 2024 - A lot has happened since I originally wrote this article. I may still update it in to cover the current state of things, but Killian Vounckx wrote an update in February of 2022 and Issue 130 has been closed. I’m not porting the original version of this article to the Sphinx site, so if you want to read it, you can find it here.
Wrapping a C Library with Zig
- 13 June 2020
This post is going to look at wrapping a C library in Zig. The library to wrap will be libsodium, a “modern, easy-to-use software library for encryption, decryption, signatures, password hashing and more.”