Erlang metaprogramming made easy: Richard Carlsson
512 views · Published 5 June 2012 · 49:37 · Indexed 29 September 2026
Channel: Erlang Solutions · 2012 · Science & Technology
Erlang Factory SF Bay Area 2012 www.erlang-solutions.com www.erlang-factory.com "To generate Erlang code dynamically, you have until now had two choices: you could either create plain tuples according to the "abstract format" as generated by erl_parse (which is messy and has many special cases to keep in mind), or you could use the API functions in the erl_syntax module (which offer more abstraction, but can get pretty verbose). This talk will present the missing ingredient; a library allowing you to use template strings with metavariables, both for generating and matching on abstract syntax trees. As examples, I will show how we have used this at Klarna to implement a small domain-specific language for business logic, and demonstrate how you too can easily write a parse transform and even implement your own DSL that compiles to Beam code. " Follow us on Twitter @Erlangfactory https://twitter.com/#!/erlangfactory Join our group on Linkedin Erlang Factory http://www.linkedin.com/groups/Erlang-Factory-2003110?trk=myg_ugrp_ovr
More from this channel
-
30:33
Erlang Application Metrics with Folsom: Joe Williams
-
40:49
Accelerated Erlang Development with e2: Garrett Smith
-
39:13
Erlang on Xen - a quest for lower instance startup latency: Maxim Kharchenko
-
30:36
Migrating a C++ team to using Erlang to deliver a real-time bidding ad system: Ken Wilson
-
22:04
The Openflow Soft Switch: Krzysztof Rutka
-
34:23
Using Software Refactoring to Form Parallel Programs(...): Chris Brown, Kevin Hammond
-
12:17
Mnesia Backend Plugin Framework and a LevelDB-based Plugin: Roland Karlsson, Malcolm Matalka
-
26:14
Scalable ejabberd: Konstantin Tcepliaev