https://github.com/shmink/metaprogramming-elixir
Notes and examples I create whilst covering the book.
https://github.com/shmink/metaprogramming-elixir
book elixir examples metaprogramming notes
Last synced: 12 months ago
JSON representation
Notes and examples I create whilst covering the book.
- Host: GitHub
- URL: https://github.com/shmink/metaprogramming-elixir
- Owner: shmink
- Created: 2018-11-07T11:30:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-12T11:13:16.000Z (over 7 years ago)
- Last Synced: 2025-04-14T03:33:52.286Z (about 1 year ago)
- Topics: book, elixir, examples, metaprogramming, notes
- Language: Elixir
- Size: 36.1 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Metaprogamming Elixir
## by Chris McCord (author of the Phoenix framework)
_Write less code, get more done (and have fun!)_ :purple_heart:
[](https://codebeat.co/projects/github-com-shmink-metaprogramming-elixir-master)
### Abstract
Reading this book to learn about how macros work and following some of the relevant
examples. This README will serve as my notes, therefore you shouldn't take them at face
value as the notes will make sense for me as I cherry pick a sentence or an analogy.
Moreover, don't expect direct quotes, changing the sentences vocbulary helps me personally.
### Contents
- [Chapter 1 - The Language of Macros](chapters/chapter1.md)
- [What are Macros?](chapters/chapter1.md#what-are-macros)
- [The Abstract Syntax Tree](chapters/chapter1.md#the-abstract-syntax-tree)
- [Trying It All Together](chapters/chapter1.md#trying-it-all-together)
- [Macro Rules](chapters/chapter1.md#macro-rules)
- [The Abstract Syntax Tree - Demystified](chapters/chapter1.md#the-abstract-syntax-tree-demystified)
- [High-Level Syntax vs. Low-level AST](chapters/chapter1.md#high-level-syntax-vs-low-level-ast)
- [AST Literals](chapters/chapter1.md#ast-literals)
- [Macros: The Building Blocks of Elixir](chapters/chapter1.md#macros-the-building-blocks-of-elixir)
- [Macro Expansion](chapters/chapter1.md#macro-expansion)
- [Code Injection and the Caller's Context](chapters/chapter1.md#code-injection-and-the-callers-context)
- [Chapter 2 - Extending Elixir with Metaprogramming](chapters/chapter2.md)
- [Re-Creating the if Macro](chapters/chapter2.md#re-creating-the-if-macro)
- [Adding a while Loop to Elixir](chapters/chapter2.md#adding-a-while-loop-to-elixir)
- [Smarter Testing with Macros](chapters/chapter2.md#smarter-testing-with-macros)
- [Extending Modules](chapters/chapter2.md#extending-modules)
- [Using Module Attributes for Code Generation](chapters/chapter2.md#using-module-attributes-for-code-generation)
- [Compile-Time Hooks](chapters/chapter2.md#compile-time-hooks)
- [Chapter 3 - Advanced Compile-Time Code Generation](chapters/chapter3.md)