Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tex pool reorg #2358

Merged
merged 11 commits into from
Apr 26, 2024
Merged

Tex pool reorg #2358

merged 11 commits into from
Apr 26, 2024

Conversation

brucemiller
Copy link
Owner

Split the (huge) TeX.pool into more manageable, modular components:

  • TeX primitives, grouped according to David Bausum's "families" of primitives
  • LaTeXML-specific utilities, helpers, etc
  • LaTeXML binding for plain.tex.

Future (or continuing) work will

  • regularize all LaTeXML-specific control-sequences to start with \lx@
  • support reading plain.tex and latex.ltx directly for the bulk of definitions, after establishing what needs LaTeXML-specific binding, eg for semantics.

@brucemiller brucemiller requested a review from dginev April 24, 2024 15:54
Copy link
Collaborator

@dginev dginev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks surprisingly well-cataloged! Kudos to David Bausum for the thematic structure.

I generally quite like it. One note is that this kind of PR is the perfect place for subtle typos to sneak in, since git won't micromanage the large chunks of text moving from one file to another, and we can't really inspect it all manually. So I hope copy-paste was bug free :> The tests passing is a big encouragement.

One curious question: Is there an obvious performance footprint from reorganizing? Or are make test times comparable to master?

@@ -433,6 +433,7 @@ sub build_kpse_cache {
foreach my $path (split(/$KPATHSEP/, $texpaths)) {
$path =~ s/^!!//; $path =~ s|//+$|/|;
push(@filters, $path) if -d $path; }
my $filterre = '(?:' . join('|', map { "\Q$_\E"; } @filters) . ')';
Copy link
Collaborator

@dginev dginev Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edge case note: I think there is a subtle behavior change here if @filters is empty. The new regex will then evaluate to (?:), which apparently matches against every string. So in that case $skip would be always false, rather than always true. I think?

Edit:
Particularly !grep{ ... } () is always true.
While $d !~ /(?:)/ is always false.

@brucemiller
Copy link
Owner Author

@dginev here's another take, per our discussions; give it another look.

@dginev
Copy link
Collaborator

dginev commented Apr 26, 2024

✅ I like the new naming scheme. Looks good to merge.

@brucemiller brucemiller merged commit 3b753cf into master Apr 26, 2024
26 checks passed
@brucemiller brucemiller deleted the tex-pool-reorg branch April 26, 2024 20:10
@dginev dginev changed the title [WiP] Tex pool reorg Tex pool reorg Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants