The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Created on: Thu 10 Dec 2009 10:32:58 PM
Last saved: Tue 09 Jul 2013 09:05:18 AM 


+-------------------------------------------------------------------+
|               TODO for Missing Perldl Functionality               |
+-------------------------------------------------------------------+

  Set readline_name to 'PDL Shell' instead of the
  default 'Perl REPL' but need to figure how to do
  so first (override default term?).

  Add syntax highlighting to help ensure correct
  entries (e.g., in matlab keywords are blue, strings
  are purple, unterminated strings are maroon...)
  We could also specifically color piddles and objects
  from the current session space.

  Add "blink to matching delimiter" for input or even
  color highlight matching delimiters

  Add Colors plugin support to the pdl2 p command.

  Add enhanced filter support to remove leading prompt
  strings (or other text) from input lines.  Need to be
  able to toggle on/off and set the regexp used.

  Allow Ctrl-C to interrupt a line but keep the entry
  in history for edit...

  Fix q alias for quit which broke as a side effect of
  a fix to the MultiLine::PPI handling.  Perhaps using
  around continue_reading_if_necessary would do the
  trick.  Need to sort out the Moose/Plugin/Roles issues
  and document.

  Implement ^C/^D to end PPI multiline if it makes sense.
  E.g., make sure that Ctrl-C can exit an incomplete
  block.  Right now ^C does not interrupt a multiline
  entry.  Need to see about implementing the Ctrl-D option
  to close all blocks as well.  It would be nice to have
  the prompt display the matching delims as in perldl.

  Fix Term::ReadLine::Perl completion in win32 to use
  the appropriate path separator character.  It appears
  to use / which is fine inside perl but not for system
  command escapes.  Need to detect the two cases.  Maybe
  we could autoquote the paths when using backslashes.

  Add auto-quoting/close quotes to Term::ReadLine::Perl
  expansion as does Term::ReadLine::Gnu.

  Fix Term::ReadLine::Perl completion to not append
  identifier characters on the inserted filenames:
  e.g. it is ok to list file.exe* in the possible
  completions part but the result should only insert
  file.exe (the actual file name).

  Fix Term::ReadLine::Perl TAB expansion for paths to work
  with win32 paths (i.e. backslashes).

  Add <TAB> expansion to the pdl2 help/? command.

  Track pdl2 session variables for PDL, including: vars
  (global and lexical), subs that were defined, modules
  loaded, and plugins for the REPL.  It should be possible
  to <TAB> complete for these.

  Add tracking and expansion for all graphics windows that
  are open/active (PGPLOT, PLplot, Prima, GLUT/FreeGLUT...)
  windows for reference.  It would be nice to have a
  list/table of currently active figures.

  IDEA: Associate metadata with image or figure windows
  (e.g., the commands that generated the figure).

  Add SIGINT handler for pdl2 for win32.  Also need to add
  feature to ignore EOF to the read routine (around read
  modifier should work here---need to decide where to put it)

  Investigate why Ctrl-L on win32 is issuing a 'clear' command.

    ANSWER: readline.pm from Term::ReadLine::Perl is doing a
    qx{clear) to determine the escape sequence to clear the
    screen.  This doesn't work on win32 since there is no clear
    command and the console does not support ANSI escape
    sequences.
    
    Plan to fix by calling the DOS cls command to clear the
    screen or by using Win32::Console and Win32::Console::ANSI
    to implement the missing ANSI support.  Need to implement
    a routine readline::F_ClearScreen() to override the default
    function for win32 systems.

  Add runtime PDL module load list so you know what has been
  loaded with use/require.  Maybe a pop-up info window would
  work here (curses based or GUI based).  Maybe there could
  be a runtime list/variable in PDL::Config that is updated
  as each module is loaded.  Override '*CORE::GLOBAL::use'?
  It would also be possible to use MOP features of Moose.
 
  Review and integrate $PERLDL::XX parameters.  Some are not
  needed or useful for Perldl2.  Others need code to tie in
  with the new framework.
 
  Implement perldl command line options:
   -M <module> load module <module>
   -m <module> unload module <module>
   -I <dir>    Add <dir> to include path.
   -V          print PDL version info (e.g. for a bug report)
   -f <file>   execute file <file> before starting perldl
   -glut       try to load OpenGL module (Enables readline event-loop processing).
   -tk         try to load Tk module (Enables readline event-loop processing).
   -w          run with warning messages turned-on 
   -           Following arguments are files for input.
 
  Add @PERLDL::AUTO processing to the PDLCommands plugin.
  Should be able to just run the code after the line is read
  but before it is eval'd.
 
  Add ability to run $PERLDL::PROMPT if it is a code reference
  and not a string.  Use the same logic as in perldl but set
  the prompt with the $_REPL->prompt(&$code) instead of using
  $_REPL->prompt($string).

  Implement support for @PERLDL::PREPROCESS filters.
 
  Update perldl documentation to match Perldl2 capabilities.
  Any way to transparently select the correct docs at runtime?
 
  Fix the newline differences between new line handling for
  TR::Perl (on win32 and cygwin and unix) and TR::Gnu (on
  cygwin and unix).  TR::Gnu seems to have an extra newline
  inserted per command.

  Is it possible to add support for Term::ReadLine::Zoid?
  It would be nice if the most possible could be done using
  the Term::ReadLine::Stub.
 
  Add MultiLine prompt with continuation character marking
  the open structures. (e.g. MultiLine::TextBalanced).

  Add generic event loop support to Term::ReadLine::Perl and
  Term::ReadLine::Gnu.  Need to figure out a clean way to
  map this into the original modules.
 
  Skip command lines that are too short and don't put
  quit/q/x/exit in the history log.  Maybe remove duplicate
  entries as well as list history commands.  Don't put
  history !-syntax into the history, put the actual command
  that resulted.  e.g., not !6 but 'p "Hello, world.\n";

  Be sure to add a line to history if it closes out a
  multi-line block.  This should not be an issue once we
  have multi-line history entries supported.  It would
  be nice if history entries were by blocks with the
  ability to go by lines within if desired.

  Make !-syntax history more restrictive so that it does
  not conflict with perl usage for negation.  Maybe it
  should only be good for completion?  At least if it is
  the first char and do_print(0).
 
  Add !<command>:p support to print history commands and
  fix the problem where the !<num> command is different
  then the one actually inserted by History...

  Add runtime control options for NiceSlice: i.e., report,
  trans, and notrans
 
  Add a CompletionDriver for Plugins for load_plugin() as
  well as the ability to toggle plugins on and off (or at
  least enable and disable them).  Would it simplify
  PDL::NiceSlice if the implementation were migrated to
  Filter::Simple?

  Make pdl2 fall back cleanly to a basic Devel::REPL or
  even perldl if requirements to run are not installed.
  (falls back to perldl right now)

  Fix glob pattern completion display for shell escapes in
  pdl2 (e.g., file*<TAB><TAB> will list out tab.a tab.b and
  tab.c if those are the valid expansions.  It should act
  just like bash directly from the command line---ideally).

  Add documentation for the startup files for unix-en and win32
  systems.  Right now, the only doc is in the code.
 
  Add startup checks for the various Devel::REPL plugins
  loaded to be sure that they can run before the load_plugin
  call to avoid nasty compile error traces.
  
  Fix 'demo 3d' so that it shifts focus to the display window
  at the start and returns focus to the CMD or shell window
  at then end.  This shouldn't be needed with GLUT event loop
  support in readline.
 
  Is there a way to fix the GNU readline where it doesn't
  process the Ctrl-C interrupt until after <Enter> has been
  typed?  There are some hooks in GNU readline for handling
  signals that may help here.

  Add option for quiet startup for use when piping to the
  shell or taking input from a file.

  Add INPUT and OUTPUT handle args for PDL shells.  How do
  we add this to the default term from Devel::REPL?
  NOTE: Also need to fix perldl v.1.x not to use STDIN/STDOUT.
 
  Verify that input from terminal and/or files works
  correctly and consistently with perldl.  NOTE: This should
  make it possible to implement some tests of the interactive
  shell from file input.

  It would be nice if variable completion followed by a
  method call would collapse the extra space.  E.g.,
  the first <TAB> in line#1 completes to the $_REPL varible
  followed by a space as seen in line#2.  Then typing the
  ->do_p<TAB> in line#3 triggers a method completion to 
  ->do_print followed by a space shown in line#4.
   
    #1 PDL> $_RE<TAB>
    #2 PDL> $_REPL _
    #3 PDL> $_REPL ->do_p<TAB>
    #4 PDL> $_REPL ->do_print _

  What we would like is the trailing space in line#2 to be
  collapsed once the -> is typed following the completion.
  Similarly, we would like the space at the end of line#4
  to be collapsed once a '(' is typed to start the arglist.

  Enhance completion strategy for Perldl2: (1) sort and
  prioritze completions to remove long lists of useless
  options [see completion paper], (2) allow chained PDL method
  completions by recognizing that the output of many (all?) PDL
  methods is a pdl so we could do method completion again...
 
  Make Perldl2 fail/degrade gracefully if various files and
  configuration stuff is not available.  Lines and lines of
  backtrace isn't a help to anyone!
 
  Improve the error returns from evaluations in pdl2 as they
  seem to cut off the root error line for failures which makes
  it very difficult to debug things, e.g. I was getting errors
  from Core.pm instead of in my routine that had the failure.
  When I looked at the entire call stack in the debugger, I
  got the actual line with the bad code---of course I had to
  give up the nice pdl2 environment.

  Filter out error tracebacks from pdl2/perldl.  It looks like
  these are internal to Devel::REPL and not the code being
  executed and could be filtered out:

   + eval {...}                # both pdl2 and perldl
   + main::__ANON__            # both pdl2 and perldl

   | main::process_input       # perldl
   | main::eval_and_report     # perldl

   - main::BEGIN               # pdl2
   - Lexical::Persistence::    # pdl2
   - Devel::REPL::             # pdl2
   - Class::MOP::              # pdl2

  

+-------------------------------------------------------------------+
| Features                       perldl                 pdl2        |
+-------------------------------------------------------------------+
  
  preproc_add/del                yes                    TBD
  
  ?,?? aliases                   yes                    yes
  
  quit,x,exit aliases            yes                    yes
  
  User AUTO commands             yes                    TBD 
  
  Autoquoting doc commands       yes                    yes

  Load user startup file         yes                    yes

  Load local.perldlrc            yes                    yes
  
  $_ preserved                   by line/block          by session

  User extendable                rewrite/hard           plugins/easy
  
  History save/recall            yes                    yes
  
  !-history expansion            yes/partial            yes
  
  Lexical variables              yes/1-command only     yes
  
  Multiline expression entry     yes/Text::Balanced     yes/PPI based
  
  NiceSlice syntax               yes                    yes
  
  package NAMESPACE support      no                     yes
  
  Readline editing               yes/partial            yes
  
  TAB completion: @INC           no                     yes                                      
  
  TAB completion: filename       yes                    yes
  
  TAB completion: globals        no                     yes
  
  TAB completion: keyword        no                     yes                                      
  
  TAB completion: lexicals       no                     yes                                     
  
  TAB completion: methods        no                     yes                                      
  
  print p alias                  yes                    yes
  
  list history                   yes                    yes

  help vars (package)            yes                    yes

  help vars (lexical)            no                     TBD