An implementation of the Self programming language.
Self is a programming language designed in 1986 at Xerox PARC. It is an object-oriented programming language which uses prototype-based inheritance as its basis and message-passing as its execution method. It is dynamically (but strongly) typed.
Self uses an image-based approach for runtime. All the objects in the system are stored in a Self world and turned into a snapshot for saving. At runtime, objects can be interacted with, created and destroyed without losing state on other objects.
You need the Zig compiler, preferably one built with the known-good version commit. You can find the source code, instructions for building, and more on the Zig repository.
Latest Zig commit known to work is 11dce7894
.
Earlier and later versions may work but there are no guarantees.
- Clone the repository with submodules:
git clone --recurse-submodules https://github.com/sin-ack/zigself
- Run the code:
zig build run -- examples/fibonacci.self
That's it! If you want to build a release version, you can build one with
zig build -Drelease-fast=true
and the binary will be in zig-out/bin/
.
There is an (experimental) REPL that you can run with zig build run -- repl.self
.
All contributions are welcome! Please follow the contribution guidelines for details.
zigSelf is licensed under the GNU General Public License version 3, so that the VM implementation remains open for everyone including end-users to study, modify and share. See LICENSE for more details.