[Openmcl-devel] how read a character without requiring a subsequent carriage return?
R. Matthew Emerson
rme at acm.org
Tue Aug 29 12:06:05 PDT 2023
> On Aug 29, 2023, at 11:25 AM, Mark Klein <m_klein at mit.edu> wrote:
>
> I'm using the listener window for CL64 Version 1.12 on a Mac (OS 11.4).
Because the listener window on the Cocoa IDE is based around an editor (and not a tty), it’s not possible to use raw i/o to read a single character.
I’m sure it’s no comfort, but others have also wanted read-char to work without needing to press return in the IDE. Unfortunately, there’s no reasonable way to make that work with a listener window as currently implemented.
>
> Maybe the Mac version of CL incorporates a buffer that the Debian Linux version does not?
>
> Mark
>
>> On Aug 29, 2023, at 2:18 PM, Devon Sean McCullough <devon at csail.mit.edu> wrote:
>>
>> Is something in line-buffered mode between you and LISP?
>>
>> Peace
>> --Devon
>>
>> P.S. In Debian Terminal I get character-at-a-time input, so
>> trivial-raw-io definitely works when *STANDARD-INPUT* is a TTY:
>>
>> Clozure Common Lisp Version 1.12.1 (v1.12.1-19-gff512282) LinuxX8664
>>
>> For more information about CCL, please see http://ccl.clozure.com.
>>
>> CCL is free software. It is distributed under the terms of the Apache
>> Licence, Version 2.0.
>> ? (q trivial-raw-io)
>> To load "trivial-raw-io":
>> Load 1 ASDF system:
>> trivial-raw-io
>> ; Loading "trivial-raw-io"
>>
>> ("TRIVIAL-RAW-IO")
>> ? (trivial-raw-io:read-char)
>> x
>> #\x
>> ?
>>
>>
>> On 29/08/2023 11:49, Mark Klein wrote:
>>> Is there any way to get around the buffering issue?
>>> The following did NOT work for me:
>>> (ql:quickload :trivial-raw-io)
>>> (trivial-raw-io:read-char)
>>> Thanks!
>>> Mark
>>> ----------------------
>>> Mark Klein, PhD
>>> Principal Research Scientist
>>> Massachusetts Institute of Technology
>>> http://cci.mit.edu/klein/
>
> ----------------------
> Mark Klein, PhD
> Principal Research Scientist
> Massachusetts Institute of Technology
> http://cci.mit.edu/klein/
>
>
>
More information about the Openmcl-devel
mailing list