From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Attila Lendvai Newsgroups: gmane.comp.gnu.guix.devel,gmane.lisp.guile.user Subject: Re: Guile-Git 0.6.0 released; looking for maintainers! Date: Tue, 27 Feb 2024 19:25:58 +0000 Message-ID: References: <871q8yjl1l.fsf@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23590"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guix-devel@gnu.org, guile-user@gnu.org, Mathieu Othacehe To: =?utf-8?Q?Ludovic_Court=C3=A8s?= Original-X-From: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Tue Feb 27 20:26:42 2024 Return-path: Envelope-to: gcggd-guix-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rf369-0005vU-0W for gcggd-guix-devel@m.gmane-mx.org; Tue, 27 Feb 2024 20:26:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rf35l-0003Bc-M9; Tue, 27 Feb 2024 14:26:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rf35h-0003B5-B9 for guix-devel@gnu.org; Tue, 27 Feb 2024 14:26:13 -0500 Original-Received: from mail-4317.proton.ch ([185.70.43.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rf35d-0008MJ-SG for guix-devel@gnu.org; Tue, 27 Feb 2024 14:26:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail; t=1709061963; x=1709321163; bh=F051MuiOsBnNAxKRwT50zpCyE8FIS66IEDYsFLYyFPE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=u8yH0OIqqJduaJOM+dyQScGy1tccfwYNhWonNgnyOKR0Es/K2koAVsPXS1dwYNdJg fOM+6TZtFbJyI1HaWTdmYs4JCBZHwXrC1G3PZg0dlO0KvIe2uUSzkOjUsYbBdutadl 0BbuLF8IhtTfraL2uU2b/nhbHn/7nP4OkIbuZQWQrSxa0XfQz/lddaw3dmOKaHTywx z234XXjmBvPV3fBRccLPoEIZ4S0/F9IspTMYvDl2A2Orb1IfvvktoAYDTBx/j7QhEF 3hG0QdeA1yhbG9ZbgM/5UghDiK3YaLu5V2kS4Mey79l7Ne5+4w/X3MklSMDoNgzDxH mDlypvhHwpebA== In-Reply-To: <871q8yjl1l.fsf@inria.fr> Feedback-ID: 28384833:user:proton Received-SPF: pass client-ip=185.70.43.17; envelope-from=attila@lendvai.name; helo=mail-4317.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Original-Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.comp.gnu.guix.devel:69471 gmane.lisp.guile.user:19450 Archived-At: > An idea might be to look into using nyacc=E2=80=99s ffi-helper to generat= e > struct definitions. over there in CL land i wrote an automatic FFI generator. it's now part of = the main CL FFI lib: https://github.com/cffi/cffi/tree/master/src/c2ffi it is based on c2ffi: https://github.com/rpav/c2ffi which is a piece of C++ code that uses CLANG as a library to parse any C he= ader file, and emit its content into a json file. a thin layer of lisp code can generate the actual sexp FFI definitions from= the json files, that then can be hooked into the usual guile way of doing = FFI. the json files can be checked into the repo, which then eliminates the depe= ndency on c2ffi on the user side (i.e. the project is only as heavy as any = other hand-written FFI wrapper). that way only the maintainer needs to rege= nerate the json files every once in a while. or short of a smarter build tool like ASDF, we can also check in the genera= ted lisp files. if there's interest, then i can help porting this over to guile. below are some example projects that are using it. they are rather thin and= simple, yet provide a full FFI: https://github.com/hu-dwim/hu.dwim.zlib https://github.com/hu-dwim/hu.dwim.sdl PS: clang now supports `-ast-dump=3Djson`, which may or may not eliminate t= he need for c2ffi entirely: https://github.com/rpav/c2ffi/issues/112 --=20 =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- =E2=80=9CSometimes I wonder whether the world is being run by smart people = who are putting us on or by imbeciles who really mean it.=E2=80=9D =09=E2=80=94 Mark Twain (1835-1910)