Re: CLX, FFIs, and graphics



>>>>> "CY" == C Y <C> writes:
[...]
CY> Based on what little I know, it seems that clx is NOT an FFI?
CY> If so, how does it handle working with X? Is there something
CY> unique about low level X that allows clx to avoid using a FFI
CY> that cannot be duplicated for higher level toolkits?

"The X Window System is defined by the X Window System Protocol
Specification, a detailed description of the encoding and the meaning
of requests and events sent between a client and a server. This
standard protocol does not depend on any particular programming
language. As a result, each programming language must define its own
functional interface for using the X protocol. The standard X
interface used by Common Lisp programmers is called CLX. CLX is a set
of data types, functions, and macros which allow a Common Lisp client
program to interact with an X server to send requests and to receive
input events and replies."[1]

So yeah there's something about X that allows CLX to be implemented in
lisp in that it is a specified client/server protocol defined on byte
streams[2]. The higher level toolkits on X are built mostly on xlib (the
CLX equivalent in C) and present a linkable function call etc.
interface, not a client/server interface.

[1] http://common-lisp.net/project/cmucl/doc/clx/1_3_A_Quick_Tour_of_CLX.html
[2] http://www.x.org/X11_protocol.html

cheers,

BM
.



Relevant Pages

  • Re: learning lisp by doing
    ... > Is there a good series of programming problems that will ... For example if your code is supposed to draw a right angled ... That is pretty low level, ... The Common Lisp equivalent to Xlib is CLX. ...
    (comp.lang.lisp)
  • Re: Deciding CLX or .NET for Cross-Platform
    ... I would have to say the very reason why I never mentioned about CLX as ... Is there anything else that we could use besides Java? ... a .NET client on a Java server ... you need to know at least one other programming ...
    (comp.lang.pascal.delphi.misc)
  • Re: Programming to an Interface
    ... it does not include member variants. ... form client of class depends on the codes from writer of class, ... 2)the mothod of coding makes sure the correctness of the programming from ... it is useful to program to an interface ...
    (comp.object)
  • Re: Programming to an Interface
    ... Isn't this inherent in the design of the classes anyway? ... can be changed without impacting users of the interface. ... client of the object. ... found a reason why from programming to interfaces is better than ...
    (comp.object)
  • Re: Programming to an Interface
    ... created by the client of the object (that implements the interface). ... For example, if you had the method AddTwoNumbers(numberOne, numberTwo) ... that "programming to an interface" means using an interface instead of a ...
    (comp.object)