taskText Extractor TXR - Tasks: task #11488, Provide better support for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #11488: Provide better support for interactive input.

Submitter:  Kaz Kylheku <kkylheku>
Submitted:  Tue 25 Oct 2011 02:31:45 PM UTC
   
 
Should Start On:  Tue 25 Oct 2011 07:00:00 AM UTC Should be Finished on:  Tue 25 Oct 2011 07:00:00 AM UTC
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Percent Complete:  0%
Open/Closed:  Open Effort:  0.00

Tue 25 Oct 2011 02:31:45 PM UTC, original submission:  

The way TXR's lazy lists are implemented and used, the program ends up reading ahead by one line, which is not nice for processing a stream interactively, such as implementing a command interpreter.

This is because after processing a line of input, there is a cdr(data) operation performed to march down the list to consume it. But cdr has to read from the file in order to determine whether to return nil. This is necessary to maintain a strict mapping in the sense that an N line file corresponds to a list with N conses, and an empty file to an empty list (nil).

There could be an interactive mode which relaxes this requirement. A different kind of lazy list could be used whose cdr operation only a promise to read from the file, such that only the car operation actually reads the line.

A special keyword like @(next :interactive) could set up this mode.


Kaz Kylheku <kkylheku>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kkylheku (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code