[03:29:07] Newsletter #138: The Joy of Collaboration; Introducing the Function of the Week: reverse string - https://meta.wikimedia.org/wiki/Abstract_Wikipedia/Updates/2024-01-11 [04:04:29] I joined BETA, but how do I add a new function, based on another? In fact, I didn't see anything like "Create New Function" ? [04:06:44] The main page takes you to "suggest a function", which in turn links to the page to create a function: https://wikifunctions.beta.wmflabs.org/wiki/Wikifunctions:Function_proposal [04:16:17] And List cannot be selected as an Input Type? [04:16:21] Yet? [04:21:58] I basically wanted to design another function similar to Z11678 but that already has the Unicode BidiBrackets List and simply uses that statically for checking matching bracket pairs in a String. [04:25:38] You can! Use "typed list" and then select the type for your list [04:25:54] An international version, if you will, that also will incorporate additional CJK codepoints (ya know, since I'm in China now retired and having to learn this difficult language, Mandarian 😁 [04:26:16] Speaking or writing or both? [04:27:00] Oh great, "typed list" . hmm, sitll don't see it. https://wikifunctions.beta.wmflabs.org/w/index.php?title=Special:ListObjectsByType/Z4&uselang=en [04:27:24] It's not in the list of types (because it's a generic) [04:27:54] But when you create a function, and have to choose your argument types, it will be available magically [04:27:55] hmm, maybe include generics there? somehow in a section? [04:28:43] It probably would be more useful to have a handwritten page that describes all types that are open for business so far [04:28:52] yeah [04:29:09] Hmmm, if no one else does it, I might do that soon. [04:30:08] hmm, so Typed Map or List ? so the BidiBrackets list is basically a long list... of open/close pairs of code points... I guess I can store them in a list, and read 2 at a time, which would basically reuse part of the other implementation... a paired list reader? [04:30:29] 0028; 0029; o # LEFT PARENTHESIS [04:30:29] 0029; 0028; c # RIGHT PARENTHESIS [04:30:31] 005B; 005D; o # LEFT SQUARE BRACKET [04:30:32] 005D; 005B; c # RIGHT SQUARE BRACKET [04:30:34] 007B; 007D; o # LEFT CURLY BRACKET [04:30:35] 007D; 007B; c # RIGHT CURLY BRACKET [04:30:37] 0F3A; 0F3B; o # TIBETAN MARK GUG RTAGS GYON [04:30:38] 0F3B; 0F3A; c # TIBETAN MARK GUG RTAGS GYAS [04:30:40] 0F3C; 0F3D; o # TIBETAN MARK ANG KHANG GYON [04:30:41] 0F3D; 0F3C; c # TIBETAN MARK ANG KHANG GYAS [04:31:18] Are you trying to do it with a composition? [04:32:21] I would start doing it in code, to be honest. On first thought this sounds rather challenging with a composition. [04:32:26] I'd like to avoid that, if I can, because of...well, performance likely, don't you think? preferable I think to just store the long list. But how best to do that? [04:32:59] If you store it as an object, you wouldn't be able to currently access it in code [04:33:16] In fact, I was waiting for Lists... so that I can come in and help with lots of Unicode aware functions and handlers [04:34:17] I'd like to avoid lookups... just store the various code lists parts that are needed... then can iteratively read them in, once... and then use them in other functions. [04:34:34] For now, code can't access other objects. It's on the future timeline, but that's not there. Objects can only be accessed by composition for now. [04:34:45] I have about 3 code list parts that I will likely want to store... BidiBrackets is 1 of them [04:35:23] oh... hmm... then that sounds like... THAD NEEDS TO WAIT A BIT ? How long ya thinking? [04:36:03] Don't know. We're having a planning session in two weeks, and that might clear it up a bit. [04:36:17] Oh, there is one way, if that works: [04:36:26] but... I "COULD" , store the lists IN THE CODE ? [04:36:45] Yes, that's one way [04:36:48] There's another [04:36:57] You could store the lists as objects [04:37:06] The algorithms as functions, without the lists [04:37:07] OH ! [04:37:17] And then have a composition of the list and the algorithm [04:37:40] So the algorithm would take the list as an input [04:39:13] And the composition would call it with the real input and the list [04:42:32] ok so either way... I should likely store the BidiBrackets codepoints as an Object. In the future, I would also be able to access said Object in code (if need be) [04:42:53] Yes [04:43:02] Lovely [04:43:59] does the function itself sound useful? an intl version, if you will of bracket matching checking. [04:44:36] How would nesting work? [04:45:34] why nest? [04:46:14] That's the whole point of brackets? To nest them in each other? Or do I misunderstand? [04:46:40] oh bracket nesting... lol [04:47:03] you mean in the Python implementation? [04:47:22] No, in the specification [04:48:19] Can I mix brackets of different types? Or do they have to nest cleanly? Or can they overlap? [04:48:52] One advantage of having several types of brackets is that they could potentially overlap. But I don't know if the meaning of that is straightforward. [04:49:29] ah. I was thinking of indeed overlap support. It's because I saw that need on some of the Wikipedia ZH pages. [04:52:50] Yeah, so just to specify that and have enough test cases that capture that, I guess [05:00:27] @amire80 by the way, I made a ticket the other day about sidebar messages not being translatable that you're probably interested in - https://phabricator.wikimedia.org/T354608 [05:06:53] James tagged the language team on that one. We probably can't do much there [05:07:20] but why not? [05:08:07] In my Input 2 , in the Type field, I type "typed li" and Typed list shows up in drop down, but when I click on it in the drop down... it doesn't select it? [05:09:22] Ah, I didn't read the latter part of the discussion. Ok, got it. (re @Nikki: but why not?) [05:10:41] Huh, that's weird. Can't check now, heading for sleep, but happy to check it tomorrow. Would you file a bug in case it's repeatable? (re @thadguidry: In my Input 2 , in the Type field, I type "typed li" and Typed list shows up in drop down, but when I click on it in the drop do...) [05:11:17] on BETA [05:11:29] Yeah, should still work