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

 
 

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

task #11488: Provide better support for interactive input.

Submitted by:  Kaz Kylheku <kkylheku>
Submitted on:  Tue 25 Oct 2011 02:31:45 PM UTC  
 
Should Start On: Tue 25 Oct 2011 07:00:00 AM UTCShould be Finished on: Tue 25 Oct 2011 07:00:00 AM UTC
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Percent Complete: 0%Assigned to: None
Open/Closed: OpenEffort: 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>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup