unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: Guile User Mailing List <guile-user@gnu.org>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: [ANN] nyacc 0.82.0 released
Date: Sun, 10 Sep 2017 11:17:12 -0700	[thread overview]
Message-ID: <B8DC2E86-63BD-4B46-8626-2C369EFDDC8B@gmail.com> (raw)
In-Reply-To: <F0B08C97-F54A-4305-9A1C-BCE771593C38@gmail.com>


> On Sep 10, 2017, at 8:37 AM, Matt Wette <matt.wette@gmail.com> wrote:
> 
> Nyacc 0.82.0 has been released
> 
> In this version I have cleaned up more of the FFI Helper.  Note:
> 1) In the distribution, you will see example .ffi files in examples/ffi/.
> 2) use of the FFI Helper required the bytestructures package, available from:
>   	https://github.com/TaylanUB/scheme-bytestructures
> 3) ffi/cairo.ffi is converted to ffi/cairo.scm by the command
> 	$ guild compile-ffi ffi/cairo.ffi
> 4) It works on my mac.  I don't know what else: the code needs to have access
>   to files in odd places (e.g., lib/gcc/..../include
> 5) If you do `make install', and have bytestructures in the SITE_SCM_DIR, then 
>   this should work:
> 	$ make install-ffi-help
> 	...
> 	+++ warning: the FFI Helper is experimental
> 	ffi-help: can't do varargs (yet)
> 	wrote `/var/tmp/zz/scm/ffi/sqlite3.scm'
> 	wrote `/var/tmp/zz/go/ffi/sqlite3.go'
> 	+++ warning: the FFI Helper is experimental
> 	ffi-help: can't do varargs (yet)
> 	wrote `/var/tmp/zz/scm/ffi/libgit2.scm'
> 	wrote `/var/tmp/zz/go/ffi/libgit2.go'
> 	+++ warning: the FFI Helper is experimental
> 	ffi-help: can't do varargs (yet)
> 	ffi-help: no FFI float-type for "long double"
> 	wrote `/var/tmp/zz/scm/ffi/glib.scm'
> 	wrote `/var/tmp/zz/go/ffi/glib.go'

Some additional notes: 
6) compile-ffi and compile may take significant time.  I have seen compile-ffi take time on 
   include files that have a large number of re-includes.  Nyacc does not try to skip re-reading
   include files (like gcc does).  And compile takes a long time because the .scm files can be
   huge.  On my machine, ffi/gio.scm turns out to be about 24 K lines and the gio.go file is 8 MB.
7) In examples I show that passing strings to function is done via (foo (string->pointer "abc")).
   Using string->pointer is not required: unwrap~pointer will now deal with this.
8) the FFI Helper files .scm files are distributed in SCM_DIR -- not under nyacc/ :
   + scripts/compile-ffi.scm is the compiler driver invoked by `guild'
   + system/ffi-help-rt.scm is the FFI Helper runtime (macros for defining types, etc)
   + ffi/ is the conventional place to host .ffi files, so ffi/glib.scm is code for (ffi glib)
9) I will need to look into how to add some needed types in guile FFI: intptr_t, long long, long
   double.

Matt




  parent reply	other threads:[~2017-09-10 18:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-02 13:46 [ANN] nyacc 0.81.0 released Matt Wette
     [not found] ` <F0B08C97-F54A-4305-9A1C-BCE771593C38@gmail.com>
2017-09-10 18:17   ` Matt Wette [this message]
2017-09-16 16:53   ` [ANN] nyacc 0.82.1 released Matt Wette
2017-11-11 14:27     ` Jan Nieuwenhuizen
2017-11-11 15:22       ` Matt Wette

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B8DC2E86-63BD-4B46-8626-2C369EFDDC8B@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@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.
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).