Nixt is an interpreted programming language written in Rust

Overview

Nixt

Nixt is an interpreted lisp inspired programming language written in Rust

Index

About

Nixt goal is to provide a fast and easy to learn scripting language that provides productivity due to its easy syntax and correct performances

Examples

Factorial

(const factorial (func (n) {
  (let toret 1)
  (let i 2)
  (while (<= i n) {
    (set toret (* toret i))
    (set i (+ i 1))

  })
  (ret toret)
}))

Ackermann function

(let ackermann (func (m n) {
  (let toret 0)
  (if (= m 0)
    (set toret (+ n 1))
    (if (and (> m 0) (= n 0))
      (set toret (ackermann (- m 1) 1))
      (if (and (> m 0) (> n 0))
        (set toret (ackermann (- m 1) (ackermann m (- n 1))))
      )
    )
  )
  (ret toret)
}))

Installation

With werb

  • Run werb install nixt
  • Add export NIXT_STD="/home/$USERNAME/.werb_bin/std/" to your ~/.bashrc (obviously replace $USERNAME with your username)

Manually

  • Run wget https://github.com/Wafelack/nixt/releases/download/$VERSION/nixt.tar.gz (replace $VERSION with the version tag you want to download (refer to the releases page))
  • Run mkdir ~/.nixt && tar -xzf nixt.tar.gz -C ~/.nixt/
  • Add ~/.nixt to your path
  • Add export NIXT_STD="/home/$USERNAME/.nixt/std/" to your ~/.bashrc (obviously replace $USERNAME with your username)

Build

git clone https://github.com/wafelack/nixt
cd nixt/
cargo test --release
cargo build --release
You might also like...
A minimal version of 'grep' implemented in Rust. Exercise in the "The Rust Programming Language" book.

Minigrep - A simple grep-like tool implemented in Rust This simple CLI tool searches for a given pattern in a specified file and as a result, it print

a function programming language for real world applications made in rust

a function programming language for real world applications made in rust

Rust implementation of µKanren, a featherweight relational programming language.

µKanren-rs This is a Rust implementation of µKanren, a featherweight relational programming language. See the original Scheme implementation here for

This repository contains the source of "The Rust Programming Language" book.

The Rust Programming Language This repository contains the source of "The Rust Programming Language" book. The book is available in dead-tree form fro

A short exercise to introduce people to the Rust programming language

Searching primes by brute force This code is ment to be an exercice to teach rust and give a first impression on how to work with the language during

The Rust Programming Language, Chapter 8, Exercise 1

Rust Common Collections - Exercise 1 In the book The Rust Programming Language by Steve Klabnik and Carol Nichols, chapter 8 - Common Collections - pr

The Ribbon Programming Language, made in Rust.

The Ribbon Programming Language (WIP) This language is designed to be quick to write and is heavily inspired by Rust, which is also the language it wa

A simple programming language for something between C and Rust.

inuc inuc is a systems programming language that is something between C and Rust. Features : [] Strong , static typing (type inference not a priority

Learn programming with Rust as a first language (book)

Learn programming with Rust as first language This is a book to learn programming from scratch. Read the book here: https://deavid.github.io/lprfl/ LI

Comments
  • Standard library

    Standard library

    Here some functions for the standard library, sorted by type

    Io

    • print: displays the arguments with a newline
    • puts: like print but without newline

    str

    • str:cat: concatenates strings
    • substring: gets a substring from a string
    • split: Splits a string on a delimiter
    • to_number: converts the string to number

    misc

    • pop: (string && list) returns the poped collection
    • push (string && list) returns the pushed collection
    • len : (string && list) returns the length

    math

    • math:abs: |x|
    • math:inv: 1/x
    • math:opp: -x
    • math:floor: floors a number
    • math:pow: x^n
    • math:cos: cos n
    • math:acos: acos n
    • math:sin: sin n
    • math:asin: asin n
    • math:tan: tan n
    • math:atan: atan n
    • math:EULER: 1 + 1/1! + 1/2! + ... + 1/13!
    • math:PI: 3.141592653590793238462643
    opened by Wafelack 3
Releases(0.1.0)
Owner
Wafelack
I make computer beep boop beep beep boop.
Wafelack
A stack based interpreted programming language.

Nightmare Nightmare is a dynamically-typed, procedural programming language that aims to be fast & simple. let user = input() as Int; print("You were

&potato 4 Nov 12, 2021
A statically-typed, interpreted programming language, with generics and type inference

Glide A programming language. Currently, this includes: Static typing Generics, with monomorphization Type inference on function calls func identity<T

Patrick Gu 1 Apr 10, 2022
🤩 Flexible interpreted programming language

Jel Flexible, memory-safe, easy-to-use, interpreted programming language. work in progress Example Hello World: print(Hello World!) # this is valid pr

0x707 4 Sep 18, 2022
The Devils' Programming Language (Quantum Programming Language)

devilslang has roots in Scheme and ML-flavored languages: it's the culmination of everything I expect from a programming language, including the desire to keep everything as minimalistic and concise as possible. At its core, devilslang is lambda-calculus with pattern-matching, structural types, fiber-based concurrency, and syntactic extension.

Devils' Language 2 Aug 26, 2022
A repository for showcasing my knowledge of the Rust programming language, and continuing to learn the language.

Learning Rust I started learning the Rust programming language before using GitHub, but increased its usage afterwards. I have found it to be a fast a

Sean P. Myrick V19.1.7.2 2 Nov 8, 2022
Nyah is a programming language runtime built for high performance and comes with a scripting language.

?? Nyah ( Unfinished ) Nyah is a programming language runtime built for high performance and comes with a scripting language. ??️ Status Nyah is not c

Stacker 3 Mar 6, 2022
lelang programming language is a toy language based on LLVM.

lelang leang是一门使用Rust编写,基于LLVM(inkwell llvm safe binding library)实现的编程语言,起初作为课程实验项目,现在为个人长期维护项目。 Target Features 支持8至64位的整形类型和32/64位浮点 基本的函数定义,调用,声明外部

Aya0wind 5 Sep 4, 2022
clone of grep cli written in Rust. From Chapter 12 of the Rust Programming Language book

minigrep is a clone of the grep cli in rust Minigrep will find a query string in a file. To test it out, clone the project and run cargo run body poem

Raunak Singh 1 Dec 14, 2021
The Rust Compiler Collection is a collection of compilers for various languages, written with The Rust Programming Language.

rcc The Rust Compiler Collection is a collection of compilers for various languages, written with The Rust Programming Language. Compilers Language Co

null 2 Jan 17, 2022
Game Boy Emulator written in Rust, as a way to fully grasp the Rust programming language

Flan's Game Boy Emulator Game Boy Emulator written in Rust, as a way to get hands-on with the Rust programming language, and creating a proper project

Flan 3 Dec 31, 2022