All Projects → Electrux → Ethereal

Electrux / Ethereal

Licence: gpl-3.0
Ethereal Language Reference Implementation (archived). Currently working on Feral

Programming Languages

language
365 projects
cxx
24 projects

Projects that are alternatives of or similar to Ethereal

Sniprun
A neovim plugin to run lines/blocs of code (independently of the rest of the file), supporting multiples languages
Stars: ✭ 93 (-27.91%)
Mutual labels:  interpreter
Quickjs
The official repo is at bellard/quickjs.
Stars: ✭ 1,429 (+1007.75%)
Mutual labels:  interpreter
Writing an interpreter in elixir
Elixir implementation of an interpreter for the Monkey programming language
Stars: ✭ 119 (-7.75%)
Mutual labels:  interpreter
Lispe
An implementation of a full fledged Lisp interpreter with Data Structure, Pattern Programming and High level Functions with Lazy Evaluation à la Haskell.
Stars: ✭ 105 (-18.6%)
Mutual labels:  interpreter
Libforth
libforth: A small Forth interpreter that can be used as a library written in c99
Stars: ✭ 107 (-17.05%)
Mutual labels:  interpreter
Brain
An esoteric programming language compiler on top of LLVM based on Brainfuck
Stars: ✭ 112 (-13.18%)
Mutual labels:  interpreter
Wasm Forth
A Forth implementation compiling to WebAssembly.
Stars: ✭ 92 (-28.68%)
Mutual labels:  interpreter
Cperl
A perl5 with classes, types, compilable, company friendly, security
Stars: ✭ 125 (-3.1%)
Mutual labels:  interpreter
Dummylua Tutorial
这是一个仿制lua解释器的项目,我希望通过逐步实现lua解释器的各个部分,更加深刻地掌握lua的基本结构和运作原理。
Stars: ✭ 108 (-16.28%)
Mutual labels:  interpreter
Atto
An insanely simple self-hosted functional programming language
Stars: ✭ 119 (-7.75%)
Mutual labels:  interpreter
Endbasic
BASIC environment with a REPL, a web interface, and RPi support written in Rust
Stars: ✭ 106 (-17.83%)
Mutual labels:  interpreter
Swiftylisp
A minimal LISP implemented in Swift
Stars: ✭ 106 (-17.83%)
Mutual labels:  interpreter
Pointless
Pointless: a scripting language for learning and fun
Stars: ✭ 116 (-10.08%)
Mutual labels:  interpreter
Root
The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
Stars: ✭ 1,377 (+967.44%)
Mutual labels:  interpreter
Simple
The Simple Intelligent and Modular Programming Language and Environment
Stars: ✭ 120 (-6.98%)
Mutual labels:  interpreter
Mages
🎩 MAGES is a very simple, yet powerful, expression parser and interpreter.
Stars: ✭ 92 (-28.68%)
Mutual labels:  interpreter
Apple Juice Actionscript
Pure .NET 2.0 code Implementation of the ActionScript3 compiler and runtime. Can be used to run scripts in environments where "just-in-time compilation" is not possible
Stars: ✭ 112 (-13.18%)
Mutual labels:  interpreter
Lpp 3ds
Lua Player Plus for 3DS
Stars: ✭ 125 (-3.1%)
Mutual labels:  interpreter
Lice
A multi-paradigm programming language running on JVM
Stars: ✭ 120 (-6.98%)
Mutual labels:  interpreter
Cpi
Tiny c++ interpreter
Stars: ✭ 116 (-10.08%)
Mutual labels:  interpreter

Ethereal

Build Status

A simple, dynamically typed, interpreted, generic programming language.

Some Sample Programs

Hello world using Function:

fn hello( to ) {
	println( 'Hello ', to );
}

hello( 'world' );

Taking input from the user - with a prompt:

dat = scan( 'Please enter some data: ' );
println( 'The data you entered is: ', dat );

Iterative Factorial of a number:

import std.str; # for to_int()

num = scan( "Enter factorial of: " ).to_int();
fact = 1;

for x = num; x >= 2; x -= 1 {
        fact *= x;
}

println( "Factorial of ", num, ": ", fact );

About

Visit the medium article here, for an overview of my journey with Ethereal :)

The language syntax is inspired from Python and C. It contains sufficient features to enjoy working with it, but avoids complex features like OOP.

Ethereal does use a concept of member functions which are actually nothing but plain functions bound to a particular struct/type. And they allow the use of self to use the calling variable inside the function itself.

One can easily make extensions for the language in the form of language modules or c++ dynamic libraries (if high performance is needed). See the existing modules for more information about it (language modules: include/ethereal/, C++ standard modules: modules/std/).

Documentation is under development and will take some time to build, but till then, feel free to go through the Code Samples and hack around with the programs in the tests directory.

Prerequisites

  • GCC/Clang with full C++ 11 support, tested with:
    • Ubuntu 14.04 (GCC 4.8.4, GMP 5.1.3, MPFR 3.1.2, MPC 1.0.1)
    • Arch Linux (GCC 9.1.0, GMP 6.1.2, MPFR 3.1.2, MPC 1.0.1)
    • macOS 10.13.6 (Homebrew LLVM 9.0.0, Homebrew GMP 6.1.2, MPFR 4.0.2, MPC 1.1.0)
    • macOS 10.14.6 (Homebrew LLVM 8.0.1, Apple LLVM 10.0.1, Homebrew GMP 6.1.2, MPFR 4.0.2, MPC 1.1.0)
    • FreeBSD 10.4 (clang 3.4.1, GMP 6.1.2, MPFR 3.1.2, MPC 1.0.1)
    • Android 9 - Pie (Termux - clang 8.0.0, GMP 6.1.2 manually compiled - see the note below, MPFR 3.1.2, MPC 1.0.1)
  • GMP library with CXX support (will be almost always built with support for CXX in your official distribution package)

Note that GMP on Termux for android does not come with CXX support, hence it will have to be manually compiled from source with the --enable-cxx configure option. You may also need to specify the PREFIX_DIR directory using --prefix configure option which, for me, is /data/data/com.termux/files/usr

The entire command sequence for installing GMP on android (for me) is: ./configure --prefix /data/data/com.termux/files/usr --enable-cxx && make -j8 && make install

Also, compiling with Link Time Optimization won't work on clang < 3.9, so disable LTO by setting SKIP_LTO=true before executing the bootstrap.sh script

Installation

Once the prerequisites are met, just execute the cmake script by doing mkdir build && cd build && cmake .. && make -j<cpu core count> commands. They will build the language interpreter along with the stdlib modules. Installation (using make install) should be done ONLY if the PREFIX_DIR variable is set to a directory other than the cmake build/ directory.

Note that if you use PREFIX_DIR, you may need root access depending on the directory you choose.

The following items will be installed:

  • buildfiles/et -> $PREFIX_DIR/bin/
  • buildfiles/lib*.so -> $PREFIX_DIR/lib/ethereal/
  • include/ethereal/* -> $PREFIX_DIR/include/ethereal/

Also, the interpreter code internally uses PREFIX_DIR to locate the lib and include directories, so you will have to rebuild the codebase if you change PREFIX_DIR.

Contributions are definitely accepted and greatly appreciated. ❤️

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].