On Fri, Mar 20, 2020 at 2:38 PM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:

With that approach, [Chicken] cannot implement R7RS fully.

 In Chicken's R7RS egg, the implementation of (scheme read) does support a per-port flag stuffed into an unused slot in the port object.  So that makes me think your concerns are correct.

That said, this is a backward compatibility feature (as are the other Chicken parameters) and I hope we can do without it in the next standard.  As things stand, only MIT, Scheme48, SISC, SCM, STklos, TinyScheme, Scheme 9, Dream, XLisp, Elk, UMB, VX, Oaklisp, SXM, Inlab are still case-insensitive in symbol names, and it will probably be a long time (if ever) before any of those become R7RS-compliant.  Someone may eventually do the work for MIT Scheme, but it's going to be a big job.

On Fri, Mar 20, 2020 at 3:12 PM Lassi Kortela <xxxxxx@lassi.io> wrote:

OTOH it would be nice to fit all custom port stuff into one SRFI.

These reader flags are not specific to custom ports, but apply to any sort of port, which is why I am not including them here.

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? 

Again, these are higher-level considerations relevant to how ports are implemented in general.  I will try to fit them into the port-position SRFI, which when I get a minute I will create (again straight from R6RS) and post.

On Fri, Mar 20, 2020 at 3:34 PM Shiro Kawai <xxxxxx@gmail.com> wrote:

My understanding is that when set-port-position! is called,

(rest of explanation snipped)