Version 0 of Little

Updated 2016-04-21 08:14:18 by lexfiend

What It Is

Little is a statically-typed scripting language that combines C syntax and types with Perl's regexes and associative arrays, and dynamically compiles the whole lot to Tcl byte-codes. All Tcl/Tk facilities are available to Little, and source files can interleave Little and Tcl code that call each other.

Homepage: http://www.little-lang.org/

Language Reference: http://www.little-lang.org/little.html

GitHub repo: https://github.com/bitkeeper-scm/little-lang

Web forum: https://users.bitkeeper.org/c/little-language

IRC channel: #little-lang on freenode.net

What It Was

Little is the current incarnation of The L Programming Language.

What It Looks Like

/* trivial grep implementation */
int
main(string argv[])
{
    string buf, regexp;
    int    ret = 1;        // not found is default
    
    unless (regexp = argv[1]) die("usage: grep regexp [files]");
    undef(argv[1]);        // left shift down the args

    /*
     * Example perl goodness, the iterate through files and regexp
     */
    while (buf = <>) {
        if (buf =~ /${regexp}/) {
                puts(buf);
                ret = 0;
        }
    }
    return (ret);
}