Skip to content

ELENA is a general-purpose language with late binding. It is multi-paradigm, combining features of functional and object-oriented programming. Rich set of tools are provided to deal with message dispatching : multi-methods, message qualifying, generic message handlers, run-time interfaces

License

Notifications You must be signed in to change notification settings

ELENA-LANG/elena-lang

Repository files navigation

ELENA Programming Language

elena-lang.github.io | Docs | Changelog | Contributing

MSBuild Nightly MSBuild Nightly FreeBSD Build Sponsor Sponsor

ELENA is a general-purpose language with late binding. It is multi-paradigm, combining features of functional and object-oriented programming. It supports both strong and weak types, run-time conversions, boxing and unboxing primitive types, direct usage of external libraries. A rich set of tools is provided to deal with message dispatching : multi-methods, message qualifying, generic message handlers. Multiple-inheritance can be simulated using mixins and type interfaces. The built-in script engine allows incorporating custom-defined scripts into your applications. Both stand-alone applications and Virtual machine clients are supported.

Features

  • Free and open-source (MIT licensed)
  • Complete source code
  • Unicode support (utf-8)
  • GUI IDE & Debugger
  • Optional types
  • Multiple dispatching / multi-methods
  • Returning Multiple Values
  • Support of variadic methods
  • Support of yieldable methods
  • Concurrent programming
  • Closures
  • Mixins
  • Type interfaces / Conversions
  • Class templates / Expression templates
  • Extensions / Extension Templates
  • Script Engine

Currently Supported Platforms

  • Windows : x86 (32-bit) / x86-64 (64-bit)
  • Linux : x86 (32-bit) / x86-64 (64-bit) / ppc64le / arm64 (a64)
  • FreeBSD :x86-64 (64-bit)

Platforms to be supported

  • macOS : arm64 (a64)

Resources

Contact Us

Reach out with any questions you may have and we'll make sure to answer them as soon as possible!

Platform Link
💬 Instant Message Chat Discord Banner
Forum Discussions
📧 E-mail [email protected]
🐤 BlueSky @elena_language

Installing ELENA from source

To acquire the source code clone the git repository:

git clone https://github.com/ELENA-LANG/elena-lang.git
cd elena-lang

Windows:

The compiler code is implemented in C++ and does not require external dependencies. You just need Visual Studio 2019 / 2022.

You have to add a path to BIN folder to the system environment PATH or copy elenavm.dll and elenart.dll to Windows\System32 folder.

To build the compiler and API under VS2019 / VS2022 you have to go to the root folder and type:

recompile60.bat 

Linux:

To compile the code in Linux you have to install GCC tool set

sudo apt-get install gcc-multilib g++-multilib

Then you have to run the compilation:

For x86

For Linux x86 (i386):

make all_i386

After this you can either install it globally:

cd scripts/i386
sudo ./build_package_i386.script 

or locally

cd scripts/i386
sudo ./local_build_package_i386.script

Note : in this case you have to copy libelenart60.so into /usr/lib/elena or modify the configuration file bin/templates/lnx_console60.config and provide the correct path:

<platform key="Linux_I386">
 <externals>
    <external key="$rt">/usr/lib/elena/libelenart60.so</external>  <!-- put your local path where libelenart60.so is located
 </externals>
</platform>

For x86-64

For Linux x86-64 (amd64):

make all_amd64

After this you can either install it globally:

cd scripts/amd64
sudo ./build_package_amd64.script 

or locally

cd scripts/amd64
sudo ./local_build_package_amd64.script

Note : in this case you have to copy libelenart60_64.so into /usr/lib/elena or modify the configuration file bin/templates/lnx_console60.config and provide the correct path:

<platform key="Linux_AMD64">
 <externals>
    <external key="$rt">/usr/lib/elena/libelenart60_64.so</external>  <!-- put your local path where libelenart60_64.so is located
 </externals>
</platform>

For AARCH64

For Linux AARCH64 (arm64):

make all_arm64

After this you can install it globally:

cd scripts/aarch64
sudo ./build_package_aarch64.script 

For PPC64le

For Linux PPC64le:

make all_ppc64le

After this you can install it globally:

cd scripts/ppc64le
sudo ./build_package_ppc64le.script 

FreeBSD:

For FreeBSD x86-64

using GCC:

make all_amd64

using CLANG:

make clang_all_amd64   

After this you can either install it globally:

cd scripts/bsd.amd64
sudo ./build_package_amd64.script 

or locally

cd scripts/bsd.amd64
sudo ./local_build_package_amd64.script

Note : in this case the script will try to create symbolic links to shared libraries libelenart60_64.so, libelenavm60_64.so, libelenasm60_64.so and config files : elenart60.config and elenavm60.config. Alternatively you can copy the shared libraries to /usr/local/lib/elena/ and config files to /usr/local/etc/elena/

Building samples

To build all existing samples you can go to the examples folder:

cd examples60

and compile them:

For Windows 32:

elena-cli examples60.prjcol 
elena-cli rosetta60.prjcol 

For Windows 64:

elena64-cli examples60.prjcol 
elena64-cli rosetta60.prjcol 

For Linux 32 (i386):

elena-cli examples60.linux.prjcol 
elena-cli rosetta60.linux.prjcol 

For Linux 64 (amd64, aarch64, ppc64le) / FreeBSD (amd64):

elena64-cli examples60.linux.prjcol 
elena64-cli rosetta60.linux.prjcol 

Source Code Organization

Windows:

The ELENA source code is organized as follows:

bin                 binaries and shared libraries
bin\scripts         scripts used by the script engine and VM console
bin\templates       ELENA project templates
asm                 source for core routines implemented in assembly
dat\sg              language grammar file            
dat\og              language optimization rules
doc                 some documentations
doc\api             ELENA API documentations
elenasrc3\elc       source for the compiler
elenasrc3\elenart   source for the run-time shared library
elenasrc3\elenasm   source for the script engine
elenasrc3\elenavm   source for the virtual machine
elenasrc3\gui       source for IDE
elenasrc3\tools     source for ELENA utilities
examples60          ELENA examples
src60               source for ELENA libraries
tests60             ELENA functional tests

Community

We want your contributions and suggestions! One of the easiest ways to contribute is to participate in Github discussions or on Discord.

Please take a look at our Getting started Wiki

1. Bugs, questions, suggestions?

If you've noticed a bug or have a question go ahead and make one!

Join design discussions or take part in general talks.

2. Implement "up for grab" issues

Good first issue is a good starting point for a first-time contributors.

3. Rosetta code

You may look at or try to implement some of Rosetta code tasks which are not yet implemented

Terminal, IDEs

ELENA support both command-line tools and IDE.

The work on VSCode extension & Debug Adapter Protoco support is going on

License

The compiler and executables distributed in this package fall under MIT License, for more information read the file LICENSE.

ko-fi

About

ELENA is a general-purpose language with late binding. It is multi-paradigm, combining features of functional and object-oriented programming. Rich set of tools are provided to deal with message dispatching : multi-methods, message qualifying, generic message handlers, run-time interfaces

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

  •