For a Lisp REPL, this is home turf. Lisp doesn't care if you're crunching matrices, parsing XML, or listening on port 23. The code looks the same. Let's build a toy Telnet server in Common Lisp. We'll call it tlen.lisp (see what I did there?).
And Lisp? Lisp is the perfect knife for cutting through that stream. Modern APIs are obsessed with structure. GraphQL schemas, Protobuf definitions, OpenAPI specs. It's powerful, but it's heavy. lisp tlen
But as a learning tool ? Absolutely. Telnet is the "Hello World" of network protocols. And writing it in Lisp is like learning to cook by making bread from scratch—you understand every ingredient. For a Lisp REPL, this is home turf
If you came of age in the modern cloud era (Post-2010), Telnet is that "insecure thing" you disable on routers. But for those of us who cut our teeth on BBSes, mainframes, or early Unix hacking, —a raw, text-based window into another machine. Let's build a toy Telnet server in Common Lisp
I recently spent a weekend revisiting Telnet, not as a sysadmin, but as a Lisp programmer. Why? Because stripping away TLS, JSON, and REST frameworks reveals something beautiful:
;;; tlen.lisp - A minimalist Telnet echo server (require :usocket) ; A portable socket library (defun handle-client (stream) "Echo back whatever the client sends, but shout it in uppercase." (loop :for line = (read-line stream nil) :while line :do (write-line (string-upcase line) stream) (force-output stream)))
Next time you need to debug an SMTP server or test a custom TCP service, skip nc (netcat) for an hour. Fire up a Lisp REPL, open a socket, and talk to the machine directly. You'll never look at curl the same way again. If you landed here searching for "Lisp CLOS" (Common Lisp Object System) or "Lisp TCO" (Tail Call Optimization), drop a comment below. I've got drafts on both. But if you really meant tlen as some obscure library... well, now you know how to roll your own. Happy hacking, parentheses and all.