From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: lexicographic list comparison Date: Mon, 12 Sep 2022 14:35:00 -0400 Message-ID: References: Reply-To: sds@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="6087"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) To: emacs-devel@gnu.org, mattiase@acm.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 12 20:36:13 2022 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 1oXoI0-0001KV-DC for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Sep 2022 20:36:12 +0200 Original-Received: from localhost ([::1]:56210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXoHz-0005kq-GC for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Sep 2022 14:36:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXoGw-0004ua-Uz for emacs-devel@gnu.org; Mon, 12 Sep 2022 14:35:06 -0400 Original-Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]:45773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXoGt-0000Hz-Ki; Mon, 12 Sep 2022 14:35:05 -0400 Original-Received: by mail-qt1-x82a.google.com with SMTP id r20so6215482qtn.12; Mon, 12 Sep 2022 11:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:mail-followup-to:reply-to :return-receipt-to:user-agent:references:in-reply-to:subject:to:from :sender:from:to:cc:subject:date; bh=TTE3SllG3nAIAd0wxHzlC6EM+BLBnHjL66Wgpduw6zw=; b=bNWOcBg+jjEi+1dXM4YQx7b04ShFRXpaZC3SQEduF/GxQnJEQwPCovOjzJil8hnxv9 +smfcoVyM/xe3eqST+2Ja/zoyBMOp6iLERvc5vb/BThsGHV6CYrj976wzWCZeVZLHt/M AWoGd/x8qaxBp0DpVb0d73wWEMQqKnMHvxNlVEUg50mItHfcid3vAKkAQA1BbfT5EtoX JDGvncMZXRV6pnaQl7/3wNeLxDy5yGq6JjKW89pjfKRsxCGD3EbzMbCr2YHzOOpDiyYP sIyF+XFxNEQblnNV0W1zBlfzIknPxRr5mCsU6smRztCwaN1Fk5FSrDSPeMb7nwPMhcoV pfRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:mail-followup-to:reply-to :return-receipt-to:user-agent:references:in-reply-to:subject:to:from :sender:x-gm-message-state:from:to:cc:subject:date; bh=TTE3SllG3nAIAd0wxHzlC6EM+BLBnHjL66Wgpduw6zw=; b=N33RGFW4ehMj/Y4KvJ5YqnffQJ4EaUJ1NTG3MoC22LiWZ2IgOiGdhhPTp3B/89rEla Ptqw1ndAP046hvz+ApCkfxDkd2k3h5VYa+QN/a/Wj+JJpNPp2P2kF1Gp4uS6dluQpjCG 3fICj2NBRiPnjIKy+LlLNz0p8ZTIz469mX3L9nxX3fEgUysEvafEwMal2Skp0G+r9bwf ecsjt3oD+MgHzOEo3dqNUbhOcHDgKtoCk3iS/dbZWYNlc52TMGwNKpZvXP3NOOJT65BW UVOfVxYDESMz+cBX9iE5KCJje2Tgd5Hkkq+VvjVDutxEFjj3dD5xYIyc3jPgo7WYUHWB /cuA== X-Gm-Message-State: ACgBeo0IRQ1UbD4S0xfK6ekT0aAxrHW8PuQOpJ3xnha6jIBVrolj71G+ z89V0PgA6fQwwXOwK8aTXEheIaQE4J7l X-Google-Smtp-Source: AA6agR7SNfjCf6JgKXiTr8XKse8frF9f41eEdAHP0qYwHK97dg2BtQ2Jg4bNEjGMB3uZZ9vIgoaKHA== X-Received: by 2002:a05:622a:5cb:b0:344:551a:c804 with SMTP id d11-20020a05622a05cb00b00344551ac804mr24393541qtb.645.1663007701656; Mon, 12 Sep 2022 11:35:01 -0700 (PDT) Original-Received: from 3c22fb11fdab.ant.amazon.com (pool-108-30-23-113.nycmny.fios.verizon.net. [108.30.23.113]) by smtp.gmail.com with ESMTPSA id o11-20020a05620a2a0b00b006b5df4d2c81sm8334242qkp.94.2022.09.12.11.35.01 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Sep 2022 11:35:01 -0700 (PDT) In-Reply-To: (mattiase@acm.org's message of "Mon, 12 Sep 2022 19:53:42 +0200") X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Mail-Followup-To: emacs-devel@gnu.org, mattiase@acm.org Received-SPF: pass client-ip=2607:f8b0:4864:20::82a; envelope-from=sam.steingold@gmail.com; helo=mail-qt1-x82a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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" Xref: news.gmane.io gmane.emacs.devel:295217 Archived-At: > * [2022-09-12 19:53:42 +0200]: > > 12 sep. 2022 kl. 16.45 skrev Sam Steingold : > >> okay, so, I suppose, you find the `lexicographic-compare-lists' from TS >> useful, right? > > (What is TS in this context?) TS=topic start (the initial message in the thread) > I usually just copy-paste code from an older project of mine (who > doesn't?) because that way I know that it works, how it works, what > its performance is like, etc. I abhor code copying. If I find that I reuse a function, I put it into a library. >> I certainly have no intention of comparing strings with numbers &c. >> My question was about a list of _homogeneous_ lists, and comparing to, >> say, lists of numbers, is done lexicographically based on number >> comparison. > > We could certainly add comparison functions for lists, then ones for > arrays, nah, all sequences are compared the same way. > then for hash tables, and so on. > Or just write one that works for all built-in types and impose an > ordering between objects of distinct types. It would be more useful > (if harder to write). I seriously doubt this could be useful. -- Sam Steingold (https://aphar.dreamwidth.org/) on darwin Ns 10.3.2113 https://lastingimpactpsychology.com https://steingoldpsychology.com https://iris.org.il https://ij.org/ https://jij.org https://camera.org Calculus has its limits.