GNU bug report logs - #33025
doc: sort: add examples for -R/--random sort

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Fri, 12 Oct 2018 16:29:02 UTC

Severity: wishlist

To reply to this bug, email your comments to 33025 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#33025; Package coreutils. (Fri, 12 Oct 2018 16:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 12 Oct 2018 16:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-coreutils <at> gnu.org
Subject: Add examples of why one would want to "sort" something "randomly"
Date: Sat, 13 Oct 2018 00:28:32 +0800
On (info "(coreutils) sort invocation")

‘-R’
‘--random-sort’
‘--sort=random’
     Sort by hashing the input keys and then sorting the hash values.
     Choose the hash function at random, ensuring that it is free of
     collisions so that differing keys have differing hash values.  This
     is like a random permutation of the inputs (*note shuf
     invocation::), except that keys with the same value sort
     together...

OK, but you need to mention some examples of why someone would want to
"sort" something "randomly".

OK, I have one:

You have a list of URLs.

You know there are probably duplicates in there, that you want to get
rid of.

But you also don't want to make it look like you have "machine sorted
them." You want them to still look "hand assembled."

So you use sort --random-sort --unique on them!




Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 30 Oct 2018 04:03:02 GMT) Full text and rfc822 format available.

Changed bug title to 'doc: sort: add examples for -R/--random sort' from 'Add examples of why one would want to "sort" something "randomly"' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 30 Oct 2018 04:03:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#33025; Package coreutils. (Sun, 30 Dec 2018 19:28:02 GMT) Full text and rfc822 format available.

Message #12 received at 33025 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 33025 <at> debbugs.gnu.org
Subject: Re: bug#33025: Add examples of why one would want to "sort" something
 "randomly"
Date: Sun, 30 Dec 2018 12:26:55 -0700
[Message part 1 (text/plain, inline)]
Hello,

On 2018-10-12 10:28 a.m., 積丹尼 Dan Jacobson wrote:
> 
> OK, but you need to mention some examples of why someone would want to
> "sort" something "randomly".
>

Attached is a patch to add examples of shuf/sort -R
to the coreutils documentation.

(It doesn't deal with "why", that is left to the users to decide when 
they need it, but it shows clear examples of how to use it).

regards,
 - assaf
[0001-doc-add-examples-of-shuf-sort-R.patch (text/x-patch, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#33025; Package coreutils. (Sun, 30 Dec 2018 19:59:02 GMT) Full text and rfc822 format available.

Message #15 received at 33025 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Assaf Gordon <assafgordon <at> gmail.com>,
 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 33025 <at> debbugs.gnu.org
Subject: Re: bug#33025: Add examples of why one would want to "sort" something
 "randomly"
Date: Sun, 30 Dec 2018 11:58:24 -0800
Thanks. Minor comments. The word "groupped" is a misspelling. Instead of " 
@samp{5},@samp{3},@samp{7} - exactly", write " 
@samp{5},@samp{3},@samp{7}--exactly"; that is, use an em dash rather than space, 
hyphen, space. Also, the style in .texi files is to put two spaces (or a 
newline) at the end of each sentence.




Information forwarded to bug-coreutils <at> gnu.org:
bug#33025; Package coreutils. (Mon, 31 Dec 2018 00:27:02 GMT) Full text and rfc822 format available.

Message #18 received at 33025 <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Assaf Gordon <assafgordon <at> gmail.com>
Cc: 33025 <at> debbugs.gnu.org
Subject: Re: bug#33025: Add examples of why one would want to "sort" something
 "randomly"
Date: Mon, 31 Dec 2018 08:26:05 +0800
>>>>> "AG" == Assaf Gordon <assafgordon <at> gmail.com> writes:

AG> (It doesn't deal with "why", that is left to the users to decide when
AG> they need it, but it shows clear examples of how to use it).

Maybe add "For example, you might want to hear your songs in a fresh fun
order. Or make sure your program still works even if the moms come
between or after the pops..."
https://www.google.com/search?q=reasons+for+random+order




This bug report was last modified 6 years and 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.