Abstract Wikipedia/Updates/2023-11-03

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

Running Python on WebAssembly[edit]

A screenshot of the improved selector, finding types related to the input as labels or aliases in different languages. The input, "cha", matches the Polish "Cecha" for Key, the French "Chaîne" for String, the English alias "Unreachable" for Nothing, and the English alias "Character" for Code point.

As reported last week, we had switched our runtime for JavaScript to use a WebAssembly-based stack. We still had to do the same for the Python language.

As of Wednesday, Python code is now also being executed in a WebAssembly-based runtime. This means that now all user-written code will be executed on a WebAssembly runtime, whether it is in JavaScript or Python.

The change turned out to be more difficult than anticipated. We tried several different ways, and discovered entirely novel ways our testing infrastructure could run into interesting issues. This has uncovered enough work for weeks! Finally, we ended up using Wasmtime with a locally-compiled RustPython module. There are a number of improvements and simplifications we want to work on in the coming weeks and months, but for now we are happy that the system seems to run in production. The WebAssembly-based Python runtime we have now seems to run a bit slower than the previous one, but it is likely that you won’t notice a difference.

With this change, we have completed adding an additional layer of security to Wikifunctions. This way we are really close to actually opening up editing. We will continue monitoring the systems, and if everything looks good, we will soon open for wider editing.

Thanks to Cory and James for integrating and deploying the WebAssembly runtime!

Improvement in the object selector[edit]

Language search

Another set of improvements were deployed to the object selector, the widget that allows you to select a function or other object. You use this every time you create a function definition, and often when calling them, so it's important that we make it helpful for key parts of the workflow. It should be much more descriptive now because it shows the right label and type. It is also better at finding the right object because it’s taking aliases and languages into account. For finding languages, now also BCP 47 (and when different, also their MediaWiki) language codes are taken into account.

It used to be that you would sometimes need to type in raw ZIDs to find the right object. This should now be needed much more rarely, and work more fluently when you do need it. Let us know if you ever run into such a situation, so that we have input for further improving the widget.

Thanks to Geno and Amin for improving and redesigning the object selector! Also thanks to the community members who suggested improvements, including GZWDer and egezort.

Volunteer’s Corner on November 13, 2023[edit]

Searching using the ZID

The next volunteer’s corner will be on November 13, 2023, at 18:30 UTC. We will meet in meet.google.com/xuy-njxh-rkw. Bring your questions, and if time permits, we will build a new function together.