Module talk:ja-link

From Wiktionary, the free dictionary
Latest comment: 1 year ago by Huhu9001 in topic string processing
Jump to navigation Jump to search

string processing

[edit]

@Theknightwho I see you have added many string processors in this module. Please give some description on what they do and how we should treat them. Now they are just random-looking utility functions and gsubs, for which we have completely no idea what their inputs and outputs are, whether they need "<", "&lt;" or "%3C", what "kana is compatible with language_link" actually means, and why they are arranged in this way. This is exactly why I urged you so many times to write documentations. Without docs basically the only thing we can do is guessing, and we will be forced to dive into mountains of unknown code to pin down some weird bugs when they happens. What you are trying to make, if I didn't get it wrong, is a general interface for all languages. Interfaces are to have standards and expected behaviours that everyone should be able to easily read and understand. -- Huhu9001 (talk) 16:39, 21 March 2023 (UTC)Reply

@Huhu9001 It’s all related to the fact Japanese rubytext uses % for subdivisions. However, the link module outputs certain risky characters as HTML entities, so that it’s possible to use them in inputs without breaking everything. This is one of several measures that are necessary to ensure that the standard link templates can be nested inside each other without breaking.
However, this initially caused problems for the rubytext module, as it resulted in the two parts becoming desynchronised in this module, before the input got fed to Module:ja-ruby. So, I added these functions to ensure that doesn’t happen.
Module:ja-link is all totally undocumented in the first place, and it would be strongly preferable to fold any of its functionality into the standard link templates, as it happening with all the other specialised link templates. Theknightwho (talk) 16:55, 21 March 2023 (UTC)Reply
Of course mod:ja-link is documented, and rather in details at t:ja-r/documentation. Please make an explicit list of which characters to escape when passed to which function on mod:languages/documentation or wherever editors can find. People need to know for sure what risky character to avoid, not "certain". -- Huhu9001 (talk) 17:10, 21 March 2023 (UTC)Reply
@Huhu9001 Are you claiming that it was possible to input '<' before? Because on my tests, the issue doesn't affect all of the escaped characters, which strongly suggests this is caused by something in Module:ja-ruby. This makes sense, given the functions in MOD:ja-link specifically cancel the escapes. Theknightwho (talk) 18:00, 21 March 2023 (UTC)Reply
"People need to know for sure what risky character to avoid, not 'certain'." I am claiming you need to write DOCUMENTATIONS. -- Huhu9001 (talk) 18:05, 21 March 2023 (UTC)Reply
Read what I wrote: it was a pre-existing problem. My changes ensured the module was compatible with changes to Module:links and Module:languages, but it did not introduce anything new or different to the output. Theknightwho (talk) 18:09, 21 March 2023 (UTC)Reply
¯\ (ツ) /¯ Never thought I would meet someone that hates writing documentations so much. Maybe there is a story behind it. -- Huhu9001 (talk) 19:19, 21 March 2023 (UTC)Reply
@Huhu9001 The story is that you’re demanding I write documentation for a pre-existing bug in the module that has nothing to do with me. Fix it yourself. Theknightwho (talk) 19:39, 21 March 2023 (UTC)Reply
Alright, since you are so uncooperative. I figured it out myself. The bug was caused by you changing the behaviour of language_link() of Module:links, which is, of course, undocumented, so I still don't know what else tricks I have to be alert to if I am to deal with it the next time. The hacks you added increased quite a lot the Lua memory usage, as I noticed when I remove them the memory errors in and are gone. -- Huhu9001 (talk) 01:42, 22 March 2023 (UTC)Reply
@Huhu9001 No, what you actually did was change the module so that rubytext was generated before language_link, which has nothing to do with me. Presumably that's why you gave absolutely no detail as to what the actual problem was. It's also still not possible to use "<" in {{ja-r}}, which is the bug you were complaining about in the first place.
As for memory issues, they change unpredictably, due to a bug in Lua 5.1's garbage collection, which is a major source of Wiktionary's memory issues.
Stop looking for reasons to blame me - it's extremely unpleasant. You seem to have a long history of being very antagonistic towards other users. Theknightwho (talk) 02:30, 22 March 2023 (UTC)Reply
I never complained I can't use "<" in t:ja-r. I have expressed myself clearly that the problem is these "random-looking utility functions and gsubs" are difficult to comprehend and handle. And your lack of documentation for the majority of changes you made has worsened this. Yes, you made this edit (special:diff/72230206) and complained "Don't reintroduce pointless extra work." But how can I know that when mod:links/documentation#language_link does not even disclose that it has an parameter "sc":
{
	term = entry_to_link_to,
	alt = link_text_or_displayed_text,
	lang = language_object,
	id = sense_id,
}
This is a good example how your habit of not documenting anything caused completely unnecessary troubles.
The "they change unpredictably" excuse is getting old. You can still reproduce these memory errors in the old versions,In page and , Lua memory errors occur for special:permanentLink/71370137 but not for special:permanentLink/72229995. These are facts and useful data for future module developing and I am not supposed to hide them just because you are displeased with them. I just don't want to mention, you yourself have been antagonistic against me from the beginning, using all ad-hominems you can think of to attack me, not stopping even when I was just posting my test results. And you are still doing so now. -- Huhu9001 (talk) 03:22, 22 March 2023 (UTC)Reply
@Huhu9001 Obviously you can reproduce the memory errors, because the internal state is the same. The reason memory issues are unpredictable is because negligible changes cause unexpectedly large changes in memory usage. You are being extremely disingenuous, because I am sure that you already knew that. The fact that and are 30KB under the limit tells us absolutely nothing useful, and you know it.
Why would you say we have completely no idea what their inputs and outputs are, whether they need "<", "&lt;" or "%3C" if you weren't complaining about not being able to use "<"? You're not even being consistent - you're just frustrated, and trying to blame me for things.
I'm also not using "ad hominems"; I'm pointing out that you're being extremely unpleasant, and have a long history of being extremely unpleasant, because it's relevant in a discussion which relies on you being honest - which you are not. You have made this about ego from the beginning, as you've done in many past discussions. Theknightwho (talk) 03:40, 22 March 2023 (UTC)Reply
I hope at least this could help you a bit: w:Coupling (computer programming) -- Huhu9001 (talk) 04:07, 22 March 2023 (UTC)Reply