[00:03:02] I don't want to assume: https://www.babycenter.com/baby-names/details/tofu-1330948 (re @cvictorovich: What? Welcoming a food?) [05:42:52] Underrated comment - I didn't even click "like" at the time, but I agree it may help to give code access to atomic number & element symbol. QID can probably only be useful for compositions which call Wikidata lookups, so code probably doesn't need that. Here's a pic with lots of options. I feel like the best user input is definitely the Wikidata item selector. Code [05:42:52] benefits most from receiving the number, but also somewhat from the symbol. Code almost always returns via the number, but occasionally the symbol. I still think the enum at the top can be left out. : https://tools-static.wmflabs.org/bridgebot/cc0e2c5e/file_68953.jpg [06:02:37] If the WD item selector chooses the QID key, can that automatically become a more complex type which has keys for # and symbol too (both mapped from lookup functions)? I know how that would work if it was an atomic number returning from code where a conversion from code would populate all three keys by looking up conversion functions. But I don't know if the item [06:02:37] selector can po [06:02:38] pulate keys other than the QID at the same time. (re @u99of9: Underrated comment - I didn't even click "like" at the time, but I agree it may help to give code access to atomic number & elem...) [06:10:00] To disparage enums even more. Here is me trying to use a month function in Finnish. This type has been available for ages, and most months are still not translated into many languages, so the dropdown is of little use except to ensure the choice is valid. To ensure that an unrestricted WD item selector choice of chemical element was valid, I think it could check a [06:10:00] list of QIDs in the validator function. : https://tools-static.wmflabs.org/bridgebot/59bb4e47/file_68954.jpg [07:47:22] Will you be sharing this on-wiki? There are some interesting islands of uncertainty to cruise around! (re @u99of9: Underrated comment - I didn't even click "like" at the time, but I agree it may help to give code access to atomic number & elem...) [07:52:32] I'm happy to, but I find type proposals slow-going and cumbersome, so ideally I'd prefer to have some clarity about what I want in advance ☺️ (re @Al: Will you be sharing this on-wiki? There are some interesting islands of uncertainty to cruise around!) [08:01:58] I get that… I’m thinking of a type with at least three additional keys: atomic number (Z13518), IUPAC symbol (Z6) and Wikidata item reference (Z6091). Will that do? (re @u99of9: I'm happy to, but I find type proposals slow-going and cumbersome, so ideally I'd prefer to have some clarity about what I want ...) [08:04:25] What do you mean "additional"? (re @Al: I get that… I’m thinking of a type with at least three additional keys: atomic number (Z13518), IUPAC symbol (Z6) and Wikidata i...) [08:06:44] Yes those would all be good. But what if the item selector can't populate the other keys? Do we leave them optional and then populate them on conversion to code? (re @Al: I get that… I’m thinking of a type with at least three additional keys: atomic number (Z13518), IUPAC symbol (Z6) and Wikidata i...) [08:07:06] In addition to the ZID: ZnK1, ZnK2, ZnK3. (re @u99of9: What do you mean "additional"?) [08:08:10] I still don't want a ZID (re @Al: In addition to the ZID: ZnK1, ZnK2, ZnK3.) [08:12:50] No doubt you have your reasons… But that’s just another way of saying that you want no persistence on Wikifunctions (outside of code and caches). Is that right? (re @u99of9: I still don't want a ZID) [08:15:36] Correct. Of course others are free to make persistent versions, but I don't see them as useful here. (re @Al: No doubt you have your reasons… But that’s just another way of saying that you want no persistence on Wikifunctions (outside of ...) [08:18:54] Hmmm… I’m just talking about the one persistent object for the chemical element type. Whether it’s an enumeration is one of the islands of uncertainty, I agree. (re @u99of9: Correct. Of course others are free to make persistent versions, but I don't see them as useful here.) [08:20:06] Oh, that's fine of course. I didn't think I had an option to go without a type definition! (re @Al: Hmmm… I’m just talking about the one persistent object for the chemical element type. Whether it’s an enumeration is one of the ...) [08:24:36] I wasn’t about to recommend it, but it could be just a persistent Typed list, where atomic number is the implicit index and QIDs are the items (aka “elements”) (re @u99of9: Oh, that's fine of course. I didn't think I had an option to go without a type definition! Not do I want to.) [08:31:56] Do you have a guess on this? Or is it only David that would know? (re @u99of9: If the WD item selector chooses the QID key, can that automatically become a more complex type which has keys for # and symbol t...) [08:34:41] Also as I was pondering about validating unrestricted QIDs, I reflected that it would be nice to have a working validator to study. Is there anything stopping us putting a simple one on natural numbers or rationals or integers? [08:49:34] My guess is that the current item selector just has a structure in memory equivalent to a Z6091 and associated Z12 for the labels. Creating a transient Wikifunctions object based on the QID would be new (I guess) and, to be honest, I’m not sure where that would happen. As I began… the WD selector is too broad… if it is going to be limiting its results by property, it [08:49:34] would [08:49:35] make sense to retrieve the atomic number and chemical symbol there, because those are things you want to search on (via the selector). (re @u99of9: Do you have a guess on this? Or is it only David that would know?) [08:57:53] The validators are specified as built-ins. Mere functioneers can’t create implementations for them. (re @u99of9: Also as I was pondering about validating unrestricted QIDs, I reflected that it would be nice to have a working validator to stu...) [08:58:11] I also want to search on the labels and aliases in every language (as it currently does). My only concern about the breadth is that we can't limit it to a specific P31 subset. (re @Al: My guess is that the current item selector just has a structure in memory equivalent to a Z6091 and associated Z12 for the label...) [09:04:38] Yes, but it does labels/aliases already, via Wikidata search APIs. That presumably picks up symbols too. Not sure about atomic number but it doesn’t seem to work currently. (re @u99of9: I also want to search on the labels and aliases in every language (as it currently does). My only concern about the breadth is t...) [09:05:26] Can we wrap Z101 in a composition that checks AND(Z101, Z13489(Z13518K1)) as the new validator for Z13518? (re @Al: The validators are specified as built-ins. Mere functioneers can’t create usable implementations for them.) [09:07:21] I think it would work with numbers too if they were added as aliases, but I think at the moment they are often written as "element 55" (re @Al: Yes, but it does labels/aliases already, via Wikidata search APIs. That presumably picks up symbols too. Not sure about atomic n...) [09:07:44] Z101 isn’t Boolean. It returns the validated object, like all the validators. (re @u99of9: Can we wrap Z101 in a composition that checks AND(Z101, Z13489(Z13518K1)) as the new validator for Z13518?) [09:08:54] Oh right, that means I don't understand what a validator is. What does it do if the supplied object is invalid? (re @Al: Z101 isn’t Boolean. It returns the validated object, like all the validators.) [09:09:33] Raises an error instead. (re @u99of9: Oh right, that means I don't understand what a validator is. What does it do if the supplied object is invalid?) [09:10:18] Ok maybe If(Z13489()) then Z101 else error? (re @Al: Z101 isn’t Boolean. It returns the validated object, like all the validators.) [09:21:30] Perhaps just search for items with a P1086? (re @u99of9: I think it would work with numbers too if they were added as aliases, but I think at the moment they are often written as "eleme...) [09:22:44] I think that includes isotopes. But sure, any search space restriction would be good. (re @Al: Perhaps just search for items with a P1086?) [09:25:18] It does, but elements get listed first, possibly by magic? (re @u99of9: I think that includes isotopes. But sure, any search space restriction would be good.) [09:26:57] https://www.wikidata.org/wiki/Special:WhatLinksHere/Property:P1086 (re @u99of9: I think that includes isotopes. But sure, any search space restriction would be good.) [14:48:28] Hello all! Wikifunctions & Abstract Wikipedia newsletter #192 is now out: [14:48:29] * Recent Changes in the software [14:48:31] * Recording of the Volunteers’ Corner from March 3 [14:48:32] * Two talks by Denny Vrandečić in London on Wikifunctions [14:48:34] * Fresh Functions Weekly: 61 new Functions [14:48:35] https://www.wikifunctions.org/wiki/Wikifunctions:Status_updates/2025-03-07 [16:30:08] okay, that's done. (re @u99of9: Thanks David . This one too please.)