Coder Social home page Coder Social logo

trwa / lw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alvisespano/lw

0.0 0.0 0.0 8.26 MB

Lw is a general-purpose statically-typed functional-first language with cutting-edge features.

License: GNU General Public License v3.0

Haskell 8.38% F# 91.62%

lw's Introduction

Lw

Lw is a general-purpose statically-typed functional-first language aimed at writing succinct, robust, powerful and highly reusable code. It includes some of the most advanced achievements in language literature as well as several novel features. Lw is currently in development and its implementation could still be unstable, nonetheless it has reached a stage at which people who enjoy experimenting with new programming languages may want to play with it.

I will keep this README file updated and increasingly document the language as development goes on. Consider, however, that features may change in the future or may get broken at some point until a stable version or an hotfix is released.

Installation

Lw and the Lw Interpreter are written in F#, therefore you probably want to import the solution into Visual Studio in order to compile it and play with its interactive console. Assuming you are using at least VS2013 - though VS2015 Community edition is the one I'm developing with at the moment - you should encounter no troubles in making NuGet package manager automatically download dependencies and get the solution compile.

VS Solution and Dependencies

Lw.sln consists of 3 projects:

  • Core. The core of the language: lexer, parser and type checker plus all that is related to them. This is a library project and cannot be run.
  • Interpreter. This is the real Lw interpreter and it's a startup*-able* project generating an executable.
  • FSharp.Common. This is another library project which both Core and Interpreter projects rely on. It is distributed separately as a stand-alone GitHub project of mine.

Usage

The Lw interpreter can be used in a few ways:

  1. passing a source file name as argument to the executable: this makes the interpreter evaluate the whole program and return an interger exit code.
  2. launching the executable with the --interactive command line argument: this runs the interpreter in interactive mode, pretty much like other functional languages interactive console. You can write declarations and expressions and see the type inferred as well as the result of the evaluation.
  3. mixing the two ways above: this makes the interpreter evaluate the source input file and eventually open the interactive console with an environment populated with all the stuff defined at top level in the input file.

Visual Studio users may activate the "Interactive" solution configuration on the left of the play button and launch the interpreter in interactive mode.

Language specification

Please read the Lw spec document for further details.

lw's People

Contributors

alvisespano avatar trwa 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.