Search code examples
lispcommon-lispatom-editorread-eval-print-loopslime

Common Lisp *query-io* REPL read problem in Atom


I'm using Atom and Atom-Slime for Common Lisp. In the REPL I'm finding that I can't read user input. The line

(read-line *query-io*)

just hangs. The REPL doesn't register any key presses.

As I tried to debug, I'm finding that I can output to *query-io* just fine:

(format *query-io* "hello")

prints as one expects.

Also, the problem doesn't seem to be with (read-line), I can read from a file with no problems:

(let ((infile (open <some-file>)))
  (format t "~a%" (read-line infile))
  (close infile))

Does anyone know what's going on?


Solution

  • As said by Coredump, you should use the SLIMA extension instead. It is a fork of Atom-Slime, the maintainer of which unfortunately didn't share push rights for other maintainers to relay him.

    But how could you know?

    By having a look at the GitHub repository, you would have seen this mention:

    Note: It's been hard to find the time to actively maintain this project. For a more recently-maintained version, please see the SLIMA Project, which builds off the code here. Good luck!

    Unfortunately, the Atom package was not updated, so we don't see it on the Atom extensions page. But that's not my poit.

    Since a few years some online resources have been thoroughly improved [1] and can help, I hope, as a goto reference for future questions and recommendations:

    The historical resource is Cliki. It is a mess sometimes, but it can be useful. In the case of Atom-Slime, it is up-to-date and refers to SLIMA: https://www.cliki.net/atom-slime

    And while I'm at it, there is also lisp-lang.org: https://lisp-lang.org/wiki/article/editors This site was the most beautiful one before common-lisp.net saw a rewrite, and is now less useful. It still has a beautiful showcase of Lisp success stories. And for more Lisp companies using CL, see awesome-lisp-companies (but don't assume it's complete!).

    I hope that now, when you ask yourself "what can I use for … in Common Lisp", you'll find answers there, before using a search engine.

    Best,

    [1] disclaimer: often by myself