Does SRFI 205 cover serial port? Lassi Kortela (18 Oct 2020 13:04 UTC)
Re: Does SRFI 205 cover serial port? hga@xxxxxx (18 Oct 2020 14:24 UTC)
Re: Does SRFI 205 cover serial port? Lassi Kortela (18 Oct 2020 15:04 UTC)
Re: Does SRFI 205 cover serial port? hga@xxxxxx (18 Oct 2020 15:49 UTC)

Re: Does SRFI 205 cover serial port? Lassi Kortela 18 Oct 2020 15:04 UTC

> Not exactly, if by terminals you mean a real physical or virtual terminal
> at the other end of the serial line

Yes.

> that falls under retrocomputing.
>
> Complete support of serial ports for embedded and the like programming is
> officially in its remit.

Classical embedded development can be quite similar to retrocomputing :)

> In part this comes from the best implementation
> strategy for doing that, create your own programmatic stty, which John
> didn't want to require in SRFI 170.
>
> But once you do that, the with-* and without-echo procedures become trivial
> or nearly so in terms of POSIX (to do timeouts and minimum number of
> characters to read, stty VTIME and VMIN, you have to get into an array
> in a C struct, that isn't as trivial to wrap as a struct's simple members).

OK, that makes sense. Go grain of the API. If you have to wrap C structs
and such, wrap them all in one place.

One thing currently missing from 205 is TIOCGWINSZ (window size):

struct winsize ws;
if (ioctl(fd, TIOCGWINSZ, &ws) == -1) error();
width  = ws.ws_col;
height = ws.ws_row;

> All part of the plan, but delayed for now due to Real Life issues, which
> are hopefully getting resolved soon.

Great.