From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: as for Calc and the math library Date: Wed, 14 Aug 2024 18:31:20 +0300 Message-ID: <86frr786k7.fsf@gnu.org> References: <864j7qhup6.fsf@gnu.org> <87a5hi0yts.fsf@valhala.localdomain> <86y152ge0b.fsf@gnu.org> <86jzgjfwqp.fsf@gnu.org> <87sev78arx.fsf@gmail.com> <86le0z89u1.fsf@gnu.org> <87o75v87n1.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27294"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, nicolas@n16f.net, arthur.miller@live.com, emacs-devel@gnu.org To: Suhail Singh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 14 17:32:22 2024 Return-path: Envelope-to: ged-emacs-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 1seFz3-0006uB-NE for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Aug 2024 17:32:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seFyB-0002B5-DL; Wed, 14 Aug 2024 11:31:27 -0400 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 1seFy9-0002AV-Bj for emacs-devel@gnu.org; Wed, 14 Aug 2024 11:31:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seFy8-000721-RG; Wed, 14 Aug 2024 11:31:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=FRkT/HX6F38NGAzVM62Q5Yid0790gc8yZBBs2z4C3JI=; b=K7WkXwIv+HwK HoiwKySdf/Vxz5cws2L3yC2nj8VVGIVCJyY1DJH7hfUoVyuZ8v932AA6uPTwe2sTrEYIdznreIOjK i0iJCOSO00Y6FpuRkyCTz0jdv2T2AuRAdye8cKCvo+21Py/S3ssCHJQLKqiekMvBEJ9QdW99VTcEV Xqoofuj/DpfyrD7vCGg8fz82F2rePm4cFl5JuppKbKT94u7gboo93vF1BYImWKAP4z4MaCf8PowBO B+zSZxs8FQfGHvHwfNUwMFliFmoBhwYcSBni9d35bW/XkmXT+kvK9TLpc3DdgAgHiA/jJ22wDyLrO 118HdY3uOT9/n3KAiiaQbQ==; In-Reply-To: <87o75v87n1.fsf@gmail.com> (message from Suhail Singh on Wed, 14 Aug 2024 11:08:02 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322752 Archived-At: > From: Suhail Singh > Cc: Suhail Singh , gerd.moellmann@gmail.com, > nicolas@n16f.net, arthur.miller@live.com, emacs-devel@gnu.org > Date: Wed, 14 Aug 2024 11:08:02 -0400 > > Eli Zaretskii writes: > > >> On the topic of what would be acceptable for an FFI, wouldn't something > >> akin to what's done for modules be sufficient ? I.e., have the users of > >> the interface explicitly state that they are compliant. > >> > >> It would scale better than an allow-list. IIUC, Arthur mentioned this > >> in another thread. If this wouldn't be sufficient for an FFI, could you > >> please elaborate on why that's the case ? > > > > What exactly are you suggesting? IOW, please describe what you have > > in mind in more detail, because I don't think I understand it. > > Specifically, modify the `define-ffi-library' macro that emacs-ffi > provides. > > Presently, it takes two arguments: a SYMBOL and a NAME. I am proposing > that it be updated to take three arguments: a SYMBOL, a NAME and a > GPL-COMPATIBLE-P token. A value of `t' would be necessary for creating > a reference to the library. And if the value is not t, then the load will fail? If so, then this additional argument makes very little sense: you could instead say that just by loading the library, the Lisp program which uses emacs-ffi "declares" the loaded library to be GPL-compatible. And we are back where we began. The way we do it when loading modules requires the _loaded_ library to declare itself compatible, by exporting a symbol of a certain name. That is an action by the library we load, not by the Lisp program which loads it.