How to write a message in another terminal (with Common Lisp) ?
(following the Reddit thread https://www.reddit.com/r/emacs/comments/hap72j/isnt_it_possible_to_ask_emacs_for_a_carriage/fv60gwq)
Install packages
apt install build-essential
apt install libfixposix3 libfixposix-dev
apt install netcat
Open 2 terminals
Terminal 1: Use Netcat to listen the port 6007
nc -l -p 6007
Terminal 2: Open stream in your favorite Common Lisp implementation
(tested with SBCL)
(ql:quickload :iolib/trivial-sockets)
(defparameter *console* (iolib/trivial-sockets:open-stream "127.0.0.1" 6007))
(print "Hello world!" *console*)
(finish-output *console*)
(let ((name "Boris"))
(format *console* "~%How are you, ~A ?" name))
(finish-output *console*)
Back to terminal 1: Read the nice mesage