1
0
mirror of https://gitlab.com/gilmi/vm synced 2025-04-11 21:31:30 +02:00
2024-12-23 16:52:10 +02:00
2024-12-23 16:52:10 +02:00
2024-04-27 17:16:46 +03:00
2024-04-27 14:10:45 +03:00
2024-04-27 14:10:45 +03:00
2024-04-27 17:16:46 +03:00
2024-04-27 14:10:45 +03:00
2022-07-08 14:04:41 +03:00
2024-04-27 14:10:45 +03:00
2024-04-27 14:10:45 +03:00
2022-07-08 14:04:41 +03:00

Build status

GlideVM

GlideVM live-coding sessions can be viewed on Youtube.

Overview

GlideVM 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 Haskell GHC + Cabal and Zig.

Build and Run

Build using ./build.hs.

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.

Description
Languages
C 59.7%
Haskell 40.3%