User talk:Thundergnat
Archive of older talk page entries
Syntax highlighting disappearing after a certain point for some tasks
Take the List comprehensions task for example. It's fine up to and including the Swift entry but then disappears from Tcl onwards even though Tcl definitely has Pygments support. If you press the edit button for Tcl and go immediately to Show Preview then the syntax highlighting appears.
I thought at first that there must be an unfinished tag or similar in the Swift entry but I can't see anything.
It's the same on FireFox, Chrome and Safari so unlikely to be a browser problem.
Any ideas on what could be causing it? --PureFox (talk) 16:38, 2 September 2023 (UTC)
- Just looked at the 100 doors task and the problem there is far worse as SH is gone after the Crystal entry - though again I can't see any obvious cause. Probably something to do with the WikiTide migration as I don't recall seeing this problem with Miraheze. --PureFox (talk) 17:34, 2 September 2023 (UTC)
- Both List comprehensions and 100 doors have a category "Pages with too many expensive parser function calls", which I suspect is something to do with it. If you edit the page as a whole and click Show preview, a message appears at the top of the page saying:
- Warning: This page contains too many expensive parser function calls.
- It should have less than 99 calls, there are now 106 calls.
- I'm guessing that syntaxhighlight could be the expensive parser function call, though there are about 125 syntaxhighlights in List comprehensions before it stops... --Tigerofdarkness (talk) 17:58, 2 September 2023 (UTC)
- Both List comprehensions and 100 doors have a category "Pages with too many expensive parser function calls", which I suspect is something to do with it. If you edit the page as a whole and click Show preview, a message appears at the top of the page saying:
- I did an experimental edit to List comprehensions#Python to change it from a rather greedy eight syntaxhighlight to one. (Feel free to undo that.) I wonder if changing the "too many expensive" from a redlink to a real page would a) work, and b) help, and, while I would do it for Phix, whether PureFox would be happy to ferret out similar edits when Wren fails to syntax highlight properly? I rather suspect we'd just have to live with/give up on the 373 on 100 doors, though, or perhaps split it into say A-G, H-N, O-U, and V-Z, or whatever works best?. PS: one thing I noted was that syntaxhighlights with no actual highlighter didn't count towards the limit. --Petelomax (talk) 20:51, 3 September 2023 (UTC)
- Well, after Pete’s experiments, it now seems certain that this is where the problem lies. TBH I doubt whether it’s worth the effort of trying to do something manually about this. A lot of tasks will be affected and only a few will be completely fixable. Even then you’d need to watch out for further languages being added which could mess them up again. --PureFox (talk) 22:34, 3 September 2023 (UTC)
- It seems that the limit can be changed: https://www.mediawiki.org/wiki/Topic:Va147qvml961b47p Laurence (talk) 23:18, 3 September 2023 (UTC)
- Sorry guys. Had an unanticipated major project at work and have had zero time for Rosetta Code for the past month. Things are starting to settle down, should be around more in the future. --Thundergnat (talk) 18:50, 30 September 2023 (UTC)
Changeable words
Hi Thundergnat, just to let you know, the output of a large number of samples on the Changeable words task was changed in April 2021. The change was to replace committeewoman and committeewomen with committeeperson and committeepeople. I've changed it back. I assume the change was for "political correctness", just thought I'd advise you I realise you don't get much time for RC. --Tigerofdarkness (talk) 16:04, 12 November 2023 (UTC)
- Huh. Bizarre. I find I difficult to figure out what they were trying to achieve. ¯\_(ツ)_/¯ Ah well, no lasting harm done. Thanks. Thundergnat (talk) 01:07, 13 November 2023 (UTC)
<syntaxhighlight>
Hello Thundergnat. You pointed out to me that <syntaxhighlight> without the lang attribute is bad and causes errors. What about <syntaxhighlight lang=some_unknown_lang>, is that just as bad, should that also be changed (back) to lang=text. There are a lot of them. --Chkas (talk) 15:23, 22 July 2024 (UTC)
- In general, an unknown language tag is not a large problem. If the parser doesn't have a lexer with that name, (I believe) it just short circuits and skips trying to highlight it. Leaving the "unknown" language name is slightly preferable since it is possible that a lexer for that language may be added to Pygments at some point, and then it would already be set up. Having just lang="text" means if a lexer does get added, someone would have to go in and edit them all to get the highlighting. --Thundergnat (talk) 15:48, 22 July 2024 (UTC)
Wait
Can I edit the list of tasks by the creators page thing? Because I literally just made a task recently Gaham (talk) 05:22, 1 August 2024 (UTC)
- Ummm.... I guess you could... but that's an automatically generated report that I update approximately weekly. (Though, to be fair, it has been pretty spotty lately...) Updated it just now. Sidenote: that is not an "official" Rosettacode page, just the output of the Raku entry for the Rosetta_Code/List_authors_of_task_descriptions task. Feel free to generate your own analogous page if desired. (BTW, please sign your comments.) --Thundergnat (talk) 00:27, 1 August 2024 (UTC)