all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel@gnu.org
Subject: Re: Binding generator, for Guile, to C libraries
Date: Wed, 05 Jul 2017 23:53:36 +0200	[thread overview]
Message-ID: <8737aasg7z.fsf@gnu.org> (raw)
In-Reply-To: <20170703013035.47d47177@scratchpost.org> (Danny Milosavljevic's message of "Mon, 3 Jul 2017 01:30:35 +0200")

Hello,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> Okay, I've cleaned up what I have and put it on github, under:
>
> https://github.com/daym/guile-gcc-unit
>
> What this does is it allows you to read gcc output files which specify all the prototypes - in our case in order to extract the prototypes and generate Guile bindings (of parted, or whatever).
>
> The next steps:
> - Provide the actual binding generator (I started a version of it - I'll commit a cleaned-up version in a few days I guess).
> - Get it to work with non-toy examples (see file "tests/huge/input" for the parted non-toy example - the goal is to read this file, find all the record decls and all the function decls in it and generate the Guile pendants of them).  If you happen to know LALR parsing theory, I have a question :)
> - Find out whether that can be integrated as a Guile "language".  Just being able to do something like ',load "foo.h"' and have it register all the functions from it would be way cool.  On the other hand, on non-Guix systems the header files aren't usually installed when the library is installed.  So maybe an offline version would be good as well.

Matt Wette, the author of nyacc, was apparently in the process of
writing a similar tool using nyacc’s C99 parser.  Might be worth looking
at.

Besides and FWIW, I’m skeptical of binding generators.  Things like
SWIG, for instance, generate interfaces that are often not quite what
you’d like, so you end up writing a layer on top of the generated glue
anyway, not to mention annotation in headers.  (Bindings generated from
high-level descriptions like GIR and XCB are a different story; those
seem to work quite well.)

That said, you might want to share on guile-user@gnu.org to get feedback!

Ludo’.

  parent reply	other threads:[~2017-07-05 21:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 22:16 Looking to contribute cinder88
2017-06-28 13:49 ` Danny Milosavljevic
2017-06-28 15:01   ` Leo Famulari
2017-06-29 15:49     ` Danny Milosavljevic
2017-06-29 17:02       ` Mekeor Melire
2017-07-01 13:15         ` Deleting system generations Ludovic Courtès
2017-07-01 15:32           ` Thomas Danckaert
2017-07-02 20:22             ` Ludovic Courtès
2017-06-29 13:22   ` Looking to contribute cinder88
2017-06-29 13:46     ` Katherine Cox-Buday
2017-06-29 15:25     ` Alex Vong
2017-06-29 16:42     ` Pjotr Prins
2017-07-02 23:30     ` Binding generator, for Guile, to C libraries Danny Milosavljevic
2017-07-04  0:41       ` Installer development Danny Milosavljevic
2017-07-05 21:53       ` Ludovic Courtès [this message]
2017-07-06 19:57         ` Binding generator, for Guile, to C libraries Danny Milosavljevic
2017-07-07 11:41           ` Ludovic Courtès
2017-07-05 13:20   ` Looking to contribute Danny Milosavljevic
2017-07-07 11:34     ` Installer, ISO9660, etc Ludovic Courtès
2017-07-07 16:13       ` Danny Milosavljevic
2017-07-09 20:08         ` Ludovic Courtès
2017-07-10 13:41           ` Danny Milosavljevic
2017-07-10 21:02             ` Ludovic Courtès
2017-07-10 21:27               ` Danny Milosavljevic
2017-07-11  9:23                 ` Ludovic Courtès
2017-07-11 10:13                   ` Danny Milosavljevic
2017-06-28 13:56 ` Looking to contribute Alex Vong
2017-06-28 17:41 ` James Richardson

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=8737aasg7z.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.