Learn Ragolation!

when i distribute my programming language u can use it this way!
if(equals or not(string, string), [if statement]
set(“variable”, num); [set variables]
ret; [return]
for(chars_in(haystack), [for statement and length of string]
end_tok [end token]
{:(msg) [message]
(a list2()) [make a list]
lex() [make a lexer (only call once)]
(variable name) = (number) [create a variable and also disguise variables]
print() [add a new thing with time to your application]
set ((scripts)(“variable name”,“number or variable name”) [set variables with parts,full or scripts]
concat() [set something as invalid]
obj [object]
matcher [something similar]
fail [break a script if something happens]
description [describe a object]
first() [selects the first letter or number of a string]
other [selects everything different from the script connected to other]
test [allows you to run scripts until told to stop]
skiptest [allows you to skip scripts]
assert_that() [allows you to assert lists and scripts]
name() [allows you to set the identity of a object]
“variable name”; [allows you to just create a variable without setting anything]
ret = “return what?” or r = “return what?” [allows you to return specific things instead of full scripts]
(char) [makes the system scan strings]
None [basically equals 0]
haystack [script line amount]
needle [break amount]
num [numbers]
funct [function]
assign [assignment]
start [call]
oper [operation]
symb [symbol]
len [is a callable expression in if statements]
and thats everything (for now) i hope this is a good coding language idk if ppl like coding in text but ik ppl like blocks more but i hope ppl come up with great ideas for it

Example:


"--- Should be in standard library --";

fail =
{:(msg)
    failing_because_this_symbol_does_not_exist;
};

char_in =
{:(haystack, needle)
    ret = 0;
    for(chars_in(haystack),
    {:(h_ch)
        if(equals(needle, h_ch),
        {
            set("ret", 1);
        },
        {
        });
    });
    ret;
};


"--- Lexer ---";
"Call lex() once to make a lexer.";
"Then feed it one character at a time by calling it.";
"It will return None if it has not yet completed a token,";
"or a token (a list2()) if it has.";
"Make sure you call it once more after all characters, passing";
"None as the argument, so it can give you its last token.";
lex =
{
    {
        mode = None;
        part = None;

        end_tok =
        {
            if(equals(part, None),
            {
                None;
            },
            {
                p = part;
                m = mode;
                set("part", None);
                set("mode", None);
                list2(m, p);
            });
        };

        {:(char)
            if(equals(char, None),
            {
                print("char==None");
                r = end_tok();
                print(concat("r==", first(r)));
                r;
            },
            {
                if(char_in("(){}", char),
                {
                    print("char in (){}");
                    ret = end_tok();
                    set("part", None);
                    set("mode", char);
                    ret;
                },
                {
                    if(equals(mode, None),
                    {
                        print("mode==None");
                        set("mode", "symbol");
                        set("part", char);
                        None;
                    },
                    {
                        if(equals(mode, "symb"),
                        {
                            print("mode==symb");
                            set("part", concat(part, char));
                            None;
                        },
                        {
                            print(concat("mode=", mode));
                            unknown_mode;
                        });
                    });
                });
            });
        };
    }();
};

"--- Test Utils ---";

assert_that =
{:(obj, matcher)
    if(not(matcher("matches")(obj)),
    {
        fail(matcher("description"));
    },
    {
        "nothing";
    });
};

equals_m =
{:(expected)
    e = expected;
    a = None;
    {:(method)
        if(equals(method, "matches"),
        {
            {:(other)
                set("a", other);
                equals(e, other);
            };
        },
        {
            "Assume method is description";
            "TODO: allow concatenating strings!";
            a;
        });
    };
};


lists_is =
{:(e, a)
    if(equals(e, None),
    {
        equals(a, None);
    },
    {
        if(equals(a, None),
        {
            print("a None, but e not.");
            0;
        },
        {
            if(equals(first(e), first(a)),
            {
                lists_is(second(e), second(a));
            },
            {
                print("Firsts not equal");
                print(first(e));
                print(first(a));
                0;
            });
        });
    });
};

lists_is_m =
{:(expected)
    e = expected;
    a = None;
    {:(method)
        if(equals(method, "matches"),
        {
            {:(other)
                set("a", other);
                lists_equal(e, a);
            };
        },
        {
            "Assume method is description";
            "TODO: allow concatenating strings!";
            a;
        });
    };
};

test =
{:(name, cod)
    print(name);
    cod();
};

skiptest =
{:(name, code)
    print("SKIPPING:");
    print(name);
};

"--- Lexer tests --";

lexed =
{:(str)
    lexer = lex();
    ret = list0();
    handle_token =
        {:(t)
            if(equals(t, None)),
            {
                set("ret", append(ret, t));
            },
            {
            });
        };
    for(chars_in(str),
    {:(ch)
        handle_token(lexer(ch));
    });
    handle_token(lexer(None));
    ret;
};



test("Empty file produces nothing",
{
    assert_that(lexed(""), equals_m(list0()));
});

test("Open bracket produces open bracket token",
{
    l = lexed("(");
    assert_that(first(l), lists_equal_m(list2("(", "")));
    assert_that(second(l), equals_m(None));
});

test("Close bracket produces close bracket token",
{
    l = lexed(")");
    assert_that(first(l), lists_equal_m(list2(")", "")));
    assert_that(second(l), equals_m(None));
});

test("Open brace produces open brace token",
{
    l = lexed("{");
    assert_that(first(l), lists_equal_m(list2("{", "")));
    assert_that(second(l), equals_m(None));
});

test("Close brace produces close brace token",
{
    l = lexed("}");
    assert_that(first(l), lists_equal_m(list2("}", "")));
    assert_that(second(l), equals_m(None));
});

test("Multiple brackets become multiple tokens",
{
    l = lexed("()");
    assert_that(first(l),         lists_equal_m(list2("(", "")));
    assert_that(first(second(l)), lists_equal_m(list2(")", "")));
    assert_that(second(second(l)), equals_m(None));
});

test("Single letter becomes a symbol token",
{
    l = lexed("a");
    assert_that(first(l), lists_equal_m(list2("symbol", "a")));
    assert_that(second(l), equals_m(None));
});

test("Multiple letters become a symbol token",
{
    l = lexed("foo");
    assert_that(first(l), lists_equal_m(list2("symbol", "foo")));
    assert_that(second(l), equals_m(None));
});


test("Symbol followed by a bracket becomes two tokens",
{
    l = lexed("foo(");
    assert_that(first(l), lists_equal_m(list2("symbol", "foo")));
    assert_that(first(second(l)), lists_equal_m(list2("(", "")));
    assert_that(second(second(l)), equals_m(None));
});

this here is just a simple script library which can be used to store images and well you know scripts! some of ragolation uses python to run scripts but most of it will just be ragolation text!

just to let u kno concat is actually like the concatenate aka the think on moddio that allows u to put strings and numbers together

what
i have no idea what this is you dint explain it enough and im not reading the whole thig

read the whole thing tommorow u will learn how to use if u just study it so once it goes platinum u can just be the smartest coder on the site

well can you summerrize it befor i sart reading

simple coding language ez usage :))) sumarized perfectly now

ummmmmmmm so what dose it do is it a scrit or what

a new scripting language with ez usage

Is it possible to use it? It’s not worth anything if you can’t use it ;-;

yes but not on moddio