The FreeBSD Ports Archive

Freebsd | Contact
Welcome to FreeBSD Software


FreeBSD misc : bogosort

Sort (or not) stdin using the bogo-sort algorithm

 Sort files or its standard input using the bogo-sort algorithm
described in the Jargon File .

A quote from the Jargon File 'bogo-sort' entry:

     ...The archetypical perversely awful algorithm (as opposed to
     _bubble sort_, which is merely the generic bad algorithm).
     _Bogo-sort_ is equivalent to repeatedly throwing a deck of cards
     in the air, picking them up at random, and then testing whether
     they are in order. It serves as a sort of canonical example of
     awfulness. Looking at a program and seeing a dumb algorithm, one
     might say "Oh, I see, this program uses _bogo-sort_." Esp.
     appropriate for algorithms with factorial or super-exponential
     running time in the average case and probabilistically infinite
     worst-case running time. Compare _bogus_, _brute force_,
     _lasherism_...

Author: Ulrik Haugen 
 

http://www.lysator.liu.se/~qha/bogosort/



bogosort history


v. 1.10
date: 2004/11/01 17:09:52;  author: roam;  state: Exp;  lines: +1 -1
A long-overdue dequoting of COMMENT.  D'oh, I thought I'd done this,
like, MONTHS ago!

Submitted by:	Brian Poole 

v. 1.9 date: 2004/08/11 13:57:27; author: roam; state: Exp; lines: +18 -0 A whole lotta fixes: - fix build with gcc-3.4; - fix sortedp.c and zbogotest to handle empty files properly; - add a 'test' target; - use INFO and PLIST_FILES and nuke pkg-plist. And yes, I know that adding HAVE_STRING_H to config.h.in is somewhat hackish; the proper fix - a string.h check in configure.in - is on its way to the bogosort developers :)
v. 1.8 date: 2003/12/14 14:35:15; author: roam; state: Exp; lines: +1 -1 Update to 0.4.2.
v. 1.7 date: 2003/02/19 16:07:27; author: roam; state: Exp; lines: +1 -0 Remove pkg-comment files in my ports.
v. 1.6 date: 2002/09/06 22:01:14; author: roam; state: Exp; lines: +1 -1 Update to bogosort-0.4.1; Ulrik accepted my files/patch-bogosort.c fix, thus rendering this patch superfluous.
v. 1.5 date: 2002/09/06 09:08:44; author: roam; state: Exp; lines: +1 -1 Update to bogosort-0.4.0, which includes fixes to the error handling and printing routines, the problem originally found by Kris Kennaway. Unfortunately, the bogosort author did not quite apply the patch I sent, hence the need for the new files/patch-bogosort.c.
v. 1.4 date: 2001/08/06 20:33:44; author: roam; state: Exp; lines: +1 -3 Update to 0.3.3. Remove the texinfo documentation patch - the author included it in the official distribution.
v. 1.3 date: 2001/06/09 12:26:49; author: roam; state: Exp; lines: +3 -2 Update to 0.3.2. Although 0.3.2 contains part of my texinfo fixes, there's still something to be desired - the author needs to re-read texinfo docs, and note that menu entries start with a '*' character :) PR: 27977 Submitted by: Patrick Li , kris
v. 1.2 date: 2000/11/22 10:20:12; author: roam; state: Exp; lines: +2 -2 update my email address - roam@orbitel.bg -> roam@FreeBSD.org
v. 1.1 date: 2000/09/16 05:15:35; author: will; state: Exp; Add bogosort 0.3.1, a program that sorts files (or stdin) using the bogo-sort algorithm described in the Jargon File. PR: 21290 Submitted by: Peter Pentchev ============================================================================= v. 1.10 date: 2004/11/01 17:09:52; author: roam; state: Exp; lines: +1 -1 A long-overdue dequoting of COMMENT. D'oh, I thought I'd done this, like, MONTHS ago! Submitted by: Brian Poole
v. 1.9 date: 2004/08/11 13:57:27; author: roam; state: Exp; lines: +18 -0 A whole lotta fixes: - fix build with gcc-3.4; - fix sortedp.c and zbogotest to handle empty files properly; - add a 'test' target; - use INFO and PLIST_FILES and nuke pkg-plist. And yes, I know that adding HAVE_STRING_H to config.h.in is somewhat hackish; the proper fix - a string.h check in configure.in - is on its way to the bogosort developers :)
v. 1.8 date: 2003/12/14 14:35:15; author: roam; state: Exp; lines: +1 -1 Update to 0.4.2.
v. 1.7 date: 2003/02/19 16:07:27; author: roam; state: Exp; lines: +1 -0 Remove pkg-comment files in my ports.
v. 1.6 date: 2002/09/06 22:01:14; author: roam; state: Exp; lines: +1 -1 Update to bogosort-0.4.1; Ulrik accepted my files/patch-bogosort.c fix, thus rendering this patch superfluous.
v. 1.5 date: 2002/09/06 09:08:44; author: roam; state: Exp; lines: +1 -1 Update to bogosort-0.4.0, which includes fixes to the error handling and printing routines, the problem originally found by Kris Kennaway. Unfortunately, the bogosort author did not quite apply the patch I sent, hence the need for the new files/patch-bogosort.c.
v. 1.4 date: 2001/08/06 20:33:44; author: roam; state: Exp; lines: +1 -3 Update to 0.3.3. Remove the texinfo documentation patch - the author included it in the official distribution.
v. 1.3 date: 2001/06/09 12:26:49; author: roam; state: Exp; lines: +3 -2 Update to 0.3.2. Although 0.3.2 contains part of my texinfo fixes, there's still something to be desired - the author needs to re-read texinfo docs, and note that menu entries start with a '*' character :) PR: 27977 Submitted by: Patrick Li , kris
v. 1.2 date: 2000/11/22 10:20:12; author: roam; state: Exp; lines: +2 -2 update my email address - roam@orbitel.bg -> roam@FreeBSD.org
v. 1.1 date: 2000/09/16 05:15:35; author: will; state: Exp; Add bogosort 0.3.1, a program that sorts files (or stdin) using the bogo-sort algorithm described in the Jargon File. PR: 21290 Submitted by: Peter Pentchev ============================================================================= v. 1.10 date: 2004/11/01 17:09:52; author: roam; state: Exp; lines: +1 -1 A long-overdue dequoting of COMMENT. D'oh, I thought I'd done this, like, MONTHS ago! Submitted by: Brian Poole
v. 1.9 date: 2004/08/11 13:57:27; author: roam; state: Exp; lines: +18 -0 A whole lotta fixes: - fix build with gcc-3.4; - fix sortedp.c and zbogotest to handle empty files properly; - add a 'test' target; - use INFO and PLIST_FILES and nuke pkg-plist. And yes, I know that adding HAVE_STRING_H to config.h.in is somewhat hackish; the proper fix - a string.h check in configure.in - is on its way to the bogosort developers :)
v. 1.8 date: 2003/12/14 14:35:15; author: roam; state: Exp; lines: +1 -1 Update to 0.4.2.
v. 1.7 date: 2003/02/19 16:07:27; author: roam; state: Exp; lines: +1 -0 Remove pkg-comment files in my ports.
v. 1.6 date: 2002/09/06 22:01:14; author: roam; state: Exp; lines: +1 -1 Update to bogosort-0.4.1; Ulrik accepted my files/patch-bogosort.c fix, thus rendering this patch superfluous.
v. 1.5 date: 2002/09/06 09:08:44; author: roam; state: Exp; lines: +1 -1 Update to bogosort-0.4.0, which includes fixes to the error handling and printing routines, the problem originally found by Kris Kennaway. Unfortunately, the bogosort author did not quite apply the patch I sent, hence the need for the new files/patch-bogosort.c.
v. 1.4 date: 2001/08/06 20:33:44; author: roam; state: Exp; lines: +1 -3 Update to 0.3.3. Remove the texinfo documentation patch - the author included it in the official distribution.
v. 1.3 date: 2001/06/09 12:26:49; author: roam; state: Exp; lines: +3 -2 Update to 0.3.2. Although 0.3.2 contains part of my texinfo fixes, there's still something to be desired - the author needs to re-read texinfo docs, and note that menu entries start with a '*' character :) PR: 27977 Submitted by: Patrick Li , kris
v. 1.2 date: 2000/11/22 10:20:12; author: roam; state: Exp; lines: +2 -2 update my email address - roam@orbitel.bg -> roam@FreeBSD.org
v. 1.1 date: 2000/09/16 05:15:35; author: will; state: Exp; Add bogosort 0.3.1, a program that sorts files (or stdin) using the bogo-sort algorithm described in the Jargon File. PR: 21290 Submitted by: Peter Pentchev =============================================================================



Main menu

FreeBSD

Program categories

Freebsd accessibility
Freebsd archivers
Freebsd astro
Freebsd audio
Freebsd benchmarks
Freebsd biology
Freebsd cad
Freebsd chinese
Freebsd comms
Freebsd converters
Freebsd databases
Freebsd deskutils
Freebsd devel
Freebsd dns
Freebsd editors
Freebsd emulators
Freebsd finance
Freebsd french
Freebsd ftp
Freebsd games
Freebsd german
Freebsd graphics
Freebsd hebrew
Freebsd hungarian
Freebsd irc
Freebsd japanese
Freebsd java
Freebsd korean
Freebsd lang
Freebsd mail
Freebsd math
Freebsd mbone
Freebsd misc
Freebsd multimedia
Freebsd net
Freebsd net-im
Freebsd net-mgmt
Freebsd net-p2p
Freebsd news
Freebsd palm
Freebsd polish
Freebsd ports-mgmt
Freebsd portuguese
Freebsd print
Freebsd russian
Freebsd science
Freebsd security
Freebsd shells
Freebsd sysutils
Freebsd textproc
Freebsd ukrainian
Freebsd vietnamese
Freebsd www
Freebsd x11
Freebsd x11-clocks
Freebsd x11-drivers
Freebsd x11-fm
Freebsd x11-fonts
Freebsd x11-servers
Freebsd x11-themes
Freebsd x11-toolkits
Freebsd x11-wm