The on-wiki version of this newsletter can be found here:
https://meta.wikimedia.org/wiki/Abstract_Wikipedia/Updates/2023-11-03
--
Running Python on WebAssembly
<https://meta.wikimedia.org/wiki/File:Wikifunctions_-_object_selector_improvements_3.png>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 "Checha" 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
<https://meta.wikimedia.org/wiki/Abstract_Wikipedia/Updates/2023-10-25>, 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
<https://wasmtime.dev/> with
a locally-compiled RustPython <https://rustpython.github.io/> 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
<https://meta.wikimedia.org/wiki/File:Wikifunctions_-_object_selector_improvements_2.png>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
<https://en.wikipedia.org/wiki/IETF_language_tag> (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
<https://meta.wikimedia.org/wiki/File:Wikifunctions_-_object_selector_improvements_1.png>Searching
using the ZID
The next volunteer’s corner will be on November 13, 2023, at 18:30 UTC
<https://zonestamp.toolforge.org/1699900200>. We will meet in
meet.google.com/xuy-njxh-rkw. Bring your questions, and if time permits, we
will build a new function together.