View gist:d856a9410095472e087d03729d871f14
in:
pow7(x) ⮕ ret: pow(x, 7) ⮕ ret;
pow(x, n) ⮕ ret: eq(n, 0) ⮕ _2;
_2(x): branch(x, then3, elseif4);
then3: pow.ret(1);
elseif4: mod(pow.n, 2) ⮕ _5;
_5(x): eq(x, 0) ⮕ _6;
_6(x): branch(x, then7, else10);
then7: div(pow.n, 2) ⮕ _8;
View interpreter.lua
ARGINDEX_DEST = 2
Label = {}
Closure = {}
Parameter = {}
none = setmetatable({}, {
__tostring = function () return "none" end
})
View cotmta.cpp
// Syntax demo for writing Cheney on the MTA style code in C++11
// (see http://home.pipeline.com/~hbaker1/CheneyMTA.html for more info)
//
// Using variadic macros, I managed to design a syntax that is good enough
// to write in, as opposed to the automated code generation that COTMTA
// originally envisioned.
//
// key reasons why I intend to use this:
// * Writing a Scheme interpreter that keeps the C stack compact
View fractional_arithmetic.md

Fractional Arithmetic

When we represent numbers as fractions of integer numerator and denominator, we can perform arithmetic on these fractions. This is useful for situations where we wish to work with fractional values, but need lossless results, something that floating point encoding can not always guarantee.

We represent a fractional number as a tuple of two integer values, separated by a slash:

View vr_protocol.md

A Decentralized Virtual Reality Protocol

by Leonard Ritter, Duangle GbR

*The metaverse can be a utopia or it can be a dystopia. And we are very fortunate that the PC platform is the number one platform for serious computing today, and the internet underlying it are all completely open technologies. Anybody can build software. Anybody can distribute it. Anybody can do anything without getting anybody's permission. I feel we have seen a major retraction from that great state of affairs over the past decade, as closed platforms (...) have grown to the forefront of the industry. (...) And I wanted to point out that this was not inevitable. (...) As we are creating a new medium together it would be really tragic if the future metaverse that binds all humanity together into shared online environments were a closed platform controlled by a giant corporation. As always, they would use it to spam you with advertising. They would use it to gather information about your private life

View error_handling.txt
A program error occurs.
What immediate context might we want to provide?
1. File, line & column (let's call it an anchor) of the expression causing the error.
2. Anchor of each of the expressions that processed & forwarded values to the expression which caused the error.
* This gives you a quasi traceback of the execution chain. When the language is not
stack based, it's a challenge to figure out which preceding continuations to select
for printing.
3. For all participating expressions, the values of their input arguments when the error was caused.
View test.scm
# boot script
# the bangra executable looks for a boot file at
# path/to/executable.b and, if found, executes it.
bangra
let-syntax (scope)
structof
tupleof "#parent" scope
tupleof "call"
syntax-macro
View gist:c4e4e8198a5edaa9a9dcfac044fa1e7d
// so this is a typical implicit-continuation function
// as we know it from many languages:
function myfunc (f) {
f(2);
return 3;
}
// but this is how that function looks internally,
// with explicit control flow, invisible variables
View gist:fad74734f4f987c1d5c69378b5f44268
>unbuffer liminal "cff.n"
source:
(quote
(function fac ((n number))
(function fac-times
((n number)
(acc number))
(if (== n 0) acc
(fac-times (- n 1)
(* acc n))))
View cff.n
none
; work in progress
; CFF form implemented after
; Leissa et al., Graph-Based Higher-Order Intermediate Representation
; http://compilers.cs.uni-saarland.de/papers/lkh15_cgo.pdf
; some parts of the paper use hindley-milner notation
; https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system