-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WISH] Lay explanation how this magic works - maybe a blog post? #30
Comments
Thanks for your suggestion! I was thinking about a blog post a while ago, but never really began writing it. I was thinking that an "average developer" should not really know how Metalang99 works under the hood -- for the same reason as they shouldn't know the internals of Clang, GCC, or Boost libraries. Metalang99 is designed in such a way that it hides its bowels as much as possible (i.e., I tried to avoid abstraction leaking), so I don't think that studying Metalang99's sources is necessary for its successful usage. On the other hand, you might be interested in actually digging into the implementation. This can be for various reasons, including contributing to Metalang99 or just pure curiosity. In this case, I invite you to begin learning how the recursion engine works -- I left a number of comments covering particular implementation aspects. You'll also find a link to CPS here, which is used as an internal representation of some functional compilers. Overall, I was relying on already established techniques of preprocessor metaprogramming. They were applied in Boost/Preprocessor, Boost/VMD, and similar libraries a long time ago. That being said, I think that a blog post is not absolutely necessary, but I'm also not against it. Perhaps one day I will write it, although it's not on my priority list. |
I like studying implementations of tools. Especially smaller and less popular ones. |
Hey @Hirrolot,
I was trying to read the implementation of the metalang99 but steam started going out of my ears.
The problem is 100% or receiving end - I lack understanding of C macros and also functional principles you've applied.
I really enjoyed your last blog post "Fueled Evaluation for Decidable Type Checking" for its clarity of thought.
It would be really great to have a similar article that explains metalang99 for smallbrain grug [1].
In particular these questions are interesting:
The knowledge is only good if we can re-transmit and reproduce it. Metalang99 probably goes above the head of the average developer.
Thanks a lot!
[1] https://grugbrain.dev/
The text was updated successfully, but these errors were encountered: