From unknown Sun Aug 10 07:13:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20268 <20268@debbugs.gnu.org> To: bug#20268 <20268@debbugs.gnu.org> Subject: Status: 25.0.50; pcase-lambda broken Reply-To: bug#20268 <20268@debbugs.gnu.org> Date: Sun, 10 Aug 2025 14:13:47 +0000 retitle 20268 25.0.50; pcase-lambda broken reassign 20268 emacs submitter 20268 Leo Liu severity 20268 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 07 03:42:53 2015 Received: (at submit) by debbugs.gnu.org; 7 Apr 2015 07:42:53 +0000 Received: from localhost ([127.0.0.1]:46927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfO9t-0008Oz-JB for submit@debbugs.gnu.org; Tue, 07 Apr 2015 03:42:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49284) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfO9r-0008Oo-O7 for submit@debbugs.gnu.org; Tue, 07 Apr 2015 03:42:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfO9l-00008o-IE for submit@debbugs.gnu.org; Tue, 07 Apr 2015 03:42:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfO9l-00008j-Fy for submit@debbugs.gnu.org; Tue, 07 Apr 2015 03:42:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfO9k-00067n-Ng for bug-gnu-emacs@gnu.org; Tue, 07 Apr 2015 03:42:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfO9g-00006w-JO for bug-gnu-emacs@gnu.org; Tue, 07 Apr 2015 03:42:44 -0400 Received: from mail-pd0-x235.google.com ([2607:f8b0:400e:c02::235]:36550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfO9g-00006T-Cb for bug-gnu-emacs@gnu.org; Tue, 07 Apr 2015 03:42:40 -0400 Received: by pdea3 with SMTP id a3so70543103pde.3 for ; Tue, 07 Apr 2015 00:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=FY2fxzkU/r+vIbjEKWPV8pFOWHS9NFlDcc93ql2QbhA=; b=QcsEBR54Eznv0seLTPnGuLGW09xRAAVYa5LpR913U7uYvS2UWFOfjiRlNhqjYZkAwK rpiQDtP5SgmugoNyV2nbzKqjkq3KKW9S5CERigk+BkfzfaEyR+BuA031lhhduXQpfiuT AJRtRnGCKT6Je5jNMvDH1cikiV8DCE3/z85Cq/1UmO0XGOH8bze7gd40g8HKNUFPUX3z 5IHAjcSg80WNd9+rsSybIbL8sNLOjig16XuRrVJM+WDiSttGPirDMCcTTMbEVQHDrMup b3aVDq5poWQT8RWJuGJs+srm55RcuNLgbOL9AhJB/65TXrGFC/mFOPzVzvDRmb0PAlaR hyBg== X-Received: by 10.70.91.225 with SMTP id ch1mr34363581pdb.65.1428392558852; Tue, 07 Apr 2015 00:42:38 -0700 (PDT) Received: from Shidais-iMac.local ([128.199.230.246]) by mx.google.com with ESMTPSA id rt12sm7109196pab.34.2015.04.07.00.42.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2015 00:42:38 -0700 (PDT) From: Leo Liu To: bug-gnu-emacs@gnu.org Subject: 25.0.50; pcase-lambda broken X-Debbugs-CC: Stefan Monnier Date: Tue, 07 Apr 2015 15:42:32 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) After the recent rewrite, pcase-lambda is broken. For example, eval the following to get 46422 instead of the correct value 65535. (cl-some (pcase-lambda (`[fullsweep_after ,v]) v) '([min_bin_vheap_size 46422] [min_heap_size 233] [fullsweep_after 65535] [minor_gcs 40])) Thanks, Leo From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 07 21:01:30 2015 Received: (at 20268) by debbugs.gnu.org; 8 Apr 2015 01:01:30 +0000 Received: from localhost ([127.0.0.1]:48606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfeMz-00033j-NZ for submit@debbugs.gnu.org; Tue, 07 Apr 2015 21:01:30 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:33355) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfeMx-00033V-MI for 20268@debbugs.gnu.org; Tue, 07 Apr 2015 21:01:28 -0400 Received: by pdbnk13 with SMTP id nk13so96788969pdb.0 for <20268@debbugs.gnu.org>; Tue, 07 Apr 2015 18:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Xleu0gW2qi1sZ1RAhkNFTxqyIkAb9siW7+Jkb4dY2Hs=; b=grf/vMORisIxz712tjDPtRbKOBtjz7NqmaAqnU3S58XaNimuO8ZSoSF0n1xOVcZEVO ODOvkhJ17kcvVJ03XVIwtgR15NSlJORcS4YvYpMZ6s7xOVkf+hab8wMRsvZhqR597UKK qZHqYYda81epoeSGf8WzE3Xvj37X5w52fmke5hq5o0/HZChhwF0SS/FSMVrfrPL3jFLL gRexXRnYOQQqaOXSX4JglAHKWeTQhAiZha5bSGkKs06ADMJJptKOaHEkRYb9N36V5kmx lzdlAZvrMjpIW+O+QTO7S4sCZN9ktQ6Kkc/gLNkZH0yahrqsPtj4MaDxJlnWQjI7oYP3 vj9w== X-Received: by 10.70.135.106 with SMTP id pr10mr41153594pdb.156.1428454881618; Tue, 07 Apr 2015 18:01:21 -0700 (PDT) Received: from zeuss-MBP.lan ([128.199.230.246]) by mx.google.com with ESMTPSA id fm3sm9329521pdb.73.2015.04.07.18.01.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2015 18:01:20 -0700 (PDT) From: Leo Liu To: 20268@debbugs.gnu.org Subject: Re: bug#20268: 25.0.50; pcase-lambda broken References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUKDAg1NjRWV1V9fnyg op/DxcLk5uP8/voi63ReAAAACXBIWXMAAAWJAAAFiQFtaJ36AAAAB3RJTUUH1goZAgAz00bgXgAA AeVJREFUKM9lk0Fz2jAQhQXJD3CCO70CmcC1YMtcWyTZ14Bl69xats4N9r6/3zWQBlodNKNPu/s0 b1cCQFuZGpfVVh3vAvBJolIXRkapSuoRUtIdFyo1Y5xSdlAj7OtvD1XnXxmWRi+eWgcxyCed1lVV B1CrKyujMoi+eLA5kU1SsjoHlW+nQjTtFxk4MXgrOxvIqzoTZR8XgPaLl419zgsMaSGFPiUOZCIh thsx5Xy9NsK8Kwf/JoQgMxcVJ301HKkcSWaT0O7FY056J4U9xcYfnmVXG4801lW6lqwu2nKFZoHC HuzvaTVndZ+LaRQgZdthXw1cpynEkLEwyFHXk/aIxNQ6QeooJuzPMB+wn+D7JJNsiCcVA13/A3h/ xE9J+WidpAwoYNmRFwyvSRhNVtsdaAewzZZP5uw82QL9+tyNfocyP0McAzICUr5Mk9RdIjWasUNx aIIt6NK4ZtXIMdfMQt3nuMAyWbLI4DqZ4xPq/ag8jPond4XU/cLuOgw6XCFX/YCUfcDAMMH58fD4 G9kDchwfqVefkBwup2uZM+Q4WhJt5jN3AxXCsaS2yXEDuWgS8VOzW0gFjhEPmLyFMKBFaLb1HRwc DiaKwx0EeTMRYnYPQRW3PP4HApvlMv0PttX5v/D6Aws3IOSEwzmLAAAAAElFTkSuQmCC Date: Wed, 08 Apr 2015 09:01:13 +0800 In-Reply-To: (Leo Liu's message of "Tue, 07 Apr 2015 15:42:32 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (OS X 10.10.2) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20268 Cc: Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Forgive me to rely here. None of our messages shown up in bug#19670. > After recent rewrite of pcase-lambda I am seeing: > (cl-some (pcase-lambda (`[fullsweep_after ,v]) v) > '([min_bin_vheap_size 46422] > [min_heap_size 233] > [fullsweep_after 65535] > > [minor_gcs 10])) > > Indeed, that's the semantics I chose. > The previous semantics was for the function to do nothing and return nil > if the arg doesn't match. The new semantics is the same as the one used > by pcase-let. It's not without its fault of course, but at least it does > correspond to the usual idea of "destructuring" and generates more > efficient code. I don't mind new semantics but I want to make sense of it so as to use it with confidence. What I am seeing is: (funcall (pcase-lambda (`[fullsweep_after ,v]) v) [min_bin_vheap_size 46422]) => 46422 That doesn't make sense to me. Could you explain why this is the right thing? > I think if you prefer to return nil, then the macro should look like > (pcase-lambda ((`[fullsweep_after ,v]) v)) > which would then naturally let you add additional cases like > (pcase-lambda ((`[fullsweep_after ,v]) v) > ((`[min_heap_size ,v]) (/ v 2))) I didn't choose the multiple-clause version because it is a cheap shortcut for (lambda (...) (pcase ... ...)). The single-clause pcase-lambda makes a lot of higher-order functions fun to use and that is where I am reaping the benefits. > Admittedly, for the current pcase-lambda (and pcase-let) macro, the > pcase.el code should be refined so as to emit a warning when it ends up > ignoring a constant like `fullsweep_after' above. Yes, I am having a lot of trouble understanding and using pcase-let* except for trivial cases. I don't want the same thing to happen to pcase-lambda. > Stefan Thanks, Leo From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 07 22:14:37 2015 Received: (at 20268) by debbugs.gnu.org; 8 Apr 2015 02:14:37 +0000 Received: from localhost ([127.0.0.1]:48629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YffVk-0004oj-T8 for submit@debbugs.gnu.org; Tue, 07 Apr 2015 22:14:37 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:42987) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YffVj-0004oV-50 for 20268@debbugs.gnu.org; Tue, 07 Apr 2015 22:14:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnEFAGvvdVRBbthL/2dsb2JhbAA3gVOfQYIugQiBdQEBBAFWIwULCw4mEhQYDSSIE6IRjGQMA4M+A4NwBKg7 X-IPAS-Result: AnEFAGvvdVRBbthL/2dsb2JhbAA3gVOfQYIugQiBdQEBBAFWIwULCw4mEhQYDSSIE6IRjGQMA4M+A4NwBKg7 X-IronPort-AV: E=Sophos;i="5.01,1,1400040000"; d="scan'208";a="115665573" Received: from 65-110-216-75.cpe.pppoe.ca (HELO pastel.home) ([65.110.216.75]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Apr 2015 22:14:29 -0400 Received: by pastel.home (Postfix, from userid 20848) id A335A1209; Tue, 7 Apr 2015 22:14:29 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#20268: 25.0.50; pcase-lambda broken Message-ID: References: Date: Tue, 07 Apr 2015 22:14:29 -0400 In-Reply-To: (Leo Liu's message of "Tue, 07 Apr 2015 15:42:32 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 20268 Cc: 20268@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > After the recent rewrite, pcase-lambda is broken. For example, eval the > following to get 46422 instead of the correct value 65535. > (cl-some (pcase-lambda (`[fullsweep_after ,v]) v) > '([min_bin_vheap_size 46422] > [min_heap_size 233] > [fullsweep_after 65535] > [minor_gcs 40])) Indeed, that's the semantics I chose. The previous semantics was for the function to do nothing and return nil if the arg doesn't match. The new semantics is the same as the one used by pcase-let. It's not without its fault of course, but at least it does correspond to the usual idea of "destructuring" and generates more efficient code. I think if you prefer to return nil, then the macro should look like (pcase-lambda ((`[fullsweep_after ,v]) v)) which would then naturally let you add additional cases like (pcase-lambda ((`[fullsweep_after ,v]) v) ((`[min_heap_size ,v]) (/ v 2))) Admittedly, for the current pcase-lambda (and pcase-let) macro, the pcase.el code should be refined so as to emit a warning when it ends up ignoring a constant like `fullsweep_after' above. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 09:23:22 2015 Received: (at submit) by debbugs.gnu.org; 8 Apr 2015 13:23:22 +0000 Received: from localhost ([127.0.0.1]:48923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfpwv-0007Ui-D0 for submit@debbugs.gnu.org; Wed, 08 Apr 2015 09:23:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44118) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfpws-0007US-OY for submit@debbugs.gnu.org; Wed, 08 Apr 2015 09:23:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yfpwj-0002nO-Na for submit@debbugs.gnu.org; Wed, 08 Apr 2015 09:23:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:37301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfpwj-0002nK-KC for submit@debbugs.gnu.org; Wed, 08 Apr 2015 09:23:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfpwi-0004Df-IA for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2015 09:23:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yfpwb-0002lb-2H for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2015 09:23:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:34382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfpwa-0002l7-RO for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2015 09:23:00 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YfpwW-0001kf-DM for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2015 15:22:56 +0200 Received: from uk.solarflare.com ([193.34.186.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Apr 2015 15:22:56 +0200 Received: from andrewjmoreton by uk.solarflare.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Apr 2015 15:22:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Andy Moreton Subject: Re: bug#20268: 25.0.50; pcase-lambda broken Date: Wed, 08 Apr 2015 14:22:46 +0100 Lines: 40 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: uk.solarflare.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) Cancel-Lock: sha1:d+CmCwakud96v1rpRj0cy+y8byk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) On Tue 07 Apr 2015, Stefan Monnier wrote: >> After the recent rewrite, pcase-lambda is broken. For example, eval the >> following to get 46422 instead of the correct value 65535. > >> (cl-some (pcase-lambda (`[fullsweep_after ,v]) v) >> '([min_bin_vheap_size 46422] >> [min_heap_size 233] >> [fullsweep_after 65535] >> [minor_gcs 40])) > > Indeed, that's the semantics I chose. > The previous semantics was for the function to do nothing and return nil > if the arg doesn't match. The new semantics is the same as the one used > by pcase-let. It's not without its fault of course, but at least it does > correspond to the usual idea of "destructuring" and generates more > efficient code. Please improve the documentation for the pcase macros: a) The elisp manual has reference documentation for pcase, but it is confusing and short on examples. The first example would be clearer if it was more like the second example, by showing some example forms that invoke pcase and the result of evaluating them. The description would flow more logically if the second example followed the reference that describes the allowed patterns, and included an example of each type of pattern. b) Add meaningful help strings for pcase-lambda, pcase-let* and pcase-let. The existing help strings all say that these constructs are "the same as another thing only different" which only serves to obscure what they do. A user should be able to discern what the interface contract is without reading the implementation. A short motivating example for each macro would be helpful. These improvements would make code using the pcase macros more readable, and aid understanding of the intended semantics. AndyM From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 10:36:09 2015 Received: (at 20268) by debbugs.gnu.org; 8 Apr 2015 14:36:09 +0000 Received: from localhost ([127.0.0.1]:49254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfr5J-0000rS-3K for submit@debbugs.gnu.org; Wed, 08 Apr 2015 10:36:09 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:63680) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfr5D-0000qu-2F for 20268@debbugs.gnu.org; Wed, 08 Apr 2015 10:36:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnEFAGvvdVRBbthL/2dsb2JhbAA3gVOfQYIugQiBdQEBBAFWIwULCw4mEhQYDSSIE6IRi3YKDBENOgkDA4M+A4NwBKg7 X-IPAS-Result: AnEFAGvvdVRBbthL/2dsb2JhbAA3gVOfQYIugQiBdQEBBAFWIwULCw4mEhQYDSSIE6IRi3YKDBENOgkDA4M+A4NwBKg7 X-IronPort-AV: E=Sophos;i="5.01,1,1400040000"; d="scan'208";a="115708029" Received: from 65-110-216-75.cpe.pppoe.ca (HELO pastel.home) ([65.110.216.75]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Apr 2015 10:35:53 -0400 Received: by pastel.home (Postfix, from userid 20848) id 6D9791FC7; Wed, 8 Apr 2015 10:35:53 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#20268: 25.0.50; pcase-lambda broken Message-ID: References: Date: Wed, 08 Apr 2015 10:35:53 -0400 In-Reply-To: (Leo Liu's message of "Wed, 08 Apr 2015 09:01:13 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 20268 Cc: 20268@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I don't mind new semantics but I want to make sense of it so as to use > it with confidence. What I am seeing is: > (funcall (pcase-lambda (`[fullsweep_after ,v]) v) [min_bin_vheap_size 46422]) When destructuring (as opposed to performing case-analysis), pcase.el takes as a given that the pattern does match, so the pattern is basically only used to decide from where to extract the information to bind the variables. So the following patterns are equivalent: `[fullsweep_after ,v] `[,_ ,v] `[,(pred foo) ,v] If you want to test that the pattern matches, that means someone needs to decide what happens when the pattern doesn't match. The previous behavior was to "do nothing and return nil", which is too arbitrary for my taste, so if you want that, you need to write it (lambda (x) (pcase (`[fullsweep_after ,v] v))) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 11:08:48 2015 Received: (at 20268) by debbugs.gnu.org; 8 Apr 2015 15:08:48 +0000 Received: from localhost ([127.0.0.1]:49309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfray-00038s-0T for submit@debbugs.gnu.org; Wed, 08 Apr 2015 11:08:48 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:33551) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfrar-00038a-SU for 20268@debbugs.gnu.org; Wed, 08 Apr 2015 11:08:46 -0400 Received: by wiax7 with SMTP id x7so35299351wia.0 for <20268@debbugs.gnu.org>; Wed, 08 Apr 2015 08:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=947KW7qPNmlhUkOnUGIRXg7jV2pVuQsYu8yG01v1ve0=; b=VBhIrLpC7rDWZAlv7cdej2jLc7YRwE3LiZjKcZ1pB00Na6vRozQDDt2LSIewO96qMW d+nzEU89UIxfDgkQGNKnDjimNgMEBh0QC9JezHYl9toJqaqqzKifYC9rM6Gs2rHTyxDj 2DwrPHIiyVl68CpwD0qZNiWhXmQ9VEnRGaz3V5D4Vz800j0DcO114zr5DdqhLN6t5Kpg qc2UMaeE5GwNaiZZ29xJWivopjYhZtr/50hpP4ENof0NHLkIxJfv5lszkyNOqLfuk/Fb z8XkAZnfOL5dwI9GYwOwC23vLNGVaqknWN8ETNhnTYSWEfOzaXcbKtoZrHmq9NQteaUJ lELQ== X-Received: by 10.194.19.166 with SMTP id g6mr51725882wje.150.1428505716328; Wed, 08 Apr 2015 08:08:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Philipp Stephani Date: Wed, 08 Apr 2015 15:08:36 +0000 Message-ID: Subject: Re: bug#20268: 25.0.50; pcase-lambda broken To: Stefan Monnier , Leo Liu Content-Type: multipart/alternative; boundary=047d7b3a8b34c8105b051337e7f4 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 20268 Cc: 20268@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --047d7b3a8b34c8105b051337e7f4 Content-Type: text/plain; charset=UTF-8 Stefan Monnier schrieb am Mi., 8. Apr. 2015 um 04:15 Uhr: > > After the recent rewrite, pcase-lambda is broken. For example, eval the > > following to get 46422 instead of the correct value 65535. > > > (cl-some (pcase-lambda (`[fullsweep_after ,v]) v) > > '([min_bin_vheap_size 46422] > > [min_heap_size 233] > > [fullsweep_after 65535] > > [minor_gcs 40])) > > Indeed, that's the semantics I chose. > The previous semantics was for the function to do nothing and return nil > if the arg doesn't match. The new semantics is the same as the one used > by pcase-let. It's not without its fault of course, but at least it does > correspond to the usual idea of "destructuring" and generates more > efficient code. > > I think if you prefer to return nil, then the macro should look like > > (pcase-lambda ((`[fullsweep_after ,v]) v)) > > which would then naturally let you add additional cases like > > (pcase-lambda ((`[fullsweep_after ,v]) v) > ((`[min_heap_size ,v]) (/ v 2))) > > Admittedly, for the current pcase-lambda (and pcase-let) macro, the > pcase.el code should be refined so as to emit a warning when it ends up > ignoring a constant like `fullsweep_after' above. > > Why not raise an error instead if there is no match (or even if any quoted or self-quoting expressions are used at all)? The current behavior is quite confusing, and warnings tend to be ignored. Given that pcase-let, pcase-lambda and pcase-dolist don't do any case-by-case analysis, maybe they should even be renamed and moved out of pcase.el. --047d7b3a8b34c8105b051337e7f4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Stefan Monnier <monnier@iro.umontreal.ca> sc= hrieb am Mi., 8. Apr. 2015 um 04:15=C2=A0Uhr:
> After the recent rewrite, pcase-lambda is broken. For example, ev= al the
> following to get 46422 instead of the correct value 65535.

>=C2=A0 =C2=A0 (cl-some (pcase-lambda (`[fullsweep_after ,v]) v)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'([min_bin_vheap_si= ze 46422]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[min_heap_size 2= 33]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[fullsweep_after= 65535]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[minor_gcs 40]))=

Indeed, that's the semantics I chose.
The previous semantics was for the function to do nothing and return nil if the arg doesn't match.=C2=A0 The new semantics is the same as the on= e used
by pcase-let.=C2=A0 It's not without its fault of course, but at least = it does
correspond to the usual idea of "destructuring" and generates mor= e
efficient code.

I think if you prefer to return nil, then the macro should look like

=C2=A0 =C2=A0(pcase-lambda ((`[fullsweep_after ,v]) v))

which would then naturally let you add additional cases like

=C2=A0 =C2=A0(pcase-lambda ((`[fullsweep_after ,v]) v)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((`[min_heap_= size ,v]) (/ v 2)))

Admittedly, for the current pcase-lambda (and pcase-let) macro, the
pcase.el code should be refined so as to emit a warning when it ends up
ignoring a constant like `fullsweep_after' above.


Why not raise an error instead if there is= no match (or even if any quoted or self-quoting expressions are used at al= l)? The current behavior is quite confusing, and warnings tend to be ignore= d.=C2=A0

Given that pcase-let, pcase-lambda and pc= ase-dolist don't do any case-by-case analysis, maybe they should even b= e renamed and moved out of pcase.el.
--047d7b3a8b34c8105b051337e7f4-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 15:26:02 2015 Received: (at 20268) by debbugs.gnu.org; 8 Apr 2015 19:26:02 +0000 Received: from localhost ([127.0.0.1]:49501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfvbt-0000p1-JK for submit@debbugs.gnu.org; Wed, 08 Apr 2015 15:26:01 -0400 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:47007) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfvbs-0000ot-4f for 20268@debbugs.gnu.org; Wed, 08 Apr 2015 15:26:00 -0400 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id C35C59C128; Wed, 8 Apr 2015 15:25:59 -0400 (EDT) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id D9A2E1E5B8C; Wed, 8 Apr 2015 15:25:36 -0400 (EDT) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id BB6FCB4122; Wed, 8 Apr 2015 15:25:36 -0400 (EDT) From: Stefan Monnier To: Philipp Stephani Subject: Re: bug#20268: 25.0.50; pcase-lambda broken Message-ID: References: Date: Wed, 08 Apr 2015 15:25:36 -0400 In-Reply-To: (Philipp Stephani's message of "Wed, 08 Apr 2015 15:08:36 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20268 Cc: Leo Liu , 20268@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > Why not raise an error instead if there is no match That would be an acceptable semantics, yes. I happen to dislike it because of the performance cost, where in most use-cases you know the pattern will match and just want to replace a bunch of car/cdr/aref with a single pattern. I.e. the code you'd have written without pcase-let would have been (let ((a (foo)) (b (car foo)) (c (nth 2 foo))) which would naturally turn into a pattern like `(,b ,_ ,c) but if you want to signal an error when the pattern fails to match, then you get 3 additional consp tests plus a null test, at which point the performance impact can become noticeable. You can get rid of the null test with a pattern like `(,b ,_ ,c . ,_) but you can't get rid of the 3 consp tests. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 16:32:04 2015 Received: (at 20268) by debbugs.gnu.org; 8 Apr 2015 20:32:04 +0000 Received: from localhost ([127.0.0.1]:49556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfwdn-0003tB-Qg for submit@debbugs.gnu.org; Wed, 08 Apr 2015 16:32:04 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:35731) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfwdm-0003sh-D6 for 20268@debbugs.gnu.org; Wed, 08 Apr 2015 16:32:02 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t38KVtHq008579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Apr 2015 20:31:56 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t38KVtsS023688 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 8 Apr 2015 20:31:55 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t38KVt4C028875; Wed, 8 Apr 2015 20:31:55 GMT MIME-Version: 1.0 Message-ID: <6814e575-e76b-4ef5-92a5-ce2c947beeb6@default> Date: Wed, 8 Apr 2015 13:31:55 -0700 (PDT) From: Drew Adams To: Stefan Monnier , Philipp Stephani Subject: RE: bug#20268: 25.0.50; pcase-lambda broken References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20268 Cc: Leo Liu , 20268@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > I.e. the code you'd have written without pcase-let would have been >=20 > (let ((a (foo)) > (b (car foo)) > (c (nth 2 foo))) >=20 > which would naturally turn into a pattern like `(,b ,_ ,c) Just out of curiosity, what was the reason we didn't go in the direction of Common Lisp's `destructuring-bind' etc., which would let you write just (a b c) instead of `(,b ,_ ,c)? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 17:29:27 2015 Received: (at 20268) by debbugs.gnu.org; 8 Apr 2015 21:29:27 +0000 Received: from localhost ([127.0.0.1]:49581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfxXK-0005EW-NM for submit@debbugs.gnu.org; Wed, 08 Apr 2015 17:29:27 -0400 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:35130) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfxXI-0005EO-KB for 20268@debbugs.gnu.org; Wed, 08 Apr 2015 17:29:24 -0400 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 788AD86076; Wed, 8 Apr 2015 17:29:24 -0400 (EDT) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 5C13D1E5B8C; Wed, 8 Apr 2015 17:29:01 -0400 (EDT) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id 417CBB4122; Wed, 8 Apr 2015 17:29:01 -0400 (EDT) From: Stefan Monnier To: Drew Adams Subject: Re: bug#20268: 25.0.50; pcase-lambda broken Message-ID: References: <6814e575-e76b-4ef5-92a5-ce2c947beeb6@default> Date: Wed, 08 Apr 2015 17:29:01 -0400 In-Reply-To: <6814e575-e76b-4ef5-92a5-ce2c947beeb6@default> (Drew Adams's message of "Wed, 8 Apr 2015 13:31:55 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20268 Cc: Philipp Stephani , Leo Liu , 20268@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > Just out of curiosity, what was the reason we didn't go in the > direction of Common Lisp's `destructuring-bind' etc., which would > let you write just (a b c) instead of `(,b ,_ ,c)? For example because it doesn't let you write (pcase-let ((cl-struct mytype slot1 slot3) (myexp)) ...) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 18:21:22 2015 Received: (at 20268) by debbugs.gnu.org; 8 Apr 2015 22:21:22 +0000 Received: from localhost ([127.0.0.1]:49605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfyLZ-0006SN-MP for submit@debbugs.gnu.org; Wed, 08 Apr 2015 18:21:21 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:37223) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YfyLX-0006SA-RD for 20268@debbugs.gnu.org; Wed, 08 Apr 2015 18:21:20 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t38MLCDW017328 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Apr 2015 22:21:12 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t38MLAxD027061 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 8 Apr 2015 22:21:10 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t38MLASa007739; Wed, 8 Apr 2015 22:21:10 GMT MIME-Version: 1.0 Message-ID: Date: Wed, 8 Apr 2015 15:21:10 -0700 (PDT) From: Drew Adams To: Stefan Monnier Subject: RE: bug#20268: 25.0.50; pcase-lambda broken References: <6814e575-e76b-4ef5-92a5-ce2c947beeb6@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20268 Cc: Philipp Stephani , Leo Liu , 20268@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > Just out of curiosity, what was the reason we didn't go in the > > direction of Common Lisp's `destructuring-bind' etc., which would > > let you write just (a b c) instead of `(,b ,_ ,c)? >=20 > For example because it doesn't let you write > (pcase-let ((cl-struct mytype slot1 slot3) (myexp)) ...) What part of "go in the direction of Common Lisp's `destructuring-bind' etc." implies that you cannot go beyond it to support that kind of thing? From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 08 02:52:21 2022 Received: (at 20268) by debbugs.gnu.org; 8 Feb 2022 07:52:21 +0000 Received: from localhost ([127.0.0.1]:45088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHLIS-0005m4-VF for submit@debbugs.gnu.org; Tue, 08 Feb 2022 02:52:21 -0500 Received: from quimby.gnus.org ([95.216.78.240]:49306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHLIQ-0005lm-8q for 20268@debbugs.gnu.org; Tue, 08 Feb 2022 02:52:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From: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=nvZGpxx3LajAhYCWkhAfcazAyfSe9cNg1qYnofU6S2w=; b=F4/O9nOTVFgT1vr3Kh9Zw1KZgB qrxcmDXUeixe2WoVgUlhMM3xtQGZTalnvic5MXO3FGAzArRhAEHxob18cLcxgUAYV72TT2Bv5Yur+ KxNb4KSX3phjCNBirXTS5nmuDh0zveeldSxWCewNRubL8/Mav9YXLTxlXYfe2DiHJjlQ=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHLIF-0002UV-F3; Tue, 08 Feb 2022 08:52:10 +0100 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#20268: 25.0.50; pcase-lambda broken References: X-Now-Playing: Melanie de Biasio's _No Deal remixed_: "Sweet Darling Pain (Chassol Remix)" Date: Tue, 08 Feb 2022 08:52:05 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 07 Apr 2015 22:14:29 -0400") Message-ID: <87v8xpre1m.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: >> After the recent rewrite, pcase-lambda is broken. For example, eval the >> following to get 46422 instead of the correct value 65535. > >> (cl-some (pcase-lambda (`[fullsweep_after ,v]) v) >> '([mi [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20268 Cc: Leo Liu , 20268@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier writes: >> After the recent rewrite, pcase-lambda is broken. For example, eval the >> following to get 46422 instead of the correct value 65535. > >> (cl-some (pcase-lambda (`[fullsweep_after ,v]) v) >> '([min_bin_vheap_size 46422] >> [min_heap_size 233] >> [fullsweep_after 65535] >> [minor_gcs 40])) > > Indeed, that's the semantics I chose. So I think everything here works as designed, and I'm therefore closing this bug report. I see that pcase-lambda wasn't documented in the manual, so I've now done so in Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 08 02:52:24 2022 Received: (at control) by debbugs.gnu.org; 8 Feb 2022 07:52:24 +0000 Received: from localhost ([127.0.0.1]:45091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHLIW-0005mJ-5g for submit@debbugs.gnu.org; Tue, 08 Feb 2022 02:52:24 -0500 Received: from quimby.gnus.org ([95.216.78.240]:49322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHLIU-0005lv-Qk for control@debbugs.gnu.org; Tue, 08 Feb 2022 02:52:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=808itFBm2xcs7f8FAH2Jn7RzhKdelRz7B9G/YFQuHdA=; b=sidPRnvTWXo7xzMyuWX0jnyH6h etGUK/MIGaqlnTYyTJ+BdVIMs/O3Uu9NOFhnobtiu9jn5nrklfQDXxhdTmEU2J3nZ6Ne/K+ddZ+YQ 8rMQHF76V/YuuqngvzJ8bNYaItUc6RKfCwef+37mAO2gWzxbnE5C+5zoKm4OzN2Eqa9w=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHLIM-0002Ue-GL for control@debbugs.gnu.org; Tue, 08 Feb 2022 08:52:16 +0100 Date: Tue, 08 Feb 2022 08:52:12 +0100 Message-Id: <87tud9re1f.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #20268 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 20268 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 20268 29.1 quit From unknown Sun Aug 10 07:13:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 08 Mar 2022 12:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator