A bytecode interpreter for statically typed functional languages. https://www.youtube.com/watch?v=pKsOAJzfLgE&list=PLhMOOgDOKD4JV2AgL1XzoYanY6RpGKbNa
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Gil Mizrahi e569d0462d update to stackage lts 17 il y a 8 mois
src Starting to design closures, small refactor il y a 9 mois
tests update to stackage lts 17 il y a 8 mois
.gitignore Read binary program from file + tests init work il y a 1 an
.gitlab-ci.yml update stackage snapshots to 16.26 and fix a warning with zig0.7 il y a 10 mois
LICENSE Add LICENSE il y a 1 an
README.md Add pipeline badge il y a 1 an
build.hs update to stackage lts 17 il y a 8 mois
design.org Starting to design closures, small refactor il y a 9 mois
todo.org Starting to design closures, small refactor il y a 9 mois

README.md

Build status

Bytecode Interpreter Project

Hi! I'm streaming work on this project on Twitch! The entire series of videos can be viewed on Youtube as well.

Overview

BIP (name pending) is stack-based bytecode interpreter (/virtual machine) for statically typed functional languages written in C.

I hope to stick with this project for long enough to get to implement closures, garbage collection, exceptions and concurrency. I'll be taking cues from OCaml and Chicken Scheme as well as other resources, combined with some experimentation.

How to build

Prerequisites

You will need to install Stack and Zig.

Build and Run

Build using ./build.hs. Stack will download GHC (A Haskell compiler) and several packages the first time you run this so this might take some time.

After that:

  • ./build.hs test - To run tests
  • ./build.hs run - To interpret and run the file a.bin
  • ./build.hs valgrind - To interpret and run the file a.bin using valgrind
  • ./build.hs clean - To clean

Motivation

I'm using this project to brush up on my C, learn more about runtime systems, and potentially use this as a backend to my WIP functional language. I'm not entirely sure what I'm doing, but I'll figure it out!

Progress

Check out the todo.org file for the current status. Note that this project is built incrementally and in short sessions. Sometimes I'll revise my design decisions, refactor my work, and change the priority of some tasks. It's all part of the plan!

Resources

Want to learn more about similar topics? Take a look at this list of resources.