From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Suhail Singh Newsgroups: gmane.emacs.devel Subject: Re: as for Calc and the math library Date: Wed, 14 Aug 2024 11:08:02 -0400 Message-ID: <87o75v87n1.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39696"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Suhail Singh , gerd.moellmann@gmail.com, nicolas@n16f.net, arthur.miller@live.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 14 17:26:16 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 1seFt9-000A9U-RA for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Aug 2024 17:26:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seFsM-0002fe-3L; Wed, 14 Aug 2024 11:25:26 -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 1seFbb-00018x-Ln for emacs-devel@gnu.org; Wed, 14 Aug 2024 11:08:07 -0400 Original-Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seFba-00031l-3O; Wed, 14 Aug 2024 11:08:07 -0400 Original-Received: by mail-qk1-x741.google.com with SMTP id af79cd13be357-7a1d881c025so2752185a.3; Wed, 14 Aug 2024 08:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723648084; x=1724252884; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=eTzdudoHZsiZS4myThVMtc+BRblAx8l1SEKXpIVgBOo=; b=epmM7Ilao72e7mb4hbSKbvKfwM8prNfPjstHnH9Ds+XIieITIWIV5a97NwO+2E1jO0 IP2RmbNmWczmiZaNmMM0Hrzk7UTR16k8EFrJ6+fCxCkQFrV3Z5YyK1mUdaQopIDdzjXj zKs7DYDd9P1Ehzal2shdio7CXt1r9RBugujw/sHTPD655c+uNXjAzqEHYV2zaHktJqhu SvZnI92L1pDjjD6PAbIIy3W1rYvidQj+e+2YrDtgMqslolUv7F3RzA61RMq75h8yMsiw eU3ZjSOeSz57/37WTmtXUjNdutVqsGq4YPoL6/Sg33I/IQICwpcd1iZk60jureGAxZOp UnWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723648084; x=1724252884; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eTzdudoHZsiZS4myThVMtc+BRblAx8l1SEKXpIVgBOo=; b=QrMC3EzN//enxVPIH0EOyAnFriwqfE2qnruf4FmaeMst9ToXgItQPZ74NnXkuy0AI2 +2qJHdY1J7MZzZcv37LJ3iO7X2oIiv/CMDphSuDxAZxEJupifwUd/sg94tYzY5axBBcF +5Xf2ZIHr+aJ8LXhibCx2rQxwMDe8WrmOJAvm8OHfsvqakwIKmYHTMaYhq73izvvAkJd B+nSOWe3UbuRz+2F6pWnpQIe8+uYqN0nY80IjPzcR51LmADmRpEyqJcjcFW1hghHWn13 vg60C4SNykUFyCwcXsdmHtC+5hyxB+XYIPiWCaqindPY89hhajP95o9Ps151yJQz+iVG Vi4Q== X-Forwarded-Encrypted: i=1; AJvYcCVCk3XxA4YbtvowdsyaRKNW9/BQ5A2SXMzGst4wbKRmNaiq+62IdULuZb4Kxpvrb1FNeKOeI9ipbsK5VTpWR+CB7goD X-Gm-Message-State: AOJu0Yzi/la0lrxuEPdot7LHm0k9kRn34/BT4M44fl01N5MYGhb1bWkE +9OGQdhcIbQFkLh7MuE6znuVXgk5+nB5nZORa1T+/LVkHqu+FQDAQ74DranE X-Google-Smtp-Source: AGHT+IFBJVWtqEOO3TQFzzza0y85kW7+oVZ6IFCi0nqNkoWSEI3pLWhWWVulNKhLuc2/fuj6C5xp5A== X-Received: by 2002:a05:620a:414c:b0:79f:b3c:8fc3 with SMTP id af79cd13be357-7a4ee3907camr211501785a.6.1723648084182; Wed, 14 Aug 2024 08:08:04 -0700 (PDT) Original-Received: from gnus (bras-base-mtrlpq0776w-grc-10-67-71-183-204.dsl.bell.ca. [67.71.183.204]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a4c7df5a55sm443995685a.86.2024.08.14.08.08.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 08:08:03 -0700 (PDT) In-Reply-To: <86le0z89u1.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 14 Aug 2024 17:20:38 +0300") Received-SPF: pass client-ip=2607:f8b0:4864:20::741; envelope-from=suhailsingh247@gmail.com; helo=mail-qk1-x741.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 14 Aug 2024 11:25:17 -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:322751 Archived-At: 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. If the value of `t' would be insufficient for Emacs' standards for encouraging GPL compliance (in case it's considered "not explicit enough"), the third argument could instead be something like GPL-COMPATIBILITY where the value of 'library-is-GPL-compatible would be necessary to be able to create a reference to the library. A further variant/extension of the above proposal is also possible. This extension modifies both `define-ffi-library' as well as `define-ffi-function'. When `define-ffi-library' gets an acceptable claim of GPL compatibility, it attaches a property (which acts as a witness for observing the claim of GPL compatibility) to the library symbol. The presence of said property is then checked by `define-ffi-function'. If the property is missing, `define-ffi-function' complains. -- Suhail