On 11/8/2024 9:53 AM, Joseph Wright wrote:
Hello both,
On 06/11/2024 15:28, Hans Hagen wrote:
On 11/6/2024 12:37 PM, Vítek Starý Novotný wrote:
Anyway, today I'm not in the mood to ponder semi colons, as it's the least of my worries,
I am very sorry to bother you and other ConTeXt devs with this. If it makes it feel any better, the LaTeX folks seem equally annoyed with me.
I'm not sure what "just %" means here.
These were Joseph Wright's words. I assume Joseph was referring to the fact that in e-TeX and LuaTeX, including a comment after a `\numexpr` causes the comment to be ignored by TeX, similarly to how in LuaLaTeX, including a semicolon causes parts of the following text to be ignored.
It's not a comment - it's that the standard e-TeX implementation for \numexpr only accept a very limited number of characters, and any characters that are non-expandable and not in that set are treated as end-of-expression.
sure, that's what i thought but it's good to have that thread fixed
Well, that's just numexpr then, but how about:
\def\fool{\hskip10pt plus 0pt}
oeps \fool me
oeps \fool minus me
This whole lookahead scanning is fragile by design and just like one should define
\def\fool{\hskip10pt plus 0pt\relax}
Most of the time I agree, but \relax is a lot longer than (say) ; and if you are writing a complex parser that can be handy.
[In the end, if ; stays as part of the extended \numexpr syntax for LuaMetaTeX, at some stage I will have to re-work the code causing the issue here to use another token in place of ; - \relax (in our case \scan_stop:) really is a bit long, so probably something like @ is the viable change.]
sure, but this expl stuff si pretty verbose and long winding anyway (or that's what i remember from some BT presentation)
one should also make sure an expression doesn't scan ahead, if only because it will expand whats coming next; basically \relax or matching () should have been mandate and it's a design flaw.
Arguably yes but e-TeX was finalised in 1999 - that was an discussion for a previous millennium (at least from a plain/LaTeX point of view) :)
as much of tex ..
As mentioned there, we also cleaned up some function names (or moved some to another namespace); there's a reason why luatex was frozen and luametatex was the follow up.
Of course - but one day one might imagine LuaMetaTeX will more something that makes sense for non-ConTeXt users too. (Plain and OPTeX as well as LaTeX, I imagine.)
i can add \etexexprmode=1 that ignores : and ; operations (not much overhead) as long as it doesn't trigger all kind of "can you also do this or that" demands to make < 1999 inspired code happy) if course \etexexprmode defaults to zero Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------