HNHacker News
TopNewBestAskShowJobs

Teiolass

21 karma · joined September 10, 2023

Website: https://teiolass.gitlab.io/en/
submissionscomments
Teiolass··on Examples of Metaprogramming
yeah I thought that creating the hackernews post so that i could link that from my post would have been quick. Of course it wasn't enough. Next time I will do a three phase deploy: create the post, create the hackernews link, update the post with the link : )
Teiolass··on Examples of Metaprogramming
This series of posts is about how I (over?-) used the metaprogramming system. This post gives an overview and a most basic examples. In the next one we will see the more complex ideas.
Teiolass··on Run Functions in Another Stack with Zig
Mostly because I just wanted to understand a bit more how these things work. Using abstraction in the form of magic keywords gets the job done (sometimes, but not always) but is almost useless for your understanding.

And I think that the understanding can be very useful even when you use the magic words.

Teiolass··on Run Functions in Another Stack with Zig
Every program compiled with a reasonable compiler runs putting some of its data in the so called stack. It’s fairly easy: when you call a function, the function puts its data on top of the stack; when the function returns the data is removed so that the stacks now exposes the data of the caller function. In this post we mess with this mechanism, but substituting the default area of memory for the stack with a freshly allocated one.