From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Code for cond* Date: Wed, 24 Jan 2024 19:12:03 +0000 Message-ID: References: <877ck7me2z.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4046"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emanuel Berg , emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 24 20:12:48 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 1rSig4-0000rZ-9q for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Jan 2024 20:12:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSifU-0005xT-8K; Wed, 24 Jan 2024 14:12:12 -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 1rSifR-0005ws-TQ for emacs-devel@gnu.org; Wed, 24 Jan 2024 14:12:09 -0500 Original-Received: from mail.muc.de ([193.149.48.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSifP-0003Kt-La for emacs-devel@gnu.org; Wed, 24 Jan 2024 14:12:09 -0500 Original-Received: (qmail 1842 invoked by uid 3782); 24 Jan 2024 20:12:04 +0100 Original-Received: from acm.muc.de (p4fe15939.dip0.t-ipconnect.de [79.225.89.57]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 24 Jan 2024 20:12:03 +0100 Original-Received: (qmail 10770 invoked by uid 1000); 24 Jan 2024 19:12:03 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.3; envelope-from=acm@muc.de; helo=mail.muc.de 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, 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: 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:315331 Archived-At: Hello, Richard. On Fri, Jan 19, 2024 at 22:39:39 -0500, Richard Stallman wrote: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > Thanks. I fixed the bugs you mentioned; elint did not show any > others. I always ran it interpreted to facilitate debugging, so I had > never compiled it. > Here is the new version. > To test it thoroughly is more that I can try to do. Could people please > try using cond*? I've read the code, briefly, and there're one or two things I'd like to comment on. In cond*-convert-condition, in > (if uncondit-clauses > ;; bind* starts a non-exit clause. > ;; Run the TRUE-EXPS. > ;; Then always go on to run the UNCONDIT-CLAUSES. > `(progn > (if ,last-value > (let* ,(cdr condition) > . ,true-exps)) > (let* ,(cdr condition) > ,(cond*-convert uncondit-clauses))) , in the generated code, the form (let* ,(cdr condition) ...) sometimes gets evaluated twice. Surely this is a Bad Thing. Or am I missing something? In cond*-match, you use gensyms. I've not spent enough time understanding the code, but would it be possible, somehow, to avoid these? The gensyms in pcase make the macro expanded code hard to read. There one frequently has to distinguish between x293, x295, x296, .... These symbols have no obvious relationship to the original code. Worse, they're not repeatable; because of the way gensym works, what was x293 last time will be x352 next time around, making it difficult to compare two expansions. > -- > Dr Richard Stallman (https://stallman.org) > Chief GNUisance of the GNU Project (https://gnu.org) > Founder, Free Software Foundation (https://fsf.org) > Internet Hall-of-Famer (https://internethalloffame.org) -- Alan Mackenzie (Nuremberg, Germany).