Adjusts words et cetera.

This commit is contained in:
Circling Skies 2024-12-15 23:18:31 -03:00
parent 006fa693d3
commit 6d5aebc361
2 changed files with 17 additions and 14 deletions

View file

@ -195,14 +195,15 @@
(let ((expr (read)))
(if (eq 'quit expr)
(progn
;; At this point, there's a newline still in the stdin due
;; to read having returned an expression, so we must wipe
;; that out.
;; At this point, there's \r\n still in the stdin due
;; to read having returned a symbol followed by a line
;; termination, so we must wipe that out or nntp-read-line
;; will find an empty line after this.
(clear-input)
(return
(make-response
:code 200 :request r
:data "Okay, no more REPL hacking.")))
:data "Okay, that's enough hacking for today.")))
(println "~a" (eval expr))))
(end-of-file ()
(print/finish "^D~%")

22
loop.nw
View file

@ -313,14 +313,15 @@ quit
205 Good-bye.
\end{verbatim}
Despite \lp being made to talk to computer programs such as the ones
Despite \lp\ being made to talk to computer programs such as the ones
illustrated in Figures~\ref{fg:gnus}--\ref{fg:sylpheed}, it's
perfectly possible for a user to interact with \lp\ directly using a
keyboard and a command-line tool such as {\tt nc} or {\tt telnet}. In
fact, \lp\ takes advantage of that to be {\em hackable}. Commands
such as [[CREATE-ACCOUNT]], [[CREATE-GROUP]], [[PASSWD]] are not part
of the NNTP protocol, so users need to know how to use {\tt nc} or
{\tt telnet} to take advantage of all of \lp's capabilities.
fact, \lp\ takes advantage of that to be {\em hackable}---see also
Section~\ref{sec:repl}. Commands such as [[CREATE-ACCOUNT]],
[[CREATE-GROUP]], [[PASSWD]] are not part of the NNTP protocol, so
users need to know how to use {\tt nc} or {\tt telnet} to take
advantage of all of \lp's capabilities.
\section{NNTP protocol}
@ -365,7 +366,7 @@ way, they work together. And \lp\ handles only a text stream, which
is why it's so easy to connect a keyboard to it and interact with it
through the command line as illustrated in Section~\ref{sec:design}.
\section{REPL for \lp}
\section{REPL for \lp}\label{sec:repl}
There's a REPL to \lp's procedures---always useful.
@ -408,14 +409,15 @@ line, which is what causes that 400 response.
(let ((expr (read)))
(if (eq 'quit expr)
(progn
;; At this point, there's a newline still in the stdin due
;; to read having returned an expression, so we must wipe
;; that out.
;; At this point, there's \r\n still in the stdin due
;; to read having returned a symbol followed by a line
;; termination, so we must wipe that out or nntp-read-line
;; will find an empty line after this.
(clear-input)
(return
(make-response
:code 200 :request r
:data "Okay, no more REPL hacking.")))
:data "Okay, that's enough hacking for today.")))
(println "~a" (eval expr))))
(end-of-file ()
(print/finish "^D~%")