No Description

Kyle Perik b80eda9624 implement inner scopes basically 7 months ago
.gitignore 0b415bbfcd ignore h.gch files 7 months ago
chunk.c aa0b369b08 inital commit 8 months ago
chunk.h b80eda9624 implement inner scopes basically 7 months ago
common.h 122c268154 implement vm 8 months ago
debug.c b80eda9624 implement inner scopes basically 7 months ago
debug.h aa0b369b08 inital commit 8 months ago
main.c 49c716d80b implement local vars basically 7 months ago
memory.c aa0b369b08 inital commit 8 months ago
memory.h aa0b369b08 inital commit 8 months ago
readme.md aa0b369b08 inital commit 8 months ago
value.c aa0b369b08 inital commit 8 months ago
value.h aa0b369b08 inital commit 8 months ago
vm.c b80eda9624 implement inner scopes basically 7 months ago
vm.h b80eda9624 implement inner scopes basically 7 months ago

readme.md

Judo VM

a VM for judo lang

**Disclaimer: ** I don't know anything about c, so currently this is almost completely a carbon copy of the great walkthrough here: http://www.craftinginterpreters.com

The goal of this is to process bytecode that is created by judo in python, which eventually could be implemented in judo

Plans

Again, not understanding how low-level code works very much, this plan is pretty vague.

This should not end up being very complex in theory, despite being a weird language. The declarative nature of the language should hopefully be beaten out of it at this point, in a nice format to be run, not doing any crazy processing.

This is just in theory, being more of a project to see if it can be done.

More practically something like this:

s = :(
    a * b = x ^ 2
)
r1 = s~[
    a = 2
    b = 4
].x
r1 | out
r2 = s~[
    a = 5
    x = 3
].b
r2 | out

would be solved for each usage, and become straightforward at this point. This means that there can never be ambiguous code, or code that can't really be solved. Like this:

r1 = :(x = (a * b) ^ -1)~[a = 2, b = 4]
r2 = :(b = x ^ 2 / a)~[a = 5, x = 3]
r1 | out
r2 | out

Here, the scope has to be split into multiple ways of solving. Obviously this is not bytecode. But this looks much more like something a typical programming language can run.