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.user Subject: Re: ffi helper Date: Tue, 21 Mar 2017 15:40:16 -0700 Message-ID: References: <96434CF4-E3F9-4410-82B6-9EB8DEE130B9@gmail.com> <95B6EEEF-5278-44C8-B640-647A16AEFD1F@gmail.com> <201FF019-FA10-4B35-A96D-BC0AD078F5DB@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1490136048 32660 195.159.176.226 (21 Mar 2017 22:40:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Mar 2017 22:40:48 +0000 (UTC) Cc: guile-user@gnu.org To: Matt Wette Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Mar 21 23:40:41 2017 Return-path: Envelope-to: guile-user@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 1cqSSH-0007uJ-GZ for guile-user@m.gmane.org; Tue, 21 Mar 2017 23:40:41 +0100 Original-Received: from localhost ([::1]:42703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqSSN-0002lF-9N for guile-user@m.gmane.org; Tue, 21 Mar 2017 18:40:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqSS0-0002kx-Ep for guile-user@gnu.org; Tue, 21 Mar 2017 18:40:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqSRx-0001rX-Br for guile-user@gnu.org; Tue, 21 Mar 2017 18:40:24 -0400 Original-Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]:36249) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cqSRx-0001r9-2h for guile-user@gnu.org; Tue, 21 Mar 2017 18:40:21 -0400 Original-Received: by mail-pf0-x232.google.com with SMTP id o126so85584400pfb.3 for ; Tue, 21 Mar 2017 15:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=CfgbivGbdrimS1EO9XVfKUG4zukWrukQ3C7SCEI9xrY=; b=fpDSunG1ihNP6r4PtuhQy+R8rwaYewBF+JnhPcIsAtSbiXi9hM2ylvE7wEe0yyU2PA MKepkSs8h/DkyDbQOvz5OkY9xbDZ0NYtfPL0WQKvzeYsyEM0Wyskrpdd8/1tjoojm96m Hbn1qDi2jeaHhva/Pg31emAUUpOsX8h6krg3RxIDptl5XbgbLK6T+KNONryf8oOuN7Dd G2rIxFvmLwIUU37LruCt+8NMTtXN6yoc3OYZ8uX5ewg59EdpxF4X1Uro2JN5VcqUHetg qxbYrBwzjpfBDJ+reXm0HgFZ8Y5G3qZkS53xCcwpEpCOphAsyBrq7nL1xIFYjMrkmdDA I0jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=CfgbivGbdrimS1EO9XVfKUG4zukWrukQ3C7SCEI9xrY=; b=ZPrbc9qUY3NWuOelgFHeWFMMu5Xkv1NDrCcBjha2LkGEhk6GtHt00QvVBE8rT4yVEZ jWu1AYEjM5MZ8QncOBKuTwJcn7IQKFbn6omNkiCy+QBtWuIpQV9SqvMOoyLzFDEdL9pX n8swXsYWldZqytU726S+GJ2NdoDA5+1+9K0grsJRafflNfxMKuJQhW22akLY8Rb+zESO YsZh2sF9+Xq4cYeW3o+LyKoY/mrXbYSITPHzEuCfD0lR6SwjUdMLqM6NKN73BVcdOdIB Q2idXFWgJQsQCYHvaTrVpJpSo+vO/sd4roFqXNQOUlcNEUlse7DX96sYvmv9IXU5jZjl XSFw== X-Gm-Message-State: AFeK/H1uU/oqmOpSLHkXedzWcG9eOUQJUKU5pZ+YOsuGK1VHlIsjUnJJ8bDyVk5l0n1qzQ== X-Received: by 10.84.218.203 with SMTP id g11mr36944382plm.6.1490136019847; Tue, 21 Mar 2017 15:40:19 -0700 (PDT) Original-Received: from [192.168.2.114] (216-165-236-44.championbroadband.com. [216.165.236.44]) by smtp.gmail.com with ESMTPSA id 197sm41530078pfv.19.2017.03.21.15.40.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Mar 2017 15:40:18 -0700 (PDT) In-Reply-To: <201FF019-FA10-4B35-A96D-BC0AD078F5DB@gmail.com> X-Mailer: Apple Mail (2.3259) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::232 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13570 Archived-At: > On Mar 19, 2017, at 10:23 AM, Matt Wette wrote: >=20 >=20 >> On Mar 13, 2017, at 5:53 PM, Matt Wette wrote: >>=20 >>=20 >>> On Mar 8, 2017, at 6:06 PM, Matt Wette wrote: >>>=20 >>> I=E2=80=99m now working on a FFI helper based on the nyacc C99 = parser. =20 >>=20 >=20 > I am making some progress with some ragged prototype code. I have issues with the bytestructures module: both it and (system = foreign) use symbols like =E2=80=9Cdouble=E2=80=9D. Probably need to = rename somewhere. I can now autogenerate enough to successfully run the following program. (use-modules (cairo cairo)) (define srf (cairo_svg_surface_create "abc.svg" 200.0 200.0)) (define cr (cairo_create srf)) (cairo_move_to cr 10.0 10.0) (cairo_line_to cr 190.0 10.0) (cairo_line_to cr 190.0 190.0) (cairo_line_to cr 10.0 190.0) (cairo_line_to cr 10.0 10.0) (cairo_stroke cr) ;; need to add guardians? (cairo_destroy cr) (cairo_surface_destroy srf)