[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] GTk+ in MIT-Scheme?

From: Matt Birkholz
Subject: [MIT-Scheme-devel] GTk+ in MIT-Scheme?
Date: Sun, 25 Jan 2009 20:15:28 -0700

Bless me, like-minded entities, for I have Schemed.  It has been 12
months since my last confession.  During that time I have accomplished
little but to re-orient my FFI.  In fact, my GNOME wrapper code has
not changed much at all.  The FFI, however, now "grovels" for C
constants, has split runtime/syntax-time packaging, produces shims
without a microcode build directory, and is fully integrated with the
system build.  And I am ready to commit it to CVS.

Do I need to sign something?

Please review the Caveats (below) and the FFI Patchfile on this web

I propose to commit that patch and thus create an FFI (a basis for an
FFI?) for MIT Scheme.

Would y'all rather see these diffs on a branch?


    Just noticed again the "address" operators in pruxdld.c.  This FFI
    now works the garbage collector so well that I don't mind
    returning C pointers in integers.  Thus the "alien" data structure
    could be replaced by integer addresses.  That complicates
    malloc/free (which will have to introduce its own Scheme
    representative) and increases consing.  Scanning a string at an
    address above fix:max conses O(length) TC_BIG_FIXNUMs, ya?  Is a
    shockingly simple representation of C pointers worth it?  I hardly
    care one way or another, so push me off the fence!  :-)

    I did not include any version info in the shims.  (Just thought of
    that too.)

    Testing has been minimal.  The examples run, and thus do not
    signal.  Your first undefined C type may just drop you into the

    I did not try the mit-scheme-c machine, but this FFI should
    (eventually?) work just as well there as in mit-scheme-native.
    The same is nearly as true for a Windows machine.

    I did not try to build a statically linked machine (linked to a
    shim and library) either.  The configure script disables the FFI
    primitives if there is no dynamic library support on the host.

    I have not actually saved and restored a band containing FFI code,
    but I've thought about it (for whatever THAT is worth).

Last minute polishing has torn a corner off the gtkio module, so the
code for my best (flimsy) test is currently offline.  I wanted to get
at least the FFI out on the web before IAP at MIT is completely over.
(Do they still do IAP?)  The Gtk should follow shortly.

A Gtk-Screen/Canvas for Edwin in 2009 then.  Surely! ;-)

Yours in Scheme,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]