THIS REPO IS OUT OF DATE AND KEPT ONLY FOR HISTORICAL PURPOSES. FOR AN UP-TO-DATE VERSION OF JAPL, CLICK HERE
JAPL is an interpreted, dynamically-typed, garbage-collected and minimalistic programming language with C- and Java-like syntax.
You may wonder what's the meaning of JAPL: well, it turns out to be an acronym for Just Another Programming Language, but beware! Despite the name, the pronounciation is actually the same as "JPL".
JAPL is born thanks to the amazing work of Bob Nystrom that wrote a book available completely for free at this link, where he describes the implementation of a simple language called Lox.
- Possibility to delete variables with the
del
statement (Currently being reworked) break
statementcontinue
statement- Multi-line comments (
/* like this */
) - Nested comments
- Modulo division (
%
) and exponentiation (**
) OP_CONSTANT_LONG
is implemented- Differentiation between integers and floating point numbers
inf
andnan
types- Possibility to have more than 255 locals in scope at any given time
- String slicing, with start:end syntax as well
- Strings are not interned (may change in the future)
- All entities are actually objects, even builtins
- Bitwise operators (AND, OR, XOR, NOT)
- Functions default and keyword arguments (WIP)
- A proper import system (Coming soon)
- Native asynchronous (
await
/async fun
) support (Coming soon) - Multiple inheritance (Coming Soon)
- Bytecode optimizations such as constant folding and stack caching (Coming Soon)
- Arbitrary-precision arithmetic (Coming soon)
- Generators (Coming soon)
- A standard library with collections, I/O utilities, scientific modules, etc (Coming soon)
- Multithreading and multiprocessing support with a global VM Lock like CPython (Coming soon)
- Multiple GC implementations which can be chosen at runtime or via CLI: bare refcount, refcount + generational GC, M&S (Coming soon)
- Exceptions (Coming soon)
- Optional JIT Compilation (Coming soon)
- Some syntax changes (maybe), e.g. get rid of semicolons
- Prototypes based system instead of classes (maybe)
Other than that, JAPL features closures, function definitions, classes, inheritance and static scoping. You can check
the provided example .jpl
files in the repo to find out more about its syntax.
This project is currently a WIP (Work in Progress) and is not optimized nor complete. The first version of the interpreter is written in Python, but a bytecode stack-based VM written in nim is being developed right now.
Also, the design of the language may change at any moment and all the source inside this repo is alpha code quality, for now.
For other useful information, check the LICENSE file in this repo.
If you want to contribute, feel free to send a PR!
Right now there are some major issues with the virtual machine which need to be addressed
before the development can proceed, and some help is desperately needed greatly appreciated!
You can also contact me using the information available here