|◀||Abstract Wikipedia Updates||▶|
- Phase γ completed.
When we started the development effort towards the Wikifunctions site, we subdivided the work leading up to the launch of Wikifunctions into eleven phases, named after the letters of the Greek alphabet.
- This week, we completed the third phase, Phase γ (gamma).
- With Phase α completed, it became possible to create instances of the system-provided Types in the wiki.
- With Phase β, it became possible to create Types on-wiki and to create instances of these Types.
The goal of Phase γ was to provide all the main Types of the pre-generic function model — Function, Implementation, Tester, Function call, Error, and so on. Some of these Types have quite a bit of “magic” attached to them. For example, the screenshot below shows a Function call. The component for the Function call first asks you to choose one of the Functions defined on-wiki, then reads the chosen Function definition in order to get the definition of the Arguments of the Function, and finally creates the UX to allow you to enter the argument values.
The screenshot for example shows a Function call to the Function “if”, taking a condition (which is just a literal “true” here), and then returning either the consequent (in this case the String
“This result”) or the alternative (in this case the String
“Not this one”).
Given that the condition is true, this Function call would evaluate to
In order to demonstrate that we indeed completed Phase γ, we created the Function call from the screenshot, and it is stored as Z10006 on the notwikilambda site. As ever, our thanks and a shout out to Lucas Werkmeister for setting up and maintaining notwkilambda in a volunteer role!
We cannot yet evaluate a Function call, only write them. In the next three phases, we will work on making evaluation possible in different forms. We are also aware that the UX needs design work; we are intentionally keeping the UX very basic for now, as we are in an early phase. We will have major updates on that in the following few weeks.
Alongside the main new feature, there have been plenty of other improvements throughout the code base. We made progress on the back-end components that will respond to requests to evaluate the code. We improved the WikiLambda extension in terms of refactoring the code, particularly through a Data Access Object for ZObjects. The front-end is currently in the middle of a refactor to support new features easier. We now display some error messages in the UX, instead of failing silently. We have components that allow entering code, for use in creating Implementations. We improved considerably the experience and scalability when creating new objects and assigning them a fresh ZID.
Outside the code changes themselves, we also had the Logo concept vote, and folks from the Security team and the Performance team each embedded with us for a few weeks, as we prepare for readiness reviews with regards to these aspects. Also the Outreachy interns finished their work and delivered their report. In fact, we closed 64 tasks in this phase — more than in the previous two phases together.
Finally, there are also some bugs, and we are tracking known ones on the Phabricator task board. We are still actively working on the Function call component. If you encounter new bugs, please do raise them. Either let us know, or create a new bug report in the column “To triage” so that we know to review them.
We are now moving on to Phase δ (delta). The goal of this phase is to allow evaluating those Function calls which can be done via built-in implementations. The implementations of the built-ins have already landed a little ahead of the phase start, so one major goal of this phase will be to wire up the MediaWiki site with the WikiLambda extension to the middleware function-orchestrator service. This will also make setting up an environment and running tests more complicated, but of course closer to the reality of how Wikifunctions will operate. At the end of this phase, we will be able to call one of the built-in implementations, such as for the demonstration function call to “if”.
This is a small change to the original plan. We had pulled the native function calls forward, but we are now noticing that we pulled them one phase too early — they should be the fifth, not the fourth phase. We will devote Phase δ to the built-in implementations, and then allow for native function calls in Phase ε, when we will wire the function executors up with the orchestrator. This will be followed by Phase ζ, which will allow for function composition. These three upcoming phases (δ, ε, ζ) will develop the three different ways to express implementations for functions, which will be the beating heart of the technical features that Wikifunctions will provide. There will still be tons of other things that need to be developed and improved, without question — but these will be the main steps towards providing a glimpse into what Wikifunctions will bring to the Wikimedia movement and beyond.
I want to end with a big shout out to the whole team, and to the volunteers who have contributed patches — in particular Arthur P. Smith, Gabriel Lee, Lucas Werkmeister, Thiemo Kreuz, DannyS712 — and give a pointer to the Focus languages submission process. The submission deadline is on 7 April. Interested people are welcome to add your own submissions and attend the Q&A session regarding the Focus languages process which is part of the 30 Lexic-o-days of Wikidata.