This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <sys/mman.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
static char *start; | |
static char *code; | |
// Registers: | |
// BL: current value of cell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define CONCAT2(x, y) x ## y | |
#define CONCAT(x, y) CONCAT2(x, y) | |
#define COMPONENT(...) | |
#define DEFEVENT(...) | |
#define DEFBUBBLE(...) | |
struct context { | |
#define DEFCONTEXT(type, name, default) type name; | |
#include "components.i" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dot = function(x1, y1, x2, y2) { | |
return x1 * x2 + y1 * y2; | |
}; | |
var Plane = function(x, y, d) { | |
this.x = x; | |
this.y = y; | |
this.d = d; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
f = open(sys.argv[1]).read().split("\n") | |
o = "[\n" | |
for l in f: | |
o += " " + ", ".join(l.strip().split(" ")) + ",\n" | |
o += "]" | |
print(o) |