r/Protos • u/guillermoamolina • 2d ago
Building a programming language on GraalVM: Protos now generates Open Graph and Twitter Cards using its own Standard Library
Another step towards building the Protos website entirely in Protos itself.
The structured HTML Standard Library now supports 14 Open Graph and Twitter Card metadata fields, including page titles, descriptions, images, dimensions and URLs.
Html: import("std:html")
Html.render(Html.meta(%{
"property": "og:title"
"content": "Protos"
}))
The interesting part is not the metadata itself, but how it was implemented:
- 100% written in Protos.
- Zero Java changes.
- No additional runtime primitives.
- Reuse of the existing URI parser, escaping and HTML serializer.
- All 127 HTML conformance tests passing locally.
Protos is an experimental prototype-based language built on GraalVM and Truffle, exploring ideas relevant to Smalltalk, Self, JavaScript and other dynamic languages.
I'm increasingly using Protos to implement the infrastructure that the language itself needs.
For those building their own programming languages: how early do you start implementing your Standard Library in the language itself?
GitHub: https://github.com/guillermomolina/protos
Website: https://www.protoslang.com/