need a random number?
  • OCaml 77.8%
  • Dune 22.2%
Find a file
2026-02-08 09:44:41 +01:00
bin bogue >= 20260208 2026-02-08 09:44:41 +01:00
bogue-randomize-2019-07-01_21.36.03.mkv add video file 2019-07-02 11:43:04 +02:00
bogue.conf add bogue.conf 2022-12-30 17:12:24 +01:00
Capture d’écran 2022-01-12 à 17.09.41.png Add files via upload 2022-01-12 17:11:41 +01:00
dune-project bogue >= 20260208 2026-02-08 09:44:41 +01:00
randomize.opam bogue >= 20260208 2026-02-08 09:44:41 +01:00
README.md update README 2022-12-30 17:18:31 +01:00
Screenshot_20190702_131806.jpg add screenshot 2019-07-02 13:27:12 +02:00
Screenshot_20190702_131806s.jpg add screenshot 2019-07-02 13:27:12 +02:00

randomize

need a random number?


This is a demo app showing basic usage of the Bogue library. More sophisticated examples are bogue-demo or the snoke game.

Click on the 'randomize' button, and it will give you a random number. Very handy if you don't have a dice in your pocket. Or a coin to flip. Or if you want to predict the upcoming National Lottery.

Moreover, it will give you a much better random number than a simple call to "rand" from your favorite library, because it depends on the duration of the button press, which is very hard to reproduce. No kidding.

Of course, you can customize the interval of numbers you expect. So this is a truly complete app!

Screenshot

Linux KDE:
Screenshot linux (large version here).

Mac OS:
Screenshot macos

See the video capture in the repository, or from Youtube.

Installation

You can try the linux binary. It requires the SDL2 library. You can also compile it if you have ocaml and the Bogue package:

opam pin https://github.com/sanette/randomize.git

Then just run ./randomize

If you want to try without installing, simply clone the git repository, and

dune exec bin/main.exe