Skip to content

Commit

Permalink
Correct some broken grammar / spelling / syntax / etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Apr 9, 2024
1 parent ba5cf81 commit 9d0b8a1
Showing 1 changed file with 28 additions and 29 deletions.
57 changes: 28 additions & 29 deletions README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ image::https://travis-ci.com/shlomif/fortune-mod.svg?branch=master[Travis-CI Bui
image::https://ci.appveyor.com/api/projects/status/0pbvqd1xa7777aoo/branch/master?svg=true[AppVeyor Build status]

This GitHub repository maintains the sources for fortune-mod, a version
of https://en.wikipedia.org/wiki/Fortune_%28Unix%29[the UNIX fortune
of https://en.wikipedia.org/wiki/Fortune_%28Unix%29[the UNIX fortune
command]. `fortune` is a command-line utility which displays a random
quotation from a collection of quotes. This collection is read from the
local https://en.wikipedia.org/wiki/File_system[file system] and does
Expand All @@ -17,7 +17,7 @@ added by the user.

The canonical repository for the time being is:
https://github.com/shlomif/fortune-mod . In the future, we may create a
GitHub organization for it and move the sources there.
GitHub organization for it, and move the sources there.

For more information about it, you can contact
https://www.shlomifish.org/[Shlomi Fish] .
Expand Down Expand Up @@ -58,9 +58,9 @@ bug]:
One can find the official release tarballs of fortune-mod as prepared by
CPack there. They have a proper containing directory. One can also
download these tarballs from the
https://github.com/shlomif/fortune-mod/releases[GitHub releases page]
but please do not use the auto generated “Source code (zip)” and “Source
code (tar.gz)” downloads which are both incomplete and have extra
https://github.com/shlomif/fortune-mod/releases[GitHub releases page].
However, please do not use the auto-generated “Source code (zip)” and “Source
code (tar.gz)” downloads, which are both incomplete, and have extra
directories inside.

=== Sample usage
Expand All @@ -75,38 +75,37 @@ $

=== History

I believe fortune-mod was originally forked from the NetBSD version of
fortune, and ported to run on Linux systems. For some time it was
maintained at the currently offline redellipse-dot-net inside a
http://en.wikipedia.org/wiki/GNU_arch[GNU Arch] (= an old and now mostly
unused version control system) repository, and version 1.99.1 was
released as a tarball.
I believe fortune-mod was originally forked from the NetBSD version of fortune,
and ported to run on Linux systems. For some time, it was maintained at the
currently offline redellipse-dot-net inside a
http://en.wikipedia.org/wiki/GNU_arch[GNU Arch] (= an old version control
system) repository, and version 1.99.1 was released as a tarball.

This maintenance version was initiated by Shlomi Fish, who decided to
maintain it out of being a fan of the fortune command. It started by
maintain it, given he is a fan of the fortune command. It started by
importing the unpacked source of the fortune-mod-1.99.1.tar tarball from
the Mageia Linux .src.rpm into an empty git repository and continuing
the Mageia Linux .src.rpm into an empty git repository, and proceeding
from there.

=== What is the difference between fortune-mod and the "normal" fortune?

fortune-mod (= "fortune modified") was the name of a fork of the
original NetBSD fortune, which was done in order to port the code to
Linux and apply some other changes. If you are using a Linux
distribution chances are that the `fortune` executable's package *is*
distribution, chances are that the `fortune` executable's package *is*
fortune-mod (although in the case of Debian-and-derivatives it is likely
very out-of-date as of September 2020).

=== Why is it written in C? Can't it be written in Perl, awk, Python, etc.?

The answer has several parts:

First of all note that according to
https://en.wikipedia.org/wiki/Fortune_%28Unix%29[the wikipedia page] the
original fortune was created in 1979, before the first version of perl
was released in 1987, or python, ruby or Lua which were released later,
and when UNIX-running computers were more underpowered than they are
today.
First of all, note that according to
https://en.wikipedia.org/wiki/Fortune_%28Unix%29[the wikipedia page], the
original fortune was created in 1979. This is before the first version of
perl was released in 1987, or those of python, ruby, or Lua, which were
released later, and when UNIX-running computers were more underpowered than
they are today.

Secondly, you can find some reimplementations of fortune here:

Expand All @@ -120,14 +119,14 @@ reviewed their source codes.
Thirdly, most of the value (and relative data size) of the tarball is in
the quotes collection.

Fourthly, a native executable may still give a
https://tonsky.me/blog/disenchantment/[better user experience] (I have
yet to perform a stresstest benchmark though, and I doubt it will matter
too much for fortune's common use case.)
Fourthly, a native executable might still provide a
https://tonsky.me/blog/disenchantment/[better user experience]. However,
note that I have yet to perform a stresstest benchmark, and I doubt it will
matter too much for fortune's common use case.

Finally note that the runtime algorithm is not as straightforward as one
may believe, making use of dat files that contain counts and offsets of
the fortune "cookies".
Finally, note that fortune’s runtime algorithm is not as straightforward as one
may believe, making use of “.dat files that contain counts and offsets of
the fortune cookies.

=== Why did you convert the buildsystem to CMake?

Expand All @@ -153,7 +152,7 @@ https://en.wikipedia.org/wiki/CMake[CMake] .
version 2.26.0 and beyond.
. Fixed some C compiler warnings encountered with the GCC compiler flags
of
https://bitbucket.org/shlomif/shlomif-cmake-modules/overview[Shlomif_Common].
https://github.com/shlomif/shlomif-cmake-modules[Shlomif_Common].
. Added a build-time option to remove the “-o” (= “offensive”) flag,
inspired by a set of patches on the Fedora package.
. Applied some downstream patches.
Expand Down Expand Up @@ -195,5 +194,5 @@ of fortune cookies.
* https://web-cpan.shlomifish.org/modules/XML-Grammar-Fortune/[XML-Grammar-Fortune]
- an XML grammar for collections of quotes, allowing one to generate
XHTML or plaintext.
* http://www.anvari.org/fortune/[Anvari.org’s web interface to fortune]
* http://www.anvari.org/fortune/[Anvari.org’s web interface to fortune]
- with many collections.

0 comments on commit 9d0b8a1

Please sign in to comment.