Jump to content

Wikifunctions:Status updates/2024-02-28/pl

From Wikifunctions
This page is a translated version of the page Wikifunctions:Status updates/2024-02-28 and the translation is 11% complete.
Wikifunctions Status updates Translate

<translate> Abstract Wikipedia via mailing list</translate> <translate> Abstract Wikipedia on IRC</translate> <translate> Wikifunctions on Telegram</translate> <translate> Wikifunctions on Mastodon</translate> <translate> Wikifunctions on Twitter</translate> <translate> Wikifunctions on Facebook</translate> <translate> Wikifunctions on YouTube</translate> <translate> Wikifunctions website</translate> Translate

Type proposal for natural numbers

We are getting close to having all the pieces in place to open up the next type to the community: natural numbers! Natural numbers, that is the numbers used for counting, are already in high demand, as witnessed by functions such as the String length function.

We have prepared a type proposal. This type proposal is also meant as a template for future type proposals, which should eventually be coming from the community, not the development team. Input and discussion both of the format of the type proposal as well as the actual proposal for natural numbers is welcome.

Note that we will launch numbers without immediate support for renderers and parsers, which reduces the Wikifunctions community's ability to provide them in translated form. This is temporary, and we are also working hard on getting renderers and parsers implemented. That will allow Wikifunctions to display and understand numbers in the way most appropriate for each language, but it will not be available immediately when we launch natural numbers.

Ostatnie zmiany w oprogramowaniu

This week we have refreshed the design of the "meta-data" dialog which opens when you click the "Details" control next to a function call result, or the “info” icon (circle around “i”) next to a test result (T341127). We now group the different pieces of information together in collapsed "accordions", and summarise some of the groups to help you understand them at a glance.

Thanks to GrounderUK, who found a mysterious bug that meant the pipe character ("|") would be swallowed when trying to run tests on draft Implementations or Test cases, but would work when saved. This was due to a complication in MediaWiki's API handling, and we've worked around it for now (T358089). We found and fixed a UX bug on the initialisation of blank custom objects, where only the first key would be initialised with the correct type, while the others were initialised as references (T355497).

As part of our long-term vision for Wikifunctions, we want to support not just multiple programming languages (currently Python and JavaScript, with more to come later), but also provide a consistent, understandable way to upgrade versions of these languages and help the Wikifunctions community migrate – so we can spot e.g. code that works in ES2019 JavaScript but needs to be improved to also work in ES2020 JavaScript. An important part of that plan is having consistent references for each version, so we have been slowly improving our stack to use ZID references rather than strings, and as of this week our UX now will understand both, and new code will use ZIDs (T287153). In future, we will use a bot to mass-move all uses to just ZIDs.

We, along with all Wikimedia-deploy code like the Vector skin's search bar, are using the latest version of the Codex UX library, v1.3.3, as of this week. Though we do not believe the library upgrade will have any user-visible changes in our use on Wikifunctions, please comment on the Project chat or file a Phabricator task if you spot an issue. This version of the library provides a new feature in how the lookup control works (T350946), which unblocks a minor improvement to pre-populate the Object selector with common types, which we hope to do soon (phab:T343564).

Wiki Mentor Africa

On this Saturday, March 2nd, at 16:00 UTC, Luca Martinelli and Denny Vrandečić will present at an event in the Wiki Mentor Africa program, and on Sunday, March 3rd, at 16:00 UTC, Hogü-456 will follow up with a hands-on demonstration. You can register for that event on the Wiki Mentor Africa event Website for the Introduction to Wikifunctions.

A research agenda regarding AI and the knowledge commons

Last week, Denny attended a convening to discuss a research agenda regarding the effect of current progress in machine learning on projects in the knowledge commons, such as Wikipedia. The resulting draft for a research agenda and more details on this event are published on Meta.

Function of the Week: Or (Z10184)

Or” is a binary Boolean function. A binary function is one that takes two arguments. A Boolean function is one where all arguments and the return type are Boolean, that is, each of them is either true or false. A binary Boolean function is a function that takes two arguments of type Boolean and returns a Boolean.

“Or” is also known as the logical disjunction, and there are Wikipedia articles about it in 46 language editions of Wikipedia.

“Or” returns false only if both of the arguments are false. Otherwise it returns true. This is meant to be a rigorous formulation of the natural language use of “or”, which usually means that either one of the two parts connected by the or may be given. Or both.

“Or” is useful to connect two conditions together. For example, if we want to know if a word ends with a vowel or a y.

Since each Boolean argument can only have two possible values, and there are two arguments, there are exactly four possible combinations of values the function can take. Accordingly, there are four tests on the function: true or true, true or false, false or true, and false or false.

The function has three implementations:

  • in Python, using the Python keyword or
  • in JavaScript, using the || operator
  • a composition using the if function: if the first argument is true, return true, or else return the second argument

Think through the composition and see if you understand the logic: does it indeed lead to the desired result for all four possible inputs?