Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/3tty0n/rpylox

RPython implementation for Lox
https://github.com/3tty0n/rpylox

crafting-interpreters meta-tracing-jit pypy rpython

Last synced: about 22 hours ago
JSON representation

RPython implementation for Lox

Awesome Lists containing this project

README

        

# RPyLox

This repository is an RPython implementation for Lox. Read more at https://craftinginterpreters.com/

## Prerequisite

### RPython and Python 2.7

This code base is built with RPython and PyPy 2.7. Please download PyPy repository and put it at the root.

```shell
wget https://downloads.python.org/pypy/pypy2.7-v7.3.14-src.tar.bz2
tar xf pypy2.7-v7.3.14-src.tar.bz2 && mv pypy2.7-v7.3.14-src pypy
```

PyPy 2.7 is based on Python 2.7. Please install Python 2.7 instead of Python 3.x.

## Build

You can use `Makefile` to build `rlox-jit` and `rlox-interp`.

`rlox-jit` supports meta-tracing compialtion and runs faster for loop-heavy programs for example.

```shell
make targetlox-jit
```

`rlox-interp` is an interpreter compiled by RPython.

```shell
make targetlox-interp
```

## Progress

- [x] Chapter 16
- [x] Chapter 17
- [x] Chapter 18
- [x] Chapter 19
- [x] Chapter 20
- Skip this chapter because we can use built-in hash tables
- [x] Chapter 21
- [x] Chapter 22
- [x] Chapter 23
- [ ] Chapter 24
- Finished 24.5.1 (2023/12/27)
- [ ] Chapter 25
- [ ] Chapter 26
- [ ] Chapter 27
- [ ] Chapter 28
- [ ] Chapter 29
- [ ] Chapter 30