Warning: file_put_contents(/opt/frankenphp/design.onmedianet.com/storage/proxy/cache/a39da1cb268f1f0323ccf2cb6afa7656.html): Failed to open stream: No space left on device in /opt/frankenphp/design.onmedianet.com/app/src/Arsae/CacheManager.php on line 36

Warning: http_response_code(): Cannot set response code - headers already sent (output started at /opt/frankenphp/design.onmedianet.com/app/src/Arsae/CacheManager.php:36) in /opt/frankenphp/design.onmedianet.com/app/src/Models/Response.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /opt/frankenphp/design.onmedianet.com/app/src/Arsae/CacheManager.php:36) in /opt/frankenphp/design.onmedianet.com/app/src/Models/Response.php on line 20
Wikifunctions:Community portal - Wikifunctions Jump to content

Wikifunctions:Community portal

From Wikifunctions

Welcome to the community portal for Wikifunctions!

This is the central place to document Wikifunctions's to-do lists and ongoing project work. [To-do!]

The catalogue of functions is a good place to start.

For discussions, see Wikifunctions:Project chat.

Noticeboards

Task centre

Perennial tasks

Tasks listed by users

Example:
Done. Thanks for pointing that out! Example (talk · contribs)

[signing to enable reply link:--GrounderUK (talk) 11:27, 6 May 2024 (UTC)[reply]

I had another go at implementing 21809 and again failed, and now I'm thinking I've misunderstood how evaluation works since I wouldn't expect Z882(Z7(...), Z7(...)) to ever appear. In addition to fixing it, would someone please explain my mistake? YoshiRulz (talk) 22:17, 19 July 2025 (UTC)[reply]
I don’t think Z17534 actually works. When it calls Z882, it passes the function calls to Z16829 as the required types, but these calls are not evaluated, so Z882 returns a generic type function call that contains function calls to Z16829. This might work in theory, but the function calls refer to argument references that cannot be resolved when the Typed pair’s type is subsequently generated by the call to Z882. At least, I think that’s where the invalid key error is coming from. When I used Try this function on Z882 with a call to Z16829 as one of the required types, it seemed to work as I would expect (with no call to Z16829 in the result). So, yeah… looks like a bug. GrounderUK (talk) 09:51, 20 July 2025 (UTC)[reply]
Oh, it never occurred to me that the problem could be with 16829. Could you make an alternate implementation for 17534 which doesn't have that, since the function's return type is a pair of Z1s anyway? (The values returned by such an implementation would violate a condition of 19586, but I think most tests would continue working because the expected values would be made the same way.) YoshiRulz (talk) 10:45, 20 July 2025 (UTC)[reply]
Not sure. I think the problem lies with Z17534 relying on something that doesn’t actually happen. And the user interface doesn’t support Typed pairs correctly. Have you considered implementing your function as a Typed list of Typed lists? GrounderUK (talk) 12:32, 20 July 2025 (UTC)[reply]
I guess I should so that it's at least usable for other compositions. edit: I can't while the tests are connected. YoshiRulz (talk) 14:49, 20 July 2025 (UTC)[reply]
Done GrounderUK (talk) 15:15, 20 July 2025 (UTC)[reply]
Z21396 fails in an edge case, which I've just added a test for. It needs to be implemented as Z876(Z10000, K1, ""). YoshiRulz (talk) 20:18, 25 July 2025 (UTC)[reply]
Done GrounderUK (talk) 20:45, 25 July 2025 (UTC)[reply]
Hi, I would like to request to connect implementation and the tests for both Indonesian cardinal (Z18546) and Indonesian ordinal from natural number (Z26821). Thank you! NikolasKHF (talk) 14:56, 29 July 2025 (UTC)[reply]
I see that Z18546 has a failed testcase. Dv103 (talk) 14:58, 29 July 2025 (UTC)[reply]
Yes, the 100 should return "seratus" instead of "satu ratus". Besides, I also notice that it will resulted "satu ribu" for 1000 instead of "seribu". I am currently trying to fix the issue and will update if I already solve it. Sorry and thanks in advance. NikolasKHF (talk) 16:12, 29 July 2025 (UTC)[reply]
I have revised the code for Indonesian cardinal (Z18546) and have added additional test cases. Please kindly check NikolasKHF (talk) 16:57, 29 July 2025 (UTC)[reply]
Done Connected both functions (and the new testcases).
As a side note, for some reason the testcases you created didn't have the input (I had to add it). What language is your Wikifunctions interface? In which format did you write the numeric values? Does Z14290 support the format you were using? Dv103 (talk) 17:02, 29 July 2025 (UTC)[reply]
Ah sorry, I think I forgot to include the input on the testcases. I use Indonesia as the Wikifunctions interface. When I try to check using Z14290 it looks like the function support the Indonesia format. While at it, I would like to ask, on the last two test cases in Z26821, I found that they are fail due to no connected implementation yet (Z503). I have purge the page but it seems the error remains. Is it only in my machine? Thank you in advanceNikolasKHF (talk) 17:15, 29 July 2025 (UTC)[reply]
I believe those were globally cached errors. The cache is now refreshed and showing the test cases as passed. Please reply if this is not what you see now. GrounderUK (talk) 17:39, 29 July 2025 (UTC)[reply]
I understand. It's fixed now. Thank you very much NikolasKHF (talk) 23:29, 29 July 2025 (UTC)[reply]
And Z26821 has failed all 3 test cases. ~/Bunnypranav:<ping> 15:01, 29 July 2025 (UTC)[reply]
This is because Z18546 isn't connected. Dv103 (talk) 15:02, 29 July 2025 (UTC)[reply]
Ah, my bad. Didn't notice the relation. ~/Bunnypranav:<ping> 16:29, 29 July 2025 (UTC)[reply]
Hi, can anyone connect the implementation Python implementation of simplified Luxembourgish (Z27275) to the function Simplified Luxembourgish Eifel rule (Z27254) please? --Volvox (talk) 12:46, 8 August 2025 (UTC)[reply]
I see there is no test for it. It's better to add some tests to the function before connecting the implementation, so we can see if it actually works as intended. Dv103 (talk) 12:49, 8 August 2025 (UTC)[reply]
They added some tests. The function was also created twice for some reason: Z27255 YoshiRulz (talk) 12:02, 11 August 2025 (UTC)[reply]
Done. I've changed the input and output type to String (since it's very difficult to work with monolingual texts in Python code, and given that the definition of function already implies to work with Luxembourgish text, the language indicator is useless) and I've connected everything. Now I'll signal Z27255 for deletion. Dv103 (talk) 13:07, 11 August 2025 (UTC)[reply]
Thank you all for your help and for cleaning up. --Volvox (talk) 07:17, 17 August 2025 (UTC)[reply]
Hi, could anyone connect simple implementation for Z27267 (Z27272) implementation to location from entity and class (Indonesian) (Z27267) function, please? Thanks! NikolasKHF (talk) 12:57, 8 August 2025 (UTC)[reply]
It seems to fail the only testcase. Dv103 (talk) 13:05, 8 August 2025 (UTC)[reply]
I see. When I test the label of item reference in language (Z23753), it always return void (Z24) error when using Indonesia (Q252). I think that's the problem. I have created another test case that used another Wikidata item. Please kindly check. Thanks! NikolasKHF (talk) 13:25, 8 August 2025 (UTC)[reply]
It's just a known problem with large items (like ones referring to nations). Please try with testcases not involving nations (or big cities). Dv103 (talk) 13:36, 8 August 2025 (UTC)[reply]
I see. I use Kenya (Q114) as the location in Unlabelled (Z27277) and it seems to work. Previous attempt is correct, it's just lack of spaces and I have added those. It works now, please kindly check. Thanks! NikolasKHF (talk) 13:43, 8 August 2025 (UTC)[reply]
Connected Dv103 (talk) 14:48, 8 August 2025 (UTC)[reply]
Thank you! NikolasKHF (talk) 14:51, 8 August 2025 (UTC)[reply]
Hi, could anyone please connect Luxembourgish article-less instantiating, compose (Z27493) to Luxembourgish article-less instantiating sentence (Z27490) please? I added three test cases, two of which passed, but the first one failed with Error in evaluation (Z507) and output result void (Z24), which I don't really understand. Is this an inherent problem of my implementation, or is it an artifact of the execution? Also, regarding the tip "Something not working? Try Wikifunctions.Debug to trace your code." that I'm shown, how would I go about doing this? --Volvox (talk) 07:23, 17 August 2025 (UTC)[reply]
Done Now all 3 tests work. When working with Wikidata, it's possible that sometimes functions don't work for unknown reasons. Dv103 (talk) 09:04, 17 August 2025 (UTC)[reply]
Could someone change the expected output to "engmilliounst" (and thus also the label) for the test case 1000000 → "engmilliounst" (Z27679), as this is also an acceptable form for the ordinal of 1.000.000 (corresponding to "millionth" vs "one millionth") and coincides with the function output? --Volvox (talk) 19:40, 25 August 2025 (UTC)[reply]
Also, the JavaScript implementation Luxembourgish cardinal javascript (Z19415) is now working just fine. --Volvox (talk) 20:05, 25 August 2025 (UTC)[reply]
Done Connected (but there is a “ghost” Z20 causing all tests to fail on the implementation pages Special:Search/Z16422) GrounderUK (talk) 21:23, 25 August 2025 (UTC)[reply]
Thank you. But I don't really understand the "ghost" Z20. Is this a general bug or is it related to how I created the implementation and/or test cases? Because I noticed that in my experience test cases seem to always fail on implementation pages, but on function pages they work as intended. --Volvox (talk) 07:13, 26 August 2025 (UTC)[reply]
Sorry. Yes, it’s a general bug. Test cases generally pass or fail the same way on the function and implementation pages. But if a connected Z20 has been deleted, you can get failures on the implementation pages. I think it just needs a small edit to the function’s JSON, but I’m not set up to do that. Hopefully, someone who is able to will make the necessary change soon (which is the only reason I mentioned it). GrounderUK (talk) 07:37, 26 August 2025 (UTC)[reply]
Not done GrounderUK (talk) 07:48, 26 August 2025 (UTC)[reply]
Done --99of9 (talk) 11:07, 26 August 2025 (UTC)[reply]
Done GrounderUK (talk) 21:10, 25 August 2025 (UTC)[reply]
Hi! I just created two functions: days since last Easter (Z28498) and days until next Easter (Z28495). Both functions already have test cases and implementation. The first function have an implementation that already pass all the tests. The implementation for the second function, however, have not passed any test case. When I check, I specify a wrong output type as Natural number (Z13518) instead of Integer (Z16683). I cannot change the output type since there are test cases that already connected to the functions.
Therefore, I would like to ask for help to connect the test cases and implementation for days since last Easter (Z28498), then maybe change the output type of days until next Easter (Z28495) to Integer (Z16683), while also change the validation functions for all test cases (192 days to Easter 2026 (from 2025-09-25) (Z28497) and Good Friday until Easter Sunday 2026 is 2 days (Z28502), so that they are validated by same Integer (Z16688) instead of equality of natural numbers (Z13522))
Sorry for the trouble. Thank you very much in advance!
NikolasKHF (talk) 07:21, 25 September 2025 (UTC)[reply]
Why is Integer (Z16683) the right type? This function could output negative values? Dv103 (talk) 07:31, 25 September 2025 (UTC)[reply]
These functions should not output negative values. As the why Integer (Z16683), I use days until (Z20744) to calculate days passed from the date provided by the user and the next or previous easter date, which has Integer (Z16683) as the output type. Which means that, the implementation on both days since last Easter (Z28498) and days until next Easter (Z28495) output Integer (Z16683). Now, because of that, the test cases gives Return type mismatch (Z517) error, I believe because it tries to compare Integer (Z16683) with Natural number (Z13518). If you have any suggestion regarding this, I would love to know.
Thank you!
NikolasKHF (talk) 07:45, 25 September 2025 (UTC)[reply]
I think it’s better to keep the function “honest”. If it’s not supposed to return negative values, it would be better to have a Natural number (Z13518) return type. I think your logic ensures you have a non-negative integer, so you can just convert that to a Natural number with absolute value of integer as natural number (Z17144). I know that’s easier said than done, once it’s all defined, but if you start with the “honest” type in the function definition, the user interface should prevent you from selecting functions with a different type in your composition (until you’ve selected an appropriate converter function). GrounderUK (talk) 09:10, 25 September 2025 (UTC)[reply]
Oh, that makes more sense. I will try implement that on the implementation. Thank you!
NikolasKHF (talk) 09:14, 25 September 2025 (UTC)[reply]
Done! Implementation (next Easter (composition) (Z28496)) for days until next Easter (Z28495) is now working! Thank you!
NikolasKHF (talk) 10:23, 25 September 2025 (UTC)[reply]
You’re welcome… and congratulations!
Done GrounderUK (talk) 10:33, 25 September 2025 (UTC)[reply]