unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: emacs-devel@gnu.org
Subject: Re: lexicographic list comparison
Date: Sat, 10 Sep 2022 11:26:39 +0200	[thread overview]
Message-ID: <YxxYT8jvCDVFuSa8@tuxteam.de> (raw)
In-Reply-To: <E79429C1-EBAA-4601-A818-1BDF6745B7B1@acm.org>

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

On Sat, Sep 10, 2022 at 11:07:49AM +0200, Mattias Engdegård wrote:
> 9 sep. 2022 kl. 21.27 skrev Sam Steingold <sds@gnu.org>:
> 
> > What do you do when sorting a list of lists of numbers?
> 
> Sigh deeply and write ad-hoc code for the nth time.

:-)

> 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.
> 
> The devil is in the details: are strings compared with our without properties? Do we observe the wonky IEEE rules for ordering floats? Is there a particularly useful ordering between elements of different types? Do we need to worry about circularity? How do we compare hash tables? And so on.
> 

And language-dependent collation, and Unicode equivalence, and NaNs
and...

Details, indeed :-)

A look at the troubles and tribulations a DBMS goes through gives one
a rough idea on how interesting a general solution can become...

> Consistency with `equal` would be desirable (up to hash table identity, perhaps).

This, too :)

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply	other threads:[~2022-09-10  9:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 19:27 lexicographic list comparison Sam Steingold
2022-09-10  9:07 ` Mattias Engdegård
2022-09-10  9:22   ` Emanuel Berg
2022-09-10  9:26   ` tomas [this message]
2022-09-12 14:45   ` Sam Steingold
2022-09-12 17:53     ` mattiase
2022-09-12 18:31       ` Stefan Monnier
2022-09-12 18:41         ` Sam Steingold
2022-09-12 19:32           ` Stefan Monnier
2022-09-12 18:35       ` Sam Steingold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YxxYT8jvCDVFuSa8@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).