Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

unbuffered keyboard input in LISP?

Name: Anonymous 2006-11-23 23:00

Is there a standard way to support unbuffered keyboard input in Common LISP, supported by all Common LISP interpreters?

So far I found something in the 'clisp' interpreter which comes with some nice unbuffered keyboard input macros.  I wrote a readline function:

(defun readline ()
 (ext:with-keyboard
  (let ((rdlinstring ""))
    (loop
     (setq char (read-char ext:*keyboard-input*))
     (setq key (or (ext:char-key char) (character char)))
     (setq rdlinstring (concatenate 'string rdlinstring (string key)))
     (write-string (string key))
     (when (eql key #\Return)
       (return rdlinstring))))))


But this doesn't work in CMUCL or SBCL.  I think anything that exists in an ext: package in one interpreter isn't guaranteed to exist in an ext: package in another interpreter (since ext: isn't Common LISP standard, but implementation-specific extensions).

Ummm, so... is there a STANDARD way to get unbuffered keyboard input in Common LISP that's guaranteed to work properly across all implementations that are standards-compliant?

Name: Anonymous 2006-11-24 0:03

use stty

Name: Anonymous 2006-11-30 3:31

>>2

Uhm... what?

Search for lisp and stty brought up a bunch of Emacs results.  I'm not using Emacs-Lisp, I'm using Common LISP.  Two different dialects for two vey different purposes.

Name: Anonymous 2006-11-30 4:52

Name: Anonymous 2006-11-30 5:19

>>3
Exactly; Emacs-Lisp is a complete operating system with its own language for developing applications (like Inferno), while Common LISP is a LISP.

Name: Anonymous 2009-01-14 13:26

lol tripfags

Name: Anonymous 2010-11-25 14:19

Name: 2012-01-25 6:51

Name: Dubs Guy 2012-03-22 13:53

DUBS, DUBS EVERYWHERE!

Name: Anonymous 2012-03-22 14:57

>>1
Um. Look, they call that a programming language.

Name: Anonymous 2012-03-22 15:23

Learn C++11

Name: Sgt.Kabu㙭㛈kimanᅂⵢ 2012-05-28 20:55

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Name: Anonymous 2013-08-31 7:32


Apparently I went to Japan to take a class in "gun control." But the first few days of classes is all squirting each other with water pistols and even plastic syringes. During one of the classes I overhear classmates saying they want to go to the club after class. I deduce that the club is actually the arcade at the mall. The group needed one more person for some reason, and I was about to volunteer myself, but I notice one of my classmates on the other side of the room looks like a girl I knew in elementary school.

Name: Anonymous 2013-08-31 8:17



I never really understood how people can sleep with people they aren't intimate with, although I guess you were with your ex. Do you just call each other up every now and then for a roll in the hay, or do you have to go through the politeness of having coffee or some shit first?

Name: Anonymous 2013-08-31 9:03


I have a problem with the game. So i DL the game the same time it released on previous Comiket. Patch it to 1.01, play a bit and stop playing it for a long time... Until recently

Don't change these.
Name: Email:
Entire Thread Thread List