daniele-rapagnani / melon

Licence: MIT license
The Melon programming language

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
CMake
9771 projects
python
139335 projects - #7 most used programming language
Objective-C++
1391 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to melon

Wren
The Wren Programming Language. Wren is a small, fast, class-based concurrent scripting language.
Stars: ✭ 5,345 (+16603.13%)
Mutual labels:  interpreter, wren
rust lisp
A Rust-embeddable Lisp, with support for interop with native Rust functions
Stars: ✭ 128 (+300%)
Mutual labels:  interpreter
HaxeVM
Prototype compiler/virtual machine in Haxe for Haxe
Stars: ✭ 24 (-25%)
Mutual labels:  interpreter
xemime
The Xemime programming language
Stars: ✭ 13 (-59.37%)
Mutual labels:  interpreter
blade
A simple, fast, clean, and dynamic language that allows you to develop applications quickly.
Stars: ✭ 113 (+253.13%)
Mutual labels:  interpreter
clri
An unfinished CIL interpreter in Rust
Stars: ✭ 22 (-31.25%)
Mutual labels:  interpreter
PDDL.jl
Julia parser, interpreter and compiler interface for the Planning Domain Definition Language (PDDL). Planners not included.
Stars: ✭ 52 (+62.5%)
Mutual labels:  interpreter
glide
Glide is an interpreted javascript VM written entirely in safe rust.
Stars: ✭ 14 (-56.25%)
Mutual labels:  interpreter
gpp
General PreProcessor
Stars: ✭ 25 (-21.87%)
Mutual labels:  interpreter
SOMns
SOMns: A Newspeak for Concurrency Research
Stars: ✭ 62 (+93.75%)
Mutual labels:  interpreter
basicv2
A Commodore (CBM) BASIC V2 interpreter/compiler written in Java
Stars: ✭ 73 (+128.13%)
Mutual labels:  interpreter
webasm-solidity
[DEPRECATED] On-chain interpreter for WebAssembly written in Solidity
Stars: ✭ 65 (+103.13%)
Mutual labels:  interpreter
fint
.NET CIL interpreter written in simple subset of F#
Stars: ✭ 50 (+56.25%)
Mutual labels:  interpreter
AlchemyVM
WebAssembly Virtual Machine Built In Elixir
Stars: ✭ 184 (+475%)
Mutual labels:  interpreter
Flang
A Scheme dialect
Stars: ✭ 26 (-18.75%)
Mutual labels:  interpreter
slox
Swift implementation of a Lox interpreter
Stars: ✭ 39 (+21.88%)
Mutual labels:  interpreter
uwuscript
World's first uwu-oriented language.
Stars: ✭ 75 (+134.38%)
Mutual labels:  interpreter
riptide
The Riptide Programming Language: Shell scripting redesigned.
Stars: ✭ 24 (-25%)
Mutual labels:  interpreter
endbasic
BASIC environment with a REPL, a web interface, a graphical console, and RPi support written in Rust
Stars: ✭ 220 (+587.5%)
Mutual labels:  interpreter
xpl
X Programming Language in a single header file.
Stars: ✭ 25 (-21.87%)
Mutual labels:  interpreter

Melon is a small and modern programming language

CI Status

Actions Status Actions Status Actions Status Actions Status

What's Melon?

Melon attempts to combine the best features of popular high-level languages in something that feels modern but is still small and light enough to be easy to embed in your project. It's inspired mainly by ES6 JavaScript, Lua, Wren, Python and Ruby.

It looks like this:

let Language = {
    create = |name|  => {
        return { name = name } @ Language;
    },
    
    getName = -> {
        return this.name;
    }
};

let Melon = {
    create = => {
        return { } @ Melon;
    },
    
    helloWorld = -> {
        io.print("Hello world " .. this->getName() .. "!");
    }
} @ Language.create("Melon");

let melon = Melon.create();
melon->helloWorld();

Features

  • A simple but functional module system
  • Good for soft realtime applications such as games: it sports an incremental generational GC
  • Native integer and array types allow for faster code
  • Support for bytecode generation, you don't need to distribute your source files
  • Full support for operator overloading using ES6-style symbols
  • Prototype based: doesn't enforce the OOP paradigm while still making it possible
  • Dynamic typing without implicit conversions: lower chance of unintended behaviour
  • Entirely written in C, the number of dependencies can be counted on one hand
  • Extensive unit tests for both the VM and language

Where to start

Melon is very young and there's still no documentation available. At the moment you can get a taste for the language by browsing the unit tests.

Platforms

Melon supports the following platforms:

  • macOS
  • Linux (32/64bit)
  • Windows (MinGW-w64, 32/64bit)
  • Emscripten

Compiling

Melon uses CMake so you can use the standard way of building CMake projects:

mkdir build && cd build
cmake ..
make

Emscripten

Just run CMake with emcmake and you are good to go:

mkdir build && cd build
emcmake cmake ..
make

MinGW

In order to link Melon and its binaries with MinGW-w64 you'll need the lld linker. You can install it on MSYS2 with: pacman -S mingw-w64-x86_64-lld or pacman -S mingw-w64-i686-lld depending on your architecture.

Disclaimer

Melon is still in alpha and it's certainly not ready for production! In the unlikely event that you are considering it for your project, please keep in mind that development is very active and nothing is written in stone at the moment.

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].