-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathTodo
399 lines (281 loc) · 9.83 KB
/
Todo
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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
Check the flow between
v override
header filter
element filters
looks like override in a filter is not forwarded to next iteration
happened in the html example
object size
dhtml
user css override
visual cue for folds
render role inheritance
eg: role X does Y
Serialization and attributes links
https://github.com/FROGGS/p6-Ser/blob/master/lib/Ser.pm
https://github.com/Skarsnik/nativecall-typediag/blob/master/lib/NativeCall/TypeDiag.pm6#L96
#wrap background color sub in utility
#remove magic 2 in split text
!hexdump object
P6 module: HexDump::Tiny
how do we handle lack of space, eg: wraping so the display still makes sense
hex dump can only display data not objects, a data to hex type could handle the rendering
to wrap data in a hex dumper:
class HexWrapper
has $.title
has $.width
has $.data
ddt_get_header
ddt_get_element # if we want to have the hex dump lines in separate elements
filter
key, binder, HexWrapper.new(data. :title<xxx>)
!randomize color
!either background color or kb colors
when scrolling large amount of repeated data it becomes difficult
to see where data block start and end
write a filter!
every x lines add a colored banner in the rendering
!:color_types
!change the color, specially background, for specific types
write a filter!
or a filter generator
or a role with custom setup
#Add screenshots to README.md
# filters
#extra roles
#Match
#data source
#separator
'' by default
inserted between k,b, v, ...
#no_multiline
necessary to be a shell source
=> can be emulated with width(INF)
#output path before key
makes it possible to use dump as data source
=> filter
#no tree (as :no_tree)
=> $d does DDTR::FixedGlyphs('') ;
#create custom setup role
#Custom Setup role
sort non terminal first
align elements
remove non final binder
# set variable name when no title and one element to dump
!containers elements number do not match when filters remove element
=> container header is called before get_elements and elements filters
the generic solution is prohibitively expensive (in memory) and not really logical
for application where containers that really must display the right amount of elements
after filtering the elements, it is better to have a specific container that know what
will be removes and display its header properly
!get_header and get_elements could know about remaining width, options, ....
#light weight remote foldable object
avoid EVAL on the receiving side
#folding
#pass an object and apply folding role on top
!large renderings are slow to scroll
probably NCurses related as get_lines is 0.004s and 0.0006s when cached
#replace NCurses by Terminal::Print
#utf8
#mo specific color handling
#ddt_send
handle multiple packaets sending
#utf8 address is always 0!
utf8 does not have a WHICH
it does have a WHERE but it is not stable beffore it gets accessed multiple times
#search unfold command
searching for data also means showing them
the fold information could be manipulated by the search
search($data, :unfold, :fold_other,:center)
it can also return a list of commands to display the next/previous result
#ddt adverbs
:curses
db_send for ddt
ddt :remote / :remote(8888)
ddt :remote_fold, send lines and fold data, no need for objects!
ddt :get instead for get_dump
#Role dumping
│ .DDTR::AsciiGlyphs .DDT exception : No such method 'parents' for invocant of type 'Perl6::Metamodel::ParametricRoleGr
│ oupHOW':U <Uninstantiable>
#NativeCall
#re-integrate Test::META
#add Horizontal in META6.json
#Sub, Block, Method, ..
better rendering
#role added to DDT handled classes
ie: MaxLine is a role added to an array but is not visible when the array is dumped
#flat
#when element if seen in sub element rendering for the first time, it gets
index 0 rather than the next index
#in column mode, if a sub element rendering passes the column max row
move next element to next column
eg: if a column contains 5 elements with each a sub element that takes
10 lines to render, then the column will be 50 in hight, instead, if a
element passes the column row limit, the next element is shifted to next column
in the eg above this could become 5 column of ten(ish) lines rather than one
column of 50+lines.
#simplified Block interface
#pass options to sub dumper
#flatten all
#ddt $s, :flat, ... # flatten level 0
#ddt $s, :flat(4,5) # flatten level 4 and 5, where 5 is in a sub dumper and it is its level 0
#ddt $s, :flat(Array, sub($s, $d){}, ...), # arguments to flat
#ddt $s, :flat($s{name}[12]), # flatten specfic element
#ddt $s, :flat<3>, :flat_title<some banner>
#multiple arguments
#handle options override
!option to have them bunched together rather than separate
#extra attributes
#display origin
#display readonly, default, required deprecate
#display sequences by default ?
#display full sequences or just part ?
#multi columns
#support width and wrapping of columns
#share seen references between columns and main dumper
return heigh and columns' widths
#what when width is much larger, seems that some text is lost
#Tuples
#dumping data vertically has the disadvantages of forcing one to scroll down
EG: a list of 10 elements each with three elements is 40 lines long
often we want to see the three elements by each other which means 20 lines
we can also inline the 3 elements with their container which makes the dump ten lines
#in extreme cases, rendering the data as a table is the best solution
#this can be done with filter but means a lot of boilerplate code
create a tuple/table plugin filter with simplified interface
also tag an array or list to get it's elements displayed horizontally
if the list elements are too wide, display them on multiple lines
#tuples could also be parts of the dump, with color
#override default colors without having to redefine all of them
Create a handler DDTR
# .Data::Dump::Tree+{DDTR::AnsiGlyphs} .Data::Dump::Tree @0
#
# remove &ansicolor, do not show the colors
# ├ $.colorizer = .AnsiColor @1
# │ │ removing %!color_lookup
# │ ├ $.is_ansi = True.Bool
# │ └ &.ansicolor = color.Sub
#
# ├ $.title = Nil.Str
# ├ $.caller = False.Bool
#
# ├ $.color = False.Bool
#
# │ removing %.colors
# show the colors in color
#
# ├ $.color_glyphs = Nil.Str
# ├ @.glyph_colors = [1] @4
# │ └ 0 = glyph_1.Str
# ├ @.glyph_colors_cycle = [0] @5
#
# ├ $.color_kbs = Nil.Str
# display over all the color information
#
# ├ @.kb_colors = [1] @6
# │ └ 0 = kb_1.Str
# ├ @.kb_colors_cycle = [0] @7
#
# ├ @.header_filters = [0] @8
# ├ @.elements_filters = [0] @9
# ├ @.footer_filters = [0] @10
# horizontal check list
#
#
# ├ $!address = Nil.Str
# ├ %!rendered = {0} @11
#
# ├ %!element_names = {0} @12
#
#
# ├ $.display_address = DDT_DISPLAY_CONTAINER.DDT_Address_Display
# ├ $.display_info = True.Bool
# ├ $.display_type = True.Bool
# ├ $.display_perl_address = False.Bool
# ├ $.keep_paths = False.Bool
# ├ %.paths = {0} @13
# remove
#
# ├ $.width = Nil.Str
# ├ $.max_depth = -1.Int
# ├ $.max_depth_message = True.Bool
# └ @!renderings = [0] @14
# remove
#ColorStr class
keeps color and string separated, or colored string and length of uncolored string
eqv not implemented for Match
#2 colums display of dumps
given two dumps, handle colors, etc ... and show both side by side
#why can't pass role (does =>) with argument
#Allow filter to add text to the rendering of an element
#display a[0..1| as a[0]
#Only container containers can have names
give names to all possible elements or example a filter that can add names/hilight
#user defined address name
is some nodes are of specific importance, give them name that can be used to
display the reference rather than a standard @1234, eg, @important_node
#color objects
#scoped filters
#paths
can be used in filters
#diff list
can use paths
#test::compare:DDT::diff
#roles to sub dump
#filters on generic containers
!scoped filter and roles
=> path and depth are enough for now
Requirements:
user interaction layer
!cache
to avoid re-generating the data
representation in
Prima, curses, gtk, dhtml, #terminal
dumper
#options
#max depth, ...
name
allow dumper to be switched on and off by name at higher level
eg: a piece of code contains a dumper but the user wants to control
in which scope the dump should be done
#handles multiple iterators
synchronized glyphs (diff)
#returns one or multiple "row representations"
multiple rows have synchronization points
#start and end tag per level
ease generation of HTML for example
#user defined filters
#dumps can be gathered from multiple source dynamically
when getting to a specific point, data is gathered from another source
no need to create a data structure in advance
=> any object can declare handler, including dynamic sources
!dump, gather, dump_gathered, reset interface.
!dumper can re-synchronize the glyphs
if a stream ends, the glyph for the previous element
may need to be changed
supports threads
!lazy row representation element generation
!can modify a previous glyph if the level after it is not the expected one
ie, an element becomes the latest in the level
#when dumping multiple structures simultaneously
diff color
diff column
diff glyphs
#row representation
can contain multiple fields for each data element dumped
level, #data, #type, #inheritance, size, taint, tie, weak references, ...
#user registrable representation generators
class defined generator
it can use this module and the glyphs get aligned properly
#colorizer
per level
per type
!lazy representation generation
},
#data iterator
from data structure
from feeder
ie data can come from a stream
#glyph generator
option for different glyph representations
generate a glyph based on a hierarchical level
method, input level, input glyphs, output a string