[02:02:40] https://t.me/joinchat/AAAAAFW7bg2HPvn77u9oxw [02:03:07] @admin spam ^ (re @Alicia D. Jones: https://t.me/joinchat/AAAAAFW7bg2HPvn77u9oxw) [11:54:39] The main intention behind Abstract Wikipedia is to write functions that generate create strings of text in human languages, right? [11:54:40] Are they supposed to be plain text? Wiki syntax? HTML? Something else? All of the above? [12:01:43] I assume MediaWiki (or the relevant extension) will expect the “article-generating function” to return wikitext, but if we wanted, we could probably, within the confines of Abstract Wikipedia / Wikifunctions, invent our own markup format, make all of our text-generating functions produce that format, and then wrap them in one function which converts that format to wikitext to make MediaWiki happy [12:02:18] that might make the functions more generally useful (because then you could, using mostly the same functions, implement e.g. plain text as an output format, by using a different wrapper function that strips away the markup) [12:03:50] as I understand it, functions can do anything, so we could produce all of those formats if we want [12:04:07] and you'd just call the appropriate ones [12:05:21] I'm just wondering, you know, how will Wikipedians actually use them :) [12:05:31] And all Wikmedians, really. [12:05:51] wikitext would probably be most useful in wikis [12:05:52] Wikimedians tend to expect wiki syntax to work in the most unusual places :) [12:06:23] yeah [12:06:29] yeah, probably wikitext most of the way [12:06:49] and an optional wikitext → plain text pass if needed (maybe for generating short descriptions?) [12:07:35] what do you mean I can't use wikitext to style my child's name on their birth certificate :< [12:08:30] Like, a super-simple scenario: if a renderer function is executed and produces a string that outputs the following: [12:08:31] * en: Moscow is the [[capital]] of [[Russia]]. [12:08:33] * ru: Москва — [[столица]] [[Россия|России]]. [12:09:08] Will these be rendered as links to the correct articles in the English and Russian Wikipedias? [12:10:39] It may seem obvious that it will be, but go figure. Maybe the default will be to interpret it as plain text (or , in Wikimedian speak). [12:11:20] Or to interpret it as links to wiki pages with these names on the repo wiki. [12:29:20] I'd love to know what do @vrandecic and dr0ptp4kt think about it. [12:33:29] I'd expect the functions to have a way of being passed the context (i.e. the wiki the output is for) and then using the appropriate page names in the output [12:34:07] plain text sounds like it would be a good way to make people complain :D [12:45:21] OK, a more complex example. [12:45:21] If I want to put write a function that has the same functionality as English Wikipedia's {{cite web}}, and to reuse the existing code as much as possible, how would I do it? So I just copy the content of the English Wikipedia function, which is {{#invoke:citation/CS1|citation|CitationClass=encyclopaedia}}, and get it returned as the function's output. The thinnest wrapper possible. [12:45:22] What will happen if I don't do anything else and don't manually move Module:Citation/CS1 to the functions wiki? When I call this function from an article on the English Wikipedia, will it invoke the module in the English Wikipedia? That's what I would expect, at least naïvely. [12:46:01] (It may seem like a far-fetched question, but it's literally my job to ask far-fetched questions about how will Wikipedia work in the future.) [13:34:23] It should return an error and say the relevant module doesn't exist (re @amire80: OK, a more complex example. [13:34:24] If I want to put write a function that has the same functionality as English Wikipedia's {{cite web}}, and to reuse the existing code as much as possible, how would I do it? So I just copy the content of the English Wikipedia function, which is {{#invoke:citation/CS1|citation|CitationClass=encyclopaedia}}, and get it returned as the function's output. The thinnest wrapper possible. [13:34:25] What will happen if I don't do anything else and don't manually move Module:Citation/CS1 to the functions wiki? When I call this function from an article on the English Wikipedia, will it invoke the module in the English Wikipedia? That's what I would expect, at least naïvely.) [13:35:01] I'd say we want to set this up so that other WMF wikis can call Wikifunctions content, not the other way round [13:35:30] That's one possible behavior. But using the module in the local wiki in a possibility, too. Why wouldn't it be? (re @deryckchan: It should return an error and say the relevant module doesn't exist) [13:36:08] In that case you'll want to copy the module code to Wikifunctions [13:36:27] What if a local wiki wants to use some common code, which is stored in the shared repo, but to keep some custom functionality in the local wiki? [13:36:51] More broadly, we need to set a Path order [13:37:21] I think we'll want it to work like Commons images in that case (re @amire80: What if a local wiki wants to use some common code, which is stored in the shared repo, but to keep some custom functionality in the local wiki?) [13:37:24] Like with images: Most images are on commons, but occasionally wikis override them with a local copy of the same name. (Sometimes intentionally, sometimes unintentionally.) [13:37:39] We wrote it at the same time :) (re @deryckchan: I think we'll want it to work like Commons images in that case) [13:37:46] In any case, this has to be defined. [13:37:47] Search local wiki first; if none then search Wikifunctions for the same name. [13:38:44] https://tools-static.wmflabs.org/bridgebot/8330d705/file_1641.webp [13:39:21] Now, serious question: If an AW function of this kind can be written, then it's basically the same as what I propose in Global templates, isn't it? [13:39:51] [ https://www.mediawiki.org/wiki/Global_templates/Proposed_specification ] [13:42:01] This may sound like ad absurdum, but I'm asking very seriously: Once this works, can someone start importing templates from Wikipedias in bulk to the functions wiki? Technically, it can be almost fully automated. Does anyone see a problem with this? [13:43:29] I can't say I like the "thin wrapper" function solution, but if it indeed works like this, then it addresses a long-standing wish by the communities to have a cross-wiki repository to share templates and modules between the WMF projects, doesn't it? [13:43:43] I can't say I like the "thin wrapper" function solution, but if it indeed works like this, then in practice it addresses a long-standing wish by the communities to have a cross-wiki repository to share templates and modules between the WMF projects, doesn't it? [15:06:48] What Nikki says. A function could be written to return any of these. It could be plain text, HTML, wikitext. (re @Nikki: as I understand it, functions can do anything, so we could produce all of those formats if we want) [15:08:06] Now the second question is, when calling a function from another Wikimedia wiki, what format / type should the allowed result be? [15:09:29] Here the discussions with the parsing teams and others have pointed to "valid HTML parsoid-like trees" [15:11:01] So one can't do everything that a template can do: in particular, you can't open markup elements (be their wikitext or HTML) in one function and close it in another [15:12:16] But a wiki is guaranteed to always get a valid tree from Wikifunctions that it can use without further parsing [15:15:56] Looks simple, but there's a lot going on in these few characters. For example, the link to capital in the English output should only link to capital if capital actually is the article about capital cities. If it happens to be about a book by Marx or about the idea from economics, this link should be different and might redlink. (re @amire80: Like, a super-simple scenario: if a renderer function is executed and produces a st [15:15:57] * en: Moscow is the [[capital]] of [[Russia]]. [15:15:58] * ru: Москва — [[столица]] [[Россия|России]].) [15:18:04] In the case of linking we could only link to things that have Wikidata items. And a Wikidata item fortunately is very much in the know which articles of its item exist in the different wikis and which do not. That's crucial for being able to write the function. [15:23:37] Now the problem is, how about redlinks? How do we ensure that a redlink is pointing consistently to the correct place in a given wiki without knowing what the correct place for it will be? I have a few ideas for this, but no answer of yet. There's a related task on phabricator. [15:24:35] T212211 [15:27:47] Now this is, I think, answered as a consequence of my earlier answer regarding the interface between Wikifunctions and the calling wikis: it depends on what the HTML parsoid tree looks like. And my understanding here is weak about how it would look like in this case. (re @amire80: OK, a more complex example. [15:27:48] If I want to put write a function that has the same functionality as English Wikipedia's {{cite web}}, and to reuse the existing code as much as possible, how would I do it? So I just copy the content of the English Wikipedia function, which is {{#invoke:citation/CS1|citation|CitationClass=encyclopaedia}}, and get it returned as the function's output. The thinnest wrapper possible. [15:27:49] What will happen if I don't do anything else and don't manually move Module:Citation/CS1 to the functions wiki? When I call this function from an article on the English Wikipedia, will it invoke the module in the English Wikipedia? That's what I would expect, at least naïvely.) [16:06:25] Aha, that's what I suspected. That's why I mentioned HTML as one of the options. Lately, the Parsing people have been talking about HTML trees all the time :) (re @vrandecic: Here the discussions with the parsing teams and others have pointed to "valid HTML parsoid-like trees") [16:09:39] Exactly—it only looks simple. Especially to experienced Wikimedians, many of whom want to use wikitext everywhere :) (re @vrandecic: Looks simple, but there's a lot going on in these few characters. For example, the link to capital in the English output should only link to capital if capital actually is the article about capital cities. If it happens to be about a book by Marx or about the idea from economics, this link sho [17:26:17] I want that to be a Wikifunctions functionality too. Global templates (re @amire80: This may sound like ad absurdum, but I'm asking very seriously: Once this works, can someone start importing templates from Wikipedias in bulk to the functions wiki? Technically, it can be almost fully automated. Does anyone see a problem with this?) [17:58:37] What's an HTML tree? (re @amire80: Aha, that's what I suspected. That's why I mentioned HTML as one of the options. Lately, the Parsing people have been talking about HTML trees all the time :)) [18:08:01] I guess HTML tree is just HTML, but emphasizing that it is usually represented in a tree structure, as HTML (tags) can be nested (and usually are). [18:08:01] The advantage of HTML is that it is formally well specified and that it is well tried out in many many situations – making writing parser and renderer for it more predictable. (re @jhsoby: What's an HTML tree?) [18:14:14] The tree emphasises that all tags have to be balanced. You can't just open or close tags. [18:14:49] Every tag that gets opened needs to be closed and no tags can be closed that have not been previously opened. [18:17:52] Don't confuse him, if he looks up balanced trees, he'll not find, what you are talking about. (re @vrandecic: The tree emphasises that all tags have to be balanced. You can't just open or close tags.) [18:17:58] Don't confuse him, if he looks up balanced trees, he'll not find, what you are talking about. 😉 (re @vrandecic: The tree emphasises that all tags have to be balanced. You can't just open or close tags.) [18:28:26] आध्यात्मिक गुरु सिद्धेश्वर स्वामीजी |Spiritual Discourse |आध्यात्मिक प्रवचन | ಆಧ್ಯಾತ್ಮಿಕಪ್ರವಚನ [18:28:27] ३० दिवसाचे ३० प्रवचन [18:28:28] खालील लिंक वर क्लिक करून प्रवचन ऐकावे. [18:28:30] १) प्रवचन - https://youtu.be/ECBEPWB-imw?t=358 [18:28:31] २) प्रवचन - https://youtu.be/hGQuuT0QL4s?t=106 [18:28:33] ३) प्रवचन - https://youtu.be/ZjQCK6uCvbI?t=163 [18:28:34] ४) प्रवचन – https://youtu.be/-zdkPoPAY9M?t=48 [18:28:36] ५) प्रवचन – https://youtu.be/NbxS0vw5Ji8?t=405 [18:28:37] ६) प्रवचन - https://youtu.be/IQNPeD2KDoU?t=56 [18:28:39] ७) प्रवचन – https://youtu.be/tMBsxmFtlRQ?t=985 [18:28:40] ८) प्रवचन – https://youtu.be/AF_UxvJ_UdI?t=21 [18:28:42] ९) प्रवचन - https://youtu.be/a7zjryn4MV8?t=2 [18:28:43] १०) प्रवचन – https://youtu.be/pVd6vmRmSQw?t=1 [18:28:45] ११) प्रवचन – https://youtu.be/ZvxXITHId70?t=92 [18:28:46] १२) प्रवचन – https://youtu.be/BucbcmCs44E?t=196 [18:28:48] १३) प्रवचन – https://youtu.be/pFANO9WR4uo?t=78 [18:28:49] १४) प्रवचन – https://youtu.be/9vhq2dfefeA?t=51 [18:28:51] १५) प्रवचन – https://youtu.be/MtidxFuMYVk?t=398 [18:28:52] १६) प्रवचन – https://youtu.be/7WpwJMxDCrw?t=356 [18:28:54] १७) प्रवचन – https://youtu.be/lvVvcW82w1s?t=232 [18:28:55] १८) प्रवचन – https://youtu.be/xEPsYjB9jn0?t=5 [18:28:57] १९) प्रवचन – https://youtu.be/2TUD84odJJY?t=1 [18:28:58] २०) प्रवचन – https://youtu.be/eXkHGGCHMd0?t=23 [18:29:00] २१) प्रवचन – https://youtu.be/SdJ6V0Powcg?t=9 [18:29:01] २२) प्रवचन – https://youtu.be/hmf-Un_s0pM?t=4 [18:29:03] २३) प्रवचन – https://youtu.be/qd6K9rQuUPM?t=5 [18:29:04] २४) प्रवचन – https://youtu.be/f5PpI0BgNnw?t=25 [18:29:06] २५) प्रवचन – https://youtu.be/WfDxy8gm380?t=3 [18:29:07] २६) प्रवचन – https://youtu.be/TRSVmpomXcY?t=4 [18:29:09] २७) प्रवचन – https://youtu.be/9cASRBanexQ?t=4 [18:29:10] २८) प्रवचन – https://youtu.be/g0dodBNKWmQ?t=3 [21:58:36] I'm really not an expert, and if you're interested in truth and details, start at https://www.mediawiki.org/wiki/Parsing . [21:58:37] But basically, the developers of the MediaWiki parser and Parsoid want the conversion from HTML to wikitext and vice versa to be as correct and predictable as possible. For that, they prefer to do all internal processing in a structured representation of HTML, and they want the HTML to be standardized and well-formed as an XML data structure. [21:58:39] One of the things that gives them a lot of blues is having to process non-balanced templates, such as {{Collapse_top}}. When used correctly with {{Collapse bottom}}, it gets rendered correctly, but it only works when parsing a whole page. It is possible at all only because when MediaWiki started, it was very lax about enforcing standard HTML, so template maintainers and wiki editors did whatever seemed to work. As time passed