A sub-1KB, self-hosting, native code Forth without compromise
At the core of paraforth is a very small assembly program - just an association list of names to subroutines, and an input loop for invoking them. By pre-populating the list with just enough functionality to build a macro assembler, a self-extensible language kernel is born.
This project is a long-running exercise in building the smallest self-sufficient Forth possible, without ANY sacrifices in speed or usability. No inputting pre-assembled machine code at runtime, and no cobbling together logic operations from NAND.
The entire language, save for just 15 words and 756 bytes of machine code, is implemented in itself - legibly - and builds in place on startup. Additionally, support for full bootstrapping coming soon.
This is a proof-of-concept implementation of CPython that supports multithreading without the global interpreter lock (GIL). An overview of the design is described in the Python Multithreading without GIL Google doc.
The proof-of-concept works best on Linux x86-64. It also builds on Linux ARM64, Windows (64-bit), and macOS, but you will have to recompile extension modules yourself for these platforms. The build process has not changed from upstream CPython.
The proof-of-concept comes with a modified bundled "pip" that includes an alternative package index. The alternative package index includes C extensions that are either slow to build from source or require some modifications for compatibility.
The GIL is disabled by default, but if you wish, you can enable it at runtime using the environment variable PYTHONGIL=1
. You can use the existing Python APIs, such as the threading module and the ThreadPoolExecutor class.
Still maintained and under development - tracks v3.9.x!
A simple interactive BASIC interpreter written in Python 3. It is based heavily on material in the excellent book Writing Interpreters and Compilers for the Raspberry Pi Using Python by Anthony J. Dos Reis. However, I have had to adapt the Python interpreter presented in the book, both to work with the BASIC programming language and to produce an interactive command line interface. The interpreter therefore adopts the key techniques for interpreter and compiler writing, the use of a lexical analysis stage followed by a recursive descent parser which implements the context free grammar representing the target programming language.
The interpreter is a homage to the home computers of the early 1980s, and when executed, presents an interactive prompt ('>') typical of such a home computer. Commands to run, list, save and load BASIC programs can be entered at the prompt as well as program statements themselves.
The BASIC dialect that has been implemented is slightly simplified, and naturally avoids machine specific instructions, such as those concerned with sound and graphics for example.
A lightweight BASIC interpreter written in standard C. It's aimed to be embeddable, extendable and portable. It is a dynamic typed programming language, reserves structured syntax, supports a style of prototype-based programming (OOP), also implements a functional paradigm by lambda abstraction. The core is written in a C source file and an associated header file. It's easy to either use it as a standalone interpreter or embed it with existing projects.
A version of it is embedded in WWIV these days.
In this book we will create a programming language together.
We'll start with 0 lines of code and end up with a fully working interpreter for the Monkey* programming language.
Step by step. From tokens to output. All code shown and included. Fully tested.
A Zcode interpreter written in Python. Plays Inform games (up to v7). Give it an Infocom game and it'll run it. I suspect that it can be included in or called from other code.
A shell which acts as a better interactive Python interpreter than the standard Python environment. iPython is designed more for experimentation and playing with ideas prior to implementation than it is for actually developing code. It also supports being embedded in other software for the purpose of extensibility. It even makes it easy to prototype and test GUIs written in Python.
PiFi is a Zcode interpreter written in Python. Great for playing your favorite Infocom games.
Just what it says on the tin. Implements Z-code with cheat commands so you can play Infocom games on whatever system you have Perl installed on. Supports multiple front-end interfaces.