Tried to write a wrapper script for my Common Lisp Gemini client library that would read a stream from a Gemini URL, and write it to standard output, for the purposes of streaming Gemini podcasts (to mpv or vlc, reading standard input). Should have been so simple there was no possibility of messing it up, but it didn't work, and I didn't understand the error message *at all*.
Turns out, the client library was returning a closed stream to the script, and because the stream was defined in a C library with an FFI wrapper, the error message was very misleading. I had to *significantly* restructure my library to keep the stream from automatically getting cleaned up, and in the process found a few more embarrassing errors. But now it works!
Now you should be able to just say:
./stream.ros gemini://gem.chriswere.uk/trendytalk/tt-2021-05-30.ogg | mpv -
in order to listen to TrendyTalk, assuming you have Roswell and a Common Lisp implementation installed, and you've checked out my Gemini client library from my Gitea.