[07:46:00] I agree that is the best, but not reminding the users to handle excess whitespace might cause issues. [07:46:00] Especially when people edit on phones shich enter extra spaces and similar. (re @vrandecic: No, we don't. Particularly for natural language general you want to remain in full control of the whitespaces) [07:49:50] I have a question for the community. In composing the swedish noun declesions I need a generic function that suffix a -s to a string. [07:49:51] I found this: Z11729 [07:49:52] My question is: what should we call these generic functions that are used across languages? [07:49:54] My proposal is to rename this one to something like: 'suffix "s" to string if not already ending in "s"' [07:49:55] Then in the alias we can put titles similar to the current one for the languages that need it. [07:54:13] Also I noticed that a link to Special:WhatLinksHere is missing on function pages. Is that a bug? [07:54:15] Interestingly the function here titled german is not used by any functions related to german according to https://www.wikifunctions.org/wiki/Special:WhatLinksHere?target=Z11729&namespace= but that might not be correct. [08:00:43] I am guessing that is because it is language dependent, if you check the History tab, you can see the What links here link that leads to https://www.wikifunctions.org/wiki/Special:WhatLinksHere/Z11733 (re @dpriskorn: Also I noticed that a link to Special:WhatLinksHere is missing on function pages. Is that a bug? [08:00:43] Interestingly the function here...) [08:03:38] oppose. I disagree that the function is generic – it was created as a German-specific function and is used as such in Wikidata Lexeme Forms (re @dpriskorn: I have a question for the community. In composing the swedish noun declesions I need a generic function that suffix a -s to a st...) [08:04:08] and perhaps more importantly, it’s _tested_ as a German-specific function – all the test cases are for German nouns [08:06:01] Principally, it’s *T345457* [08:06:01] There was also a bug with populating links which is now fixed, but not for all pre-existing objects (T345457). Please see https://www.wikifunctions.org/wiki/Wikifunctions:Status#Problems_with_finding_things (re @dpriskorn: Also I noticed that a link to Special:WhatLinksHere is missing on function pages. Is that a bug? [08:06:03] Interestingly the function here...) [08:06:40] That was my first instinct too. However, the implementation seems to be similar as what I would expect a "suffix "s" to string" would have. Should the implementation be improved, or do we want functionally duplicates of functions if they have different purposes? (re @lucaswerkmeister: oppose. I disagree that the function is generic – it was created as a [08:06:40] German-specific function [08:06:40] and is used as such in Wikidata L...) [08:09:12] I understand. This means we are going to have thousands of suffix and prefix functions for every existing language we would like to support. [08:09:13] It's a mountain of redundancy. [08:09:15] I have no intention of changing it BTW. If another output is needed for Swedish (which is a germanic language BTW) I'll create a specific one for Swedish instead with Swedish test cases. (re @lucaswerkmeister: oppose. I disagree that the function is generic – it was created as a German-specific function and is used as such in Wikidata L...) [08:11:08] Here is one I created yesterday that suffix "n" Z17791 (needed for Swedish declesion composition functions) (re @Jan_ainali: That was my first instinct too. However, the implementation seems to be similar as what I would expect a "suffix "s" to string" ...) [08:15:55] Here is another one Z17948 [08:27:30] It’s hard to generalise across languages. But this is where we can nest the functions. The outer function reflects the purpose. So we have an English plural noun function and an English 3rd-person simple present function. They both generally “add an s” and follow the same approach in the case of a terminal sibilant (which is one of the cases in suffix English word that [08:27:30] ough [08:27:31] t to be a separate function). (re @Jan_ainali: That was my first instinct too. However, the implementation seems to be similar as what I would expect a "suffix "s" to string" ...) [08:27:50] the implementation could be shared between the functions, but IMHO the functions themselves should be separate (re @dpriskorn: I understand. This means we are going to have thousands of suffix and prefix functions for every existing language we would like...) [08:29:24] So generalize implementations but not necessarily functions. And the reason is test cases (re @lucaswerkmeister: the implementation could be shared between the functions, but IMHO the functions themselves should be separate) [08:30:25] I forgot we could reuse implementations across functions. That is a neat feature! (re @lucaswerkmeister: the implementation could be shared between the functions, but IMHO the functions themselves should be separate) [08:31:06] I think that's one of the benefit composition have over Python or JavaScript is to reuse other wikifunctions that does a similar thing you want to implement in own function [08:31:46] Indeed, this system is so nice! It's so much fun to collaborate on functions and create together 😃 (re @Jan_ainali: I forgot we could reuse implementations across functions. That is a neat feature!) [08:31:48] can we? what I had in mind was an intermediate function (and then use that in a composition) ^^ (re @Jan_ainali: I forgot we could reuse implementations across functions. That is a neat feature!) [08:39:18] In practice, I don’t think so. We can only link an implementation to a function by adding a new implementation. (re @lucaswerkmeister: can we? what I had in mind was an intermediate function (and then use that in a composition) ^^) [08:45:00] Oh, I L1310097 🫣 (re @lucaswerkmeister: can we? what I had in mind was an intermediate function (and then use that in a composition) ^^) [08:47:50] That's really interesting. Hm I wonder if this is a design deficiency that could be fixed? [08:47:51] @vrandecic WDYT? (re @Al: In practice, I don’t think so. We can only link an implementation to a function by adding a new implementation.) [09:14:29] I wouldn’t call it a “deficiency”… But implementations are functions too (conceptually), so having a simple way to promote an existing implementation to a standalone Wikifunctions function would be an interesting feature to consider. (re @dpriskorn: That's really interesting. Hm I wonder if this is a design deficiency that could be fixed? [09:14:30] @vrandecic WDYT?) [10:02:23] So, what do I do now? [10:02:24] 1) Create a function swedish -s declension with a (redundant) python implementation exactly like the german one? [10:02:25] 2) Or perhaps better: Create a function swedish -s declension with a composition implementation calling the german -s declension function? [10:02:27] I would like to have input from the community which of those to choose. :) [10:21:13] My suggestion would be to create a new function that adds a character to a string unless the string already ends in that character. Create a new (composition) implementation for any function that requires exactly that (providing the literal “s”, “a” etc as an argument to the more general function) 🤷‍♂️ (re @dpriskorn: So, what do I do now? [10:21:13] 1) Create a function swedish -s declension with a (redundant) python implementation exactly like the germ...) [10:40:00] That sounds the least redundant 🤩 (re @Al: My suggestion would be to create a new function that adds a character to a string unless the string already ends in that charact...) [10:43:26] You might like to add a topic at https://www.wikifunctions.org/wiki/Wikifunctions_talk:Best_practices. I expect I’ll get round to doing that myself, if you’d rather. (re @dpriskorn: That sounds the least redundant 🤩) [10:48:18] ✅ Z17973 (re @Al: My suggestion would be to create a new function that adds a character to a string unless the string already ends in that charact...) [10:53:41] https://www.wikifunctions.org/wiki/Wikifunctions_talk:Best_practices#Generalize_functions_with_code_as_much_as_possible feel free to improve it (re @Al: You might like to add a topic at https://www.wikifunctions.org/wiki/Wikifunctions_talk:Best_practices. I expect I’ll get round t...) [11:01:28] https://www.wikifunctions.org/wiki/Wikifunctions_talk:Naming_conventions#Labels_of_language_functions%3F I would like input [11:10:45] Here I used the new generic suffix function Z17983 (re @Al: My suggestion would be to create a new function that adds a character to a string unless the string already ends in that charact...) [11:39:29] how do I propose a function for deletion? [11:42:31] https://www.wikifunctions.org/wiki/Wikifunctions:Requests_for_deletions (re @dpriskorn: where do I propose a function for deletion?) [11:51:41] I have created a few helper functions so far in my work with Swedish.See https://www.wikifunctions.org/wiki/User:So9q : https://tools-static.wmflabs.org/bridgebot/722f4125/file_62703.jpg [11:55:53] Maybe add them to https://www.wikifunctions.org/wiki/Wikifunctions:Catalogue? (re @dpriskorn: I have created a few helper functions so far in my work with Swedish. [11:55:54] See https://www.wikifunctions.org/wiki/User:So9q) [11:58:23] I realize that Z11178 is the same as Z17973 🙈 [11:58:24] Can we merge functions? (re @Al: Maybe add them to https://www.wikifunctions.org/wiki/Wikifunctions:Catalogue?) [11:59:09] I realize that Z11178 is the same as Z17986 🙈 [11:59:09] Can we merge functions? [11:59:16] /delete@wikilinksbot [12:00:30] I added more aliases to the former to help others find it. [13:46:22] I created Z17783 a few days ago before I read the catalogue. Do we have a function that return the same as the input already? [13:46:22] Should we have such a function at all? [14:09:02] Z801 generally and Z11602 for type Z6 (re @dpriskorn: I created Z17783 a few days ago before I read the catalogue. Do we have a function that return the same as the input already? [14:09:03] Sh...) [14:11:33] Fantastic, I'll propose mine for deletion then (re @Al: Z801 generally and Z11602 for type Z6) [14:13:39] Maybe just Z17788? (re @dpriskorn: Fantastic, I'll propose mine for deletion then) [14:16:33] But actually you can just convert it into a composition calling Z11602 🤷‍♂️ (re @dpriskorn: Fantastic, I'll propose mine for deletion then) [17:08:34] I'm almost done with all Swedish noun declensions now. These are the generic string helper functions I have created. : https://tools-static.wmflabs.org/bridgebot/bd4a13d7/file_62715.jpg [17:56:24] Most or all of these can be avoided, but then one has to nest functions a lot more and I found that terrible so I went with these instead. [17:58:00] It's pretty incredible how much you can accomplish when the right helper functions are in place using compositions without writing a single line of code. [18:18:29] Is the feature to copy the ZID of a page when clicking on the ZID new. I have not seen it before that it is possible and I like at as I need to copy ZIDs often. [18:19:30] looks like https://phabricator.wikimedia.org/T360001 [18:19:43] New today/yesterday 👍 (re @Hogü-456: Is the feature to copy the ZID of a page when clicking on the ZID new. I have not seen it before that it is possible and I like ...)