The Loop programming language

Overview

Loop Language

Documentation | Website
A dynamic type-safe general purpose programming language


Note: currently Loop is being re-written into Rust. Meaning that while this change is happening not all features of Loop are implemented.

In this repository, you will find the lexer, parser, compiler and virtual machine.

Get started (usage)

  1. Download a pre-built binary from the releases section for your platform
  2. Run ./loop to start the REPL environment or
  3. Run ./loop FILENAME.lp to run a specific file.

Get Started (development)

  1. Make sure you have Rust installed
  2. Clone the repository git clone https://github.com/looplanguage/loop
  3. Enter the repository cd loop
  4. Run the command cargo run
  5. The Loop shell should now popup

Website: https://looplang.org

Documentation: https://looplang.org/docs

Comments
  • Add comments to code

    Add comments to code

    Currently most of Loop does not have comments explaining what functions actually do. To use Rust's docgen we want to add comments to code.

    An example of a good comment is this:

    // Adds two numbers together and returns the result
    /// # Example
    /// ```
    /// // Value will be 300
    /// let value = add_numbers(100, 200);
    /// ```
    fn add_numbers(a: i32, b: i32) -> i32 {
        a + b
    }
    

    Comments can contain markdown with examples, as seen above. We use the following standard for these comments: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text

    (The same as the Rust STD library).

    documentation good first issue help wanted 
    opened by kanersps 4
  • Implement the code explainer

    Implement the code explainer

    When this function is called, it prints a very beginner friendly explenation of the code. Example 1:

    explain {
        var f = fn(x) { x + 2 }
    }
    

    Print:

    Functions ' f ' has a parameter called ' x ', when ' f ' is called the value of ' x ' is being upped by 2 and that value is returned

    Example 2:

    explain {
        var x = true;
        if ( x ) { x = false; }
    }
    

    Print:

    A variable called ' x ' is created with the value: ' true '. Then there is an if statement. If the condition of the if statement equals ' true ', ' x ' gets assigned the value of ' false '.

    enhancement 
    opened by WouterPennings 1
  • JIT-conditionals

    JIT-conditionals

    This PR makes if-then-else work inside JIT-ted functions.

    A few caveats:

    • Chaining doesn't work (if-then-else if-else if-else-if-else etc)
      • Internally this should be optimized to a switch instead
    • It's only possible for a simple expression (& one parameter only)
    • You can not use blocks, only a single expression that must return either an integer or float
    opened by kanersps 0
  • tweak: re enable CI using Github Actions

    tweak: re enable CI using Github Actions

    Prerelease and production builds (eg deployment) will run via Jenkins. However general CI (testing & linting) will run via GitHub actions due to the better integration options.

    opened by kanersps 0
  • Restyle tweak: updated readme

    Restyle tweak: updated readme

    Automated style fixes for #102, created by Restyled.

    The following restylers made fixes:

    To incorporate these changes, merge this Pull Request into the original. We recommend using the Squash or Rebase strategies.

    NOTE: As work continues on the original Pull Request, this process will re-run and update (force-push) this Pull Request with updated style fixes as necessary. If the style is fixed manually at any point (i.e. this process finds no fixes to make), this Pull Request will be closed automatically.

    Sorry if this was unexpected. To disable it, see our documentation.

    opened by restyled-io[bot] 0
  • Go to Gitlab for issues

    Go to Gitlab for issues

    DO NOT CREATE ISSUES IN GITHUB

    We moved to Jira for our issues.

    If you are an open-source contributor, and thus do not have acces to our Jira. You then need to create an issue in GitLab. We will review the issue and if important enough we will move it to Jira. Bugs will always be put in Jira. Features request might not, if we do not think it is a good idea to implement it in Loop.

    We do not recommend working on a feature request if it is not accepted into Jira. It will probably be rejected.

    opened by WouterPennings 0
Releases(v0.1.0)
Owner
LoopLanguage
The Loop programming language
LoopLanguage
Implementation of Immix Mark-Region Garbage collector written in Rust Programming Language.

libimmixcons Implementation of Immix Mark-Region Garbage collector written in Rust Programming Language. Status This is mostly usable library. You can

playX 34 Dec 7, 2022
A computer programming language interpreter written in Rust

Ella lang Welcome to Ella lang! Ella lang is a computer programming language implemented in Rust.

Luke Chu 64 May 27, 2022
Oxide Programming Language

Oxide Programming Language Interpreted C-like language with a Rust influenced syntax. Latest release Example programs /// recursive function calls to

Arthur Kurbidaev 113 Nov 21, 2022
The hash programming language compiler

The Hash Programming language Run Using the command cargo run hash. This will compile, build and run the program in the current terminal/shell. Submit

Hash 13 Nov 3, 2022
🍖 ham, general purpose programming language

?? ham, a programming language made in rust status: alpha Goals Speed Security Comfort Example fn calc(value){ if value == 5 { return 0

Marc Espín 19 Nov 10, 2022
A small programming language created in an hour

Building a programming language in an hour This is the project I made while doing the Building a programming language in an hour video. You can run it

JT 40 Nov 24, 2022
Stackbased programming language

Rack is a stackbased programming language inspired by Forth, every operation push or pop on the stack. Because the language is stackbased and for a ve

Xavier Hamel 1 Oct 28, 2021
REPL for the Rust programming language

Rusti A REPL for the Rust programming language. The rusti project is deprecated. It is not recommended for regular use. Dependencies On Unix systems,

Murarth 1.3k Dec 20, 2022
sublingual: toy versions of existing programming languages

sublingual: toy versions of existing programming languages This is a collection of toy languages created by taking much "larger" languages (e.g. Rust)

Eduard-Mihai Burtescu 20 Dec 28, 2022
A rusty dynamically typed scripting language

dyon A rusty dynamically typed scripting language Tutorial Dyon-Interactive Dyon Snippets /r/dyon Dyon script files end with .dyon. To run Dyon script

PistonDevelopers 1.5k Dec 27, 2022
A static, type inferred and embeddable language written in Rust.

gluon Gluon is a small, statically-typed, functional programming language designed for application embedding. Features Statically-typed - Static typin

null 2.7k Dec 29, 2022
Lisp dialect scripting and extension language for Rust programs

Ketos Ketos is a Lisp dialect functional programming language. The primary goal of Ketos is to serve as a scripting and extension language for program

Murarth 721 Dec 12, 2022
Source code for the Mun language and runtime.

Mun Mun is a programming language empowering creation through iteration. Features Ahead of time compilation - Mun is compiled ahead of time (AOT), as

The Mun Programming Language 1.5k Jan 9, 2023
Rhai - An embedded scripting language for Rust.

Rhai - Embedded Scripting for Rust Rhai is an embedded scripting language and evaluation engine for Rust that gives a safe and easy way to add scripti

Rhai - Embedded scripting language and engine for Rust 2.4k Dec 29, 2022
Interpreted language developed in Rust

Xelis VM Xelis is an interpreted language developed in Rust. It supports constants, functions, while/for loops, arrays and structures. The syntax is s

null 8 Jun 21, 2022
Interactive interpreter for a statement-based proof-of-concept language.

nhotyp-lang Nhotyp is a conceptual language designed for ease of implementation during my tutoring in an introductive algorithmic course at Harbin Ins

Geoffrey Tang 5 Jun 26, 2022
Scripting language focused on processing tabular data.

ogma Welcome to the ogma project! ogma is a scripting language focused on ergonomically and efficiently processing tabular data, with batteries includ

kdr-aus 146 Dec 26, 2022
A Rust macro for writing nested loop expressions

loop_chain A Rust macro for writing nested loop expressions Usage | Examples | Docs Dependencies [dependencies] loop_chain = "0.1.1" Usage For express

Takayuki Maeda 5 Jul 30, 2021
Tiny PID loop for `no_std` targets

pid-loop ?? PID loop for no_std targets. License Licensed under either of Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/license

Vitaly Domnikov 3 Dec 16, 2021
Ever got frustrated when you realize that the for loop you were writing

for_each_repeat Ever got frustrated when you realize that the for loop you were writing... fn foo(mut iter: impl Iterator<Item=i32>) { for i in it

null 1 Jun 18, 2022