port-position and get-position
Shiro Kawai
(19 Mar 2020 10:16 UTC)
|
Re: port-position and get-position
Marc Nieper-Wißkirchen
(19 Mar 2020 10:25 UTC)
|
Re: port-position and get-position
Shiro Kawai
(19 Mar 2020 21:07 UTC)
|
Re: port-position and get-position
John Cowan
(20 Mar 2020 02:48 UTC)
|
Re: port-position and get-position
Shiro Kawai
(20 Mar 2020 04:52 UTC)
|
Re: port-position and get-position
John Cowan
(20 Mar 2020 18:21 UTC)
|
Re: port-position and get-position
Marc Nieper-Wißkirchen
(20 Mar 2020 18:38 UTC)
|
Re: port-position and get-position
Lassi Kortela
(20 Mar 2020 18:43 UTC)
|
Re: port-position and get-position
Shiro Kawai
(20 Mar 2020 18:46 UTC)
|
Re: port-position and get-position Lassi Kortela (20 Mar 2020 19:17 UTC)
|
Re: port-position and get-position
Shiro Kawai
(20 Mar 2020 19:33 UTC)
|
Re: port-position and get-position
Shiro Kawai
(20 Mar 2020 19:46 UTC)
|
Re: port-position and get-position
Marc Nieper-Wißkirchen
(20 Mar 2020 07:29 UTC)
|
Re: port-position and get-position
Shiro Kawai
(20 Mar 2020 09:00 UTC)
|
Re: port-position and get-position
Lassi Kortela
(20 Mar 2020 19:12 UTC)
|
Re: port-position and get-position
John Cowan
(20 Mar 2020 19:51 UTC)
|
Re: port-position and get-position
Marc Nieper-Wißkirchen
(20 Mar 2020 20:02 UTC)
|
> Right, I suspect get-position and port-position relation hasn't been > thought out wrt. buffering. Yet, > the read! callback of make-custom-textual-input-port allows multiple > characters to be read, implying it allows > character buffering. Good point about the buffering. Shouldn't set-position implicitly flush the buffer, and get-position count only the characters/bytes that the user of the port has already received from the custom read procedure? The flushing would get tricky for ports that don't have an obvious random-access backing store like a vector or a regular file. In principle, we could say the port has to cache any buffered data the user hasn't yet read, in case the user wants to seek back to the same position later. But ports without random-access backing stores generally do not support seeking anyway, so maybe it's the user's own problem if they want that :)