.issues gi: Edit issue description 3 years ago
web index.html 3 years ago
.gitignore release 0.0.1 2 years ago
Makefile makefile 4 months ago
README.md readme 4 months ago
asino.c LICENSE 5 years ago
asino.cpp LICENSE 5 years ago
asino.d print only first arg if res == 2 26 days ago
asino.py LICENSE 5 years ago

Asino - Buridan's donkey

Originally written in c++ and python, this program given some choices orders them in casual order. I wrote about it at: http://francescomecca.eu/index.php/archives/207

Now I rewrite the Buridan's donkey in whatever language I feel passionate about.


The D version is the most complete and provides the following options:

-n --numbers enable number output on screen
-d --divider divide the arguments using a different divider
-v --version show version and exit
-e  --engine Choose the RNG between "mt" (Mersenne-Twister, default), "x" (xorshift),
                "dr" (/dev/random), "du" (/dev/urandom)

The program can also be used piped to another process.

$ echo D C++ | ./asino -d " " -n 1
1. D
2. C++


The C version makes a system call to get a random pool of numbers.

Compile including math library.

It supports cli arguments:

      --urandom, -u: no arguments, uses /dev/urandom instead of /dev/random
      --no-numbers, -n: no arguments, disable line numbers


$ ls

asino.c  asino.cpp  asino.py  README.md

$ ls | asino

1. asino.c
2. README.md
3. asino.py
4. asino.cpp