Cool Stuff
Spotlighted Projects
Web Assembly Game Of Life
Compile Brainfuck to Rust with Macros
macro_rules! frick {
( $( $code:tt )* ) => {
let mut mem: [u8; 30_000] = [0; 30_000];
let mut ptr = 0;
$(
instr!(mem ptr $code);
)*
};
Puffin: an interpreted language written in Rust
// recursively computes factorial of n
fact = fn(n) {
if (n < 2) {
return 1;
}
return n * fact(n - 1);
};
// Take a number from stdin, and compute the factorial
print(fact(input_num("Factorial: ")));