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 A2AF524801 for ; Mon, 6 May 2024 00:19:33 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1714947573; b=ZG7jSC0ytNeHqCPLX2JyySWvcW3UaA9u5+LZDXS0xSdqz6O16ydF83g4Oz3XD2x/SeXzZh7cmZ NRVR0ZdqgL2t1f3U+pZLlO+NSha1h2/QiHVGJTzu0nkfDvTk7yYcQ9+HVLfkDX3mrQp2jeOcGZ vXdbfT7Ml2KxvYehkLQS3qG2NUZA/3Q5ZmIvnRmOBj8QvwxDU9TgPelIeChB2fG98SLTqXP1n1 h9hOxEhxV0HUln39jjwi14bQtab5Q85ZV3KgBnAu9t98si6N1w6yi8XqMqnQFWvSz9JeInHjf8 Zbmk2EJtL0CJBLjSco6xrQXUrrKy3ueZlAseOH3ONIm6xA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; 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=1714947573; bh=a8lhdPR0RxjQW1hcNARHFM/ws3yHIn13aBj0d47dhsQ=; 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=AX17+rv2tw8kt7d/nrMv1C7lwcJCK10f9oJAZIiPwYZBqplqKG4KpU1+BC/Qk+hcJe83YuozZk 7bnnovdARogn61WCquHWEDxr1AwxTnd1vRGIFZNsrFCZrkvagxXVnGZpN36Ja4jorKQtvBqIzh AuLpLar5kB7xL0Lhddjf6F3TgJnhuTprzs+ea0yn8yw/vmxsBWsfRpjBZ82bSfMtnAWV0htxzf JJMFNNKCMHrw1aaAL6+jxEZe11tp6WPgrJ6jdFfi4wU0aXexMHS8m1UPMgpjG1CLh2T4/oWZkb ht4s4wpjo7I4NJZPQPjZ0VfvnACRccxZtDpbefV6Ewn4YA==; 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=74nHW/1ZcTwL2mac7eLbb62u0/VorcWxBN0RdUhkYeo=; b=qnjpHe8sCCfTKs6jID7U//0BqL O9tb1g05JdK5f3zFYoJwRDVRIzuLgcUvLkssAtVh1rfDNG8CmIdHMQnQy7iZZuieIc3kFbB/olhUj mFwUNvLihxGhflkVw575JrzCIDcO7PgfmgSZwl4xI5zdt35H02X3WfEy/SdQ8lupmE/5pj7CquBaq 4nuMnwmiSwrGcUyLcIDgZxW67/Gx4dZZA903H2XqjAQrj6kznUpNIchu/bPdvGmiH3GughtT/0zmL EilrFaR/TpdW24WBUlkDWNMa9RhINiVm4+sS0Qt02QR8srvgEJ2dkmanUc3LZU09iUxM1k9L+LHjB g478AoNQ==; Received: by zero.zsh.org with local id 1s3kCi-000EPI-PQ; Sun, 05 May 2024 22:19:32 +0000 Authentication-Results: zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none Received: from mta02.eastlink.ca ([24.224.136.13]:59283) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1s3kBj-000Dcb-R1; Sun, 05 May 2024 22:18:32 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta02.eastlink.ca ([24.224.136.13]) with ESMTPS id <0SD10Q7A29WX9UP0@mta02.eastlink.ca> for zsh-users@zsh.org; Sun, 05 May 2024 19:18:30 -0300 (ADT) Received: from [192.168.0.11] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp01.eastlink.ca ([71.7.199.166]) with ESMTPSA id 3kBhsnrto98ni3kBisofpI (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sun, 05 May 2024 19:18:30 -0300 X-Authority-Analysis: v=2.4 cv=C75KyhP+ c=1 sm=1 tr=0 ts=663805b6 a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=6ZuKy5aiK8MT8jIs7FUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=ZLGELXoPAAAA:8 a=_J1SBpxGhC7gspRfjlgA:9 a=WvPyIebw0j0NfpyP:21 a=_W_S_7VecoQA:10 a=CFiPc5v16LZhaT-MVE1c:22 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvhedgtdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpefhteethfevgeeuvdelgefgvdevudefueduffdvgfelvddvgfdtieegueeuleeifeenucfkphepvdegrddvtdejrdduledrudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdduledrudefpdhhvghloheplgduledvrdduieekrddtrdduudgnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Content-type: multipart/alternative; boundary="------------Dr34iFwWsGOkN9MNXhWtXG0W" Message-id: <086da1ef-79dd-448d-b463-01895df2866f@eastlink.ca> Date: Sun, 5 May 2024 15:18:29 -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> Content-language: en-US From: Ray Andrews In-reply-to: <8d597bb5-39c8-4544-ad1a-907a79bf4cba@app.fastmail.com> X-Seq: 29902 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. --------------Dr34iFwWsGOkN9MNXhWtXG0W Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-05-05 13:14, Lawrence Velázquez wrote: > Nonsense. There is no universally desired sort. It depends entirely on > what the application needs. Naturally, but I expect that when we are sorting numbers, '2' should come before '10' most of the time.  No not 'everybody' but ... sheesh, I'm just saying that I'm glad that '(n)' gives me what I'd call version sort.  That's all.  Can't I be satisfied? > I don't see this behavior. > ... > aaa,3,pard > aaa,3a,pard > 8 /aWorking/Zsh/Source/Wk/Boneyard 1 % var=( aaa,3*(nN) ); print -l $var aaa,3a,pard aaa,3,pard ... I don't know what to say. 8 /aWorking/Zsh/Source/Wk/Boneyard 1 % var=( aaa,6*(nN) ); print -l $var aaa,6 aaa,6,    # sixth char ',' precedes sixth char 'a' aaa,6a aaa,6a, aaa,6a,howdy # sixth char 'a' precedes sixth char ',' aaa,6,howdy It's not how I understand sorting but I don't doubt there is some method to it.  'sort' does the same.  'sort' has been around a long time so I don't doubt that what it does is very well thought out whether it makes sense to me or not.   Version sort is not a strict 'dictionary' sort, it 'interprets', so the above does what it thinks best.  I would have expected: aaa,6, aaa,6a aaa,6,howdy aaa,6a,howdy ... but that's not the way it is. Not worth worrying about. vmlinuz-6.1.0-20-amd64 ... that's my Linux version, the algorithm for sorting such versions must be a bit arbitrary.  I'm not complaining. --------------Dr34iFwWsGOkN9MNXhWtXG0W Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 2024-05-05 13:14, Lawrence Velázquez wrote:
Nonsense. There is no universally desired sort. It depends entirely on what the application needs.
Naturally, but I expect that when we are sorting numbers, '2' should come before '10' most of the time.  No not 'everybody' but ... sheesh, I'm just saying that I'm glad that '(n)' gives me what I'd call version sort.  That's all.  Can't I be satisfied?
I don't see this behavior.
...
	aaa,3,pard
	aaa,3a,pard

8 /aWorking/Zsh/Source/Wk/Boneyard 1 % var=( aaa,3*(nN) ); print -l $var       
aaa,3a,pard
aaa,3,pard

... I don't know what to say.

8 /aWorking/Zsh/Source/Wk/Boneyard 1 % var=( aaa,6*(nN) ); print -l $var
aaa,6
aaa,6,    # sixth char ',' precedes sixth char 'a'
aaa,6a
aaa,6a,
aaa,6a,howdy   
# sixth char 'a' precedes sixth char ','
aaa,6,howdy

It's not how I understand sorting but I don't doubt there is some method to it.  'sort' does the same.  'sort' has been around a long time so I don't doubt that what it does is very well thought out whether it makes sense to me or not.   Version sort is not a strict 'dictionary' sort, it 'interprets', so the above does what it thinks best.  I would have expected:

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

... but that's not the way it is. Not worth worrying about.

vmlinuz-6.1.0-20-amd64

... that's my Linux version, the algorithm for sorting such versions must be a bit arbitrary.  I'm not complaining.





--------------Dr34iFwWsGOkN9MNXhWtXG0W--