// Focus is on having a simple toolchain to build onto. // For this reason, MVP syntax should stay as simple as possible. // The weird mixture of C and Lisp is a feature, I swear. // Global scope is initialized to zero. let g_heap; let g_another g_one; main argc argv { let hello; let world; g_heap = 8000; hello = (strdup "bonjour");;; [hello 6] = 'w'; world = (strdup "monde"); (print hello); (print " "); (print world); return 0; } alloc size { let ptr; ptr = g_heap; g_heap = (add g_heap size); return heap; } strdup str { let dest; let i; dest = (alloc (add [str 0] 1)); i = 0; while (lesseq i [str 0]) { let smile please; [dest i] = [str i]; i = (add i 1); } return dest; } print str { let i; i = 1; while (lesseq i [str 0]) { (putchar [str i]); i = (add i 1); } return 0; }