Coder Social home page Coder Social logo

alan's Introduction

drawing

The Alan Programming Language

CI Docs Discord Reddit

โ›“ Implicitly parallel across events, arrays, and IO - Alan recognizes and exploits opportunities for parallelization without parallel programming (threads, channels, futures, locks, etc.)

โœ… Almost no runtime errors - Null references, deadlocks, livelocks, undefined variables, divide-by-zero, integer under/overflow, array out-of-bounds access, etc, are not possible in Alan.

๐Ÿ”’ Granular third party permissions - Alan's module resolution mechanism allows you to prevent third-party dependencies from having access to standard libraries that they should not have access to.



๐Ÿ‘ฉโ€๐Ÿš€ Alan is a programming language that does concurrency for you and can thus separate how the software is written from how it runs. To learn more about Alan, take a look at runnable examples or the most Frequently Asked Questions.


Installation


It is recommended to install Alan via the published artifacts. Simply download the zip or tar.gz file for your operating system, and extract the alan executable to somewhere in your $PATH, make sure it's marked executable (if not on Windows), and you're ready to roll.

Linux:

wget https://github.com/alantech/alan/releases/latest/download/alan-ubuntu.tar.gz
tar -xzf alan-ubuntu.tar.gz
sudo mv alan /usr/local/bin/alan

MacOS:

curl -OL https://github.com/alantech/alan/releases/latest/download/alan-macos.tar.gz
tar -xzf alan-macos.tar.gz
# sudo mkdir -p /usr/local/bin if the folder does not exist
sudo mv alan /usr/local/bin/alan

Windows:

Invoke-WebRequest -OutFile alan-windows.zip -Uri https://github.com/alantech/alan/releases/latest/download/alan-windows.zip
Expand-Archive -Path alan-windows.zip -DestinationPath C:\windows

Usage


To compile to Alan GraphCode and then run it with the AVM:

alan compile <source>.ln <whateveryouwant>.agc
alan run <whateveryouwant>.agc

You can also compile-and-run a source file with a simple:

alan <source>.ln

You can also transpile Alan to Javascript or one of it's intermediate representations.


Contributing


Source Installation:

If you wish to contribute to Alan, or if your operating system and/or CPU architecture do not match the above, you'll need a development environment to build Alan locally:

  • git (any recent version should work)
  • Node.js >=10.20.1, <14.0.0
  • Rust >=1.41.1
  • A complete C toolchain (gcc, clang, msvc)
  • Python >=2.7, <3.0 (and named python2 in your PATH)

Once those are installed, simply:

git clone https://github.com/alantech/alan
cd alan
make
sudo make install

Integration tests:

Integration tests are in /bdd and defined using Shellspec. To run all integration tests:

make bdd

To run a single test file:

make bdd testfile=bdd/spec/001_event_spec.sh

To run a single test group use the line number corresponding to a Describe:

make bdd testfile=bdd/spec/001_event_spec.sh:30

License


The Alan Programming Language is made up of multiple sub-projects housed within this monorepo. Each subdirectory has its own license file and the project as a whole uses two licenses: The Apache 2.0 license and the Affero GPL 3.0 license, with the breakdown as follows:

  • Apache 2.0
    • bdd
    • js-runtime
    • std
  • AGPL 3.0
    • compiler
    • avm

The Apache 2.0 license is freely combinable with the GPL 3 series of licenses as well as with proprietary software, so the standard library and Javascript runtime library are freely combinable with your own software projects without any requirement to open source it.

The AGPL 3.0 license requires that any changes to the code are published and publicly accessible. This is to make sure that any advancements to the compiler and AVM are available to all. The licensing of these tools does not affect the licensing of the code they compile or run. Similarly, the GCC compiler collection is GPL 3.0 licensed, but code compiled by it is not GPL 3.0 licensed.

alan's People

Contributors

aguillenv avatar dependabot[bot] avatar depombo avatar dfellis avatar drkameleon avatar saifelokour avatar

Watchers

 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.