Posts with topic 'C'

Recursive macros in C, demystified (once the ugly crying stops 😭)

In which it becomes clear, the C Preprocessor was designed by a Kafka fan

So you have heard rumors whispered between peers, that a rare few people somehow manage to make compile-time recursion work in C? And you want to have some insight into how that might be possible??

I should warn you, you’re risking your sanity… but I’ll indulge you.

Wait, did I really just say that? I must be a glutton for punishment, because the macro system is, by far, the thing I like least about C.

Read more about Recursive macros in C, demystified (once the ugly crying stops 😭)

Why C variable argument functions are an abomination (and what to do about it)

As a language, C has managed to do a remarkable job providing an incredibly useful middle ground between assembly languages and other systems languages… for more than 50 years.

At its heart is a simple imperative language with accessible enough syntax. And while concepts like pointers are often a challenge for people coming into the language, if you are doing systems programming, you should have to understand them. Not to mention, C is a massive upgrade over dealing with the problem in assembly.

Read more about Why C variable argument functions are an abomination (and what to do about it)

The 🀯 truth about heap memory!

A.k.a. the complexities of computational complexity

Probably only two people read my arena allocation article last week (even my employer, who begged me to write, did not post), but one person did seem to read it (and to the other: hi, mom!). Okay, maybe a few other people skimmed it, but stopped when they realized it was just an arena allocator as a precursor to a garbage collector.

I know one person read it fully, because this person let me know I was full… of garbage. And not because I had stopped before the actual garbage, collection.πŸ₯ No, apparently, the complaint came due to an article last week people actually did read:

Read more about The 🀯 truth about heap memory!