[01:26:44] We don't (re @Nicolas: but how do assure consistency between functions?) [01:27:23] Nothing can be assured to be consistent [04:37:21] I've realised that the question at the end of the FOTW section I wrote is now more urgent. The question was "Should special values return with their other (usually disregarded) keys matching the values of the sign, mantissa and exponent in the IEEE 754 binary representations?". It's now urgent because the type reader is now hardcoding the representation of the special [04:37:21] values in e [04:37:22] very test that involves them (e.g. Z22081). Perhaps obviously by posing the question, I favour returning values for all keys that match how they appear in the binary representations. [04:38:33] I still disagree with the special value key so would prefer halfway instead of none (re @u99of9: I've realised that the question at the end of the FOTW section I wrote is now more urgent. The question was "Should special valu...) [07:51:50] then all functions are useless... (re @Feeglgeef: Nothing can be assured to be consistent) [07:52:55] and that how we crashed Mars Climate Orbiter (300 millions dollars lost because two functions had inconsistent units) [08:05:12] Forwarded from DylanCollins_bot: I traded with $100 with this platform and i got $1,000 after 24 hours trade, this man has changed many life’s including mine contact him for your investment.. [08:13:45] The teacher who said "25 what? Apples? Centimeters? Elephants?" had a point apparently... (re @Nicolas: and that how we crashed Mars Climate Orbiter (300 millions dollars lost because two functions had inconsistent units)) [15:31:10] Then all functions are useless right now (re @Nicolas: then all functions are useless...) [15:31:31] There are tens of functions that aren't consistent [15:31:43] Nothing has blown up yet [15:34:23] Wikifunctions is not used yet (with very few exceptions), so yes it is useless yet [15:34:23] How to make it used? There is a lot of technical aspects but also some more editorial (re @Feeglgeef: Nothing has blown up yet) [15:34:53] Not used and useless are very different things (re @Nicolas: Wikifunctions is not used yet (with very few exceptions), so yes it is useless yet [15:34:53] How to make it used? There is a lot of techn...) [15:35:18] Pragmatically what's the difference (re @Feeglgeef: Not used and useless are very different things) [15:35:32] I've used it myself quite a bit for things I would have asked an LLM [15:35:55] Because it can be used, and is on a small scale (re @Nicolas: Pragmatically what's the difference) [15:36:18] If it were useless I couldn't use it at all, which is obviously false [15:36:25] And this a starting point, we need to think about what it will be in 10, 29, 100 years when the community will have millions of people [15:37:30] Almost all functions have consistent data types right now [15:37:31] The NLG are the anomaly here (re @Feeglgeef: There are tens of functions that aren't consistent) [15:37:51] I wouldn't be so sure (re @Nicolas: Almost all functions have consistent data types right now [15:37:52] The NLG are the anomaly here) [15:38:22] For example we have some things that we only have natural number functions for, and some with only integer functions [15:38:34] And names are also inconsistent [15:39:23] But the data type is consistent, so "all is good " (re @Feeglgeef: For example we have some things that we only have natural number functions for, and some with only integer functions) [15:40:32] Names can be changed and don't matter much ("What's in a name?") [15:40:32] Plus, there is a talk to make them more consistent right now (re @Feeglgeef: And names are also inconsistent) [15:40:55] So can these (re @Nicolas: Names can be changed and don't matter much ("What's in a name?") [15:40:55] Plus, there is a talk to make them more consistent right now) [15:41:48] Which is exactly my point, thanks! (re @Feeglgeef: So can these) [15:43:07] Yes, so you agree that the Dropdown items can be changed just like these, so they will both be in the same situation, so because it's ok now it will be ok when we add them, so inconsistency is not an issue. (re @Nicolas: Which is exactly my point, thanks!) [15:46:01] No I don't, I fear drop-down would create inconsistency failures (re @Feeglgeef: Yes, so you agree that the Dropdown items can be changed just like these, so they will both be in the same situation, so because...) [15:46:29] So why don't we already have inconsistency failures? (re @Nicolas: No I don't, I fear drop-down would create inconsistency failures) [15:46:48] Two functions would have a gender input but treat it differently, so when used together it would produce nonsense [15:47:08] Because it's not used, not really (re @Feeglgeef: So why don't we already have inconsistency failures?) [15:48:04] And I do see problems already, the main one being I can't create functions without the correct input [16:32:15] I’ll avoid repeating what I’ve said on-wiki, but let’s assume that the logical input is a list of grammatical features, and these are represented by Wikidata item references. What more do you need to specify the “correct input” for your functions? (re @Nicolas: And I do see problems already, the main one being I can't create functions without the correct input) [16:39:54] Can I do it right now? Has anyone done it? (re @Al: I’ll avoid repeating what I’ve said on-wiki, but let’s assume that the logical input is a list of grammatical features, and thes...) [16:45:21] I believe we can. The usability issue is that one can choose grammatical features (or other Wikidata items) that are meaningless for the particular function. Shall we give it a go? (re @Nicolas: Can I do it right now? Has anyone done it?) [16:48:23] I'd love to try yes, I'm waiting for months [16:48:23] A general function centralising all my Breton conjugations for example (re @Al: I believe we can. The usability issue is that one can choose grammatical features (or other Wikidata items) that are meaningless...) [16:57:18] There seems to be a problem with Z6801 at the moment, because it’s fetching the two items when it has identical references, but I think we can find a way around that 🤔 So you’re thinking of a Breton verb form function that calls one of your existing functions according to the grammatical features supplied (if there is one)? (re @Nicolas: I'd love to try yes, I'm waiting [16:57:19] for months [16:57:19] A general function centralising all my Breton conjugations for example) [17:00:56] [Ah, yes… Z19316 👍] (re @Al: There seems to be a problem with Z6801 at the moment, because it’s fetching the two items when it has identical references, but ...) [17:04:11] Yes, see all the subfunctions on https://www.wikifunctions.org/wiki/Wikifunctions:Catalogue/Natural_language_operations/Breton (re @Al: There seems to be a problem with Z6801 at the moment, because it’s fetching the two items when it has identical references, but ...) [17:06:00] (I needed subfunctions for Wikidata Lexemes forms but for other future functions - generating sentences - one general function is easier to deal with) [17:11:00] I understand. Performance is likely to be an issue but let’s see what our prototyping teaches us. (re @Nicolas: (I needed subfunctions for Wikidata Lexemes forms but for other future functions - eg. generating sentences - one general functi...) [17:16:01] For composition, maybe but I could write a more performant Python implementation (re @Al: I understand. Performance is likely to be an issue but let’s see what our prototyping teaches us.) [17:24:42] Generally that's the solution. None of the indefinite noun phrase functions went through because a function in the composition that was a composition took 70% of the allowed time. I added a python implementation and I think the team has sped some things up so they all pass now (re @Nicolas: For composition, maybe [17:24:43] but I could write a more performant Python implementation) [17:33:53] Well, we have a test case, at least… Z22098 (re @Nicolas: For composition, maybe [17:33:53] but I could write a more performant Python implementation) [18:05:38] hmm, I need to have a deeper look but that looks promising (re @Al: Well, we have a test case, at least… Z22098) [18:20:25] thanks a lot Al, I need to do the experience the "put all features in one list" to see how it works (for instance "1st person" + "singular" vs. "first person singular") [18:20:26] I also will add a bunch of "if" in the implementation( hopping it won't break after 500 if :/ and trying to do it in a clever way) and some tests [18:25:29] I’ve expanded the prototype to include conditions for number, person, tense and mood. Currently it only has 1st person singular pathways but it does distinguish between indicative and conditional, for starters. (re @Nicolas: thanks a lot Al, I need to do the experience the "put all features in one list" to see how it works (for instance "1st person" +...) [18:46:16] I added Z22100 to test the conditional branch. I’m stepping back for now… I’d be inclined to specify the set of grammatical features with a function call, at this stage, but I assume there is no such function at present. (re @Nicolas: thanks a lot Al, I need to do the experience the "put all features in one list" to see how it works (for instance "1st person" +...) [21:20:55] Why does Z22101 use "apply" all the time. Can't it just call the function it has chosen and pass through the argument? [21:22:50] Same with Z22099 [21:24:01] 🤔 I think I was thinking in Python 😄 (re @u99of9: Why does Z22101 use "apply" all the time. Can't it just call the function it has chosen and pass through the argument?) [21:26:48] It would make sense if we were choosing these functions from a configuration. Maybe later we need a type of configuration by grammatical feature set. [21:28:20] I think so. And a case construct would be nice 👍 (re @u99of9: It would make sense if we were choosing these functions from a configuration. Maybe later we need a type of configuration by gra...) [21:28:22] "choose Breton verb function([grammatical features])" [21:32:35] But I still think this argument that takes a jumbled list of grammatical features should be split into a few arguments with single grammatical features (tense, person, etc). Maybe a jumbled list at the end for extra context. [21:34:49] How would a case construct differ from Z19601 (re @Al: I think so. And a case construct would be nice 👍) [21:36:06] Would it just have values to test for equality rather than Boolean tests in each conditional? (re @u99of9: How would a case construct differ from Z19601) [21:36:43] I wouldn’t object to that, if we had appropriate enumeration types agreed. (re @u99of9: But I still think this argument that takes a jumbled list of grammatical features should be split into a few arguments with sing...) [21:38:08] By the way, this is a good example of where a composition is faster than the code. I think it's because the composition can exit early without evaluating later conditions once it finds a true. (re @wikilinksbot: Z19601 – N-ifs) [21:38:30] The problem with Z19601 (I think) is that if the options are function calls, they can’t have argument references. [21:38:57] Yeah they can (re @Al: The problem with Z19601 (I think) is that if the options are function calls, they can’t have argument references.) [21:39:10] They are all preevaluated [21:39:15] I think [21:40:40] Give it a go, by all means. (re @Feeglgeef: I think) [21:41:32] Actually I was thinking of Z19565, but they're likely similar (re @u99of9: By the way, this is a good example of where a composition is faster than the code. I think it's because the composition can exit...) [21:42:19] I'm sure I've done this already somewhere (re @Al: Give it a go, by all means.) [21:42:54] Yep (re @Al: Give it a go, by all means.) [21:43:19] I tried it with 3 wait 4000ms and it times out [21:43:43] In any event, I think all the function calls in the list would be evaluated, which could be a tad inefficient. (re @u99of9: Actually I was thinking of Z19565, but they're likely similar) [21:44:19] Yeah, the expected current behavior is all inputs being evaluated unless specified otherwise in the orchestrator (re @Al: In any event, I think all the function calls in the list would be evaluated, which could be a tad inefficient.) [21:44:46] Which is if and one other [21:45:24] Ooh, we have another now, do we? 😮 (re @Feeglgeef: Which is if and one other I think) [21:45:48] Not sure (re @Al: Ooh, we have another now, do we? 😮) [21:45:52] I'll check in a bit [21:46:05] No rush. (re @Feeglgeef: I'll check in a bit) [21:46:57] Not me, but is this what you mean? Z20126 (re @u99of9: I'm sure I've done this already somewhere) [21:50:09] But compositions which use of can avoid it too. See the durations of the three implementations at Z21993 (re @Feeglgeef: Yeah, the expected current behavior is all inputs being evaluated unless specified otherwise in the orchestrator) [21:59:09] Ah, I see what you mean 🤔 I’ll have a play when time allows. But the real point of a proper case construct would be to restrict the evaluation to the relevant branch (and maybe have a two-pass orchestration, so that the redundant branches wouldn’t even be orchestrated). (re @u99of9: Not me, but is this what you mean? Z20126) [21:59:37] Nope. https://gitlab.wikimedia.org/repos/abstract-wiki/wikifunctions/function-orchestrator/-/blob/main/src/builtins.js#L1079 (re @Al: Ooh, we have another now, do we? 😮) [22:32:53] Fixed now, I think. Thanks for catching that before more functions were added! 🙏 (re @u99of9: Why does Z22101 use "apply" all the time. Can't it just call the function it has chosen and pass through the argument?) [22:44:54] I've written a recursive function which I think should avoid the pre-evaluation of all conditions: Z22102 [23:04:24] Doesn't work (re @u99of9: I've written a recursive implementation which I think should avoid the pre-evaluation of all conditions: Z22102) [23:05:48] I tested it and I would be really surprised if it did work, the orchestrator is too eager. [23:20:46] I don’t think you can test a recursive composition when others are connected, because the php selects the current first implementation for the recursion (I think). (re @Feeglgeef: I tested it and I would be really surprised if it did work, the orchestrator is too eager.)