Hi,
Comments are welcome before I reply. Personally I doubt
much indirection is feasible, though.
Taco
-------- Original Message --------
Subject: LuaTeX
Date: Sun, 30 Apr 2006 08:52:03 -0700 (PDT)
From: James Quirk
To: Taco Hoekwater
Dear Taco,
I understand from the LuaTeX FAQ that third-party feedback is currently
not encouraged. However, I have one observation that I hope you
might consider. Specifically, I would have thought it possible,
and desirable, to introduce a lightweight intermediate layer to broker
communications between TeX and Lua.
The situation would be analagous to converting between graphics formats.
Rather than writing N^2 conversion programs (a2b, a2c, b2a, b2c,
c2a, c2b etc.) it is possible to get away with the 2N conversion programs
(a2xyz, b2xyz, c2xyz, xyz2a, xyz2b, xyz2c etc.). The motivation being
that when a new format comes along one need only construct xyz2new
and new2xyz to be able to convert to any one of the other formats.
So instead of having tex2lua and lua2tex communications one would have
{tex,lua}2broker and broker2{tex,lua}. That way it would be be
straightforward for a third-party to add their own favourite scripting
language, as most of the machinations live with the broker and do not
change with the choice of embedded language (at least not for languages
implemented in C, which covers perl python, ruby etc.).
I realise, from arguments of portablity, that you might not want to have a
situation where there are 57 varieties of embedded interpreter. But the
broker-design would provide a springboard for whatever language
developments
might occur down the road without needing to be rewritten. As for the
cost of the overhead, it would not be great and with the advent of
multicore processors I'm not sure it is something to worry about.
Afterall, much of TeX's programming clunkiness stems from decisions
that were too focussed on the machine's of the day; a mistake
that crops up time and time again.
In any event. I look forward to trying out LuaTeX when it is
made publicly available.
All the best with your project,
James Quirk