[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#163528: ITP: randomize-lines -- Randomize lines of input text



On Sun, 6 Oct 2002 21:45:25 +0200 (CEST)
Arthur de Jong <arthur@tiefighter.et.tudelft.nl> wrote:

> > How different is it from bogosort ?
> 
> I didn't know about bogosort (but I did some looking around when I first
> developed rl) but from the manual page they seem similar. 

Yes, but you know now :)
I'm just pointing out to you that there exists an application that 
does what you describe, as Debian package. That's the duty of 
filing an ITP.



> Some
> differences (from browsing the manual page and toying with it):
> 
> * rl can pick lines from the input (you can say give me 10 random lines
>   from this file), this can be done with and without recurring lines (my
>   math/statistics knowledge is mostly Dutch but it's like drawing cards
>   with and without replacing them to the deck).

head/tail, sort, uniq can do them.

> * I don't understart bogosort's default mode of operation
>   (it just permutates until the file is sorted? at least it takes more
>   time than I am willing to wait for it), with --nosort it behaves
>   just like rl by default

It works like "sort" with a less optimal algorithm.

> * bogosort has some command-lines features like --output and --verbose
> * rl seems to be about three times as fast (just running
>   'time rl 100000lines > /dev/null' and
>   'time bogosort -n 100000lines > /dev/null a couple of times, no real
>   statistics involved here)

It could be due to the way bogosort generates randomness.


regards,
	junichi


-- 
dancer@debian.org  http://www.netfort.gr.jp/~dancer






Reply to: