Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/3tty0n/rpylox
- Owner: 3tty0n
- Created: 2023-10-16T15:49:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-01T01:21:36.000Z (3 months ago)
- Last Synced: 2024-11-10T17:49:39.438Z (about 2 months ago)
- Topics: crafting-interpreters, meta-tracing-jit, pypy, rpython
- Language: Python
- Homepage:
- Size: 115 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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