2025:Program/Imagining a future for Scribunto
Session title: Imagining a future for Scribunto
- Session type: Lecture
- Track: Wild Ideas
- Language: en
đ„ Session recording: https://commons.wikimedia.org/wiki/File:Imagining_a_future_for_Scribunto.webm đ„
What's the future of Scribunto? It's the primary scripting/template system of the Wikimedia projects, but it has effectively been maintenance-only for over a decade and it's still running Lua 5.1, which has been end-of-life since 2012.
So let's imagine a more exciting future for Scribunto!
Scribunto running JavaScript! Scribunto in French! Scribunto in every language at once! Scribunto with a modern separation of presentation and data! Scribunto with a HTML DOM library or an SVG library! Scribunto and Charts! Scribunto integration with Visual Editor! Maybe even... Scribunto running on a modern supported Lua release! (Sigh.)
Join me for some (perhaps) provocative musings on all these topics, using prototypes and designs of the author, including code you can run on Wikimedia wikis today.
Description
Let's talk about Scribunto, the primary scripting/template system of the Wikimedia projects!
We'll begin by reviewing what is is, where it came from, and how it relates to the three (or so) other template systems used on Wikimedia projects. We'll revisit some of the original design decisions behind the choice of Lua, the reasons for Scribunto stagnating at Lua 5.1, and envision what it would take (from infrastructure and module authors) to catch up to a modern Lua runtime.
Then we'll imagine alternative programming languages: why limit ourselves to Lua? How about JavaScript? Did you know you can already write Scribunto modules in JavaScript?
Why stop at other programming languages --- why not imagine using other /human/ languages with Scribunto! Lua's keywords as well as all the property and object names in the MediaWiki API are all English-only. What would it mean to write in French when writing Scribunto modules? (You can do this already, too!) I'll describe a system that would allow you to write Scribunto modules in every language at once, with proper translation of not just keywords but also object and property names, comments, everything!
We will pivot at this point to discuss Scribunto from an article author's perspective. How does Scribunto relate to VisualEditor and TemplateData? Could we make invocation easier? Scribunto's design does not have any model-view separation, which is a standard feature of modern templating languages. We'll discuss the ArrayFunctions extension, and how it may point a way forward for Scribunto. We'll also discuss HTML DOM and SVG libraries that would let us elevate our presentation layer past the perils of string concatenation.
Finally, we'll review how the awkward mixture of namespaces, documentation, and TemplateData should interact with the Multi-Content Revisions (MCR) system introduced in 2019, with inspiration for a new organization of modules. We'll also discuss how Scribunto might interact with modern version control systems.
This work will propose (perhaps provocative) answers to all of these questions, using prototypes and designs of the author, including code you can run on Wikimedia wikis today. In conversation with attendees it will also hopefully build consensus for future collaboration.
- How does your session relate to the event theme, Wikimania@20 â Inclusivity. Impact. Sustainability?
This session hopes to contribute to Impact: solving wiki-related problems! As well as promoting the sustainability of the template infrastructure of the wiki by maintaining and reinvigorating it.
- What is the experience level needed for the audience for your session?
This session is for an experienced audience
Resources
Speakers
- C. Scott Ananian
- C. Scott Ananian is an employee of the Wikimedia Foundation, working on the Parsoid project. He also dabbles with LanguageConverter, and Real-time collaboration in VE.
- Previously, Dr. Ananian was a jack-of-all-trades for the One Laptop per Child Foundation. He received his PhD in computer science from MIT, and before joining OLPC was a local activist and organizer for copyright issues. He's a kernel hacker, part-time khipu researcher, and aperiodic tesselation aficionado. Now he tries to build robust and reliable systems to allow everyone to discover, share, and learn.