From: Daniel Skarda <0rfelyus@atrey.karlin.mff.cuni.cz>
To: guile-gtk@sourceware.cygnus.com
Subject: Towards guile-gtk x.xx
Date: Sat, 13 Nov 1999 07:42:00 -0000 [thread overview]
Message-ID: <m0aeoiqtxw.fsf@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <19991024202010.8425.qmail@nwcst287.netaddress.usa.net>
Hello,
few days ago I talked with my friend about programming languages. His
favourite language is (currently :) Python and during debate he frequently
mentioned that "Python comes with batteries included". This means that
you install single Python package and get standard modules for nearly
everything.
I think that at this point he is quite right - just imagine you base your
project on goops, guile-gtk and guileGL. Than users of such project have to
download and install guile, goops, guile-gtk, guileGL - and possibly other
guile packages you use. Fortunately nowadays all "serious" packages use
autoconf - but there is serious labyrinth of version dependencies.
I am not sure that instant merge of all available packages would be clever - but
some sort of convergence would be nice. In my opinion following issues should
be solved to make guile (not only guile-gtk) more useful:
* Guile should ship with standard way of storage and accessing of C modules
(shared libraries loading). Today I found try-module-dynamic-link in
(ice-9 boot-9) module, but guile-gtk does dynamic linking on its own. I
would prefer something like (ice-9 libltdl) - guile bindings for libltdl
library which ships with libtool package.
* Sometime ago I had to create bindings by hand I have to say that writing
all these asserts by hand is really painful (and its easy to make mistake -
... == 0, ... == SCM_BOOL_F).
After some experience with guileGL bindings I am sure that it is not easy
to create bindings directly from header files - or it is possible just for
basic types (ints etc) - but when there are arrays and pointers things get
more complicated.
I now that there are at least two programs for creating bindings. To be
honest - I have not tried them. Because I hacked some things in guile-gtk,
I got used to build-guile-gtk script. I do not know whether all schemers
would nominate it for best solution but I am sure that Guile should ship
with such script. So I would like to propose:
- instead of adding new features to build-guile-gtk we should make it
more general and separate gtk specific features to special module
(GuileGL already do this)
- it would be nice to separate generic functions (enum2scm, scm2enum..)
from guile-gtk library, thus other bindings do not depend on gtk
Also functions for creating new smob types would be useful. As I saw
the current define-struct code it depends on gtk library :(
- To simplify writing and maintaining glue (.defs) files we should
provide some mechanism to specify function definitions inside .c
files (like SCM_PROC and SCM_MAGIC_SNARFER mechanism):
SCM_GLUE((define-enum FooType
(foo1 MY_FOO_1)
(foo2 MY_FOO_2)))
typedef enum {
MY_FOO_1,
MY_FOO_2
} FooType;
SCM_GLUE((define-func foo
int
((string bar)
(FooType foot))
(scm-name "my-foo")))
int foo(char* bar, FooType foot)
{
.... /* C code */
What do you thing about proposed changes?
Dan Skarda
prev parent reply other threads:[~1999-11-13 7:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-24 13:14 Towards guile-gtk 0.18 Ariel Rios
1999-10-25 7:46 ` Miroslav Silovic
1999-10-25 10:55 ` Marius Vollmer
1999-10-25 14:45 ` Miroslav Silovic
1999-10-30 23:05 ` Jim Blandy
1999-10-31 4:34 ` Miroslav Silovic
1999-10-31 5:14 ` Marius Vollmer
1999-10-31 9:54 ` Keith Wright
1999-11-01 6:37 ` Jim Blandy
1999-11-02 21:42 ` Keith Wright
1999-11-13 7:42 ` Daniel Skarda [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m0aeoiqtxw.fsf@atrey.karlin.mff.cuni.cz \
--to=0rfelyus@atrey.karlin.mff.cuni.cz \
--cc=guile-gtk@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).