Box is a dependently-typed programming language for Minecraft: Java Edition1.
Footnotes
-
NOT OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG. ↩
A dependently-typed programming language for Minecraft
Home Page: https://mcenv.github.io/book-box/
License: MIT License
Box is a dependently-typed programming language for Minecraft: Java Edition1.
NOT OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG. ↩
Represents functions only available in the meta-level.
function f () → [int;] = [int; 1, 2, 3]
data modify storage mcx: int_array append value [I;1,2,3]
data modify storage mcx: int_array append value [I;0,0,0]
data modify storage mcx: int append value 1
data modify storage mcx: int_array[-1][0] set from storage mcx: int[-1]
data remove storage mcx: int[-1]
data modify storage mcx: int append value 2
data modify storage mcx: int_array[-1][1] set from storage mcx: int[-1]
data remove storage mcx: int[-1]
data modify storage mcx: int append value 3
data modify storage mcx: int_array[-1][2] set from storage mcx: int[-1]
data remove storage mcx: int[-1]
The following code fails in the pack phase.
function f () → int =
let x = 0
if true then x else 1
let name = 0; "Hello, #{name}!"
const
-only until string concatenation is added<term> is <pattern>
: bool
Implement a Tokenize
pass before the Parse
pass.
Tokenize
does not know mixfix operators and only generates a list of atom terms.
installations play
command launches the Minecraft server with a specific version# class definition
class add⟨a⟩ {
function +(a₁: a, a₂: a) → a;
};
# instance definition
instance add_int = add⟨int⟩ {
function +(a₁: int, a₂: int) → int {
# ...
};
};
# class use
function sum⟨a: add⟩(as: [a]) → a {
# ...
};
string → location/level
def
sRestricts the function to be a leaf one for optimization.
For tracking the world and command source stacks.
The following ill-phased code elaborates successfully.
function f () → int =
let x = [`0];
0
⊢ code i8_array <: collection i8
⊢ code i32_array <: collection i32
⊢ code i64_array <: collection i64
τ : tag, α : type τ ⊢ code (vec α) <: collection α
const def f(xs : collection i32) : collection α := xs
test def g :=
let _ := $f(`[1, 2, 3]);
let _ := $f(`[i32; 1, 2, 3]);
true;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.