Skip to content

Ni is a small esoteric programming language turing complete, cell based, like brainfuck.

License

Notifications You must be signed in to change notification settings

DeybisMelendez/ni

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

Ni

Spanish description in: https://github.com/DeybisMelendez/ni/blob/master/README-es.md

¿What is Ni?

Ni is an esoteric programming language influenced by brainfuck. The name Ni comes from Nicaragua.

Language Overview

Like brainfuck, Ni operates on a tape containing cells, cells can store 64-bit integers.

The cells are pointed by a head, the head can move from left to right or jump to a cell directly.

There is also a clipboard where you can store data from one cell and insert any other.

Instructions

Instruction Description
> Move the head to the right
< Move the head to the left
+ Increment the targeted cell
- Decrement the targeted cell
@ Reads the first character, converts it to its ASCII number and stores it in the pointed cell
. Print the number stored in the targeted cell
! Print the ASCII equivalent of the number stored in the pointed cell
# Set a hexadecimal number in the pointed cell
? Copy the number of the pointed cell
= Stores the copied number in the pointed cell
* Converts the number of the pointed cell to 0
$ Moves the spindle to the cell indicated with a hexadecimal number
[] (While) Loop that continues execution if the pointed cell is not equal to 0
{} (For) Loop that executes the instructions the number of times that the memory of the pointed cell indicates
() (if) Executes the set of instructions if the pointed number is equal to the clipboard
/ Ignore the rest of the line

How to run

Download Ni here: https://github.com/DeybisMelendez/ni/releases

Windows

CMD -> ni yourcode.nic

Linux

Terminal -> ./ni yourcode.nic

Mac

Lua is required, you can install lua with brew.

Commands:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

brew update

brew install lua

Then on terminal execute lua ni.lua yourcode.nic

Lua

CMD or Terminal -> lua ni.lua yourcode.nic

Examples

Hello World!

#48!#65!#6c!#6c!#6f!#20!#57!#6f!#72!#6c!#64!#21!#0a!

Cat

#01[@!#0a!]

More in examples/.

Send examples

The main purpose of programming in Ni is fun, the challenge of creating a program that works, these programs are collected in the examples/ folder.

You can send pull requests if you write one, send it as an issue or Discord to add it.

There are a number of popular problems to solve and show the ability of an esoteric programming language, the list is here: https://esolangs.org/wiki/Popular_problem

The main problems to solve are:

Also, I add these:

Discord

https://discord.gg/dxYxZs5

ko-fi