Skip to content

Instantly share code, notes, and snippets.

View be5invis's full-sized avatar

Belleve be5invis

View GitHub Profile
@be5invis
be5invis / k-types.txt
Last active December 31, 2015 18:29
Conceptional language + type system
// data types
type[T] Point {
data x : T
data y : T
}
type IntPoint = Point[Integer]
// complex concepts
type[T <= Differable] DifferenceOf {
@be5invis
be5invis / ceki-tco.js
Last active January 28, 2016 20:55
CEK interpreter with TCO example
// noprotect
function Lambda(param, body, e){
this.param = param
this.body = body
this.env = e
};
Lambda.prototype.apply = function(t, args, k0){
var e_ = Object.create(this.env);
for(var j = 0; j < this.param.length; j++){
e_[this.param[j]] = args[j];
@be5invis
be5invis / cjson.md
Last active January 30, 2016 21:49

COMPRESSED BIN JSON

document = stringtable ctortable value
stringtable = length string*length
ctortable = length constructor*length
constructor = 
	F0-FF value // Internal constructor
	00 key      // External constructor

value = 
@be5invis
be5invis / themepatch.css
Created February 20, 2016 19:15
VSCode theme patch
/***** PATCHES *****/
.monaco-workbench.hc-black { color: #FFF; background-color: #000; }
.monaco-workbench.hc-black .sidebar .separator { background-color: #000; border: 1px solid #6FC3DF; }
.monaco-workbench.hc-black input,
.monaco-workbench.hc-black textarea {
background-color: #000;
}
.monaco-workbench.hc-black .monaco-action-bar .action-item.disabled .action-label.disabled,
.monaco-workbench.hc-black .monaco-action-bar .action-item.disabled .action-label.disabled:hover {
opacity: 1;
@be5invis
be5invis / gist:fc63b8b7e24c87e26f3b
Created March 3, 2016 13:16
JK proposal syntax
[-- article --]
[title] Article Title
[arthur] be5invis
[summary] This is the summary of the article
[section] Section One
This is a paragraph.
This is another.
[figure 1] The Sample Image of The Storage Method.
<div id="example">
<test v-bind:type=type v-bind:a="a" v-bind:b="b"></test>
</div>
declare-glyph "a.singlestorey" : begin
rhythm {blank curve blank} {blank straight blank}
include : OBarRightShape
include : VBarRight ([rhythm.right.middle] <> 0) xheight
declare-glyph "a" [unicode-of "a"] : begin
include : glyph : "a" + parameters.variantSelector.a
@be5invis
be5invis / CTF1.h
Last active October 21, 2016 00:49
CTF1.h
typedef uint16_t glyphid_t;
typedef uint16_t shapeid_t;
typedef int16_t sshapeid_t;
typedef struct {...} position_t;
typedef struct CTF1Point {
position_t x;
position_t y;
} CTF1Point;
@be5invis
be5invis / jlos.jl
Last active December 1, 2016 12:32
module jlos
import Base.getindex
import Base.colon
import Base.(-)
import Base.(<<)
export endl, @method, Message
function <<{T <: IO, X}(io::T, x::X)::T
@be5invis
be5invis / idris_main.c
Created February 3, 2017 04:18
main.c compiled from main.idr
#include "math.h"
#include "idris_rts.h"
#include "idris_bitstring.h"
#include "idris_stdfgn.h"
void _idris_assert_95_unreachable(VM*, VAL*);
void _idris_call_95__95_IO(VM*, VAL*);
void _idris_io_95_bind(VM*, VAL*);
void _idris_io_95_pure(VM*, VAL*);
void _idris_Main_46_main(VM*, VAL*);
void _idris_mkForeignPrim(VM*, VAL*);