A POC (proof of concept) of the JAPL language written in Python 3
Go to file
Mattia fb9a769d07
Update README.md
2021-08-23 20:30:27 +02:00
JAPL added missing files 2020-10-22 10:19:00 +02:00
examples added missing files 2020-10-22 10:19:00 +02:00
.gitignore Initial commit 2020-10-21 18:01:09 +02:00
LICENSE Initial commit 2020-10-21 18:01:09 +02:00
README.md Update README.md 2021-08-23 20:30:27 +02:00
japl.py added missing files 2020-10-22 10:19:00 +02:00
requirements.txt added missing files 2020-10-22 10:19:00 +02:00
setup.py added missing files 2020-10-22 10:19:00 +02:00

README.md

THIS REPO IS OUT OF DATE AND KEPT ONLY FOR HISTORICAL PURPOSES. FOR AN UP-TO-DATE VERSION OF JAPL, CLICK HERE

japl

JAPL is an interpreted, dynamically-typed, garbage-collected and minimalistic programming language with C- and Java-like syntax.

J.. what?

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".

Some backstory

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.

What has been (or will be) added from Lox

  • Possibility to delete variables with the del statement (Currently being reworked)
  • break statement
  • continue 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 and nan 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.

Disclaimer

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.

Contributing

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