From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: [External] : Re: How to make M-x TAB not work on (interactive) declaration? Date: Mon, 16 Jan 2023 17:47:19 +0100 Message-ID: References: <874jt0imh0.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pF7SR6FZOrBumQu+" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21447"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuri Khan , Rudolf =?utf-8?Q?Adamkovi=C4=8D?= To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 16 17:48:07 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1pHSeT-0005KU-0B for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 16 Jan 2023 17:48:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHSe0-0005x0-Ka; Mon, 16 Jan 2023 11:47:36 -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 1pHSds-0005vT-Gj for help-gnu-emacs@gnu.org; Mon, 16 Jan 2023 11:47:30 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHSdm-00054O-Ic for help-gnu-emacs@gnu.org; Mon, 16 Jan 2023 11:47:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6xWX6HzeTOdL8Y4DmZfLq/bNu9vzHG3gnwd9aprduWc=; b=is7cCeSN7cq7zrIHjtGQADZIrR W/FEdIawC9xqE4loEK79Se8RmD6rlMUojW+ZGrp0sixCfOoe3LeDVvSnoPMPkR0XPwoq9E3IUm/yP NLH++DuiMApW+9LStqCuY6ZCV4HvhazCgl65KL7G2vgWtpd+iZKa6qQrX4SO/PN6NPHuilGBYnax5 JBSq2/Qbyt8+GAWPpwrjUzqhzhbjfhui4lVnka6uQYf+hotoIHvps80C+Og+eYz1KENFJE/tBg1wl hG6CIimmv72XE5rqMqfcnN3VcU8H3oF8zjf6nUJ4q6BiJTA7r/tteXH17KLv639b2fgMWxEnoJKtO QBhAz8Kw==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1pHSdj-0007KO-Et; Mon, 16 Jan 2023 17:47:19 +0100 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142276 Archived-At: --pF7SR6FZOrBumQu+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 16, 2023 at 07:14:49PM +0300, Jean Louis wrote: > * Yuri Khan [2023-01-16 19:01]: > > On Mon, 16 Jan 2023 at 22:50, Jean Louis wrote: > >=20 > > > There are no elements in this context. > > > > > > (+) =E2=9E=9C 0 > >=20 > > There is a list of elements, and the length of that list is zero. > >=20 > > > Multiplication of zero elements is also zero: > > > (* 0 0) =E2=9E=9C 0 > > > but Lisp: > > > (*) =E2=9E=9C 1 > >=20 > > You are conflating elements of zero value with a zero count of elements. > >=20 > > You are not willing to understand. I suspect you also will not believe > > me if I tell you all my dogs have green hair. >=20 > I am very willing to understand. This should not be place of laughing > me out because I keep asking questions. Again: the behaviour of Lisp's + and * is modeled after maths conventions. Assuming you've read both Wikipedia references I linked to you might understand why those conventions "make sense" (no they are not theorems or some such, just conventions, you notice that proofs and formulae are usually simpler). The mathematical things modeled by Lisp's + and * are the summation =CE=A3 and the product =CE=A0. In maths, the empty sum evaluates to 0, the empty product to 1 [1] [2] (for the last one: otherwise this would be at odds that a number raised to the zeroth power also yields 1). So why would Lisp, modeling numbers (roughly) after maths, deviate from math conventions? If you do functional programming, this corresponds nicely to anamorphisms [3]: you have a start value and a two-place funtion and calculate the next "start" value by combininb the old one with the next in the list. For sums, your start value would be zero. For products? Nah :) Cheers [1] "If the summation has no summands, then the evaluated sum is zero, because zero is the identity for addition. This is known as the empty sum." https://en.wikipedia.org/wiki/Sigma_notation#Special_cases [2] "[...] an empty product whose value is 1 -- regardless of the expression for the factors." https://en.wikipedia.org/wiki/Capital-pi_notation#Capital_pi_notation [3] Google called them "reduce" in their "map-reduce" framework, but they try to put their scent on everything. They didn't invent them. Oh, that's the way you can define aggregates in your beloved PostgreSQL, too. https://en.wikipedia.org/wiki/Anamorphism --=20 t --pF7SR6FZOrBumQu+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCY8V/kQAKCRAFyCz1etHa RnP9AJ9g82DCbFnYT28+h9sooipnJlpv7QCeIhLTMmGT40V8Y/oe3ro4SZq4r3M= =glPP -----END PGP SIGNATURE----- --pF7SR6FZOrBumQu+--