From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: [ANN] nyacc 0.82.0 released Date: Sun, 10 Sep 2017 11:17:12 -0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1505067473 15380 195.159.176.226 (10 Sep 2017 18:17:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 10 Sep 2017 18:17:53 +0000 (UTC) Cc: guile-devel To: Guile User Mailing List Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Sep 10 20:17:48 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dr6nO-0002mx-Vx for guile-devel@m.gmane.org; Sun, 10 Sep 2017 20:17:27 +0200 Original-Received: from localhost ([::1]:53839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dr6nW-0002fr-1V for guile-devel@m.gmane.org; Sun, 10 Sep 2017 14:17:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dr6nJ-0002eJ-MI for guile-devel@gnu.org; Sun, 10 Sep 2017 14:17:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dr6nI-00019i-La for guile-devel@gnu.org; Sun, 10 Sep 2017 14:17:21 -0400 Original-Received: from mail-pg0-x232.google.com ([2607:f8b0:400e:c05::232]:36910) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dr6nD-000180-Aq; Sun, 10 Sep 2017 14:17:15 -0400 Original-Received: by mail-pg0-x232.google.com with SMTP id d8so11833926pgt.4; Sun, 10 Sep 2017 11:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=EMu+3suJxDULIi14H1NUaG9J86a81FnTOvQme/BdU9Q=; b=AyfcMWugS4esz5yc19oFgH9y2hU40HI075L+wEBzVOys1XzvTrST+x7a7dTNL1+ynv uDqlNMFbJ5XahYGm5grK+gI1yvqfH0HHRvI/tcKZOtDUmuVdlNUQadjm/OTNHdXUWg5D p7N3cCwuZda0z9CTSRFXX6iHX0ar5vgc3BQyZGRLoWqyoKYRjJt9pooKviSSVf5Icez9 zHDSdkllTsZRiu4l3VwrPfiZXmFarK5ASyzLvx4Xdg+h9eRf8EOxLoiSkq2NF5l7KGSW mxH3twDNd1fz46O7uw35VvC7A8SpyeaEv86mcIxtHiy7j9MUctMqHWw39bvDBxDD/Wlg aG4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=EMu+3suJxDULIi14H1NUaG9J86a81FnTOvQme/BdU9Q=; b=TAB9iVFZAaXjyAAjnpCY/qDcd8CQkPzCi6BLikLZXmzh0C14vNnGAtG3AFB8JDjiXJ QRLgOu5QB78sgTY6DHB1lyCuUCSecg3cjbG+Fw47hCKImqttWG/D7QkCR2ltQ/pdYShi qv2rEIWfqJOT/qVGZJqVCqzQVsej44MvFNhG8T66uYwtbunPR0CAexEYViz3DIR1XkdQ L8JlN/9X3LMmMuYFIGcnXGri5edf0B/gnJtP1/ib6TU9kB6MWbFls5EFQhgBDVmNt9wB 0hYEI7v2vpoz6siCKOza7v894nEJs/KEq38+P69qAtarznkeduqGsTUOn+e6xvBcNGF5 uKGw== X-Gm-Message-State: AHPjjUhFO0yu+7Oh9Hnbj4POi9/enxLIrLWeIxt2/n5ksqo/A/saBHZO jgjTGOvsPMLmbhqNpE8= X-Google-Smtp-Source: ADKCNb5ZyEeZJ1WuvJqY3exCneL9TOGL3oHPG88SbD2TPOh6RdOfq5oo50piznLFA2aNBYsL51Yxtw== X-Received: by 10.84.128.99 with SMTP id 90mr10666884pla.444.1505067433924; Sun, 10 Sep 2017 11:17:13 -0700 (PDT) Original-Received: from nautilus.championbroadband.com (216-165-229-229.championbroadband.com. [216.165.229.229]) by smtp.gmail.com with ESMTPSA id i10sm5553372pgo.71.2017.09.10.11.17.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Sep 2017 11:17:13 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::232 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19285 gmane.lisp.guile.user:14108 Archived-At: > On Sep 10, 2017, at 8:37 AM, Matt Wette wrote: >=20 > Nyacc 0.82.0 has been released >=20 > 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=20 > 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:=20 6) compile-ffi and compile may take significant time. I have seen = compile-ffi take time on=20 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