Re: Curses alternative for Lisp?



grue@xxxxxxx (Timofei Shatrov) writes:

(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.

If you have to use FFI it usually means two things. First you've
encountered one of the things that Lisp lack, like a standard socket
library, or second that you are trying to do things the C way and not the
Lisp way. If during all these years nobody have made any terminal
handling library I'm beginning to think I'm onto case two.

As it is low-level stuff I guess FFI is the way to go, but I'm beginning
to wonder how lispers do their (G)UI programming anyway.

/Andreas

--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
.



Relevant Pages

  • Re: Welche Programmiersprache?
    ... macros and Lisp" von Christian Queinnec und Julian Padget ... was der Common-Lisp Standard alles nicht kann. ... Ich halte das nicht fuer irreperabel. ... aber ein FFI erlaubt auch die Anbindung an die Umgebung. ...
    (de.comp.lang.misc)
  • Re: Clipboard Access on Windows
    ... Here's a reference to getting start with the clipboard functions. ... Can you elaborate on "load the user32.dll et al ... Each FFI has its own specific details, but all the Lisps you will ... is the term for a Lisp FFI binding to an external non-Lisp function; ...
    (comp.lang.lisp)
  • Re: Popularity of programming languages
    ... It seems to me that ACL (assuming you mean Allegro Common Lisp) ... quite good FFI, TCP and UDP sockets, an OSI module (Operating System ...
    (comp.lang.lisp)
  • Re: Suggested problems?
    ... I would much rather deal with a pure Lisp solution ... >> Why would an FFI wrapper be implementation specific? ... It's another thing entirely to deal with shared libraries ...
    (comp.lang.lisp)
  • Re: Calling lisp from C
    ... The various FFI packages I ... > looked at seemed more concerned with calling C from lisp. ... > with CORBA but couldn't find a good free implementation. ... it provides an easy way if calling lisp from C. ...
    (comp.lang.lisp)