Rant Generator 1.0
October 16th, 2013
Giuseppe Gatta <email@example.com>
What is this?
This is a nice and little rant generator, that generates automatically small texts about
management or science.
It is available in C, the language it was originally written in, and as Java and PHP classes.
Now, some history...
This program is actually really old, as the comments in the rant.c source code file show:
* Stupid Report Generator. (possibly a VSRG; very SRG)
* This is a very simplified report generating program based on
* a visual experience with "festoon". The vocabulary was "strings"-ed
* (or strung?) from the binary of festoon and some words were added.
* Author: argv@sri-spam.UUCP
* Several extensions: Sven. T. Wiberg, Chalmers, Gothenburg.
The original code dates at least back to the early nineties, but it wouldn't be surprising if it was
actually from the eighties.
I found the code on http://grack.com/programming/others/Rant.html, then I converted
the old K&R C syntax to ANSI C and fixed some small issues in the code.
Some time later, I ported the code first to Java, then to PHP.
How to use
The C version is a stand-alone program.
If you use the GNU C compiler, run: gcc -o rant rant.c
At this point, if there were no errors, you can run it like this: ./rant <number_of_sentences>
where <number_of_sentences> is the number of sentences you want the rant generator to output.
The Java version comes as source code for the RantGenerator class.
Get the RantGenerator.java source file and include it in your project.
Small class usage example (prints a rant of two sentences):
public class Ranter
public static void main(String args)
RantGenerator myGenerator = new RantGenerator();
The PHP version comes as source code for the RantGenerator class.
Get the RantGenerator.php source file and include it in your project.
Small class usage example (generates an HTML page containing a rant of two sentences):
echo '<html><head><title>Rant Generator Example</title></head>';
$myGenerator = new RantGenerator();
Questions, comments, etc. should be directed to me, Giuseppe Gatta <firstname.lastname@example.org>
Click here to download version 1.0.
The archive contains the C, Java and PHP versions.
You can click here for a demo of the rant generator.