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 10:45:06 -0400 Message-ID: References: Reply-To: sds@gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27080"; 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, Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 12 16:46:24 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 1oXkhc-0006pY-Ak for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Sep 2022 16:46:24 +0200 Original-Received: from localhost ([::1]:35102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXkhb-0001XC-Am for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Sep 2022 10:46:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXkgS-0000Dw-VW for emacs-devel@gnu.org; Mon, 12 Sep 2022 10:45:14 -0400 Original-Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:42956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXkgP-0003l8-D0; Mon, 12 Sep 2022 10:45:10 -0400 Original-Received: by mail-qk1-x72d.google.com with SMTP id d15so6139169qka.9; Mon, 12 Sep 2022 07:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding: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=vgp/FQS/33njH5aMW2uykvMXGyNV7fp8HmG8AQLR3jo=; b=fdiII3PjOptKkvWsMHQzrFsqkkqeIIQgNIR0JS4YL53YrDvft7tFRXVIdvUT9N/7+T OJ1iwqBglXJwrhuxyWKgroAEnm5X3bP0Goa1ILhP/vMwbryThGbbkbcaN6d19hYFVS1r wRCzS0QMpjbtPRrxBtVztOh1uLl1mZeDl9JkQcOYtkKR3rt9FfSSwNgjodrbegXEQfUh U/kcg8CIootdBYCwQcf3HcUvAIt944CmQDqWroADekJPbxnPiGv7BLDiDTI0OqlxnuPB 4I89Ts1YyJu2HUnpfAPHh7+ZphDXirRhzgIFR5WHSudMZY7f4od+YXaIbIQ+dxJESGBA /GCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=vgp/FQS/33njH5aMW2uykvMXGyNV7fp8HmG8AQLR3jo=; b=mH9QKHzPyI7rjgQifCGwNsU31i54O4YxGziRVOd8JG137mfTS50iY+qGlHtN65q/Oe C5VVWpSJEDQKyq+z6cm2fVa/DxYqSTsa/6mbC9mFnZJpFeQznBmLeP7fLtiRPUiIPZbQ waOy9uJqzi9bGAZJg0XbYWlIYnBDy8ofh3OD5FjryzRzF4zMsKrcVnRRH9bnY2ed11rs C/CWA4ZB9n0tJWaNGQF79FkFMIYv6oacSzgrJvcTF1PkOPo+muKxxpC7Sk+abzMPZtbn pD3M8zblFPX46AndnT+zMds/iiskhtauQKBSHkjtL+JwTJ2CCjqCvcthbhXpyqkCoZfE 6jWw== X-Gm-Message-State: ACgBeo2dhHh6RyTHnA5P6h/mG+1gNdWxYPLK5Z+z+5r97TRHjO3NrukY NKklfWfbGbwEtULSt8vf/R6mSmaqJQCS X-Google-Smtp-Source: AA6agR57c5o7rPtERajsnV0rB/2c7GudQ5u6uqXxR3JKUXUfTyUMnCBLAks2YltKy77+Qt9cspBoiQ== X-Received: by 2002:a05:620a:134d:b0:6cb:c03d:dbd3 with SMTP id c13-20020a05620a134d00b006cbc03ddbd3mr14314555qkl.447.1662993907763; Mon, 12 Sep 2022 07:45:07 -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 bp11-20020a05622a1b8b00b0031f36cd1958sm7066105qtb.81.2022.09.12.07.45.06 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Sep 2022 07:45:07 -0700 (PDT) In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Sat, 10 Sep 2022 11:07:49 +0200") X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. Mail-Followup-To: emacs-devel@gnu.org, Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=sam.steingold@gmail.com; helo=mail-qk1-x72d.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:295209 Archived-At: > * Mattias Engdeg=C3=A5rd [2022-09-10 11:07:49 +0200]: > > 9 sep. 2022 kl. 21.27 skrev Sam Steingold : > >> What do you do when sorting a list of lists of numbers? > > Sigh deeply and write ad-hoc code for the nth time. okay, so, I suppose, you find the `lexicographic-compare-lists' from TS useful, right? >> Or maybe sorting lists of lists is just such a rare op that no one has >> ever encountered it before me? > > It would be useful to have a total ordering on Lisp values: for > heterogeneous ordered collections, for simplifying multi-key sorting, > for normalising unordered collections, etc. 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. --=20 Sam Steingold (https://aphar.dreamwidth.org/) on darwin Ns 10.3.2113 https://lastingimpactpsychology.com https://steingoldpsychology.com https://www.peaceandtolerance.org/ https://www.memritv.org When C++ is your hammer, everything looks like a thumb.