[Snek] mu, network REPL, echoing
Keith Packard
keithp at keithp.com
Sun Oct 11 12:59:25 PDT 2020
"Misha Gusarov" <dottedmag at dottedmag.net> writes:
> Hi Keith,
>
> On 11 Oct 2020, at 3:40, Keith Packard wrote:
>
>> It could? But the USB serial Snek instances all handle echo and erase
>> stuff inside the device, so presumably the EV3 port should as well?
>>
>> You'll find the echo and erase code in 'snek-io.c', which gets hooked
>> up
>> in stdio for the avrlibc and picolibc ports, and as SNEK_GETC for the
>> esp32 port. Lots of options for how to connect things up here :-)
>
> Oh, now it all makes sense.
>
> So it follows ev3 port ought to have three modes:
>
> - Non-interactive, reading script from stdin or a file
I think this is just reading from a file?
> - Interactive, terminal. Leaves echoing and line editing to the
> terminal, handles prompt.
> - Interactive, remote. Hadles echoing, line editing, prompt.
I think I understand the distinction -- 'terminal' mode is when you're
reading from a tty device, 'remote' mode is when the input is from a
network connection.
> Sounds about right?
Yup. Sounds like you're on the right track; I'll trust you to make it
work in the best possible way :-)
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://keithp.com/pipermail/snek/attachments/20201011/b96fdd3d/attachment.sig>
More information about the Snek
mailing list