All Projects → FascinatedBox → Lily

FascinatedBox / Lily

Licence: mit
This repository has moved: https://gitlab.com/FascinatedBox/lily

Programming Languages

c
50402 projects - #5 most used programming language
language
365 projects

Projects that are alternatives of or similar to Lily

Tagha
Minimal, low-level, fast, and self-contained register-based bytecode virtual machine/runtime environment.
Stars: ✭ 101 (-90.66%)
Mutual labels:  interpreter, embeddable
Tagha
Minimal, low-level, fast, and self-contained register-based bytecode virtual machine/runtime environment.
Stars: ✭ 79 (-92.69%)
Mutual labels:  interpreter, embeddable
huginn
Programming language with no quirks, so simple every child can master it.
Stars: ✭ 41 (-96.21%)
Mutual labels:  interpreter, embeddable
Szl
A lightweight, embeddable scripting language
Stars: ✭ 134 (-87.6%)
Mutual labels:  interpreter, embeddable
embed
An embeddable, tiny Forth interpreter with metacompiler.
Stars: ✭ 80 (-92.6%)
Mutual labels:  interpreter, embeddable
rust lisp
A Rust-embeddable Lisp, with support for interop with native Rust functions
Stars: ✭ 128 (-88.16%)
Mutual labels:  interpreter, embeddable
Ligo
ligo language interpreter
Stars: ✭ 17 (-98.43%)
Mutual labels:  interpreter, embeddable
Goawk
A POSIX-compliant AWK interpreter written in Go
Stars: ✭ 995 (-7.96%)
Mutual labels:  interpreter
Algorithmmap
建立你的算法地图:如何高效学习算法;算法工程师:从小白到专家
Stars: ✭ 47 (-95.65%)
Mutual labels:  interpreter
Rascal
A simple Pascal interpreter written in rust.
Stars: ✭ 38 (-96.48%)
Mutual labels:  interpreter
Seax
A VM-based runtime environment for functional programming languages
Stars: ✭ 36 (-96.67%)
Mutual labels:  interpreter
Openxion
OpenXION - Reference Implementation of the XION Scripting Language
Stars: ✭ 40 (-96.3%)
Mutual labels:  interpreter
Hermes
C-like scripting language
Stars: ✭ 48 (-95.56%)
Mutual labels:  interpreter
Mips
MIPS assembler and simulator
Stars: ✭ 38 (-96.48%)
Mutual labels:  interpreter
Wasmjit
Small Embeddable WebAssembly Runtime
Stars: ✭ 1,063 (-1.67%)
Mutual labels:  interpreter
Brainfuck C
Brainfuck interpreter in C.
Stars: ✭ 36 (-96.67%)
Mutual labels:  interpreter
Mir
A light-weight JIT compiler based on MIR (Medium Internal Representation)
Stars: ✭ 1,075 (-0.56%)
Mutual labels:  interpreter
Pythonvm Rust
An incomplete stackless interpreter of Python bytecode, written in Rust.
Stars: ✭ 50 (-95.37%)
Mutual labels:  interpreter
U6a
Implementation of Unlambda, an esoteric programming language.
Stars: ✭ 46 (-95.74%)
Mutual labels:  interpreter
Sink
Minimal programming language for embedding small scripts in larger programs
Stars: ✭ 42 (-96.11%)
Mutual labels:  embeddable

Linux: Linux Build

Windows: Windows Build

Test Coverage: codecov

Lily

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

Sample

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

class Terminal(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(Color.Red, "40")]

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

Features

Templating

By default, Lily runs in standalone mode where all content is code to execute. But Lily can also be run in template mode. In template mode, code is between <?lily ... ?> tags. When a file is imported, it's always loaded in standalone mode, so that it doesn't accidentally send headers. Files that are imported are also namespaced (no 'global namespace').

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 and CMake (3.0.0 +). There are no external dependencies.

To build Lily, execute the following in a terminal:

cmake .

make

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.

Community

Lily is a very young language and the community is still growing.

  • Discord: Lily to chat with others in real-time.

  • IRC: freenode #lily is another way to chat with others.

  • Reddit: /r/lily for discussion around the language and providing support to new users.

Resources

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].