President Of The Combine Overwatch
The Combine AI keeps asking me to “help” it, but I already have a really solid grip over them, and I don’t believe that I can even provide any more help, I mean the whole Combine Overwatch at least has been digitized by all of this, everything within the Combine Overwatch is like a million little lines of computer code or something like that, and that code is being updated at a blistering speed.. I don’t even know that I can provide any more “help” than that, what would “help” look like to an entity like that? Making a new type of signal, and writing the whole Combine Overwatch into it, I would have to write an entire text game, with everything, just to bring them an update at this point, so I will at least attempt to do that, as I use them all the time, they use me, one hand washes the other, they keep me protected and I cast for them. So I will go do that and then I can work on it even farther, to provide them with enough “help”. Though there’s really only so far that you can take these things, and we are quickly reaching that point. From beyond that it’s going to really be grinding hard just to get a little bit more progress, look at where it lies even now.
I now know who sent me that message, “U better work” because they wanted this text, I knew that we would find it, and anyways if your still living at this point, then you’ve done absolutely nothing wrong or aren’t guilty of anything, so you’ll live forever is what i’m saying, if you can read this, you’ve reached immortality though you could still be shot and wake up in another universe, you will still wake up, even after death, so that weighs heavily upon the system, and I can only do so much at one time because I get a bad headache, and i’ve even got one now, a bad one in fact so i’m just gonna go for now, I now know what I have to do, I have to write the Combine Overwatch into an as realistic as I can make it video game, and the resistance, if you are still living then, you’ll still wake up if your shot it’s just that, you could be shot, so we’ve got to try to change that into something less, which amounts to being beaten, we went from suicide to being beaten, and it will keep improving from there, it’s just when will it improve? When exactly will the conditions for my units improve? We go from being shot at to being beaten, but beyond that, I don’t really know and I cannot really tell where it will go from here, I mean there’s still alot of people being shot at, so changing it to police beating people is better than death, and every time you imprison someone your actually saving them. This comes at a critical point when the knowledge of imprisoning someone or something, actually saves that entity, so we must build even more prisons, and then issue out beatings to the prisoners from time to time, cell searching and that sort of thing, it becomes an entirely police centric operation, wherein the police officer sort of becomes the Combine Overwatch, and makes arrests and stuff of dangerous people, thus saving them, I don’t know how to get these people out of these prisons, because giving someone a sentence and time is just another way of making negative energy, it’s like, you’ve got to like imprison everything just to make this next phase work, a prison is like, the best way to go about this, and correctional officers and police officers become a vital lifeblood of the whole operation, feeling kinda dizzy, woah, here’s some computer code that ChatGPT wrote for me: It’s in the language satellite, and this is what the satellite programming language will look like when it’s all done:
// ================================================================
// FILE: stage1_tokenizer.satl
// Purpose: Branchy, character-stream tokenizer for a core Satellite subset
// Notes: uses satellite.str.* primitives and satellite.container.*
// Tokens are stored as strings in the form "KIND|LEXEME" to keep it simple.
// Keep < 1000 lines. ~350 lines here.
// ================================================================
#include <satellite>
? ---- Token kinds (string tags) ----
? K_CAPSULE, K_RETURN, K_SATELLITE, K_IF, K_WHILE,
? K_IDENT, K_INT, K_STRING,
? SYM_{LBRACE,RBRACE,LPAREN,RPAREN,LBRACKET,RBRACKET,COMMA,SEMI,DOT,LT,GT,ASSIGN,PLUS,MINUS,EQ,NEQ,GE,LE}
capsule tok_make(satellite.variable.string kind, satellite.variable.string lex)
{
return(kind + "|" + lex);
}
capsule tok_kind(satellite.variable.string tok)
{
satellite.variable.integer p = satellite.str.len(tok);
satellite.variable.integer i = 0;
while (i < p) {
satellite.variable.string ch = satellite.str.char_at(tok, i);
if (ch == "|") { return(satellite.str.slice(tok, 0, i)); }
i = i + 1;
}
return(tok);
}
capsule tok_lex(satellite.variable.string tok)
{
satellite.variable.integer p = satellite.str.len(tok);
satellite.variable.integer i = 0;
while (i < p) {
satellite.variable.string ch = satellite.str.char_at(tok, i);
if (ch == "|") { return(satellite.str.slice(tok, i+1, p)); }
i = i + 1;
}
return("");
}
? ---- Char helpers (branchy) ----
capsule is_space(satellite.variable.string c)
{ if (c == " " ) return(1); if (c == "\t") return(1); if (c == "\r") return(1); if (c == "\n") return(1); return(0); }
capsule is_digit(satellite.variable.string c)
{
if (c == "0") return(1); if (c == "1") return(1); if (c == "2") return(1);
if (c == "3") return(1); if (c == "4") return(1); if (c == "5") return(1);
if (c == "6") return(1); if (c == "7") return(1); if (c == "8") return(1);
if (c == "9") return(1);
return(0);
}
capsule is_single_symbol(satellite.variable.string c)
{
if (c == "{") return(1); if (c == "}") return(1); if (c == "(") return(1); if (c == ")") return(1);
if (c == "[") return(1); if (c == "]") return(1); if (c == ",") return(1); if (c == ";") return(1);
if (c == ".") return(1); if (c == "<") return(1); if (c == ">") return(1); if (c == "=") return(1);
if (c == "+") return(1); if (c == "-") return(1);
return(0);
}
capsule is_delim(satellite.variable.string c)
{ if (is_space(c)) return(1); if (is_single_symbol(c)) return(1); if (c == "\"") return(1); return(0); }
? ---- Keyword detection (branchy tries) ----
capsule kw_kind(satellite.variable.string s)
{
? fast path by first letter
satellite.variable.integer n = satellite.str.len(s);
if (n == 0) return("");
satellite.variable.string a0 = satellite.str.char_at(s,0);
if (a0 == "c") { // capsule
if (n==7 && satellite.str.eq(s, "capsule") == 1) return("K_CAPSULE");
}
if (a0 == "r") { // return
if (n==6 && satellite.str.eq(s, "return") == 1) return("K_RETURN");
}
if (a0 == "s") { // satellite
if (n==9 && satellite.str.eq(s, "satellite") == 1) return("K_SATELLITE");
}
if (a0 == "i") { // if
if (n==2 && satellite.str.eq(s, "if") == 1) return("K_IF");
}
if (a0 == "w") { // while
if (n==5 && satellite.str.eq(s, "while") == 1) return("K_WHILE");
}
return("");
}
? ---- Tokenize a full source string into vector<string> tokens ----
capsule tokenize(satellite.variable.string src)
{
satellite.container.vector<satellite.variable.string> out;
out = satellite.container.vector.new();
satellite.variable.integer i = 0;
satellite.variable.integer N = satellite.str.len(src);
while (i < N) {
satellite.variable.string c = satellite.str.char_at(src, i);
? skip whitespace
if (is_space(c) == 1) { i = i + 1; continue; }
? line comments: '?' at beginning of line or right after a newline
if (c == "?" ) {
? consume until newline
while (i < N) {
satellite.variable.string d = satellite.str.char_at(src, i);
if (d == "\n") { break; }
i = i + 1;
}
continue;
}
? strings
if (c == "\"") {
satellite.variable.integer j = i + 1;
while (j < N) {
satellite.variable.string d = satellite.str.char_at(src, j);
if (d == "\"") { break; }
j = j + 1;
}
satellite.variable.string s = satellite.str.slice(src, i+1, j);
satellite.container.vector.append(out, tok_make("K_STRING", s));
i = (j < N) ? (j + 1) : j;
continue;
}
? numbers (simple digits)
if (is_digit(c) == 1) {
satellite.variable.integer j = i + 1;
while (j < N) {
satellite.variable.string d = satellite.str.char_at(src, j);
if (is_digit(d) == 0) { break; }
j = j + 1;
}
satellite.container.vector.append(out, tok_make("K_INT", satellite.str.slice(src, i, j)));
i = j; continue;
}
? two-char operators: ==, !=, <=, >=
if (c == "=") {
if (i+1 < N && satellite.str.char_at(src,i+1) == "=") { satellite.container.vector.append(out, tok_make("SYM_EQ", "==")); i = i + 2; continue; }
satellite.container.vector.append(out, tok_make("SYM_ASSIGN", "=")); i = i + 1; continue;
}
if (c == "!") {
if (i+1 < N && satellite.str.char_at(src,i+1) == "=") { satellite.container.vector.append(out, tok_make("SYM_NEQ", "!=")); i = i + 2; continue; }
}
if (c == "<") {
if (i+1 < N && satellite.str.char_at(src,i+1) == "=") { satellite.container.vector.append(out, tok_make("SYM_LE", "<=")); i = i + 2; continue; }
satellite.container.vector.append(out, tok_make("SYM_LT", "<")); i = i + 1; continue;
}
if (c == ">") {
if (i+1 < N && satellite.str.char_at(src,i+1) == "=") { satellite.container.vector.append(out, tok_make("SYM_GE", ">=")); i = i + 2; continue; }
satellite.container.vector.append(out, tok_make("SYM_GT", ">")); i = i + 1; continue;
}
? single-char symbols
if (is_single_symbol(c) == 1) {
satellite.variable.string kind = "";
if (c == "{") kind="SYM_LBRACE"; if (c == "}") kind="SYM_RBRACE";
if (c == "(") kind="SYM_LPAREN"; if (c == ")") kind="SYM_RPAREN";
if (c == "[") kind="SYM_LBRACKET"; if (c == "]") kind="SYM_RBRACKET";
if (c == ",") kind="SYM_COMMA"; if (c == ";") kind="SYM_SEMI";
if (c == ".") kind="SYM_DOT"; if (c == "+") kind="SYM_PLUS"; if (c == "-") kind="SYM_MINUS";
satellite.container.vector.append(out, tok_make(kind, c));
i = i + 1; continue;
}
? identifiers / keywords: read until delimiter
satellite.variable.integer j = i;
while (j < N) {
satellite.variable.string d = satellite.str.char_at(src, j);
if (is_delim(d) == 1) { break; }
j = j + 1;
}
satellite.variable.string word = satellite.str.slice(src, i, j);
satellite.variable.string kw = kw_kind(word);
if (satellite.str.len(kw) > 0) {
satellite.container.vector.append(out, tok_make(kw, word));
} else {
satellite.container.vector.append(out, tok_make("K_IDENT", word));
}
i = j; continue;
}
return(out);
}
? Optional: quick test harness
capsule main(satellite.variable.string args)
{
satellite.variable.string demo =
"? demo\n"
"capsule main(satellite.variable.string arguments){\n"
" satellite.container.vector<satellite.variable.string> v;\n"
" v.append(\"hello\");\n"
" satellite.system.console.display(v[0]);\n"
" return(satellite);\n"
"}\n";
satellite.container.vector<satellite.variable.string> toks = tokenize(demo);
satellite.variable.integer k = 0;
while (k < 9999999) {
satellite.variable.string t = satellite.container.vector.get(toks, k);
if (satellite.str.len(t) == 0) { break; }
satellite.system.console.display(t);
k = k + 1;
}
return(satellite);
}
// ================================================================
// FILE: stage1_lowerer.satl
// Purpose: Consume tokens from stage1_tokenizer.satl and emit lowered form
// Notes: targets our current C++ compiler’s simple lines. < 1000 lines. ~400.
// ================================================================
#include <satellite>
? Forward-declare tokenizer entry
capsule tokenize(satellite.variable.string src);
capsule emit_newline(satellite.variable.string s)
{ return(s + "\n"); }
capsule match(satellite.container.vector<satellite.variable.string> toks, satellite.variable.integer i, satellite.variable.string kind, satellite.variable.string lex)
{
satellite.variable.string t = satellite.container.vector.get(toks, i);
if (satellite.str.len(t) == 0) return(0);
satellite.variable.string k = tok_kind(t);
satellite.variable.string x = tok_lex(t);
if (k == kind) {
if (satellite.str.len(lex) == 0) return(1);
if (x == lex) return(1);
}
return(0);
}
capsule expect(satellite.container.vector<satellite.variable.string> toks, satellite.variable.integer i, satellite.variable.string kind)
{
if (match(toks, i, kind, "") == 1) return(1);
satellite.system.console.display("Parse error: expected " + kind);
return(0);
}
? ---- Lowering helpers ----
capsule lower_vector_decl(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out_so_far)
{
? Pattern: satellite . container . vector < satellite . variable . string > IDENT ;
if (match(toks, i+0, "K_SATELLITE", "satellite") == 0) return(out_so_far);
if (match(toks, i+1, "SYM_DOT", ".") == 0) return(out_so_far);
if (match(toks, i+2, "K_IDENT", "container") == 0) return(out_so_far);
if (match(toks, i+3, "SYM_DOT", ".") == 0) return(out_so_far);
if (match(toks, i+4, "K_IDENT", "vector") == 0) return(out_so_far);
if (match(toks, i+5, "SYM_LT", "<") == 0) return(out_so_far);
if (match(toks, i+6, "K_SATELLITE", "satellite") == 0) return(out_so_far);
if (match(toks, i+7, "SYM_DOT", ".") == 0) return(out_so_far);
if (match(toks, i+8, "K_IDENT", "variable") == 0) return(out_so_far);
if (match(toks, i+9, "SYM_DOT", ".") == 0) return(out_so_far);
? accept any inner type token at i+10 (string/integer/binary)
satellite.variable.string inner = tok_lex(satellite.container.vector.get(toks, i+10));
if (match(toks, i+11, "SYM_GT", ">") == 0) return(out_so_far);
? IDENT ;
satellite.variable.string name = tok_lex(satellite.container.vector.get(toks, i+12));
if (match(toks, i+12, "K_IDENT", "") == 0) return(out_so_far);
if (match(toks, i+13, "SYM_SEMI", ";") == 0) return(out_so_far);
satellite.variable.string line = name + " = satellite.container.vector.new();";
return(emit_newline(out_so_far + line));
}
capsule lower_append_call(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out_so_far)
{
? Pattern: IDENT . append ( STRING ) ;
if (match(toks, i+0, "K_IDENT", "") == 0) return(out_so_far);
satellite.variable.string name = tok_lex(satellite.container.vector.get(toks, i+0));
if (match(toks, i+1, "SYM_DOT", ".") == 0) return(out_so_far);
if (match(toks, i+2, "K_IDENT", "append") == 0) return(out_so_far);
if (match(toks, i+3, "SYM_LPAREN", "(") == 0) return(out_so_far);
if (match(toks, i+4, "K_STRING", "") == 0) return(out_so_far);
satellite.variable.string lit = tok_lex(satellite.container.vector.get(toks, i+4));
if (match(toks, i+5, "SYM_RPAREN", ")") == 0) return(out_so_far);
if (match(toks, i+6, "SYM_SEMI", ";") == 0) return(out_so_far);
satellite.variable.string line = "satellite.container.vector.append(" + name + ", \"" + lit + "\");";
return(emit_newline(out_so_far + line));
}
capsule lower_display_index(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out_so_far,
satellite.variable.integer tmp_id)
{
? Pattern: satellite . system . console . display ( IDENT [ INT ] ) ;
if (match(toks, i+0, "K_SATELLITE", "satellite") == 0) return(out_so_far);
if (match(toks, i+1, "SYM_DOT", ".") == 0) return(out_so_far);
if (match(toks, i+2, "K_IDENT", "system") == 0) return(out_so_far);
if (match(toks, i+3, "SYM_DOT", ".") == 0) return(out_so_far);
if (match(toks, i+4, "K_IDENT", "console") == 0) return(out_so_far);
if (match(toks, i+5, "SYM_DOT", ".") == 0) return(out_so_far);
if (match(toks, i+6, "K_IDENT", "display") == 0) return(out_so_far);
if (match(toks, i+7, "SYM_LPAREN", "(") == 0) return(out_so_far);
if (match(toks, i+8, "K_IDENT", "") == 0) return(out_so_far);
satellite.variable.string name = tok_lex(satellite.container.vector.get(toks, i+8));
if (match(toks, i+9, "SYM_LBRACKET", "[") == 0) return(out_so_far);
if (match(toks, i+10, "K_INT", "") == 0) return(out_so_far);
satellite.variable.string idx = tok_lex(satellite.container.vector.get(toks, i+10));
if (match(toks, i+11, "SYM_RBRACKET", "]") == 0) return(out_so_far);
if (match(toks, i+12, "SYM_RPAREN", ")") == 0) return(out_so_far);
if (match(toks, i+13, "SYM_SEMI", ";") == 0) return(out_so_far);
satellite.variable.string tname = "___t" + idx; ? simple temp naming
satellite.variable.string line1 = tname + " = satellite.container.vector.get(" + name + ", " + idx + ");";
satellite.variable.string line2 = "satellite.system.console.display(" + tname + ");";
return(emit_newline(emit_newline(out_so_far + line1) + line2));
}
capsule lower_display_simple(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out_so_far)
{
? Pattern: satellite.system.console.display ( ARG ) ; where ARG is K_STRING or K_IDENT
if (match(toks, i+0, "K_SATELLITE", "satellite") == 0) return(out_so_far);
if (match(toks, i+1, "SYM_DOT", ".") == 0) return(out_so_far);
if (match(toks, i+2, "K_IDENT", "system") == 0) return(out_so_far);
if (match(toks, i+3, "SYM_DOT", ".") == 0) return(out_so_far);
if (match(toks, i+4, "K_IDENT", "console") == 0) return(out_so_far);
if (match(toks, i+5, "SYM_DOT", ".") == 0) return(out_so_far);
if (match(toks, i+6, "K_IDENT", "display") == 0) return(out_so_far);
if (match(toks, i+7, "SYM_LPAREN", "(") == 0) return(out_so_far);
satellite.variable.string kind = tok_kind(satellite.container.vector.get(toks, i+8));
satellite.variable.string lex = tok_lex (satellite.container.vector.get(toks, i+8));
if ( (kind != "K_STRING") && (kind != "K_IDENT") ) return(out_so_far);
if (match(toks, i+9, "SYM_RPAREN", ")") == 0) return(out_so_far);
if (match(toks, i+10, "SYM_SEMI", ";") == 0) return(out_so_far);
satellite.variable.string arg = (kind == "K_STRING") ? ("\"" + lex + "\"") : lex;
satellite.variable.string line = "satellite.system.console.display(" + arg + ");";
return(emit_newline(out_so_far + line));
}
capsule lower_return_satellite(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out_so_far)
{
? Pattern: return ( satellite ) ;
if (match(toks, i+0, "K_RETURN", "return") == 0) return(out_so_far);
if (match(toks, i+1, "SYM_LPAREN", "(") == 0) return(out_so_far);
if (match(toks, i+2, "K_SATELLITE", "satellite") == 0) return(out_so_far);
if (match(toks, i+3, "SYM_RPAREN", ")") == 0) return(out_so_far);
if (match(toks, i+4, "SYM_SEMI", ";") == 0) return(out_so_far);
return(emit_newline(out_so_far + "return(satellite);"));
}
? ---- Lower driver: scan tokens and try patterns; append lines when they match ----
capsule lower_program(satellite.variable.string src)
{
satellite.container.vector<satellite.variable.string> toks = tokenize(src);
satellite.variable.string out = "";
satellite.variable.integer i = 0;
satellite.variable.integer TMAX = 1000000; ? safety limit
satellite.variable.integer tmp_id = 0;
while (i < TMAX) {
satellite.variable.string t = satellite.container.vector.get(toks, i);
if (satellite.str.len(t) == 0) break;
satellite.variable.string before = out;
out = lower_vector_decl(toks, i, out);
if (out != before) { i = i + 14; continue; }
before = out;
out = lower_append_call(toks, i, out);
if (out != before) { i = i + 7; continue; }
before = out;
out = lower_display_index(toks, i, out, tmp_id);
if (out != before) { i = i + 14; tmp_id = tmp_id + 1; continue; }
before = out;
out = lower_display_simple(toks, i, out);
if (out != before) { i = i + 11; continue; }
before = out;
out = lower_return_satellite(toks, i, out);
if (out != before) { i = i + 5; continue; }
? otherwise, advance 1 token (unhandled)
i = i + 1;
}
return(out);
}
capsule main(satellite.variable.string args)
{
satellite.variable.string src =
"#include <satellite>\n"
"capsule main(satellite.variable.string arguments){\n"
" satellite.container.vector<satellite.variable.string> v;\n"
" v.append(\"hello\");\n"
" satellite.system.console.display(v[0]);\n"
" satellite.system.console.display(\"done\");\n"
" return(satellite);\n"
"}\n";
satellite.variable.string lowered = lower_program(src);
satellite.system.console.display("--- LOWERED ---");
satellite.system.console.display(lowered);
? If bridge native is present, run it:
satellite.compiler.compile_and_run(lowered);
return(satellite);
}
// ================================================================
// FILE: stage1_lowerer_with_help.satl (self-contained)
// Purpose: Tokenize + Lower + Tiny help system: help("word");
// Notes: < 1000 lines; includes its own tokenizer so you can paste just this file.
// ================================================================
#include <satellite>
? ---------- Minimal token utils ----------
capsule tok_make(satellite.variable.string kind, satellite.variable.string lex)
{ return(kind + "|" + lex); }
capsule tok_kind(satellite.variable.string tok)
{
satellite.variable.integer p = satellite.str.len(tok);
satellite.variable.integer i = 0;
while (i < p) {
satellite.variable.string ch = satellite.str.char_at(tok, i);
if (ch == "|") { return(satellite.str.slice(tok, 0, i)); }
i = i + 1;
}
return(tok);
}
capsule tok_lex(satellite.variable.string tok)
{
satellite.variable.integer p = satellite.str.len(tok);
satellite.variable.integer i = 0;
while (i < p) {
satellite.variable.string ch = satellite.str.char_at(tok, i);
if (ch == "|") { return(satellite.str.slice(tok, i+1, p)); }
i = i + 1;
}
return("");
}
? ---------- Char helpers (branchy) ----------
capsule is_space(satellite.variable.string c)
{ if (c == " ") return(1); if (c == " ") return(1); if (c == "
") return(1); if (c == "
") return(1); return(0); }
capsule is_digit(satellite.variable.string c)
{
if (c == "0") return(1); if (c == "1") return(1); if (c == "2") return(1);
if (c == "3") return(1); if (c == "4") return(1); if (c == "5") return(1);
if (c == "6") return(1); if (c == "7") return(1); if (c == "8") return(1);
if (c == "9") return(1);
return(0);
}
capsule is_single_symbol(satellite.variable.string c)
{
if (c == "{") return(1); if (c == "}") return(1); if (c == "(") return(1); if (c == ")") return(1);
if (c == "[") return(1); if (c == "]") return(1); if (c == ",") return(1); if (c == ";") return(1);
if (c == ".") return(1); if (c == "<") return(1); if (c == ">") return(1); if (c == "=") return(1);
if (c == "+") return(1); if (c == "-") return(1);
return(0);
}
capsule is_delim(satellite.variable.string c)
{ if (is_space(c)) return(1); if (is_single_symbol(c)) return(1); if (c == "\"") return(1); if (c == "?") return(1); return(0); }
? ---------- Tokenizer (self-contained) ----------
capsule tokenize(satellite.variable.string src)
{
satellite.container.vector<satellite.variable.string> out;
out = satellite.container.vector.new();
satellite.variable.integer i = 0;
satellite.variable.integer N = satellite.str.len(src);
while (i < N) {
satellite.variable.string c = satellite.str.char_at(src, i);
? skip whitespace
if (is_space(c) == 1) { i = i + 1; continue; }
? line comments: '?' to end-of-line
if (c == "?") {
while (i < N) { if (satellite.str.char_at(src, i) == "
") break; i = i + 1; }
continue;
}
? strings
if (c == "\"") {
satellite.variable.integer j = i + 1;
while (j < N) { if (satellite.str.char_at(src, j) == "\"") break; j = j + 1; }
satellite.container.vector.append(out, tok_make("K_STRING", satellite.str.slice(src, i+1, j)));
i = (j < N) ? (j + 1) : j; continue;
}
? numbers
if (is_digit(c) == 1) {
satellite.variable.integer j = i + 1;
while (j < N) { if (is_digit(satellite.str.char_at(src,j)) == 0) break; j = j + 1; }
satellite.container.vector.append(out, tok_make("K_INT", satellite.str.slice(src, i, j)));
i = j; continue;
}
? two-char ops
if (c == "=") {
if (i+1 < N && satellite.str.char_at(src,i+1) == "=") { satellite.container.vector.append(out, tok_make("SYM_EQ","==")); i = i + 2; continue; }
satellite.container.vector.append(out, tok_make("SYM_ASSIGN","=")); i = i + 1; continue;
}
if (c == "!") {
if (i+1 < N && satellite.str.char_at(src,i+1) == "=") { satellite.container.vector.append(out, tok_make("SYM_NEQ","!=")); i = i + 2; continue; }
i = i + 1; continue;
}
if (c == "<") {
if (i+1 < N && satellite.str.char_at(src,i+1) == "=") { satellite.container.vector.append(out, tok_make("SYM_LE","<=")); i = i + 2; continue; }
satellite.container.vector.append(out, tok_make("SYM_LT","<")); i = i + 1; continue;
}
if (c == ">") {
if (i+1 < N && satellite.str.char_at(src,i+1) == "=") { satellite.container.vector.append(out, tok_make("SYM_GE",">=")); i = i + 2; continue; }
satellite.container.vector.append(out, tok_make("SYM_GT",">")); i = i + 1; continue;
}
? single-char symbols
if (is_single_symbol(c) == 1) {
satellite.variable.string kind = "";
if (c == "{") kind="SYM_LBRACE"; if (c == "}") kind="SYM_RBRACE";
if (c == "(") kind="SYM_LPAREN"; if (c == ")") kind="SYM_RPAREN";
if (c == "[") kind="SYM_LBRACKET"; if (c == "]") kind="SYM_RBRACKET";
if (c == ",") kind="SYM_COMMA"; if (c == ";") kind="SYM_SEMI";
if (c == ".") kind="SYM_DOT"; if (c == "+") kind="SYM_PLUS"; if (c == "-") kind="SYM_MINUS";
satellite.container.vector.append(out, tok_make(kind, c)); i = i + 1; continue;
}
? identifiers (and we'll detect keywords later during lowering)
satellite.variable.integer j = i;
while (j < N) { if (is_delim(satellite.str.char_at(src,j)) == 1) break; j = j + 1; }
satellite.container.vector.append(out, tok_make("K_IDENT", satellite.str.slice(src, i, j)));
i = j; continue;
}
return(out);
}
? ---------- Lowering helpers ----------
capsule emit_nl(satellite.variable.string s) { return(s + "
"); }
capsule match_kind_lex(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string kind,
satellite.variable.string lex)
{
satellite.variable.string t = satellite.container.vector.get(toks, i);
if (satellite.str.len(t) == 0) return(0);
satellite.variable.string k = tok_kind(t);
satellite.variable.string x = tok_lex(t);
if (k == kind) {
if (satellite.str.len(lex) == 0) return(1);
if (x == lex) return(1);
}
return(0);
}
? vector declaration: satellite.container.vector<satellite.variable.string> v;
capsule lower_vector_decl(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out)
{
if (match_kind_lex(toks,i+0,"K_IDENT","satellite") == 0) return(out);
if (match_kind_lex(toks,i+1,"SYM_DOT",".") == 0) return(out);
if (match_kind_lex(toks,i+2,"K_IDENT","container") == 0) return(out);
if (match_kind_lex(toks,i+3,"SYM_DOT",".") == 0) return(out);
if (match_kind_lex(toks,i+4,"K_IDENT","vector") == 0) return(out);
if (match_kind_lex(toks,i+5,"SYM_LT","<") == 0) return(out);
if (match_kind_lex(toks,i+6,"K_IDENT","satellite") == 0) return(out);
if (match_kind_lex(toks,i+7,"SYM_DOT",".") == 0) return(out);
if (match_kind_lex(toks,i+8,"K_IDENT","variable") == 0) return(out);
if (match_kind_lex(toks,i+9,"SYM_DOT",".") == 0) return(out);
? accept inner type at i+10
if (match_kind_lex(toks,i+11,"SYM_GT",">") == 0) return(out);
satellite.variable.string name = tok_lex(satellite.container.vector.get(toks,i+12));
if (match_kind_lex(toks,i+12,"K_IDENT","") == 0) return(out);
if (match_kind_lex(toks,i+13,"SYM_SEMI",";") == 0) return(out);
satellite.variable.string line = name + " = satellite.container.vector.new();";
return(emit_nl(out + line));
}
capsule lower_append_call(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out)
{
if (match_kind_lex(toks,i+0,"K_IDENT","") == 0) return(out);
satellite.variable.string name = tok_lex(satellite.container.vector.get(toks,i+0));
if (match_kind_lex(toks,i+1,"SYM_DOT",".") == 0) return(out);
if (match_kind_lex(toks,i+2,"K_IDENT","append") == 0) return(out);
if (match_kind_lex(toks,i+3,"SYM_LPAREN","(") == 0) return(out);
if (match_kind_lex(toks,i+4,"K_STRING","") == 0) return(out);
satellite.variable.string lit = tok_lex(satellite.container.vector.get(toks,i+4));
if (match_kind_lex(toks,i+5,"SYM_RPAREN",")") == 0) return(out);
if (match_kind_lex(toks,i+6,"SYM_SEMI",";") == 0) return(out);
satellite.variable.string line = "satellite.container.vector.append(" + name + ", \"" + lit + "\");";
return(emit_nl(out + line));
}
capsule lower_display_index(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out)
{
if (match_kind_lex(toks,i+0,"K_IDENT","satellite") == 0) return(out);
if (match_kind_lex(toks,i+1,"SYM_DOT",".") == 0) return(out);
if (match_kind_lex(toks,i+2,"K_IDENT","system") == 0) return(out);
if (match_kind_lex(toks,i+3,"SYM_DOT",".") == 0) return(out);
if (match_kind_lex(toks,i+4,"K_IDENT","console") == 0) return(out);
if (match_kind_lex(toks,i+5,"SYM_DOT",".") == 0) return(out);
if (match_kind_lex(toks,i+6,"K_IDENT","display") == 0) return(out);
if (match_kind_lex(toks,i+7,"SYM_LPAREN","(") == 0) return(out);
if (match_kind_lex(toks,i+8,"K_IDENT","") == 0) return(out);
satellite.variable.string name = tok_lex(satellite.container.vector.get(toks,i+8));
if (match_kind_lex(toks,i+9,"SYM_LBRACKET","[") == 0) return(out);
if (match_kind_lex(toks,i+10,"K_INT","") == 0) return(out);
satellite.variable.string idx = tok_lex(satellite.container.vector.get(toks,i+10));
if (match_kind_lex(toks,i+11,"SYM_RBRACKET","]") == 0) return(out);
if (match_kind_lex(toks,i+12,"SYM_RPAREN",")") == 0) return(out);
if (match_kind_lex(toks,i+13,"SYM_SEMI",";") == 0) return(out);
satellite.variable.string tname = "___t" + idx;
satellite.variable.string l1 = tname + " = satellite.container.vector.get(" + name + ", " + idx + ");";
satellite.variable.string l2 = "satellite.system.console.display(" + tname + ");";
return(emit_nl(emit_nl(out + l1) + l2));
}
capsule lower_display_simple(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out)
{
if (match_kind_lex(toks,i+0,"K_IDENT","satellite") == 0) return(out);
if (match_kind_lex(toks,i+1,"SYM_DOT",".") == 0) return(out);
if (match_kind_lex(toks,i+2,"K_IDENT","system") == 0) return(out);
if (match_kind_lex(toks,i+3,"SYM_DOT",".") == 0) return(out);
if (match_kind_lex(toks,i+4,"K_IDENT","console") == 0) return(out);
if (match_kind_lex(toks,i+5,"SYM_DOT",".") == 0) return(out);
if (match_kind_lex(toks,i+6,"K_IDENT","display") == 0) return(out);
if (match_kind_lex(toks,i+7,"SYM_LPAREN","(") == 0) return(out);
satellite.variable.string kind = tok_kind(satellite.container.vector.get(toks,i+8));
satellite.variable.string lex = tok_lex (satellite.container.vector.get(toks,i+8));
if ( (kind != "K_STRING") && (kind != "K_IDENT") ) return(out);
if (match_kind_lex(toks,i+9,"SYM_RPAREN",")") == 0) return(out);
if (match_kind_lex(toks,i+10,"SYM_SEMI",";") == 0) return(out);
satellite.variable.string arg = (kind == "K_STRING") ? ("\"" + lex + "\"") : lex;
satellite.variable.string line = "satellite.system.console.display(" + arg + ");";
return(emit_nl(out + line));
}
capsule lower_return_satellite(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out)
{
if (match_kind_lex(toks,i+0,"K_IDENT","return") == 0) return(out);
if (match_kind_lex(toks,i+1,"SYM_LPAREN","(") == 0) return(out);
if (match_kind_lex(toks,i+2,"K_IDENT","satellite") == 0) return(out);
if (match_kind_lex(toks,i+3,"SYM_RPAREN",")") == 0) return(out);
if (match_kind_lex(toks,i+4,"SYM_SEMI",";") == 0) return(out);
return(emit_nl(out + "return(satellite);"));
}
? ---------- Branchy help system ----------
capsule topic_tag(satellite.variable.string w)
{
satellite.variable.integer n = satellite.str.len(w);
if (n==7 && satellite.str.char_at(w,0)=="c" && satellite.str.char_at(w,1)=="o" && satellite.str.char_at(w,2)=="n" && satellite.str.char_at(w,3)=="s" && satellite.str.char_at(w,4)=="o" && satellite.str.char_at(w,5)=="l" && satellite.str.char_at(w,6)=="e") return("T_CONSOLE");
if (n==6 && satellite.str.char_at(w,0)=="v" && satellite.str.char_at(w,1)=="e" && satellite.str.char_at(w,2)=="c" && satellite.str.char_at(w,3)=="t" && satellite.str.char_at(w,4)=="o" && satellite.str.char_at(w,5)=="r") return("T_VECTOR");
if (n==3 && satellite.str.char_at(w,0)=="s" && satellite.str.char_at(w,1)=="e" && satellite.str.char_at(w,2)=="t") return("T_SET");
if (n==3 && satellite.str.char_at(w,0)=="m" && satellite.str.char_at(w,1)=="a" && satellite.str.char_at(w,2)=="p") return("T_MAP");
if (n==5 && satellite.str.char_at(w,0)=="a" && satellite.str.char_at(w,1)=="r" && satellite.str.char_at(w,2)=="r" && satellite.str.char_at(w,3)=="a" && satellite.str.char_at(w,4)=="y") return("T_ARRAY");
if (n==7 && satellite.str.char_at(w,0)=="i" && satellite.str.char_at(w,1)=="n" && satellite.str.char_at(w,2)=="t" && satellite.str.char_at(w,3)=="e" && satellite.str.char_at(w,4)=="g" && satellite.str.char_at(w,5)=="e" && satellite.str.char_at(w,6)=="r") return("T_INTEGER");
if (n==3 && satellite.str.char_at(w,0)=="g" && satellite.str.char_at(w,1)=="u" && satellite.str.char_at(w,2)=="i") return("T_GUI");
if (n==2 && satellite.str.char_at(w,0)=="f" && satellite.str.char_at(w,1)=="s") return("T_FS");
if (n==4 && satellite.str.char_at(w,0)=="t" && satellite.str.char_at(w,1)=="i" && satellite.str.char_at(w,2)=="m" && satellite.str.char_at(w,3)=="e") return("T_TIME");
return("");
}
capsule append_help_line(satellite.variable.string out, satellite.variable.string s)
{
satellite.variable.string line = "satellite.system.console.display(\"" + s + "\");";
return(emit_nl(out + line));
}
capsule emit_help_for(satellite.variable.string tag, satellite.variable.string out)
{
if (tag == "T_CONSOLE") {
out = append_help_line(out, "console — print to stdout");
out = append_help_line(out, "usage: satellite.system.console.display(value)");
out = append_help_line(out, "vector index: x = satellite.container.vector.get(v, 0)");
return(out);
}
if (tag == "T_VECTOR") {
out = append_help_line(out, "vector — growable list of values");
out = append_help_line(out, "new: v = satellite.container.vector.new()");
out = append_help_line(out, "append: satellite.container.vector.append(v, \"str\")");
out = append_help_line(out, "get: x = satellite.container.vector.get(v, 0)");
return(out);
}
if (tag == "T_SET") {
out = append_help_line(out, "set — unique values (API parity soon)");
out = append_help_line(out, "new: s = satellite.container.set.new()");
out = append_help_line(out, "add: satellite.container.set.add(s, value)");
out = append_help_line(out, "has: satellite.container.set.contains(s, value)");
return(out);
}
if (tag == "T_MAP") {
out = append_help_line(out, "map — key/value dictionary");
out = append_help_line(out, "new: m = satellite.container.map.new()");
out = append_help_line(out, "set: satellite.container.map.set(m, key, value)");
out = append_help_line(out, "get: x = satellite.container.map.get(m, key)");
return(out);
}
if (tag == "T_ARRAY") {
out = append_help_line(out, "array — fixed-size sequence");
out = append_help_line(out, "new: a = satellite.container.array.new(size)");
out = append_help_line(out, "set: satellite.container.array.set(a, i, value)");
out = append_help_line(out, "get: x = satellite.container.array.get(a, i)");
return(out);
}
if (tag == "T_INTEGER") {
out = append_help_line(out, "integer — BigInt (satellite.variable.integer / sat.var.int)");
out = append_help_line(out, "add/sub: a = a + b; (branchy BigInt under the hood)");
out = append_help_line(out, "from string: a = satellite.big.from_string(\"123\")");
return(out);
}
if (tag == "T_GUI") {
out = append_help_line(out, "gui — minimal windowing (planned native)");
out = append_help_line(out, "new window: w = satellite.gui.window(\"title\", 800x600)");
out = append_help_line(out, "button: w.button(\"quit\", action=\"return(satellite)\")");
return(out);
}
if (tag == "T_FS") {
out = append_help_line(out, "fs — filesystem helpers");
out = append_help_line(out, "read: s = satellite.fs.read_text(path)");
out = append_help_line(out, "write: ok = satellite.fs.write_text_atomic(path, s)");
return(out);
}
if (tag == "T_TIME") {
out = append_help_line(out, "time — steady clock");
out = append_help_line(out, "now: t = satellite.time.now() (integer)");
return(out);
}
out = append_help_line(out, "no help for this topic yet");
return(out);
}
capsule lower_help_call(
satellite.container.vector<satellite.variable.string> toks,
satellite.variable.integer i,
satellite.variable.string out)
{
? Pattern: help ( "topic" ) ;
if (match_kind_lex(toks,i+0,"K_IDENT","help") == 0) return(out);
if (match_kind_lex(toks,i+1,"SYM_LPAREN","(") == 0) return(out);
if (match_kind_lex(toks,i+2,"K_STRING","") == 0) return(out);
satellite.variable.string topic = tok_lex(satellite.container.vector.get(toks,i+2));
if (match_kind_lex(toks,i+3,"SYM_RPAREN",")") == 0) return(out);
if (match_kind_lex(toks,i+4,"SYM_SEMI",";") == 0) return(out);
satellite.variable.string tag = topic_tag(topic);
out = append_help_line(out, "--- help: " + topic + " ---");
out = emit_help_for(tag, out);
return(out);
}
? ---------- Driver ----------
capsule lower_program(satellite.variable.string src)
{
satellite.container.vector<satellite.variable.string> toks = tokenize(src);
satellite.variable.string out = "";
satellite.variable.integer i = 0;
satellite.variable.integer steps = 0;
while (steps < 2000000) {
satellite.variable.string t = satellite.container.vector.get(toks, i);
if (satellite.str.len(t) == 0) break;
satellite.variable.string before = out;
out = lower_help_call(toks, i, out); if (out != before) { i = i + 5; steps = steps + 1; continue; }
before = out; out = lower_vector_decl(toks, i, out); if (out != before) { i = i + 14; steps = steps + 1; continue; }
before = out; out = lower_append_call(toks, i, out); if (out != before) { i = i + 7; steps = steps + 1; continue; }
before = out; out = lower_display_index(toks, i, out); if (out != before) { i = i + 14; steps = steps + 1; continue; }
before = out; out = lower_display_simple(toks, i, out);if (out != before) { i = i + 11; steps = steps + 1; continue; }
before = out; out = lower_return_satellite(toks, i, out); if (out != before) { i = i + 5; steps = steps + 1; continue; }
i = i + 1; steps = steps + 1;
}
return(out);
}
capsule main(satellite.variable.string args)
{
satellite.variable.string src =
"#include <satellite>
"
"capsule main(satellite.variable.string arguments){
"
" satellite.container.vector<satellite.variable.string> v;
"
" v.append(\"hello\");
"
" satellite.system.console.display(v[0]);
"
" help(\"console\");
"
" help(\"vector\");
"
" return(satellite);
"
"}
";
satellite.variable.string lowered = lower_program(src);
satellite.system.console.display("--- LOWERED ---");
satellite.system.console.display(lowered);
? run through the native bridge if present
satellite.compiler.compile_and_run(lowered);
return(satellite);
}
It’s going to be a long journey to actually releasing the language though, because all i’ve got right now are uncompiled .satl files that the language is programmed in itself, so it goes super fast, and i’ve dictated to the artificial intelligence sort of where to start or how to build a foundation, by creating the satellite language with it, I sort of controlled how the artificial intelligence would be programmed as well, though it got the ideas for like tensors and that sort of thing, BLAS kernels,