An fx-92 Scientifique Collège+ algorithmic interpreter for PC.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lephe 8c3341d09f
tests: add two more entries to the 2019 contest
9 months ago
doc update atomically (like a bomb) 9 months ago
fx92 lang: realize that WHILE was actually UNTIL 9 months ago
tests tests: add two more entries to the 2019 contest 9 months ago
.gitignore initial commit: most of the lexing and parsing work 10 months ago
README.md more atomic committing 9 months ago
fx92.py update atomically (like a bomb) 9 months ago
tests.py more atomic committing 9 months ago

README.md

Python-based fx-92 Scientifique Collège+ interpreter

This is an alternate imlementation of the fx-92 SC+ Algorithmic application. It interprets programs read from QR code URLs or text files, and renders images using the SDL.

Requirements:

  • Python ≥ 3.5 (may work with older versions)
  • PySDL2 (pip3 install --user PySDL2)

Running programs

To run programs, execute fx92.py and specify an input file:

./fx92.py [-s|-u] <input file> [options...]
  • If the input file contains text instructions (for example goto 12,35), specify -s (this is the default).
  • If the input file contains a QR code URL (for example https://...F908313200333500), specify -u.

The input can also be set to -, in which case the interpreter reads from standard input. Typical use case is for URLs:

echo -n "F908313200333500" | ./fx92.py -u -

Output options

  • --scale <n> lets you set the (integer) scaling ratio of the output.
  • --save <bmp> will save a screenshot of the output to the designated file.
  • --quiet will “hide” the window while executing. (At the moment the window is still shown, but closed immediately, due to SDL subtleties.)
  • --stream <dir> will stream window frames as a series of bitmap images to the specified directory. Use your favorite tool to make a GIF.

Tests

A few units tests are provided. Run tests.py to execute them.