Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thecommieaxolotl/thighkiss
A simple brainfuck interpreter. Because there aren't enough of them.
https://github.com/thecommieaxolotl/thighkiss
brainfuck interpreter javascript npm-package
Last synced: about 6 hours ago
JSON representation
A simple brainfuck interpreter. Because there aren't enough of them.
- Host: GitHub
- URL: https://github.com/thecommieaxolotl/thighkiss
- Owner: TheCommieAxolotl
- Created: 2022-07-19T06:20:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-24T19:23:54.000Z (about 2 months ago)
- Last Synced: 2024-10-14T06:39:50.827Z (about 1 month ago)
- Topics: brainfuck, interpreter, javascript, npm-package
- Language: JavaScript
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# ThighKiss
A simple brainfuck interpreter. Because there aren't enough of them.## Usage
```js
import thighkiss from 'thighkiss'; // commonjs: const thighkiss = require('thighkiss')console.log(thighkiss("++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++."))
// Expected output: 'Hello World!'
```## Features
- Support for all commonly accepted brainfuck instructions.
- Supports overflow wrapping.
- Supports program inputs.## So... What the f**k is brainfuck?
Brainfuck is a turing-complete esoteric programming language designed by Urban Müller. Brainfuck programs use a pointer to infuence an array of 30,000+ values, brainfuck has a total of 8 commands:| Character | Description |
|:---------:|----------------------------------------------------------------------------------------------------------|
| `+` | Increment the value at the current cell. *If the value is 255 it becomes the lowest possible value (0) |
| `-` | Decrement the value at the current cell. *If the value is 0 it becomes the highest possible value (255) |
| `>` | Move the pointer to the right. |
| `<` | Move the pointer to the left. |
| `[` | If the value at the current cell is zero, move the current cell to the matching `]`. |
| `]` | If the value at the current cell is non-zero, move the current cell to the matching `[`. |
| `.` | Print the value at the current cell. |
| `,` | Read a character in the input and store it in the current cell. |\*Assuming the compiler supports overflow wrapping.