It seems like you've gotten reviews but you just don't like the answer.

It is extremely unlikely that anyone is going to merge it in over the
objection of other reviewers. The code needs to be structured so the logic
of what is going on is clear. 3000 lines of regexes with half of them
commented out just doesn't meet expectations for how mediawiki code should
be written.

>it has been said that the file is too big and the commit is too big.
>the code is nearly 3500 lines. i think it is not worth to divide it
>into separate library or files. as library it would be very fit for
>this conversion, not usable for other things. i feel making library as
>"premature optimisation". and laziness, feeling as useless work. also
>just dividing into files, into classes. 3500 lines is not very hard
>for me to browse.

You can feel however you want, but if you want to have the code merged into
mediawiki and deployed to wikipedia, you're going to have to put aside your
feelings, or be content with it staying as an unmerged patchset forever.

--
bawolff

On Mon, Oct 24, 2022 at 9:03 PM dinar qurbanov <qdi...@gmail.com> wrote:

> hello
>
> can somebody help with reviewing technical aspects of a cyrillic <->
> latin converter ?
>
> it has been said that the file is too big and the commit is too big.
> the code is nearly 3500 lines. i think it is not worth to divide it
> into separate library or files. as library it would be very fit for
> this conversion, not usable for other things. i feel making library as
> "premature optimisation". and laziness, feeling as useless work. also
> just dividing into files, into classes. 3500 lines is not very hard
> for me to browse.
>
> if anybody wants to separate it into classes and files, feel free to
> edit, if you think it is good for mediawiki. i do not want to make
> such change by myself. i can help with proper names (for classes,
> variables).
>
> i said variables because it is possible to convert some lists of php
> commands into for cycles with arrays, just to make it look shorter. i
> think it is also like premature optimisation, i have more freedom when
> they are as they are, in further editing. i do not want to make such
> change by myself. feel free to edit.
>
> quick link to the newest version of the code:
>
> https://gerrit.wikimedia.org/r/c/mediawiki/core/+/164049/219/includes/language/converters/TtConverter.php
> .
>
> also it was suggested to get rid of regex lookahead and lookbehind.
> and strtr was like suggested. i think i probably cannot easily make
> those changes. and i think, is strtr really faster than preg_replace?
> i googled for benchmark results and i do not see, in the first page,
> like 10 results.
>
> the code is big, but it just modifies a string.
>
> tatar wikipedians have asked me about this code, yesterday, and now i
> try this approach, to write to this mailing list, before other ways to
> go. maybe there is just a lack of some people who can review this code
> and approve it, and maybe this mailing list can help.
>
> other ways to go to the problem's pages:
> https://phabricator.wikimedia.org/T27537 ,
> https://gerrit.wikimedia.org/r/c/mediawiki/core/+/164049 .
> _______________________________________________
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

Reply via email to