From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 0B22923EB2 for ; Mon, 6 May 2024 03:52:34 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1714960354; b=LlKL/OUUKW/fzskj3i49nspwOgBYZLGykTm1rIwrwb96Z+Maf2MdpoCrm1f6QMVdJwcoOAt3rr UZlLuAbmU+9kY64lX2tZVW2kBoCo16HCYxNgrUdjoL8O6SaLgSkuvFtk3/RYfiQ5KBPEynoZZ2 4/0zU9amscH1+bJsgDSnVuD744x3DX5EZC9Q2nbV5gHXd8VWtorXIas+NHquWsSUdJrUzfUjKL jl3hhZ0AOHBhAL8RfVPAfUx0ij35956IS2dxBlZwycVDk8EuHv8sgFLPtQSx1XmH9mo/YoTz+o BGMx6p0W4ow50wsEHePU745/e0R4MeZkwGI5PdbHJi2oWg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1714960354; bh=Q+4h+CS9/WhsaVOG8KKojAB0dt85grXKa7Er0rCfnHE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Content-Type:DKIM-Signature; b=UfN/Ld9WqhiLtLfDoRRQZpfFsb+BHKhbpz/Bir4p8lZwXhz+/w+/D2BlR5QA6i4evap+m31Neb Xe0UdP5IRGk86VNbtcuu5Ha0vMHg7+5QTEAcgwEv7GmB0Ka3USdPrPrtEdeRMwtUZm/fu+nZyH 5VB9VWP/aRmiwwmx1uNqEGeV2GoY+MaTwyMXaHu1MLPv2uJX9w/1H3VWWyvu/njsnsFJk01bkH psXCGi6t935FqRU6IWUYOWD6efQEOgVWDnPn1d/7hW0uLfi/Ujv9SRGOAT6QwvqHtqhmdzZ4pv 8M+gXOd5ef3bZKTFLNBxnNm3fqF4dvz4Feiq6Z3M34cWXg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-reply-to:From:References:To: Subject:MIME-version:Date:Message-id:Content-type:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=PVweQCqU04glWqHjEIR9qhuIxhij1OZqDKcXhi7K35Y=; b=A+4tY/tkOZsmb1HAqPYIV+rZVO 8UDQEFLffpyKomPg8Pnh/r+v40uaENaZZyXWimdECTpR3vaZWki/5rpZCVSaegSU+bodY44NDEhoi jwa2fzirwHDcMmJ+2ZjT+eXr5O1y2uLMLvDh88P2NfBPS+cK6D3ThN/fVJ1e3ClNPqeabV0hoCLrY OuDm0s+hIWTfu+ZmoQdL7id3ub1lMQ3Flmt1vzIzriklTaDi5WJZk5bnKmiTYMA9pHVPSIaek0NU9 R3uBQpQRJ3rnSRIwndaqTsLOzl70uhhU9r/7pQeUlpySCpDg6ZXbLWiGanxGVSTlRLfBbA60jhJ+H ewBygMHg==; Received: by zero.zsh.org with local id 1s3nWs-000O01-Oj; Mon, 06 May 2024 01:52:34 +0000 Authentication-Results: zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none Received: from mta03.eastlink.ca ([24.224.136.9]:41001) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1s3nW2-000NGl-7M; Mon, 06 May 2024 01:51:42 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta03.eastlink.ca ([24.224.136.9]) with ESMTPS id <0SD10P6NMJS9G2Y0@mta03.eastlink.ca> for zsh-users@zsh.org; Sun, 05 May 2024 22:51:41 -0300 (ADT) Received: from [192.168.0.11] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id 3nW0sXoXCxAjx3nW0s0CWI (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sun, 05 May 2024 22:51:41 -0300 X-Authority-Analysis: v=2.4 cv=EfprQ+mC c=1 sm=1 tr=0 ts=663837ad a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=ax2dIwEslqkVxp7mb48A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=ZLGELXoPAAAA:8 a=9sR4loMBLItLlhOfzPoA:9 a=hVKKzimAtN21zseq:21 a=_W_S_7VecoQA:10 a=CFiPc5v16LZhaT-MVE1c:22 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvhedghedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpefhteethfevgeeuvdelgefgvdevudefueduffdvgfelvddvgfdtieegueeuleeifeenucfkphepvdegrddvtdejrdduledrudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdduledrudefpdhhvghloheplgduledvrdduieekrddtrdduudgnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------o1GzBJNnuZz3wqndMEx01j8J" Message-id: <6cfb08f8-ee3d-40fa-be88-cb10882bc1d0@eastlink.ca> Date: Sun, 5 May 2024 18:51:39 -0700 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: nesting issue To: zsh-users@zsh.org References: <8d597bb5-39c8-4544-ad1a-907a79bf4cba@app.fastmail.com> <086da1ef-79dd-448d-b463-01895df2866f@eastlink.ca> <58741215-7c41-4230-8eb5-6556bd969140@app.fastmail.com> Content-language: en-US From: Ray Andrews In-reply-to: <58741215-7c41-4230-8eb5-6556bd969140@app.fastmail.com> X-Seq: 29906 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: This is a multi-part message in MIME format. --------------o1GzBJNnuZz3wqndMEx01j8J Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-05-05 16:26, Lawrence Velázquez wrote: >> ... I don't know what to say. > Seems like differing locales (which I overlooked earlier). On > Debian 12: Man ... I dunno, maybe the world needs different sorting logic between Canada and the US but to me it just looks like making trouble.  Anyway kudos for figuring that out. I would have expected: >> aaa,6, >> aaa,6a >> aaa,6,howdy >> aaa,6a,howdy > Why? Because at least the dictionary sort proceeds left to right with each subsequent character sorted as a sub-sort within the fixed sort arrived at by previous characters.  IOW as you move right, nothing ever changes to the left.  If 'aaa,6,' precedes 'aaa,6a' then every possible expansion of 'aaa,6,' will precede every possible expansion of 'aaa,6a'. It's the same as with numbers: every 2,xxx is greater than every 1,xxx.  I suppose there's something in the version sort that interferes with that.  Mind ... (n) is not an explicit version sort, so what's the algorithm?  This gets interesting.  And ... Ooops, no, that's not what I'm expecting I'm expecting: > aaa,6, > aaa,6,howdy > aaa,6a > aaa,6a,howdy ... a few more tests ... 'sort -V' is different.  But '(n)' seems the same as 'sort -n': aaa,6 aaa,6, aaa,6a aaa,6a, aaa,6a,howdy aaa,6,howdy    # I'd just like to know how this ends up last. I'd expect it 3d.  Both version sort and '(n)' agree that this is last. There will be an algorithm I'd just like to know what it is. --------------o1GzBJNnuZz3wqndMEx01j8J Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 2024-05-05 16:26, Lawrence Velázquez wrote:
... I don't know what to say.
Seems like differing locales (which I overlooked earlier).  On
Debian 12:
Man ... I dunno, maybe the world needs different sorting logic between Canada and the US but to me it just looks like making trouble.  Anyway kudos for figuring that out.

I would have expected:
aaa,6,    
aaa,6a
aaa,6,howdy
aaa,6a,howdy
Why?
Because at least the dictionary sort proceeds left to right with each subsequent character sorted as a sub-sort within the fixed sort arrived at by previous characters.  IOW as you move right, nothing ever changes to the left.  If 'aaa,6,' precedes 'aaa,6a' then every possible expansion of 'aaa,6,' will precede every possible expansion of 'aaa,6a'. It's the same as with numbers: every 2,xxx is greater than every 1,xxx.  I suppose there's something in the version sort that interferes with that.  Mind ... (n) is not an explicit version sort, so what's the algorithm?  This gets interesting.  And ... Ooops, no, that's not what I'm expecting I'm expecting:

aaa,6,    
aaa,6,howdy
aaa,6a
aaa,6a,howdy

    ... a few more tests ... 'sort -V' is different.  But '(n)' seems
    the same as 'sort -n':

aaa,6
aaa,6,
aaa,6a
aaa,6a,
aaa,6a,howdy
aaa,6,howdy    # I'd just like to know how this ends up last. I'd expect it 3d.  Both version sort and '(n)' agree that this is last.  There will be an algorithm I'd just like to know what it is.


--------------o1GzBJNnuZz3wqndMEx01j8J--