ASN.1 for Perl 6: with elegance and metacompilation

Alexander Kiryuhin — 20 minutes 🦋

During this talk we will take a quick look at the process of implementing Perl 6 support for an ASN.1 subset: what was easy, what was hard and what was awesome.

When one has to implement support for interface description languages, such as ASN.1 (Abstract Syntax Notation One), usually a compiler has to be written with the source language being an ASN.1 specification, and the target language being source code of the target programming language. However, this approach has a number of disadvantages. Some of them can be mitigated using manual specification encoding - but a number of different issues arise with this approach also. Perl 6, with its compile time execution policy and metaobject protocol, allows us to use a third approach - utilizing the best parts of the first one and the second one, while avoiding some of the issues.

In this talk we will discuss:

* The necessary bits for basic ASN.1 support with BER encoding - ASN::Grammar and ASN::BER.
* Issues with the simplest approach of pure ASN::BER usage.
* Guts of the ASN::META module that allows us to improve the simplest approach.
* Advantages and disadvantages of the ASN::META module.



Talk tags
Perl 6, ASN.1, Metaprogramming
Perl versions
🦋 Perl 6
Target audience
Intermediate
Category
Perl 6 programming
Talk duration
20 minutes
Talk status
accepted

Talk announce