8000 GitHub - Dirivial/Nutlang: 🥜 A nutty programming language 🥜
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Dirivial/Nutlang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nutlang 🥜

The nuttiest of langs.

Base code from Writing An Interpreter In Go. You might recognize Monkey Language or similar names, but I wanted to give it my own name.

The goal is to improve the language far enough to solve a couple of leetcode or advent of code problems, comfortably.

Features

After following the book I ended up with these features:

  • integers
  • booleans
  • strings
  • arrays
  • hashes
  • prefix-, infix- and index operators
  • conditionals
  • global and local bindings
  • first-class functions
  • return statements
  • closures

The number of built-in functions are relatively sparse.

  • len (strings and arrays)
  • push
  • first
  • last
  • rest (copy array, without the first element)
  • puts (print to STDOUT)

Things I want to add

This is a list of things I feel are missing for it to be considered a limited, but still somewhat complete language

General features

  • Value Assignment (meaning re-assignment, after let statement)
    • Arrays
    • Hashes
    • Integers
  • File IO
    • Read file content
  • Floats
  • <= and >=
  • for(& while) loop

Arrays

  • Pop
  • Remove
  • Shift
  • Unshift
  • includes

Integers/Floats

  • Random
  • Min
  • Max
  • Modulo

Strings

  • split
  • trim
  • includes
  • escaped chars

Booleans

  • &&
  • ||

About

🥜 A nutty programming language 🥜

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0