Wikifunctions:Project chat/Archive/2026/02
| This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Next Wikifunctions & Abstract Wikipedia Volunteers' Corner will be on February 9
Hi, we remind you that, if you have questions or ideas to discuss about Wikifunctions & Abstract Wikipedia, you can participate to the next Volunteers' Corner, that will be held on February 9, at 18:30 UTC (link to the meeting).
We hope to see you there! -- User:Sannita (WMF) (talk) 06:23, 6 February 2026 (UTC)
- This section was archived on a request by: Mdktb (talk) 05:17, 18 February 2026 (UTC)
Wikifunctions & Abstract Wikipedia Newsletter #235 is out: Finishing each other sentences: Starting things; Offsite in Istanbul
There is a new update for Abstract Wikipedia and Wikifunctions. Please, come and read it!
In this issue, we share the results of our recent team offsite (meeting in person) in Istanbul, Türkiye, especially on creating sentence fragments in several languages.
Want to catch up with the previous updates? Check our archive!
Enjoy the reading! -- User:Sannita (WMF) (talk) 16:31, 13 February 2026 (UTC)
- This section was archived on a request by: Sannita (WMF) (talk) 11:23, 27 February 2026 (UTC)
Wikifunctions & Abstract Wikipedia Newsletter #236 is out: A sneak preview of Abstract Wikipedia
There is a new update for Abstract Wikipedia and Wikifunctions. Please, come and read it!
In this issue, we share a sneak preview of how Abstract Wikipedia will look like and work, and we take a look at the latest software developments.
Want to catch up with the previous updates? Check our archive!
Enjoy the reading! -- User:Sannita (WMF) (talk) 13:15, 20 February 2026 (UTC)
- This section was archived on a request by: Sannita (WMF) (talk) 11:23, 27 February 2026 (UTC)
List typing still annoying
Do we think that maybe I shouldn't have to insert 6 calls to untype a list (Z17895) in my composition, ~doubling its size, just so it can work with any type?
Since JS/Python can't be used to implement generic list operations, they have to be compositions.
Naturally these are all built from more primitive operations, down to remove first N elements of list (Z13369) etc. which don't play nice with Z1-typed lists.
(A while back I added some disconnected tests to document this: Z29805, Z29808, Z29811)
YoshiRulz (talk) 20:31, 2 February 2026 (UTC)
- phab:T407932 is the root issue, as if it were implemented functions would be able to work better with Z1 typed-lists and objects. Feeglgeef (talk) 20:57, 2 February 2026 (UTC)
- I don't have an opinion on that ticket, but I'm sure we could fix those low-level functions (or create new ones) without needing any changes to Wikifunctions itself. YoshiRulz (talk) 21:36, 2 February 2026 (UTC)
- Yes, I agree it’s a pain. In general, though, I think we can just write generic functions in Python or JavaScript. We need to ensure that these expect and return Z1-typed lists, however. In practice, that may mean also providing a wrapper function that converts properly typed lists into Z1-typed and wraps any Z1 arguments as a singleton Z1-list or Quote.
- I think your implementation in JavaScript would succeed for test ins([ 1/1, 2/1 ], 2, [ 5/4, 3/2, 7/4 ]) (Z31354) if the list arguments were Z1-typed. I would expect it to return a list typed for Rational numbers, which is currently unavoidable when a homogeneous list is returned from code. GrounderUK (talk) 14:29, 3 February 2026 (UTC)
- You were right, but that's just putting the onus on the caller to wrap in untype a list (Z17895), or as you say, requiring we make wrapper Functions which is inelegant IMO. YoshiRulz (talk) 19:40, 3 February 2026 (UTC)
- True, and that’s the motivation behind phab:T407932. It’s good to see the problem being thought about, but we are constrained by the existing conversion machinery, and the unconverted-object route is not designed as a general solution. GrounderUK (talk) 10:30, 4 February 2026 (UTC)
- You were right, but that's just putting the onus on the caller to wrap in untype a list (Z17895), or as you say, requiring we make wrapper Functions which is inelegant IMO. YoshiRulz (talk) 19:40, 3 February 2026 (UTC)
Upcoming Wikimedia Café session regarding the Wikimedia Commons mobile app
| Hello! There will be a Wikimedia Café meetup on 7 March 2026 at 15:00 UTC, focusing on the Wikimedia Commons mobile app. Featured guests will be software developers User:Misaochan and User:RitikaPahwa4444, and Wiki Project Med chair User:Doc James. Please see the Café page for more information, including how to attend. ↠Pine (✉) 07:37, 22 February 2026 (UTC) |
- This section was archived on a request by: Mdktb (talk) 23:32, 9 March 2026 (UTC)
Wikifunctions & Abstract Wikipedia Newsletter #237 is out: Graceful overrides and fallbacks
There is a new update for Abstract Wikipedia and Wikifunctions. Please, come and read it!
In this issue, we discuss different patterns in articles about years on different Wikipedias, we present the video of the Wikifunctions presentation by Nicolas Vigneron at the last Celtic Knot, and we take a look at the latest software developments.
Want to catch up with the previous updates? Check our archive!
Also, we remind you that if you have questions or ideas to discuss, the next Volunteers' Corner will be held on March 2, at 18:30 UTC (link to the meeting).
Enjoy the reading! -- User:Sannita (WMF) (talk) 11:18, 27 February 2026 (UTC)
- This section was archived on a request by: Mdktb (talk) 23:33, 9 March 2026 (UTC)
Function call objects vs. Compositions
What are "Function call" objects for? E.g. Z27951 or Z28518.
They look kind of like Compositions. How are they different from them? Amir E. Aharoni (talk) 19:04, 22 February 2026 (UTC)
- When a persistent object says its type is "Function call" like that (Special:ListObjectsByType/Z7), it means references to that object will dereference to the result of that call. Compare this to a persistent object of type Z8, which you still need to call after dereferencing.
- And be careful not to confuse Function (Z8) with Implementation (Z14). You don't call an Implementation-by-composition directly, you call its associated Function.
Currently, every persistent Z7 is a lightweight enum, that is, the call returns a Type (Z4) and you can use it just like a persistent Type, but I believe they can evaluate to any object. YoshiRulz (talk) 23:05, 22 February 2026 (UTC)- Thanks. I understand the difference between function and implementation. However, I still don't understand what are these persistent objects are for. Can you give an example of how they are used and why do they have to be created as separate pages? Amir E. Aharoni (talk) 23:18, 22 February 2026 (UTC)
- They are a w:en:single source of truth for those enumeration Types, allowing you to define and call a Function like this one which takes a Chemical element (Z27951) input. YoshiRulz (talk) 02:47, 23 February 2026 (UTC)
- Thanks, I think I'm starting to get it.
- A couple of follow-up questions:
- When I try to edit the Z27954 function, I see the label of the function and the input in Italian at the top, and only after that I see it in English. My user interface language in Wikifunctions is English, so this is already a bit weird. Even weirder is the fact that I can change the input label and type in Italian, but in English, I can only change the input label and not the type. This is quite confusing, and I'd say that this is a bug.
- The Function editing form says at the top that "Only users with special permissions can change the definition of the function". Which right is it exactly? wikilambda-edit-running-function-definition? (Edit inputs/output of Function that has a connected Implementation)
- Amir E. Aharoni (talk) 03:01, 23 February 2026 (UTC)
- Are you clicking Edit at the top? You can easily edit the label etc. by clicking the pencil in the About box instead. Possibly relevant: phab:T345541 YoshiRulz (talk) 03:22, 23 February 2026 (UTC)
- Yes, I'm clicking Edit at the top. If I click the pencil in the about box, I can edit the labels, but not the input type in any language. Amir E. Aharoni (talk) 03:33, 23 February 2026 (UTC)
- Quite right too!
- There is a separate right for editing input labels but it is configured to be the same as other textual edits, which is what the pencil-icon permits.
- The UX for your point 1 is a little quirky, I agree. Basically, structural changes to the functions can only be made in the top box, which also supports textual changes for the first language. You can also “Add another input” from the lower boxes… but you can only really click the button and add a label; specifying the type must still be done in the first box.
- To your second point, the specific editing rights depend on the state of the function. These are detailed in the link provided and summarised here. Basically, the User right is wikilambda-edit-user-function and the Functioneer right is wikilambda-edit-running-function. There is also the wikilambda-edit-running-function-definition right, but that is currently reserved to the (tiny) functionmaintainer and Wikifunctions-staff groups. GrounderUK (talk) 10:56, 23 February 2026 (UTC)
- I'm still not sure which right it is that allows me to change the type. I have functioneer. I don't have maintainer. I also have global sysop.
- And is "a running function" the same thing as "a function that has connected implementations"? Amir E. Aharoni (talk) 14:14, 23 February 2026 (UTC)
- Yes, Functioneers (and Users) can change input or output types, so long as there are no connected implementations at the time of the edit. This will also disconnect any connected test cases. This is the general User right, wikilambda-edit-user-function, but if the function has a connected implementation, this right is blocked, so you need the Functioneer right to disconnect the implementations first. Just to be clear, only staff can change function input or output types without disconnecting implementations first and it is noted [link in previous reply] that This operation will also automatically disconnect from this function all its connected testers and implementations (just after Running function: Any function that has, at least, one connected implementation). GrounderUK (talk) 15:27, 23 February 2026 (UTC)
- Yes, I'm clicking Edit at the top. If I click the pencil in the about box, I can edit the labels, but not the input type in any language. Amir E. Aharoni (talk) 03:33, 23 February 2026 (UTC)
- Are you clicking Edit at the top? You can easily edit the label etc. by clicking the pencil in the About box instead. Possibly relevant: phab:T345541 YoshiRulz (talk) 03:22, 23 February 2026 (UTC)
- They are a w:en:single source of truth for those enumeration Types, allowing you to define and call a Function like this one which takes a Chemical element (Z27951) input. YoshiRulz (talk) 02:47, 23 February 2026 (UTC)
- Thanks. I understand the difference between function and implementation. However, I still don't understand what are these persistent objects are for. Can you give an example of how they are used and why do they have to be created as separate pages? Amir E. Aharoni (talk) 23:18, 22 February 2026 (UTC)
"Run function" statistics
Are there statistics about how many people run functions on the site using the "Run function" button? Amir E. Aharoni (talk) 05:23, 23 February 2026 (UTC)
How does Wikifunctions get lexemes from Wikidata entries?
How does Wikifunctions get the lexemes from Wikidata entries? I don't see them in e.g. Wikidata entry for 'city', but something like Z28254, entering city and German gives an answer. Where does Wikifunctions get it from? ChaoticVermillion (talk) 13:47, 27 February 2026 (UTC)
- Ultimately, it’s always Find lexemes for a Wikidata item (Z6830), which looks for Lexemes that link to a given Wikidata item, rather than the other way round (see phab:T383631). These implementations call Z6830. GrounderUK (talk) 14:59, 27 February 2026 (UTC)
How to get right lexeme?
I made a lexeme for নগর as trying out some of the functions gave out কোট as Bangla of city when the word is closer to fort. However, trying out the functions again, it still shows কোট as city. I made sure to connect the word to the Wikidata item for city. How do I fix this? ChaoticVermillion (talk) 02:06, 28 February 2026 (UTC)
- Function calls' results are cached and anything fetched from Wikidata is also cached. I don't think there's a way to clear that cache, you'll just have to wait for it to expire. YoshiRulz (talk) 19:13, 28 February 2026 (UTC)
- We don’t have a proper solution for the case where more than one lexeme links to the same item. One approach is to use best lexeme from list of lexemes (Z27332), but that can still lead to a tie. I recall some discussion about using some measure of affinity between an item label (here, নগর) and each of the identified lexemes, and we might now extend that to consider the text for sitelinks (নগর, for Wikipedia). GrounderUK (talk) 15:27, 1 March 2026 (UTC)
Projektin nimi suomeksi
Hei kaikki! Tämä on mielenkiintoinen projekti. Loin tänne funktion perimeter of circle with radius (Z31661), näyttäisi toimivan hyvin.
Ehdotan, että Wikifunctions olisi suomeksi ”Wikifunktiot” (wikifunktiot.org). Tällä hetkellä projektin nimi on jätetty kääntämättä keskellä suomenkielisiä sanoja useissa paikoissa etusivulla ja muualla. Jatkossa voisi toivon mukaan tehdä sanasta muuttujan, jotta sanan voi vaihtaa yhdessä paikassa ja se vaihtuu automaattisesti kaikkialla. Suomen kielen taivutus tekee siitä tosin hieman monimutkaista. –Onioniton (talk) 13:10, 15 February 2026 (UTC) Edit Onioniton (talk) 19:15, 18 February 2026 (UTC)
- (fi) Wikifunctions should be the project’s label in Finnish (Z1051) from Wikidata (Q2013) or a fallback label if (as appears to be the case) there is no label in that language. GrounderUK (talk) 15:12, 15 February 2026 (UTC)
- Tein lekseemin L1555911 jolla on tarvittavat muodot, sen pitäisi olla linkitetty Wikifunctions (Q104587954)iin. Toivottavasti tein sen oikein, otin mallia L1553994:stä. En ole aiemmin muokannut Wikidataa. –Onioniton (talk) 15:55, 17 February 2026 (UTC)
- You might like to refine this function call. I promoted the plural forms, since you specified the nominative plural as the lemma. I look forward to seeing a proper Finnish noun declension function soon. See this Latin example or take a look at German noun declension table (Z28602). GrounderUK (talk) 23:16, 18 February 2026 (UTC)
- Unfortunately this looks to be undoable for me because of consonant gradation (genitive of kaappi → kaapin, notice the dropped p). I'm unsure about the lemma, I think it's a normal plurale tantum, just a proper noun. I'm not a professional linguist. –Onioniton (talk) 16:03, 19 February 2026 (UTC)
- You might like to refine this function call. I promoted the plural forms, since you specified the nominative plural as the lemma. I look forward to seeing a proper Finnish noun declension function soon. See this Latin example or take a look at German noun declension table (Z28602). GrounderUK (talk) 23:16, 18 February 2026 (UTC)
- Tein lekseemin L1555911 jolla on tarvittavat muodot, sen pitäisi olla linkitetty Wikifunctions (Q104587954)iin. Toivottavasti tein sen oikein, otin mallia L1553994:stä. En ole aiemmin muokannut Wikidataa. –Onioniton (talk) 15:55, 17 February 2026 (UTC)
- Hei Onioniton! Yleensä kai monikielisten Wikimedia-hankkeiden nimet ollaan jätetty kääntämättä suomen kielelle (vrt. Wikimedia Commons, Wikispecies). Wikimedia-hankkeille, joista on monia eri kieliversiota (suomenkielinen Wikisanakirja, Wikimatkat, Wikisitaatit, Wikikirjasto jne.) on keksitty suomenkielinen nimi. Pitäisin mieluummin tästä linjasta kiinni, mutta jos Wikifunktiot-suomennokselle on laajempaa tukea, niin sekin sopii minulle. Tietyt tämän hankkeen käyttöliittymän tekstit käännetään translatewiki.netissä (vaatii erillisen rekisteröitymisen), joten muutokset täytyy tehdä sinnekin, jos suomenkieliseen nimeen halutaan vaihtaa.
- [Discussing whether or not we should localize the project name in Finnish] Samoasambia (talk) 21:52, 2 March 2026 (UTC)
- Hei ja kiitos vastauksesta. En tiennyt tästä, ymmärrän logiikan. Varmaan parasta tosiaan pitäytyä nykyisessä tavassa. –Onioniton (talk) 14:36, 4 March 2026 (UTC)