Wikifunctions:Project chat/Archive/2024/12
![]() | 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 December 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 December 9, at 15:30 UTC (link to the meeting).
We hope to see you there! -- User:Sannita (WMF) (talk) 14:46, 6 December 2024 (UTC)
- The recording of the Volunteer's Corner is now available on Commons. Enjoy! --Sannita (WMF) (talk) 10:21, 11 December 2024 (UTC)
- This section was archived on a request by: Sannita (WMF) (talk) 17:26, 19 December 2024 (UTC)
Update "Functions to try out"
Currently, the "Functions to try out" section of the main page has functions that are quite old. The one most recently created was made in March. I think we should replace the contents with the previous functions of the week. This would direct new users to our current work with Z6005, Z19677, Z20159, Z20342, where they are currently directed to string functions, which, while important to include, misrepresent the project and its current status. Thanks! Feeglgeef (talk) 03:22, 3 December 2024 (UTC)
- Can we make the 'Functions to try out' section more dynamic? I mean, we can use a set of multiple templates, each containing different functions to try out. The templates could be displayed randomly (along with the purge) or on a day to day basis. Just an idea though. Asked42 (talk) 15:55, 11 December 2024 (UTC)
- This section was archived on a request by: Feeglgeef (talk) 02:57, 5 January 2025 (UTC)
code artifacts with wikifunction api
Hi. I didn't find it in the API. Is there any way to get the function code artifact through the API. For example, for If Z802 get the python code artifact and status (passed tests, etc.) Konstantin Klepikov (talk) 01:52, 8 December 2024 (UTC)
- Hello, and welcome! If I remember correctly, to get connected implementations, you can get the JSON of the object from the API and grab the .Z2K2.Z8K4, which will give you a list of connected implementations. As for status, I'm not sure. Someone else may know how to do this, or you can ask the development team themselves at the volunteer's corner, at 15:30 UTC, Monday. Thanks! Feeglgeef (talk) 02:51, 8 December 2024 (UTC)
- Just looking through the network tab, the URL seems to be
www.wikifunctions.org/w/api.php?action=wikilambda_perform_test&format=json&wikilambda_perform_test_zfunction={ZFUNCTION}&wikilambda_perform_test_zimplementations={ZIMPLEMENTATIONS (PIPE SEPERATED)}&wikilambda_perform_test_ztesters={ZTESTS (PIPE SEPERATED)&uselang=en
(make sure to replace the things in curly braces. Thanks! Feeglgeef (talk) 03:05, 8 December 2024 (UTC)
- Just looking through the network tab, the URL seems to be
- @Konstantin Klepikov: Our overall documentation for public APIs is at https://api.wikimedia.org/wiki/Wikifunctions_API. You can use the public API,
wikilambda_fetch
. Please do not usewikilambda_perform_test
, it's an internal API, and might go away with no notice. (CC @Feeglgeef, please don't recommend internal APIs.) Jdforrester (WMF) (talk) 15:42, 9 December 2024 (UTC)- I wasn't recommending it, I was just responding with "a way to get the [implementation] status." I, of course, would not recommend it be used. Feeglgeef (talk) 16:03, 9 December 2024 (UTC)
- This section was archived on a request by: Feeglgeef (talk) 02:57, 5 January 2025 (UTC)
Translations
Hi everybody. I am translating Wikifunctions in French. On Object (Z1) (for example), I don't know where to translate "identity", "keys", "label" and "validator". I encounter the same problem for other functions. I'm writing a short guide for people who would like to translate Wikifunctions into their language. Jérémy-Günther-Heinz Jähnick (talk) 07:46, 8 December 2024 (UTC)
- Z1 is an object of type Z4, so it provides values associated with the keys defined in Z4. The labels for these keys can be entered on Z4. I’m not sure about “the same problem for other functions” but the same principle applies more generally: the label for the key is provided by the object’s type. Just let me know if that doesn’t answer your question. GrounderUK (talk) 09:47, 8 December 2024 (UTC)
- Hi @GrounderUK:. On Validate HTML fragment (Z189), at "try this function", fragment HTML is in French, but not value, on I don't know where to translate value to have valeur in French. Jérémy-Günther-Heinz Jähnick (talk) 14:19, 8 December 2024 (UTC)
- You want to edit source on Z89 and click the + here:
- Feeglgeef (talk) 15:23, 8 December 2024 (UTC)
- @Feeglgeef:, and I do that, click the +, add valeur, and I publish and there is nothing in the history. And the second time I have Vous n’avez pas la permission de modifier les objets 'prédéfinis' existants (sous Z10000) and it not publish. I think there is a problem, maybe because I am very new on this project. Six other fields are also to translate in this item, like validator, is identity, key id... Jérémy-Günther-Heinz Jähnick (talk) 23:36, 8 December 2024 (UTC)
- About this file, I don't find where to translate in French key id, label and texts. Yes for value but it doesn't work when I publish. Jérémy-Günther-Heinz Jähnick (talk) 23:39, 8 December 2024 (UTC)
- Perhaps this is phab:T348997? I'm not sure why that would happen. Feeglgeef (talk) 02:50, 9 December 2024 (UTC)
- key id and label are in Z3 and texts is in Z12. Where there is a vertical bar to the left, this is an embedded object. The type of the embedded object is the first link for a given bar (under type), so you can just follow such a link in any similar case. GrounderUK (talk) 04:20, 9 December 2024 (UTC)
- About this file, I don't find where to translate in French key id, label and texts. Yes for value but it doesn't work when I publish. Jérémy-Günther-Heinz Jähnick (talk) 23:39, 8 December 2024 (UTC)
- @Feeglgeef:, and I do that, click the +, add valeur, and I publish and there is nothing in the history. And the second time I have Vous n’avez pas la permission de modifier les objets 'prédéfinis' existants (sous Z10000) and it not publish. I think there is a problem, maybe because I am very new on this project. Six other fields are also to translate in this item, like validator, is identity, key id... Jérémy-Günther-Heinz Jähnick (talk) 23:36, 8 December 2024 (UTC)
- You want to edit source on Z89 and click the + here:
- Hi @GrounderUK:. On Validate HTML fragment (Z189), at "try this function", fragment HTML is in French, but not value, on I don't know where to translate value to have valeur in French. Jérémy-Günther-Heinz Jähnick (talk) 14:19, 8 December 2024 (UTC)

- @Feeglgeef and GrounderUK: It was a success for value type. I had the possibility to choose a language and add my translation. For Z12 the problem is always here (and was present since my beginning here), so I make a screenshot, I should have done this since the beginning (the computer is new...). I think there is a bug, the display is different compared to Key (Z3), and I can't chose my language. If I had texte and publish, there is no action, I verify on the history. Jérémy-Günther-Heinz Jähnick (talk) 11:41, 9 December 2024 (UTC)
- Ah, I see… when you click the ➕ the new item is in a collapsed state. That’s probably wrong, but what you can do is click the > to the left. That should expand the item you’re andding and allow you to select the language and enter the text for the label. GrounderUK (talk) 12:24, 9 December 2024 (UTC)
- Ah yes, it was that. Thank you @GrounderUK:. Jérémy-Günther-Heinz Jähnick (talk) 15:35, 9 December 2024 (UTC)
- Ah, I see… when you click the ➕ the new item is in a collapsed state. That’s probably wrong, but what you can do is click the > to the left. That should expand the item you’re andding and allow you to select the language and enter the text for the label. GrounderUK (talk) 12:24, 9 December 2024 (UTC)
- This section was archived on a request by: Feeglgeef (talk) 02:57, 5 January 2025 (UTC)
Staff editing policy
There is a staff editing policy as a draft at Wikifunctions:Staff editing policy. Would we like to approve it in its current form, or make modifications to it? I think the current version of the policy is fine.Feeglgeef (talk) 21:45, 15 December 2024 (UTC)
- I think that it was approved in the discussions following the original draft publication, but it appears no-one updated the on-wiki page. Hmm. Jdforrester (WMF) (talk) 14:52, 16 December 2024 (UTC)
- This section was archived on a request by: Feeglgeef (talk) 02:57, 5 January 2025 (UTC)
Sketching a path to Abstract Wikipedia
In the new Status updates there is a section about ideas how to start Abstract Wikipedia. I read the section and from my point of view there are enough available functions in Wikifunctions available to start Abstract Wikipedia. The lack of available data in Wikidata is a huge challenge for further development of Abstract Wikipedia. In conversations about Wikidata often people asked me what the data in Wikidata is used for. The motivation for editing Wikidata could increase if there is a clear case where the data will be used. I think there should be a Sandbox in Dagbani Wikipedia or another Wiki where people can test function calls to Wikifunctions to generating simple texts as used in Abstract Wikipedia in the future. Maybe I am wrong but at least the number of editors in Wikifunctions is at the moment not so high and so hopefully load to the servers will not increase drastically when there will be a Sandbox to test function calls and some tests will occur. Do you think this is a first step how to go beyound theory as written down in the Status update. Hogü-456 (talk) 21:52, 12 December 2024 (UTC)
- Thanks! Feeglgeef (talk) 22:13, 12 December 2024 (UTC)
- I look forward to test function calls in test2wiki and hope to have further discussions about it. As this thread shows there is not so much discussion about Abstract Wikipedia. I thought there will be more answers to what I wrote. Hogü-456 (talk) 16:50, 14 December 2024 (UTC)
- Wikifunctions itself is not very active as of now. Feeglgeef (talk) 16:57, 14 December 2024 (UTC)
- I look forward to test function calls in test2wiki and hope to have further discussions about it. As this thread shows there is not so much discussion about Abstract Wikipedia. I thought there will be more answers to what I wrote. Hogü-456 (talk) 16:50, 14 December 2024 (UTC)
Wikifunctions & Abstract Wikipedia Newsletter #183 is out: Sketching a path to Abstract Wikipedia; Team offsite in Lisbon; and much more
There is a new update for Abstract Wikipedia and Wikifunctions. Please, come and read it!
In this issue, we discuss how natural language generation for Abstract Wikipedia might develop, and we share news on tools and types on Wikifunctions.
Want to catch up with the previous updates? Check our archive!
Enjoy the reading! -- User:Sannita (WMF) (talk) 18:52, 16 December 2024 (UTC)
Wikifunctions & Abstract Wikipedia Newsletter #184 is out: Function of the Week: age; Intros for year articles; New Type: Floating-point number
There is a new update for Abstract Wikipedia and Wikifunctions. Please, come and read it!
In the last issue for 2024, we discuss functions to create introductions for articles about years, we showcase one of the 23 functions with the Gregorian year type, we introduce a new type, and finally 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) 22:06, 19 December 2024 (UTC)
Need help with JS implementation?
Hi! I created a Python implementation of a Spanish cardinal function and wanted to write a Javascript implementation for it as well. However, after creating it, I noticed that one of the tests doesn't pass and, in fact, it doesn't pass on my local machine either. I added a console.log before line 48 to see the value of count and it is indeed greater than 999,999 but the following conditional (count > 999999) doesn't trigger for some reason. I'm not sure where else I could ask (my friends don't use JS) so I was wondering if anyone could help me. Apologies if this isn't the best place to ask for help. Moon motif (talk) 10:09, 25 December 2024 (UTC)
- You really should throw instead of returning a string. Feeglgeef (talk) 14:41, 25 December 2024 (UTC)
- Fair enough. Actually, I changed it and saw that the result actually did change to the expected error too! Turns out, the forEach() function doesn't act exactly like iterating with a for loop. If a return statement is hit in the latter, the function terminates but in the former, it just continues. Another reason to use throw instead of returning a string :)
- I'm not sure how I would change the corresponding test case to match though, the corresponding English cardinal function test has both connected Python and JS implementations failing as well. Moon motif (talk) 18:18, 25 December 2024 (UTC)
- This is phab:T381361 (which even mentions the cardinal function). Feeglgeef (talk) 18:39, 25 December 2024 (UTC)
- And, in errors and forEach(), our programming languages have an error system. Why try to implement our own and have to deal with how the language natively handles it? That's why I recommend you always throw (especially if phab:T381361 is fixed) Feeglgeef (talk) 18:44, 25 December 2024 (UTC)
Problem editing Wikifunctions
Hi! I made the Finnish nominative plural, Python Z11207 some time ago. I tried to edit it, but I couldn't. It gave this error message: "You don't have permission to edit Implementation that is connected to a Function." What did I do wrong? --Teromakotero (talk) 16:08, 27 December 2024 (UTC)
- The functioneer permission is required to edit connected implementations. Someone (also with the functioneer permission) must have connected it. I will disconnect it for you, and you can let me know here if you would like me to reconnect it. Feeglgeef (talk) 16:59, 27 December 2024 (UTC)
- Ahh, your functioneer was only temporary and expired. You can apply for permanent renewal here Feeglgeef (talk) 17:00, 27 December 2024 (UTC)
- This section was archived on a request by: ToadetteEdit (talk) 09:58, 23 January 2025 (UTC)