summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/status-mkiv.tex
blob: 8685c97ad3f242005eb4c514c287f175a3405d78 (plain)
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
326
327
328
\usemodule[abr-02]

\setupbodyfont
  [dejavu,9pt]

\setuppapersize
  [A4,landscape]

\setuplayout
  [width=middle,
   height=middle,
   backspace=.5cm,
   topspace=.5cm,
   footer=0pt,
   header=1.25cm]

\setuphead
  [title]
  [style=\bfa,
   page=yes,
   after={\blank[line]}]

\setuppagenumbering
  [location=]

\setupheadertexts
  [\currentdate]
  [MkIV Status / Page \pagenumber]

% \showmakeup
% \showallmakeup

\starttext

% logs.report (immediate) versus logs.messenger (in flow)

\starttitle[title=Todo]

\startitemize[packed]
    \startitem currently the new namespace prefixes are not consistent but this
               will be done when we're satisfied with one scheme \stopitem
    \startitem there will be additional columns in the table, like for namespace
               so we need another round of checking then \stopitem
    \startitem the lua code will be cleaned up upgraded as some is quite old
               and experimental \stopitem
    \startitem we need a proper dependency tree and better defined loading order \stopitem
    \startitem all dotag.. will be moved to the tags_.. namespace \stopitem
    \startitem we need to check what messages are gone (i.e.\ clean up mult-mes) \stopitem
    \startitem some commands can go from mult-def (and the xml file) \stopitem
    \startitem check for setuphandler vs simplesetuphandler \stopitem
    \startitem for the moment we will go for \type {xxxx_} namespaces that (mostly) match
               the filename but later we can replace these by longer names (via a script) so
               module writers should {\bf not} use the core commands with \type{_} in the
               name \stopitem
    \startitem the message system will be unified \stopitem
    \startitem maybe rename dowhatevertexcommand to fromluawhatevertexcommand \stopitem
    \startitem consider moving setups directly to lua end (e.g. in characterspacing, breakpoint, bitmaps etc.) \stopitem
    \startitem more local temporary \type {\temp...} will become \type {\p_...} \stopitem
    \startitem check all ctxlua calls for ctxcommand \stopitem
    \startitem rename all those \type {\current<whatever>}s in strc \stopitem
    \startitem check \type {option} vs \type {options} \stopitem
    \startitem check \type {type} vs \type {kind} \stopitem
    \startitem check \type {label} vs \type {name} vs \type {tag} \stopitem
    \startitem check \type {limop}, different limops should should be classes \stopitem
    \startitem too many positions in simple files (itemize etc) \stopitem
    \startitem math domains/dictionaries \stopitem
    \startitem xtables don't span vertically with multilines (yet) \stopitem
    \startitem notes in mixed columns \stopitem
    \startitem floats in mixed columns \stopitem
    \startitem check return values \type {os.execute} \stopitem
    \startitem more r, d, k in xml code \stopitem
    \startitem mathml, more in \LUA \stopitem
    \startitem style: font-size, font, color handling in \HTML\ (lxml-css) \stopitem
    \startitem a \type {\name {A.B.C DEF}} auto-nobreakspace \stopitem
    \startitem redo \CWEB\ module with \LUA \stopitem
    \startitem maybe move characters.blocks to its own file \stopitem
    \startitem more local context = context in \LUA\ files \stopitem
    \startitem check and optimize all storage.register and locals (cosmetics) \stopitem
    \startitem check all used modules in \LUA\ (and local them) \stopitem
    \startitem environment and basic lua helpers are now spread over too many files \stopitem
    \startitem isolate tracers and showers \stopitem
    \startitem check all possible usage of ctxcommand \stopitem
    \startitem there are more s-* modules, like s-fnt-41 \stopitem
    \startitem check (un)marked tables \stopitem
\stopitemize

\stoptitle

\starttitle[title=To keep an eye on]

\startitemize[packed]
    \startitem Currently lpeg replacements interpret the percent sign so we need to escape it. \stopitem
    \startitem Currently numbers and strings are cast in comparisons bu tthat might change in the future. \stopitem
\stopitemize

\stoptitle

\definehighlight[notabenered]    [color=darkred,    style=bold]
\definehighlight[notabeneblue]   [color=darkblue,   style=bold]
\definehighlight[notabeneyellow] [color=darkyellow, style=bold]
\definehighlight[notabenemagenta][color=darkmagenta,style=bold]

\startluacode

    local coremodules = dofile("status-mkiv.lua")

    local valid = table.tohash {
        "toks", "attr", "page", "buff", "font", "colo", "phys", "supp", "typo", "strc",
        "syst", "tabl", "spac", "scrn", "lang", "lxml", "mlib", "java", "pack", "math",
        "symb", "grph", "anch", "luat", "mult", "back", "node", "meta", "norm", "catc",
        "cldf", "file", "char", "core", "layo", "trac", "cont", "regi", "enco", "hand",
        "unic", "sort", "blob", "type", "scrp", "prop", "chem", "bibl", "task",
        "whatever", "mp", "s", "x", "m", "mtx",
    }

    local specialcategories = {
        mkvi = true,
   }

    local what = {
        "main", "core", "lua", "optional", "implementations", "extra", "extras", "metafun", "modules", "resources"
    }

    local totaltodo     = 0
    local totalpending  = 0
    local totalobsolete = 0
    local totalloaded   = 0

    local function summary(nofloaded,noftodo,nofpending,nofobsolete)

        local nofdone = nofloaded - noftodo - nofpending - nofobsolete

        context.starttabulate { "|B|r|" }
        context.HL()
        context.NC() context("done")     context.NC() context(nofdone)     context.NC() context.NR()
        context.NC() context("todo")     context.NC() context(noftodo)     context.NC() context.NR()
        context.NC() context("pending")  context.NC() context(nofpending)  context.NC() context.NR()
        context.NC() context("obsolete") context.NC() context(nofobsolete) context.NC() context.NR()
        context.HL()
        context.NC() context("loaded")   context.NC() context(nofloaded)   context.NC() context.NR()
        context.HL()
        context.stoptabulate()

    end

    if coremodules then

        local function tabelize(loaded,what)

            if loaded then

                local noftodo     = 0
                local nofpending  = 0
                local nofobsolete = 0
                local nofloaded   = #loaded
                local categories  = { }

                for k, v in next, valid do
                    categories[k] = { }
                end

                for i=1,nofloaded do
                    local l = loaded[i]
                    l.order = i
                    local category = string.match(l.filename,"([^%-]+)%-") or "whatever"
                    local c = categories[category]
                    if c then
                        c[#c+1] = l
                    end
                end

                for k, loaded in table.sortedhash(categories) do

                    local nofloaded = #loaded

                    if nofloaded > 0 then

                        table.sort(loaded,function(a,b) return a.filename < b.filename end) -- in place

                        context.starttitle { title = string.format("%s: %s",what,k) }

                        context.starttabulate { "|Tr|Tlw(3em)|Tlw(12em)|Tlw(12em)|Tlw(4em)|Tl|Tl|Tl|Tp|" }
                        context.NC() context.bold("order")
                        context.NC() context.bold("kind")
                        context.NC() context.bold("file")
                        context.NC() context.bold("loading")
                        context.NC() context.bold("status")
                        context.NC() context.bold("reference")
                        context.NC() context.bold("manual")
                        context.NC() context.bold("wiki")
                        context.NC() context.bold("comment")
                        context.NC() context.NR()
                        context.HL()
                        for i=1,nofloaded do
                            local module = loaded[i]
                            local status = module.status
                            local category = module.category
                            local filename = module.filename
                            context.NC()
                            context(module.order)
                            context.NC()
                            if specialcategories[category] then
                                context.notabeneblue(category)
                            else
                                context(category)
                            end
                            context.NC()
                            if #filename>20 then
                                context(string.sub(filename,1,18) .. "..")
                            else
                                context(filename)
                            end
                            context.NC()
                            context(module.loading)
                            context.NC()
                            if status == "todo" then
                                context.notabenered(status)
                                noftodo = noftodo + 1
                            elseif status == "pending" then
                                context.notabeneyellow(status)
                                nofpending = nofpending + 1
                            elseif status == "obsolete" then
                                context.notabenemagenta(status)
                                nofobsolete = nofobsolete + 1
                            else
                                context(status)
                            end
                            context.NC() context(module.reference)
                            context.NC() context(module.manual)
                            context.NC() context(module.wiki)
                            context.NC() context(module.comment)
                            context.NC() context.NR()
                        end
                        context.stoptabulate()

                        context.stoptitle()

                    end

                end

                context.starttitle { title = string.format("summary of %s modules",what) }

                    summary(nofloaded,noftodo,nofpending,nofobsolete)

                context.stoptitle()

                totaltodo     = totaltodo     + noftodo
                totalpending  = totalpending  + nofpending
                totalobsolete = totalobsolete + nofobsolete
                totalloaded   = totalloaded   + nofloaded

            end

        end

        for i=1,#what do
            tabelize(coremodules[what[i]],what[i])
        end

    end

 -- context.starttitle { title = "Valid prefixes" }
 --
 -- for namespace, data in table.sortedhash(namespaces) do
 --     if valid[namespace] then
 --         context.type(namespace)
 --     end
 --     context.par()
 -- end
 --
 -- context.stoptitle()

    context.starttitle { title = string.format("summary of all",what) }

        summary(totalloaded,totaltodo,totalpending,totalobsolete)

    context.stoptitle()

    if io.exists("status-namespaces.lua") then

        context.starttitle { title = "messy namespaces" }

        local namespaces = dofile("status-namespaces.lua")

        for namespace, data in table.sortedhash(namespaces) do
            if valid[namespace] then
            else
                context(namespace)
            end
            context.par()
        end

        context.stoptitle()

    end

    if io.exists("status-registers.lua") then

        context.starttitle { title = "messy registers" }

        local registers  = dofile("status-registers.lua")

        for register, data in table.sortedhash(registers) do
            context(register)
            context.par()
            for name in table.sortedhash(data) do
                context.quad()
                context.type(name)
                context.par()
            end
            context.par()
        end

        context.stoptitle()

    end

    context.starttitle { title = "callbacks" }

    commands.showcallbacks()

    context.stoptitle()

\stopluacode


\stoptext