Giter Site home page Giter Site logo

wingerse / lily Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fascinatedbox/lily

0.0 2.0 0.0 13.81 MB

An interpreted language with a focus on expressiveness and type safety

Home Page: http://lily-lang.org

License: MIT License

CMake 1.30% Python 3.40% C 91.60% C++ 1.68% Objective-C 0.47% Lua 0.81% Ruby 0.75%

lily's Introduction

Linux: Linux Build

Windows: Windows Build

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.

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

lily's People

Contributors

fascinatedbox avatar kevinji avatar crasm avatar stevedonovan avatar tyroxx avatar alpha123 avatar jonathonf avatar isidentical avatar ibara avatar iblech avatar acconut avatar rurban avatar eskatrem avatar gitter-badger avatar gernest avatar

Watchers

James Cloos avatar wingerse avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.