Jump to content

Abstract Wikipedia/Updates/2021-07-22

From Meta, a Wikimedia project coordination wiki
Abstract Wikipedia Updates Translate

Abstract Wikipedia via mailing list Abstract Wikipedia on IRC Wikifunctions on Telegram Wikifunctions on Mastodon Wikifunctions on Twitter Wikifunctions on Facebook Wikifunctions on YouTube Wikifunctions website Translate

Boolean logic in Wikilambda

In the last few weeks, the Wikifunctions prototype has passed a few critical milestones. We have massively improved the testability of our codebase and increased the robustness of our tests. There’s still plenty to do, but, considering the development ahead, it is reassuring to see the code becoming more robust.

Another step is that the first parts of evaluating function composition are now working. We can neatly compose any combination of built-ins, code-based implementations, and other compositions.

I found myself having quite a bit of fun working with the prototype. Last week, in order to capture some of the possibilities, I made a video where I set up a new Wikilambda instance and defined a few functions for Boolean algebra. Booleans are one of the types that come pre-loaded with a Wikilambda instance. The main reason why they come as a pre-loaded type is because they are necessary for the builtin If function, and the If function is extremely useful.

In the demonstration video, I defined the Negate function, which takes one of the two Boolean values (i.e. either True or False) and returns the other. Then I implemented the Negate function using the If function: If true then false else true. I followed this by implementing a few other Boolean functions with two parameters, such as the And function (conjunction), the Or function (disjunction), the Nand function, and the Exclusive or function. Some of the functions are implemented using solely the built-in If function; others combine previously composed functions together (such as Nand, implemented as Not And).

The video also shows how to call these newly-created functions and see that they work. You will notice a number of bugs in the video. Most of them are already filed and being worked on; some of them have even been solved already. A number of the workflows that you see have already been improved, such as creating an implementation directly from a newly defined function, etc. Also, please remember that the UX is still intentionally rough, and we will give it a complete overhaul before we launch.

The video runs for 24 minutes and is available on Commons.

Thanks so much to the team for getting the prototype so far! I am very proud, and looking forward to what comes next.


We are hiring! We are looking for an Engineering Manager. Our hires can be based remotely.

The next opportunity to meet us and ask us questions will be at Wikimania. On 14 August, at 17:00 UTC, we will host a 1.5 hour session on Wikifunctions and Abstract Wikipedia. This year, Wikimania will be an entirely virtual event and registration is free. Bring your questions and discussions to Wikimania 2021.

And a reminder that all Wikimedians are invited to register to the Grammatical Framework Summer School from 26 July to 6 August 2021 for free.