1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
|
% language=us
\usemodule[present-boring,abbreviations-logos]
\definehighlight[nb][style=bold,color=middlegray,define=no]
\startdocument
[title={PROGRAMMING},
banner={the way \CONTEXT\ is set up},
location={context\enspace {\bf 2021}\enspace meeting}]
\starttitle[title=Levels]
When you look at \CONTEXT\ bottom|--|up (engine|--|interface) you will notice: \blank[2*big]
\startnarrower
\startitemize[n]
\startitem
\highlight[nb]{primitives:} this is what the engine comes with
\stopitem
\startitem
\highlight[nb]{infrastructure:} basic management of data structures
\stopitem
\startitem
\highlight[nb]{helpers:} macros that hide complexity
\stopitem
\startitem
\highlight[nb]{subsystems:} collections of macros that implement functionality
\stopitem
\startitem
\highlight[nb]{mechanisms:} these combine various subsystems
\stopitem
\startitem
\highlight[nb]{modules:} extra functionality (uses 1--5)
\stopitem
\startitem
\highlight[nb]{styles:} handling sources and layout (uses 4--6)
\stopitem
\stopitemize
\stopnarrower
\blank[2*big] Users normally see \CONTEXT\ top|--|down (usage|--|hacking).
\stoptitle
% % %
\starttitle[title=Styles]
\startitemize
\startitem
These are prebuilt solutions for common as well as rare situations.
\stopitem
\startitem
The system comes with some styles: the \type {s-*} files.
\stopitem
\startitem
Right from the start the idea was that you get some reasonable default.
\stopitem
\startitem
And if you want more you stepwise define your style as you go.
\stopitem
\startitem
It really is part of the game: exploration.
\stopitem
\startitem
Solving your problem is a nice challenge.
\stopitem
\startitem
If you want a completely predefined setup, shop somewhere else.
\stopitem
\stopitemize
\stoptitle
% % %
\starttitle[title=Modules]
\startitemize
\startitem
A lot of functionality is built in.
\stopitem
\startitem
This helps to keep the system consistent.
\stopitem
\startitem
We could cheat and ship thousands of few|--|liner styles but don't do that.
\stopitem
\startitem
There are a few mechanisms that don't really fit into the core, so these are
implemented as modules that do fit into the interface: the \type {m-*} and
\type {x-*} files.
\stopitem
\startitem
Users can build and share their solutions which has resulted in some
third party modules: the \type {t-*} files.
\stopitem
\startitem
For (a few, often old) private files I use \type {p-*} name scheme.
\stopitem
\stopitemize
\stoptitle
% % %
\starttitle[title=Mechanisms]
\startitemize
\startitem
These are combinations of subsystems but often they cannot really be distinguished.
\stopitem
\startitem
Examples are notes, that combine notations, lists, references, descriptions etc.
\stopitem
\stopitemize
\stoptitle
% % %
\starttitle[title=Subsystems]
\startitemize
\startitem
This is what users see and can configure
\stopitem
\startitem
Most are (conceptually) rather old but evolved over time. There are no
fundamental differences between \MKIV\ and \LMTX, but the later is hopefully
a bit cleaner.
\stopitem
\startitem
Examples are fonts, languages, color, structure (sectioning, lists,
constructions, itemgroups, references), spacing, graphics, bibliographies,
positioning, numbering and layout.
\stopitem
\startitem
More hidden are the backend, export and \XML\ interfaces.
\stopitem
\startitem
Some have subsystems themselves, like widgets that relate to a specific
backend.
\stopitem
\startitem
There are often dependencies between subsystems which makes that it's not really a
hierarchy. A more strict separation would demand much more overhead.
\stopitem
\stopitemize
\stoptitle
% % %
\starttitle[title=Helpers]
\startitemize
\startitem
These provide basic programming help.
\stopitem
\startitem
Examples are macros for comparing things, loops, list processing,
argument handling.
\stopitem
\startitem
But more abstract box manipulations also fits in here.
\stopitem
\startitem
Some subsystems, like \XML\ and bibliographies provide more specific low
level helpers.
\stopitem
\stopitemize
\stoptitle
% % %
\starttitle[title=Infrastructure]
\startitemize
\startitem
The engine provides counters, dimension and other registers that need
to be managed in order to avoid clashes in usage.
\stopitem
\startitem
Many of the helpers, subsystems and mechanisms fall back on common rather
low level functions (\LUA) and macros (using primitives).
\stopitem
\stopitemize
\stoptitle
% % %
\starttitle[title=Primitives]
\startitemize
\startitem
This is what the engine provides: the built|-|in commands and features.
\stopitem
\startitem
In addition to the visible primitives there are \LUA\ interfaces and these
permit adding extra primitives.
\stopitem
\startitem
In \LUAMETATEX\ we have the core \TEX\ set but a few were dropped because we
don't have a backend and a different \IO\ subsystem (so they have to be
emulated).
\stopitem
\startitem
We also have some of the \ETEX\ primitives and very few of the \PDFTEX\ ones
but I now consider for instance expansion and protrusion extensions to be
kind of \ETEX.
\stopitem
\startitem
There are additional \LUATEX\ primitives but some were dropped, again because
of the backend, so we emulate some, and also because some were experimental.
\stopitem
\startitem
There are quite some new primitives and existing mechanisms have been extended,
cleaned up and (hopefully) improved.
\stopitem
\stopitemize
% % %
\starttitle[title=The shift]
\startitemize
\startitem
There have always been complaints about \TEX\ as a language (what makes me
wonder why those who complain use it.)
\stopitem
\startitem
Although there are some extensions to the language in \ETEX, follow|-|ups have
not really succeeded in this area.
\stopitem
\startitem
At some point I decided that code in the categories 1|--|4 cold benefit from
extensions.
\stopitem
\startitem
That also meant that we use less of the low helpers. It makes the code look a
bit more \TEX.
\stopitem
\startitem
It also means less clutter, in code as well in tracing. Often the code
becomes simpler too.
\stopitem
\startitem
The idea is that \TEX\ becomes a bit more a programming language.
\stopitem
\startitem
Of course it takes away the \quotation {Watch me, I can do real dirty \TEX\
hacking!} brawling.
\stopitem
\startitem
It also can take away some of the complaints.
\stopitem
\startitem
And it definitely adds some fun.
\stopitem
\stopitemize
{\em During the week we show some of the implementation (in Visual Studio) and
examples of applications. We also write a small extension (the {\tttf dk} unit)}
\stoptitle
\stopdocument
|