Re: Curses alternative for Lisp?



Andreas Davour <anteRUN@xxxxxxxxxxxxxxxxxxxx> writes:

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.

Really? Even if during all these years, more terminal handling
libraries for Lisp have been made than ... terminals?


In the meantime, in clisp you can use the clisp specific SCREEN package,

or if you want to deal only with ECMA-048 (ie. ISO-6429) terminals,
you can use COM.INFORMATIMAGO.COMMON-LISP.ECMA048 to build these
control sequences.
http://darcs.informatimago.com/darcs/public/lisp/common-lisp/ecma048.lisp


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.



--
__Pascal_Bourguignon__ _ Software patents are endangering
() ASCII ribbon against html email (o_ the computer industry all around
/\ 1962:DO20I=1.100 //\ the world http://lpf.ai.mit.edu/
2001:my($f)=`fortune`; V_/ http://petition.eurolinux.org/
.



Relevant Pages

  • Re: Lisp in a Box
    ... > Lisp implementation to get started with the language. ... with lots of libraries and documentation all in one place. ... Bundle binaries of Gnu Emacs, CLISP, and some library package that suits ... entire "this runs on that, but not this" scenario, because Emacs and CLISP ...
    (comp.lang.lisp)
  • Re: Oft-shared (perhaps?) Impressions of a Lisp Newbie
    ... library" of Common Lisp? ... If something isn't in the language, it will be in some common library, ... you might find M linked list libraries and N ... The more years you spend as a programmer, the more you learn ways to ...
    (comp.lang.lisp)
  • Re: Reddit Guys on the Pros and Cons of Lisp
    ... If I need to use FFI-Callback, I need to sue CMUCL or CLISP, SBCL ... Can you tell me what should I choose if I need multithread Lisp on ... They either have the feature or they don't. ... libraries which depend heavily on the FFI. ...
    (comp.lang.lisp)
  • Re: Why Lisp is too hard for me to use
    ... > Lisp. ... > deal with the complexity alluded to in this thread. ... python libraries without being a python-ite is a major pain. ... > (by essentially understanding the difference between a debian system ...
    (comp.lang.lisp)
  • Re: A lisp foundation - a model for open source development?
    ... Lisp doesn't stand very well in terms of popularity so money from ads ... quality libraries we need sponsors, to gain sponsors we need to be ... Create an foundation, let's call it Alexandria ... deposit under foundation library. ...
    (comp.lang.lisp)