Awesome Open Source
Awesome Open Source
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.

Note: To better understand if we are building something people want to use we currently log an event when running an Alan command. Feel free to turn this off by setting the ALAN_TELEMETRY_OFF environment variable to true, but if you do please let us know how you are using Alan and how often!


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
  • Rust >=1.45.0
  • A complete C toolchain (gcc, clang, msvc)

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.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
typescript (10,361) 
programming-language (328) 
parallelization (21) 

Find Open Source By Browsing 7,000 Topics Across 59 Categories

Advertising 📦 10
All Projects
Application Programming Interfaces 📦 124
Applications 📦 192
Artificial Intelligence 📦 78
Blockchain 📦 73
Build Tools 📦 113
Cloud Computing 📦 80
Code Quality 📦 28
Collaboration 📦 32
Command Line Interface 📦 49
Community 📦 83
Companies 📦 60
Compilers 📦 63
Computer Science 📦 80
Configuration Management 📦 42
Content Management 📦 175
Control Flow 📦 213
Data Formats 📦 78
Data Processing 📦 276
Data Storage 📦 135
Economics 📦 64
Frameworks 📦 215
Games 📦 129
Graphics 📦 110
Hardware 📦 152
Integrated Development Environments 📦 49
Learning Resources 📦 166
Legal 📦 29
Libraries 📦 129
Lists Of Projects 📦 22
Machine Learning 📦 347
Mapping 📦 64
Marketing 📦 15
Mathematics 📦 55
Media 📦 239
Messaging 📦 98
Networking 📦 315
Operating Systems 📦 89
Operations 📦 121
Package Managers 📦 55
Programming Languages 📦 245
Runtime Environments 📦 100
Science 📦 42
Security 📦 396
Social Media 📦 27
Software Architecture 📦 72
Software Development 📦 72
Software Performance 📦 58
Software Quality 📦 133
Text Editors 📦 49
Text Processing 📦 136
User Interface 📦 330
User Interface Components 📦 514
Version Control 📦 30
Virtualization 📦 71
Web Browsers 📦 42
Web Servers 📦 26
Web User Interface 📦 210