Debian Codegraph @

TODO

raw
1 Created on: Thu 10 Dec 2009 10:32:58 PM
2 Last saved: Tue 09 Jul 2013 09:05:18 AM
3
4
5 +-------------------------------------------------------------------+
6 | TODO for Missing Perldl Functionality |
7 +-------------------------------------------------------------------+
8
9 Set readline_name to 'PDL Shell' instead of the
10 default 'Perl REPL' but need to figure how to do
11 so first (override default term?).
12
13 Add syntax highlighting to help ensure correct
14 entries (e.g., in matlab keywords are blue, strings
15 are purple, unterminated strings are maroon...)
16 We could also specifically color ndarrays and objects
17 from the current session space.
18
19 Add "blink to matching delimiter" for input or even
20 color highlight matching delimiters
21
22 Add Colors plugin support to the pdl2 p command.
23
24 Add enhanced filter support to remove leading prompt
25 strings (or other text) from input lines. Need to be
26 able to toggle on/off and set the regexp used.
27
28 Allow Ctrl-C to interrupt a line but keep the entry
29 in history for edit...
30
31 Fix q alias for quit which broke as a side effect of
32 a fix to the MultiLine::PPI handling. Perhaps using
33 around continue_reading_if_necessary would do the
34 trick. Need to sort out the Moose/Plugin/Roles issues
35 and document.
36
37 Implement ^C/^D to end PPI multiline if it makes sense.
38 E.g., make sure that Ctrl-C can exit an incomplete
39 block. Right now ^C does not interrupt a multiline
40 entry. Need to see about implementing the Ctrl-D option
41 to close all blocks as well. It would be nice to have
42 the prompt display the matching delims as in perldl.
43
44 Fix Term::ReadLine::Perl completion in win32 to use
45 the appropriate path separator character. It appears
46 to use / which is fine inside perl but not for system
47 command escapes. Need to detect the two cases. Maybe
48 we could autoquote the paths when using backslashes.
49
50 Add auto-quoting/close quotes to Term::ReadLine::Perl
51 expansion as does Term::ReadLine::Gnu.
52
53 Fix Term::ReadLine::Perl completion to not append
54 identifier characters on the inserted filenames:
55 e.g. it is ok to list file.exe* in the possible
56 completions part but the result should only insert
57 file.exe (the actual file name).
58
59 Fix Term::ReadLine::Perl TAB expansion for paths to work
60 with win32 paths (i.e. backslashes).
61
62 Add <TAB> expansion to the pdl2 help/? command.
63
64 Track pdl2 session variables for PDL, including: vars
65 (global and lexical), subs that were defined, modules
66 loaded, and plugins for the REPL. It should be possible
67 to <TAB> complete for these.
68
69 Add tracking and expansion for all graphics windows that
70 are open/active (PGPLOT, PLplot, Prima, GLUT/FreeGLUT...)
71 windows for reference. It would be nice to have a
72 list/table of currently active figures.
73
74 IDEA: Associate metadata with image or figure windows
75 (e.g., the commands that generated the figure).
76
77 Add SIGINT handler for pdl2 for win32. Also need to add
78 feature to ignore EOF to the read routine (around read
79 modifier should work here---need to decide where to put it)
80
81 Investigate why Ctrl-L on win32 is issuing a 'clear' command.
82
83 ANSWER: readline.pm from Term::ReadLine::Perl is doing a
84 qx{clear) to determine the escape sequence to clear the
85 screen. This doesn't work on win32 since there is no clear
86 command and the console does not support ANSI escape
87 sequences.
88
89 Plan to fix by calling the DOS cls command to clear the
90 screen or by using Win32::Console and Win32::Console::ANSI
91 to implement the missing ANSI support. Need to implement
92 a routine readline::F_ClearScreen() to override the default
93 function for win32 systems.
94
95 Add runtime PDL module load list so you know what has been
96 loaded with use/require. Maybe a pop-up info window would
97 work here (curses based or GUI based). Override '*CORE::GLOBAL::use'?
98 It would also be possible to use MOP features of Moose.
99
100 Review and integrate $PERLDL::XX parameters. Some are not
101 needed or useful for Perldl2. Others need code to tie in
102 with the new framework.
103
104 Implement perldl command line options:
105 -M <module> load module <module>
106 -m <module> unload module <module>
107 -I <dir> Add <dir> to include path.
108 -V print PDL version info (e.g. for a bug report)
109 -f <file> execute file <file> before starting perldl
110 -glut try to load OpenGL module (Enables readline event-loop processing).
111 -tk try to load Tk module (Enables readline event-loop processing).
112 -w run with warning messages turned-on
113 - Following arguments are files for input.
114
115 Add @PERLDL::AUTO processing to the PDLCommands plugin.
116 Should be able to just run the code after the line is read
117 but before it is eval'd.
118
119 Add ability to run $PERLDL::PROMPT if it is a code reference
120 and not a string. Use the same logic as in perldl but set
121 the prompt with the $_REPL->prompt(&$code) instead of using
122 $_REPL->prompt($string).
123
124 Implement support for @PERLDL::PREPROCESS filters.
125
126 Update perldl documentation to match Perldl2 capabilities.
127 Any way to transparently select the correct docs at runtime?
128
129 Fix the newline differences between new line handling for
130 TR::Perl (on win32 and cygwin and unix) and TR::Gnu (on
131 cygwin and unix). TR::Gnu seems to have an extra newline
132 inserted per command.
133
134 Is it possible to add support for Term::ReadLine::Zoid?
135 It would be nice if the most possible could be done using
136 the Term::ReadLine::Stub.
137
138 Add MultiLine prompt with continuation character marking
139 the open structures. (e.g. MultiLine::TextBalanced).
140
141 Add generic event loop support to Term::ReadLine::Perl and
142 Term::ReadLine::Gnu. Need to figure out a clean way to
143 map this into the original modules.
144
145 Skip command lines that are too short and don't put
146 quit/q/x/exit in the history log. Maybe remove duplicate
147 entries as well as list history commands. Don't put
148 history !-syntax into the history, put the actual command
149 that resulted. e.g., not !6 but 'p "Hello, world.\n";
150
151 Be sure to add a line to history if it closes out a
152 multi-line block. This should not be an issue once we
153 have multi-line history entries supported. It would
154 be nice if history entries were by blocks with the
155 ability to go by lines within if desired.
156
157 Make !-syntax history more restrictive so that it does
158 not conflict with perl usage for negation. Maybe it
159 should only be good for completion? At least if it is
160 the first char and do_print(0).
161
162 Add !<command>:p support to print history commands and
163 fix the problem where the !<num> command is different
164 then the one actually inserted by History...
165
166 Add runtime control options for NiceSlice: i.e., report,
167 trans, and notrans
168
169 Add a CompletionDriver for Plugins for load_plugin() as
170 well as the ability to toggle plugins on and off (or at
171 least enable and disable them). Would it simplify
172 PDL::NiceSlice if the implementation were migrated to
173 Filter::Simple?
174
175 Make pdl2 fall back cleanly to a basic Devel::REPL or
176 even perldl if requirements to run are not installed.
177 (falls back to perldl right now)
178
179 Fix glob pattern completion display for shell escapes in
180 pdl2 (e.g., file*<TAB><TAB> will list out tab.a tab.b and
181 tab.c if those are the valid expansions. It should act
182 just like bash directly from the command line---ideally).
183
184 Add documentation for the startup files for unix-en and win32
185 systems. Right now, the only doc is in the code.
186
187 Add startup checks for the various Devel::REPL plugins
188 loaded to be sure that they can run before the load_plugin
189 call to avoid nasty compile error traces.
190
191 Fix 'demo 3d' so that it shifts focus to the display window
192 at the start and returns focus to the CMD or shell window
193 at then end. This shouldn't be needed with GLUT event loop
194 support in readline.
195
196 Is there a way to fix the GNU readline where it doesn't
197 process the Ctrl-C interrupt until after <Enter> has been
198 typed? There are some hooks in GNU readline for handling
199 signals that may help here.
200
201 Add option for quiet startup for use when piping to the
202 shell or taking input from a file.
203
204 Add INPUT and OUTPUT handle args for PDL shells. How do
205 we add this to the default term from Devel::REPL?
206 NOTE: Also need to fix perldl v.1.x not to use STDIN/STDOUT.
207
208 Verify that input from terminal and/or files works
209 correctly and consistently with perldl. NOTE: This should
210 make it possible to implement some tests of the interactive
211 shell from file input.
212
213 It would be nice if variable completion followed by a
214 method call would collapse the extra space. E.g.,
215 the first <TAB> in line#1 completes to the $_REPL varible
216 followed by a space as seen in line#2. Then typing the
217 ->do_p<TAB> in line#3 triggers a method completion to
218 ->do_print followed by a space shown in line#4.
219
220 #1 PDL> $_RE<TAB>
221 #2 PDL> $_REPL _
222 #3 PDL> $_REPL ->do_p<TAB>
223 #4 PDL> $_REPL ->do_print _
224
225 What we would like is the trailing space in line#2 to be
226 collapsed once the -> is typed following the completion.
227 Similarly, we would like the space at the end of line#4
228 to be collapsed once a '(' is typed to start the arglist.
229
230 Enhance completion strategy for Perldl2: (1) sort and
231 prioritze completions to remove long lists of useless
232 options [see completion paper], (2) allow chained PDL method
233 completions by recognizing that the output of many (all?) PDL
234 methods is a pdl so we could do method completion again...
235
236 Make Perldl2 fail/degrade gracefully if various files and
237 configuration stuff is not available. Lines and lines of
238 backtrace isn't a help to anyone!
239
240 Improve the error returns from evaluations in pdl2 as they
241 seem to cut off the root error line for failures which makes
242 it very difficult to debug things, e.g. I was getting errors
243 from Core.pm instead of in my routine that had the failure.
244 When I looked at the entire call stack in the debugger, I
245 got the actual line with the bad code---of course I had to
246 give up the nice pdl2 environment.
247
248 Filter out error tracebacks from pdl2/perldl. It looks like
249 these are internal to Devel::REPL and not the code being
250 executed and could be filtered out:
251
252 + eval {...} # both pdl2 and perldl
253 + main::__ANON__ # both pdl2 and perldl
254
255 | main::process_input # perldl
256 | main::eval_and_report # perldl
257
258 - main::BEGIN # pdl2
259 - Lexical::Persistence:: # pdl2
260 - Devel::REPL:: # pdl2
261 - Class::MOP:: # pdl2
262
263
264
265 +-------------------------------------------------------------------+
266 | Features perldl pdl2 |
267 +-------------------------------------------------------------------+
268
269 preproc_add/del yes TBD
270
271 ?,?? aliases yes yes
272
273 quit,x,exit aliases yes yes
274
275 User AUTO commands yes TBD
276
277 Autoquoting doc commands yes yes
278
279 Load user startup file yes yes
280
281 Load local.perldlrc yes yes
282
283 $_ preserved by line/block by session
284
285 User extendable rewrite/hard plugins/easy
286
287 History save/recall yes yes
288
289 !-history expansion yes/partial yes
290
291 Lexical variables yes/1-command only yes
292
293 Multiline expression entry yes/Text::Balanced yes/PPI based
294
295 NiceSlice syntax yes yes
296
297 package NAMESPACE support no yes
298
299 Readline editing yes/partial yes
300
301 TAB completion: @INC no yes
302
303 TAB completion: filename yes yes
304
305 TAB completion: globals no yes
306
307 TAB completion: keyword no yes
308
309 TAB completion: lexicals no yes
310
311 TAB completion: methods no yes
312
313 print p alias yes yes
314
315 list history yes yes
316
317 help vars (package) yes yes
318
319 help vars (lexical) no TBD