Skip to content
Projetos

Sobre

Linguagem interpretada com foco em expressividade e segurança de tipos. (Este é um espelho de https://gitlab.com/fascinatedbox/lily)

Linguagens e ambientes de execução

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
0
em 7 dias
-1
em 15 dias
-2
em 1 mês
-1

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original
Lily Logo

Discord Pipeline Status Windows Build Coverage Report

Lily

Lily is a programming language focused on expressiveness and type safety.

Sample

enum Color { Black, Blue, Cyan, Green, Magenta, Red, White, Yellow }

class Terminal(public var @foreground: Color, width_str: String)
{
    public var @width = width_str.parse_i().unwrap_or(80)

    public define set_fg(new_color: Color) {
        @foreground = new_color
    }
}

var terms = [Terminal(Color.White, "A"), Terminal(.Red, "40")]

terms.each(|e| e.width += 20 )
     |> print

Features

Embeddable

Lily may be a statically-typed language, but the reference implementation is an interpreter. The interpreter as well as its API have been carefully designed with sandboxing in mind. As a result, it's possible to have multiple interpreters exist alongside each other.

Shorter edit cycle

Another benefit from having the reference implementation as an interpreter is a shorter turn around time. The interpreter's parser is comparable in speed to that of languages using an interpreter as their reference.

Building

You need a C compiler (C11+) and CMake (3.10+). There are no external dependencies.

To build Lily, execute the following in a terminal:

cmake .
cmake --build .

Note: Windows users may need to add -G"Unix Makefiles" to the end of the cmake invocation.

The above will build the lily executable, as well as a liblily that you can use with your program. It also builds pre-commit-tests.

Running tests

The centerpiece of Lily's testing is test_main.lily in the test directory. That file imports and invokes a large number of tests that cover a lot of Lily.

The make command also builds covlib and pre-commit-tests. No additional commands are necessary. covlib is a library that tests some parts of Lily that native code can't test. pre-commit-tests is a special runner that executes test_main.lily.

To run Lily's tests, execute pre-commit-tests from the directory it's in after building Lily.

Resources

Packaging

The lily-garden repository contains a package manager (Garden) that simplifies the install of Lily packages.

License

MIT

Explore projetos relacionados

Carregando…