Meta-programming guide

I’ve written up the notes I took while learning basic concepts:

https://github.com/p-i-/MetaGuideJulia/wiki

It is far from complete, and maybe needs to be split up into several pages.

Please feel very welcome to do some community editing magic and knock this into shape. If it’s hassle to do PRs, feel welcome to hand me a splat of text in the JuliaLang gitter and I will stick it in.

Maybe it can evolve into a proper learning resource…

I will keep nudging it as my own understanding improves.

Suggestions / feedback / content gladly received!

π

PS Is there a better category for this?

PPS I’ve also put it up here: Documentation - Stack Overflow just because it’s easier for people to make edits I think. (I never figured out how to edit a GitHub project wiki) at time of writing it needs a couple of reviews before it goes visible.

5 Likes

I’m not sure how to do a PR against a wiki on github (if it’s possible?).

So I figured I try to point out here that https://github.com/p-i-/MetaGuideJulia/wiki#module-gotcha should be mostly fixed now by https://github.com/JuliaLang/julia/pull/15850 on v0.6 master.

Also, in the https://github.com/p-i-/MetaGuideJulia/wiki#ismael-vc example, you don’t want to call esc(:(@util)) there since you want the hygienic macrocall, not the non-hygienic one. (only block and condition should be wrapped in esc).

Similarly for https://github.com/p-i-/MetaGuideJulia/wiki#example-until-macro, you don’t want to call esc(:!), only the block and condition should be wrapped in esc.

1 Like

DUH the wiki was only editable by myself.

I’ve flipped the switch. Now everyone can edit.

And please do!

Note that the bottom third hasn’t yet been structured / organised / polished. I need to go through that properly at some point (or someone does).