u/raiphin r/ProgrammingLanguages • Recommends
On “Does a language like this exist?”
3.7K subscribers • 5 videos on Hallway
Advanced. Deep dive for people who know the field.
1.9K views6 years ago1 recommendation
Programming languagesSystems programmingLanguage design and type systemsCompilers and interpreters
Jonathan Worthington introduces RakuAST, a document object model for Raku code that enables robust compile-time manipulation and macro support.
Raku already invites the programmer to participate in compile time, for example by implementing trait handlers, customizing meta-classes, producing meta-objects in an EXPORT, or using BEGIN blocks directly. These are utilized by a range of modules, such as Red (an ORM), Cro (used for building web applications) and ASN::META (parsing an ASN specification and exporting Raku classes based on the specification). The key limitation today is that there’s no document object model for Raku code itself. For example, it would be desirable in a web framework to have a Raku regex used for validation on the server side be translated into one usable on the HTML5 pattern attribute - however that would only be achieved today by a program choosing to re-parse the Raku regex syntax itself! Similarly, modules that produce Raku code and EVAL it would be far more robust if they could instead build a tree of objects representing the Raku program. Macros, too, will only reach their potential if the programmer can work with the AST passed in. Therefore, I’m currently working on RakuAST, a user-facing Abstract Syntax Tree for Raku programs. In this talk, I’ll share the design and implementation progress on that so far, and some of the things it will enable.What people say. Recommended as a demonstration of Raku's powerful compile-time capabilities, macro system, and language-oriented programming features.
u/raiphin r/ProgrammingLanguages • Recommends
On “Does a language like this exist?”
u/raiphin r/ProgrammingLanguages • Recommends
On “Simple Macros”
u/raiphin r/ProgrammingLanguages • Recommends
On “How can I create a language?”
u/raiphin r/ProgrammingLanguages • Recommends
On “Where to start for self-learning of the basics?”
u/raiphin r/ProgrammingLanguages • Recommends
On “Video resources to help learn”
u/raiphin r/ProgrammingLanguages • Recommends
On “Literature about mixing compile time and runtime code.”