hybrid-introduction.tex /size: 5762 b    last modification: 2023-12-21 09:43
1% language=us
2
3\startcomponent hybrid-languages
4
5\environment hybrid-environment
6
7\startchapter[title={Introduction}]
8
9We're halfway the development of \LUATEX\ (mid 2009) and substantial parts of
10\CONTEXT\ have been rewritten using a mixture of \LUA\ and \TEX. In another
11document, \quotation {\CONTEXT\ \MKII--\MKIV, the history of \LUATEX\
122006--2009}, we have kept track of how both systems evolved so far\footnote
13{Parts of this have been published in usergroup magazines like the \MAPS,
14\TUGBOAT, and conference proceedings of \EUROTEX\ and \TUG.}. Here we continue
15that story which eventually will end with both systems being stable and more of
16less complete in their basic features.
17
18The title of this document needs some explanation, although the symbols on the
19cover might give a clue already. In \CONTEXT\ \MKIV, as it is now, we mix several
20languages:
21
22\startitemize[packed]
23\startitem
24    good old \TEX: here you will see \type {{}} all over the place
25\stopitem
26\startitem
27    fancy \METAPOST: there we use quite some \type {()}
28\stopitem
29\startitem
30    lean and mean \LUA: both \type{{}} and \type {()} show up a lot there
31\stopitem
32\startitem
33    unreadable but handy \XML: immediately recognizable by the use of \type {<>}
34\stopitem
35\stopitemize
36
37As we use all of them mixed, you can consider \MKIV\ to be a hybrid system and
38just as with hybrid cars, efficiency is part of the concept.
39
40% copied from chrt-xml.tex
41
42\startFLOWchart[conversion 10]
43  \startFLOWcell
44    \name       {TEX}
45    \location   {2,1}
46    \shape      {action}
47    \text       {\TEX}
48    \connection [b+l] {CONTEXT}
49  \stopFLOWcell
50  \startFLOWcell
51    \name       {XML}
52    \location   {1,2}
53    \shape      {action}
54    \text       {XML}
55    \connection [rl] {CONTEXT}
56  \stopFLOWcell
57  \startFLOWcell
58    \name       {METAPOST}
59    \location   {2,3}
60    \shape      {action}
61    \text       {\METAPOST}
62    \connection [t-l] {CONTEXT}
63  \stopFLOWcell
64  \startFLOWcell
65    \name       {CONTEXT}
66    \location   {3,2}
67    \shape      {action}
68    \text       {\ConTeXt}
69    \connection [rl] {PDF}
70    \connection [-b-t] {UTILITIES}
71    \connection [-t-b] {LUA}
72  \stopFLOWcell
73  \startFLOWcell
74    \name       {PDF}
75    \location   {4,2}
76    \shape      {action}
77    \text       {PDF}
78  \stopFLOWcell
79  \startFLOWcell
80    \name       {UTILITIES}
81    \location   {3,3}
82    \shape      {action}
83    \text       {UTILITIES}
84    \connection [+t+b] {CONTEXT}
85  \stopFLOWcell
86  \startFLOWcell
87    \name       {LUA}
88    \location   {3,1}
89    \shape      {action}
90    \text       {LUA}
91    \connection [+b+t] {CONTEXT}
92  \stopFLOWcell
93\stopFLOWchart
94
95\startlinecorrection[big]
96\FLOWchart[conversion 10]
97\stoplinecorrection
98
99In this graphic we've given \LUA\ a somewhat different place than the other three
100languages. First of all we have \LUA\ inside \TEX, which is kind of hidden, but
101at the same time we can use \LUA\ to provide whatever extra features we need,
102especially when we've reached the state where we can load libraries. In a similar
103fashion we have utilities (now all written in \LUA) that can manage your workflow
104or aspects of a run (the \type {mtxrun} script plays a central role in this).
105
106The mentioned history document was (and still is) a rather good testcase for
107\LUATEX\ and \MKIV. We explore some new features and load a lot of fonts, some
108really large. This document will also serve that purpose. This is one of the
109reasons why we have turned on grid snapping (and occasionally some tracing).
110
111Keeping track of the history of \LUATEX\ and \MKIV\ in a document serves several
112purposes. Of course it shows what has been done. It also serves as a reminder of
113why it was done that way. As mentioned it serves as test, both in functionality
114and performance, and as such it's always one of the first documents we run after
115a change in the code. Most of all this document serves as an extension to my
116limited memory. When I look at my source code I often can remember when and why
117it was done that way at that time. However, writing it down more explicitly helps
118me to remember more and might help users to get some insight in the developments
119and decisions made. \footnote {I read a lot and regret that I forget most of what
120I read so fast. I might as well forget what I wrote so have some patience with me
121as I repeat myself occasionally.}
122
123A couple of new features were added to \LUATEX\ in 2010 but the years 2011 and
1242012 were mostly spent on fixing issues and reaching a stable state. In parallel
125parts of \CONTEXT\ were rewritten using \LUA\ and new possibilities have been
126explored. Indeed \LUATEX\ had become pretty stable, especially because we used it
127in production. There are still a lot of things on the agenda but with \LUATEX\
1280.75 we have reached yet another milestone: integration of \LUA\ 5.2, exploration
129of \LUAJIT, and the move forward to a version of \METAPOST\ that supports doubles
130as numeric type. Luigi Scarso and I also started the SwigLib project that will
131make the use of external libraries more easy.
132
133Of course, although I wrote most of the text, this document is as much a
134reflection of what Taco Hoekwater and Hartmut Henkel come up with, but all errors
135you find here are definitely mine. Some chapters have been published in \TUGBOAT,
136the \MAPS\ and other usergroup journals. Some chapters have become manuals, like
137the one on spreadsheets. I also owe thanks to the \CONTEXT\ community and those
138active on the mailing list: it's a real pleasure to see how fast new features are
139picked up and how willing to test users are when new betas show up.
140
141\blank
142
143Hans Hagen, Hasselt NL,\crlf September 2009 \emdash\ December 2012
144
145\blank
146
147\type {http://www.luatex.org}\crlf
148\type {http://www.pragma-ade.com}
149
150\stopchapter
151
152\stopcomponent
153