Anyone who's written C knows that full ISO C standard-adhering code is an impractical rarity. Most real world C code out there relies on non-standard behaviors and language extensions to varying extents, and a lot of this isn't for extra features, but just to work around bugs and gaps in different compilers and libraries. A lot of codebases will try somewhat to support various…
I have migrated this site from Codeberg Pages (and before that, sourcehut pages 1 ) to a VPS. This is something I've been considering for a long time and finally got around to it this week, in no small part encouraged by recent discourse (see: one , two , three ). Git I already moved off GitHub many years ago, seeing the, uh, direction, it was taking after the Microsoft acquisition... I…
Morcilla de Verano The name of this dish from the Murcia region of Spain translates to "summer morcilla", named after its resemblance to the filling of a type of blood sausage called morcilla. In spite of its name, this is a meat-free recipe, made by stewing down eggplant into a deliciously savory dip with a soft spreadable texture. Ingredients olive oil 1 onion (chopped small) 2 medium eggplants…
Motivating example Say you want to write an integer hash-set implementation in C. You might start like this: /* a hash-set implemented with a flat open-addressed array with linear probing */ struct set { int *entries; size_t N; }; void set_init(struct set *set, size_t initial) { /* make sure N is a power of 2, with enough capacity to minimize collisions */ for (set->N = 8;…
No-Knead Bread I grew up eating good bread fresh from an artisan bakery every day. Over the years I've experimented with making and baking my own bread with recipes from the internet but most of it felt flat and it was only this year that I figured out What Worked to make delicious bread that matched that from the bakery. This recipe , itself an adaptation of a NYTimes recipe, is what…
Over the past few months, I've really come to enjoy oatmeal. I'm from a country where it's not a common food at all and I never knew of it growing up, but now it's become my breakfast of choice most days, and I have experimented with many variations of it which I wanted to share: Sweet Variations This is how I like to have oatmeal most of the time, with some sweetener and maybe…
I've wanted to make use of some of my spare time to do a bit of writing, and food & cooking is something I find interesting and spend time thinking about, plus I like to experiment with cooking as a creative outlet. So writing about it seems like a natural choice, and I get to give this site some more use that way.
Preface The 1999 revision to the C programming language brought several interesting changes and additions to the standard. Among those are variable length arrays, or VLAs for short, which allow array types to have lengths that are determined at runtime. These can show up in different contexts, but for the purposes of this post we will be looking at VLAs as parameters to functions. For example:…