Re: Curses alternative for Lisp?
- From: Pascal Bourguignon <pjb@xxxxxxxxxxxxxxxxx>
- Date: Mon, 31 Dec 2007 20:08:34 +0100
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/
.
- References:
- Curses alternative for Lisp?
- From: Andreas Davour
- Re: Curses alternative for Lisp?
- From: Timofei Shatrov
- Re: Curses alternative for Lisp?
- From: Andreas Davour
- Re: Curses alternative for Lisp?
- From: Timofei Shatrov
- Re: Curses alternative for Lisp?
- From: Andreas Davour
- Curses alternative for Lisp?
- Prev by Date: Re: Class slots in CLOS
- Next by Date: Re: How do lispers do their GUI programming anyway? (was Re: Curses alternative for Lisp?)
- Previous by thread: Re: Curses alternative for Lisp?
- Next by thread: Re: Curses alternative for Lisp?
- Index(es):
Relevant Pages
|