Code Monkey home page Code Monkey logo

icelang's Introduction

Icelang

Description

Icelang is a minimal, dynamically-typed scripting language inspired by Lua and Rust. It is my first attempt at writing a tree-walking interpreter and also my first Rust project. As you might expect, it was not intended for serious use. It is not fast or efficient, but it is decent enough for basic computation.

Check out the website for more details about the language specifications. Icelang is also available online through a Web Assembly port of the interpreter, try it now here.

Preview

See examples to see some of the features in action.

REPL Preview

Usage

Download icelang from release or build it from source.

icelang # no arguments for REPL mode
icelang script.ic # to run a file

Build

NB: You must have the rust tool chain installed.

Icelang executable

To build the icelang executable you have to clone the repository then enter the following commands:

cargo install --path . # build and install in ~/.cargo/bin
# or
cargo build --release # build inside target/release

Website and WASM binaries

To build the website you must have npm and wasm-pack installed.

cd wasm/
wasm-pack build --target web --out-dir ../website/pkg # build the wasm binaries
cd ../website/
npm install # install dependencies
npm run build # vite build

You can run npm run dev to start a local server at https://localhot:5173

Testing

You can run the tests by running:

cargo test --workspace --lib

Todo

Some add-ons not directly related to the project itself:

icelang's People

Contributors

luckasranarison avatar dependabot[bot] avatar

Stargazers

Sumit avatar  avatar Michaël avatar

Watchers

 avatar  avatar

icelang's Issues

Code optimization

  • use thiserror instead of implementing fmt::Display manually
  • improve Environment
  • use traits for evaluating node
  • remove block expressions

Fancy REPL

Add colors, history and autocompletion

Module resolution

read_to_string() is relative to the process calling it so when calling a script from outside the script directory the import will be relative to the process calling it and not the script file. And so the import function won't work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.