Re: Curses alternative for Lisp?



On Sun, 30 Dec 2007 15:42:30 +0100, Andreas Davour
<anteRUN@xxxxxxxxxxxxxxxxxxxx> tried to confuse everyone with this message:

grue@xxxxxxx (Timofei Shatrov) writes:

On Sun, 30 Dec 2007 06:06:09 +0100, Andreas Davour
<anteRUN@xxxxxxxxxxxxxxxxxxxx> tried to confuse everyone with this message:


So, what do people use to build text based menu systems, and to do other
terminal based maneuvers in lisp? In C I would reach for curses, but
what now? Any hints?

Use CFFI to call Ncurses _or_ PDcurses (to cover non-Linux systems). A
reasonably useful implementation can be found here:

http://common-lisp.net/project/lifp/sewers-src.zip

(check out curses.lisp; it also contains some bloat such as REPL
implementation; oh, there is also a whole game that uses the library)

Ouch! I sense a lack, or maybe I'm into unidiomatic territory.


I don't see how Lisp is different from C in this case. In either case you have
to call some external library. The fact that curses implementations are written
in C doesn't matter. This is extremely low-level OS-specific stuff, and perhaps
C is the best language to implement that stuff in. Once you have FFI bindings,
curses is just as easy and natural to use in Lisp as in C.

--
|Don't believe this - you're not worthless ,gr---------.ru
|It's us against millions and we can't take them all... | ue il |
|But we can take them on! | @ma |
| (A Wilhelm Scream - The Rip) |______________|
.



Relevant Pages

  • Re: Lisp without curses anyone?
    ... You need to be able to separate the curses i/o from the REPL i/o. ... process, but it's hard to see how to do that with lisp, which is why ...
    (rec.games.roguelike.development)
  • Re: Questions about passing cons as parameter and the behavior of pop
    ... As for the defvar/setq/setf example, I saw the same, as well as Lisp being a big ball of mud, which is not to be confused with blurred levels. ... possibly having a default-initarg of ":x 42", because they misconstrued some AMOP about defclass's implementation as applying to defclass. ... AllegroCL has a broken defclass. ... Lisp allows one to operate different levels, it does not confuse them. ...
    (comp.lang.lisp)
  • Re: Lisp for enterprise computing?
    ... That Lisp is ... In Web tier and in Biz Logic ... How much of a pure functional style of programming ... Asking to do an experiment may simply confuse and raise abstract objections - showing a result misses all that bit out... ...
    (comp.lang.lisp)
  • Re: Curses alternative for Lisp?
    ... or maybe I'm into unidiomatic territory. ... I don't see how Lisp is different from C in this case. ... curses is just as ... If you have to use FFI it usually means two things. ...
    (comp.lang.lisp)
  • Re: newbie attempts to write adventure game, learn lisp
    ... confuse everyone with this message: ... You should probably use defparameter, ... let is for temporary bindings - as soon as you leave its ... I think it's a reasonable way to learn Lisp, ...
    (comp.lang.lisp)