https://github.com/aaronc81/brainfocc
Brainfuck with Occam-style concurrency
https://github.com/aaronc81/brainfocc
Last synced: 10 months ago
JSON representation
Brainfuck with Occam-style concurrency
- Host: GitHub
- URL: https://github.com/aaronc81/brainfocc
- Owner: AaronC81
- Created: 2020-03-19T23:45:04.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-19T23:45:18.000Z (almost 6 years ago)
- Last Synced: 2025-03-06T15:17:08.237Z (10 months ago)
- Language: Ruby
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Brainfocc
Brainfocc is a **Brainfuck dialect with Occam-style concurrency**.
On top of the standard Brainfuck instructions, it has:
- `^` **fork**: Creates a new interpreter with an identical state to the
current one, except for the current data byte. The data byte is set to 0 on
the original thread, and a new unique PID on the forked thread.
- `&` **channel select**: Chooses a channel to send and receives messages to.
The new channel number is set with the current data byte.
- `!` **send**: Sends a data byte to the currently selected channel, blocking
until it's received.
- `?` **receive**: Receives a data byte on the currently selected channel,
blocking if one is not immediately available.
## Usage
You'll need `concurrent-ruby` and `concurrent-ruby-edge`. Invoke this like:
```
brainfocc
```
## Quirks
- The fact this exists is enough of a quirk, to be honest
- The main executable will never terminate without a Ctrl+C