diff options
| author | Arslaan Pathan <[email protected]> | 2026-01-22 09:39:54 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-01-22 09:39:54 +1300 |
| commit | 5a81d4f81a6151c4ee4b2ec195af0931b674dbd8 (patch) | |
| tree | e1fd5da9ab424e6ff6a4911242c3573a4e36d5ed | |
| parent | be433efc29016d20e94521baee8bbe326e889560 (diff) | |
| download | python-0.9.1-patched-QoL-5a81d4f81a6151c4ee4b2ec195af0931b674dbd8.tar.xz python-0.9.1-patched-QoL-5a81d4f81a6151c4ee4b2ec195af0931b674dbd8.zip | |
| -rw-r--r-- | README.md | 22 | ||||
| -rw-r--r-- | src/Makefile | 2 |
2 files changed, 19 insertions, 5 deletions
@@ -4,7 +4,7 @@ https://arslaancodes.com/ > Notice: This is not endorsed by the Python Software Foundation nor is it endorsed by Stichting Mathematisch Centrum/CWI or any of their subsidiaries. -This repository is a patched version of Python 0.9.1 which fixes the multiplication integer overflow bug on 64-bit systems, sets -std=c89 in CFLAGS by default to be compatible with GCC 15, and a couple of other QoL improvements. +This repository is a patched version of Python 0.9.1 (from 1991!) which fixes the multiplication integer overflow bug on 64-bit systems, sets -std=c89 in CFLAGS by default to be compatible with GCC 15, and a couple of other QoL improvements. ## QoL improvements - Fixed int_mul integer overflow bug in src/intobject.c on 64-bit systems @@ -12,13 +12,27 @@ This repository is a patched version of Python 0.9.1 which fixes the multiplicat - Added a `make install` target that installs to /opt/python091 by default (python is at /opt/python091/bin/py091), this can be changed with the INSTALL_DIR env variable. - Fixed PYTHONPATH to be relative to the INSTALL_DIR used in `make install` target -## Some tips to get you started +## Compilation & Installation + +To get started with Python 0.9.1, you'll need to compile it yourself. +Do not fear, as it should only take a couple seconds. +Simply install the dependencies `glibc-static` and `gcc`, then run `make` inside the `src` directory. +Once it's done, simply run the `./python` binary! + +### Installing + +Installing is also quite easy. +Make sure the dependencies from earlier are installed, then run `make install` inside the `src` directory. +If you are installing to the default INSTALL_DIR (/opt/python091) or any system directory, you may need root privileges. + +## Some tips to get you started with the language 1. The syntax of Python 0.9.1 is quite similar to the syntax of Python 2, but with fewer features. The language is more lightweight overall. 2. Start by attempting to write FizzBuzz and some basic scripts. If you know Python 3, this language is easy to learn. The language is best learnt by experimenting. 2. The `os` module does not exist here; use `posix` instead. 3. The singular `=` sign is used for both assignment AND comparison (a nightmare, I know.) -4. Some things may be unstable, it is not fully tested. I'll have to read through the whole codebase later. -5. If you cannot import modules from the standard library, try setting the PYTHONPATH environment variable to the location of the `lib` directory. For example, to use a standard library from ~/py091/lib, run the command like this: `PYTHONPATH=~/py091/lib /path/to/python **args` +4. Double-quoted strings do not exist, we only have single-quoted strings. +5. Some things may be unstable, it is not fully tested. I'll have to read through the whole codebase later. +6. If you cannot import modules from the standard library, try setting the PYTHONPATH environment variable to the location of the `lib` directory. For example, to use a standard library from ~/py091/lib, run the command like this: `PYTHONPATH=~/py091/lib /path/to/python **args` > Original README is at README.original diff --git a/src/Makefile b/src/Makefile index 6d5280d..83b5d17 100644 --- a/src/Makefile +++ b/src/Makefile @@ -74,7 +74,7 @@ RANLIB = ranlib # For BSD # change DEFPYTHONPATH to the default INSTALL_DIR # used in the make install target I added at the # end of the file. -INSTALL_DIR="/opt/python091" +INSTALL_DIR= /opt/python091 DEFPYTHONPATH= .:$(INSTALL_DIR)/lib:../lib |
