From 29dab702eaabb1c18eb5e93f4ac5cea2ec612e6a Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Sat, 13 Apr 2024 22:31:18 +0200 Subject: [PATCH] add sly io issue post --- content/blog/2024-04-13-sly-repl-io-issues.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 content/blog/2024-04-13-sly-repl-io-issues.md diff --git a/content/blog/2024-04-13-sly-repl-io-issues.md b/content/blog/2024-04-13-sly-repl-io-issues.md new file mode 100644 index 0000000..edfd218 --- /dev/null +++ b/content/blog/2024-04-13-sly-repl-io-issues.md @@ -0,0 +1,47 @@ ++++ +title = "Issue with SBCL console output in Sly" +date = 2024-04-13 +[taxonomies] +tags = ["programming"] +categories = ["lisp"] ++++ + +# Inconsistent output in REPL + +When doing the examples in the _Practical Common Lisp_ book I had confusing output in the repl when prompting the user for CDs using SBCL. + +``` +; Dedicated output stream setup (port 46185) +; Redirecting all output to this MREPL +; SLY 1.0.43 (#) +CL-USER> (prompt-for-cd) +Title: Unplugged +Eric Clapton +8 +y +``` + +Apparently a similar issue was first found on MacOSX and later confirmed on Arch. + +The suggestion was given to disable passing the output via a socket to have higher performance that via the protocol by adding + +``` +(setf slynk:*use-dedicated-output-stream* nil) +``` + +Since I rather have something working that it being high performant not-working I followed the suggestion which fixed the issue: + + +``` +CL-USER> (prompt-for-cd) +Title: Bar +Artist: Foo Fighters +Rating: 8 +Ripped: y + +y (y or n) y +(:TITLE "Bar " :ARTIST "Foo Fighters" :RATING 8 :RIPPED T) +CL-USER> +``` + +so I can continue with the chapter.