chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1180: parley seems to insert the same sexpressio


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1180: parley seems to insert the same sexpression to the reader again when getting input while sleeping
Date: Wed, 13 Sep 2017 18:54:05 -0000

#1180: parley seems to insert the same sexpression to the reader again when
getting input while sleeping
-------------------------------------+-------------------------------------
            Reporter:  ckeen         |      Owner:  ckeen
                Type:  defect        |     Status:  new
            Priority:  major         |  Milestone:  someday
           Component:  extensions    |    Version:  4.9.x
          Resolution:                |   Keywords:  parley input type ahead
Estimated difficulty:                |  bug
-------------------------------------+-------------------------------------

Comment (by LemonBoy):

 There are a few problems here:
 * In `parley` we get a non-false `prev-input` with the contents of the
 typeahead buffer in it so we have to process every element one by one
 before reading from the "real" prompt. Now, the `(eof-object? (peek-char
 in)` condition doesn't make any sense because you want to process `in`
 until an `#!eof` occurs and then switch to `real-in-port` as soon as the
 typeahead buffer has been completely processed. The `#<unspecified>` value
 you see in the trace comes from the other arm of the `if`.
 * The use of `object-copy` is dangerous, especially when the `state`
 record contains references to `port` objects. With the adjustments
 outlined above I found that parley would crash the csi instance due to
 heap exhaustion while it was trying to copy such an object.
 * `(parley "")` gives an error, this is not really a problem but it could
 give a better error.

--
Ticket URL: <https://bugs.call-cc.org/ticket/1180#comment:1>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]