website/content/blog/2024-04-13-sly-repl-io-issues.md

48 lines
1.1 KiB
Markdown
Raw Normal View History

2024-04-13 22:31:18 +02:00
+++
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 (#<MREPL mrepl-1-1>)
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)
```
2024-06-06 17:15:08 +02:00
Since I rather have something working than it being highly performant and not-working I followed the suggestion which fixed the issue:
2024-04-13 22:31:18 +02:00
```
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.