mcenv / box Goto Github PK
View Code? Open in Web Editor NEWA dependently-typed programming language for Minecraft
Home Page: https://mcenv.github.io/book-box/
License: MIT License
A dependently-typed programming language for Minecraft
Home Page: https://mcenv.github.io/book-box/
License: MIT License
let name = 0; "Hello, #{name}!"
const
-only until string concatenation is addedImplement a Tokenize
pass before the Parse
pass.
Tokenize
does not know mixfix operators and only generates a list of atom terms.
⊢ 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;
Restricts the function to be a leaf one for optimization.
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]
def
s<term> is <pattern>
: bool
For tracking the world and command source stacks.
Represents functions only available in the meta-level.
installations play
command launches the Minecraft server with a specific versionThe following code fails in the pack phase.
function f () → int =
let x = 0
if true then x else 1
The following ill-phased code elaborates successfully.
function f () → int =
let x = [`0];
0
string → location/level
# 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 {
# ...
};
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.