Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gldanoob/nooblang-rust
NOOBLANG interpreter but in Rust (not blazingly fast)
https://github.com/gldanoob/nooblang-rust
esolang esoteric-programming-language interpreter lexer parser rust
Last synced: 17 days ago
JSON representation
NOOBLANG interpreter but in Rust (not blazingly fast)
- Host: GitHub
- URL: https://github.com/gldanoob/nooblang-rust
- Owner: gldanoob
- Created: 2023-01-07T08:54:22.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-13T13:44:55.000Z (almost 2 years ago)
- Last Synced: 2024-12-15T07:42:15.831Z (21 days ago)
- Topics: esolang, esoteric-programming-language, interpreter, lexer, parser, rust
- Language: Rust
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NOOBLANG
**The Perfect (Esoteric) Programming Language for Beginners**
- ❌ No symbols (except `"`)
- ❌ No `for`, `while` loops, functions (too overwhelming for starters)
- ❌ No data structures like arrays (a pain to understand)
- ❌ No variable scoping rules and stuff
- ✔️ Everything done with `if`s and procedures (`run`ning lines of code)
# Examples
## Prime numbers between 0 and 100:
```
x be 2
prime be yes
y be 1
y be y plus 1
run 8 to 11 if y is x
prime be no if x mod y is 0
run 4 to 7
write x if prime
x be x plus 1
end if x atleast 100
run 2 to 11
```Most of the syntax shouldn't be hard to understand (they're designed for beginners),
but in case you're wondering, `run` runs the line(s) of code with the given line numberSo `run 8 to 11 if y is x` runs lines 8-11 if `x` is equal to `y`
## Pascal's triangle
No arrays? Not a problem:
```
write "Enter number of rows (1 ~ 10): "
n be num read
run 25 to 26 if n mod 1 isnt 0 or n below 1 or n above 10
a be 1
i be 0
s be ""
j be i
x be 0
run 29 plus i
run 20 to 23 if j is 0
run j plus 38
x be y
run j plus 39
x be x plus y
run j plus 28
s be s plus " " plus text xj be j minus 1
run 10 to 19
write s plus " 1"
i be i plus 1
end if i is n
run 6 to 23write "Need integer between 1 and 10 inclusive"
run 1 to 23a be x
b be x
c be x
d be x
e be x
f be x
g be x
h be x
k be x
l be xy be a
y be b
y be c
y be d
y be e
y be f
y be g
y be h
y be k
y be l
```
# TODO
- Alphanumeric variable names
- Escape characters
- Tutorial/Docs (god damn)
- Prove turing completeness (Probably a brainf interpreter)
- Fix column numbers of errors
- Bytecode compiler? Nah, I don't have time