Programming Language Inspired by Brainfuck

Overview

Brainsuck

Brainfuck but not really... like... a better version of it.

Installation

Requirements:

  • Rust version 1.50 or higher

Linux

curl https://raw.githubusercontent.com/d3r1n/brainsuck/master/install.sh | bash

Windows

  • Clone the repository
  • cd into bs_bin
  • run cargo build --release
  • generated binary will be in target/release (binary name: bs_bin)

Usage:

Help

$ brainsuck [-h, --help]

Interactive Shell

$ brainsuck

Execute

$ brainsuck <INPUT FILE> [OPTIONS]

Options

  • [-m, --mem-size]: Sets the program's memory size. (default: 1024)
  • [-p, --ptr-loc]: Sets the program's memory pointer location. (default: 512)
  • [-a, --auto]: Automatically allocates memory for the program. (default: false)

Versions History

  • v3.0 [Next]
    • Adding custom keywords and functions to the brainsuck
  • v2.0 [Now]
    • Added Interactive Shell (Main Feature) see Usage ^
    • More bug fixes
  • v1.5 [Previous]
    • Automatic Memory Allocation (Main Feature)
    • New way of argument handling
    • Some bug fixes
  • v1.0
    • Initial Verison of Brainsuck

--

Some screenshots:

Programs:


Hello, World!

Mandelbrot Set

Click to expand

Errors


File Not Found

Syntax Errors

Memory Overflow Errors


TODO:

  • Add basic brainfuck commands.
  • Add automatic memory allocation.
  • Add repl
  • Add lots of custom commands and features.
Comments
  • Simplify the lexer

    Simplify the lexer

    This replaces the main loop of lex() with a for loop that iterates over the characters of the input directly without collecting them. Since this doesn't require ownership of the input, it can be passed as a borrowed str instead of an owned String.

    opened by Johan-Mi 2
  • Reorganize project layout with workspaces

    Reorganize project layout with workspaces

    Workspaces are a feature in Cargo that make it easier to manage muti-crate projects. The project will now have a single target directory instead of having it both in bs_lib and bs_bin. This means that dependencies will only be compiled once and not duplicated. This also lets you build and lint the code from the root of the repository instead of having to handle one of the crates at a time.

    opened by Johan-Mi 1
  • Fix the rest of the warnings

    Fix the rest of the warnings

    This patch fixes all warnings, both from the compiler and from Clippy. It's always a good idea to check your code with Clippy before commiting it. This can be done by running cargo clippy in the bs_lib and bs_bin directories.

    bug 
    opened by Johan-Mi 1
  • Code formatting with rustfmt / cargo fmt

    Code formatting with rustfmt / cargo fmt

    Please consider formatting your code with rustfmt, which can be done by running cargo fmt. This way, you'll get a consistent style and it will be easier for other people to contribute to the project. If you don't like the default configuration there's a list of options here: https://rust-lang.github.io/rustfmt/.

    opened by Johan-Mi 1
  • Fix naming related warnings

    Fix naming related warnings

    Variables and functions should use snake_case and unused variables should be prefixed wih an underscore. This is the standard naming convention in Rust and is enforced through compiler warnings.

    bug 
    opened by Johan-Mi 0
  • [Idea] Unecesary installation

    [Idea] Unecesary installation

    What about just having 2 different packages?

    For the CLI

    cargo install brainsuck-cli
    $ brainsuck
    

    And for the lib (in the Cargo.toml)

    brainsuck = "1.0.0"
    
    enhancement 
    opened by mauro-balades 4
Releases(v2.75-windows-linux)
Owner
Derin Önder Eren
Rs, Js, Py, Go, Cpp, Ts, Ex 14 y.o Full-stack Web, Game, Software Developer.
Derin Önder Eren
The brainfuck language interpreter written in Rust

The brainfuck language interpreter written in Rust

Jan Štaffa 1 Feb 21, 2022
The language that eats the stack. Heavily inspired by porth which is inspired off of forth

Snack The language that eats the stack. Heavily inspired by porth which is inspired off of forth Install To use Snack you will need Rust and fasm Afte

Cowboy8625 2 Mar 20, 2022
Programming language from down under, inspired by this Reddit post.

aussie++ Programming language from down under, inspired by this Reddit post. View live demo here. Special thanks to MarkWhyBird, louis100, and others

Zack Radisic 562 Dec 27, 2022
A Star Wars inspired by programming language

The Force The Force is a gateway to abilities many believe are unnatural... Getting Started Install Rust. We also provide a Dev Container if you would

Matthew Booe 14 Dec 21, 2022
Brainfuck interpreter written in rust

Brainfuck Interpreter Written in Rust Simple Interpreter that runs bare Brainfuck and extends it with debug command # which prints content of first te

Was 1 Nov 28, 2021
Boop is a variant of Brainfuck featuring cats.

Boop Boop is a variant of Brainfuck featuring cats. Try it $ cat ./examples/hello-world.boop This program is Hello World translated from Brainfuck to

Federico Damián Schonborn 4 Aug 12, 2022
Brainf - A brainfuck interpreter written in Rust 🦀

brainf A brainfuck interpreter written in Rust ?? . Do not I wrote this in my spare time... but still its good! Run Locally Clone the project git cl

Nav 3 Oct 8, 2022
A transpiler/compiler for CrabRave, a version of BrainFuck with sea-life emojis.

CrabRave Programming Language CrabRave is a fun and unique programming language based on Brainfuck, which utilizes crab and sea-life emojis as its syn

null 23 May 3, 2023
tr-lang is a language that aims to bring programming language syntax closer to Turkish.

tr-lang Made with ❤️ in ???? tr-lang is a language that aims to bring programming language syntax closer to Turkish. tr-lang is a stack based language

Kerem Göksu 10 Apr 2, 2022
A simple programming language for everyone.

Slang A simple programming language for everyone, made with Rust. State In very early stages. Plan is to create a byte-code compiler and make that exe

Slang, Inc. 11 Jul 1, 2022
A programming language. Better mantra pending.

Dusk Dusk is a programming language I've been working on on and off for the past while now. It's still very much in its infancy (... a quick look thro

Kaylynn Morgan 14 Oct 24, 2022
Ruxnasm is an assembler for Uxntal — a programming language for the Uxn stack-machine by Hundred Rabbits

Ruxnasm is an assembler for Uxntal — a programming language for the Uxn stack-machine by Hundred Rabbits. Ruxnasm strives to be an alternative to Uxnasm, featuring more user-friendly error reporting, warnings, and helpful hints, reminiscent of those seen in modern compilers for languages such as Rust or Elm.

Karol Belina 44 Oct 4, 2022
Frame is a markdown language for creating state machines (automata) in 7 programming languages as well as generating UML documentation.

Frame Language Transpiler v0.5.1 Hi! So very glad you are interested in Frame. Frame system design markdown language for software architects and engin

Mark Truluck 35 Dec 31, 2022
beat saber is a strongly typed, self-documenting and highly performant programming language

beatsaber beat saber is a strongly typed, self-documenting and highly performant programming language. With beat saber we aimed to create a language t

Untitled 4 Jan 17, 2022
Analogous, indented syntax for the Rust programming language.

Note: After experimenting with this in the wild, I have found representing keywords as symbols to be far less readable in large codebases. Additionall

null 42 Oct 2, 2021
A cell-based esoteric programming language

Tape A cell-based esoteric programming language Tape is a cell-based, brainfuck-like programming language that has a readable syntax and a non-wasted

Gabriel Pacheco 2 Feb 23, 2022
An incremental programming language

Differential Datalog (DDlog) DDlog is a programming language for incremental computation. It is well suited for writing programs that continuously upd

VMware 1.2k Dec 28, 2022
🤯 A brainf*ck-style programming language, but readable

?? Brainease Brainease is a brainf*ck-style programming language, but readable. $ cargo install brainease # brainease -f examples/hello.bz save 'H

Arthur Fiorette 11 Sep 30, 2022
Simple programming language that speaks the ones you already know!

Simple programming language that speaks the ones you already know!

LyonSyonII 2 Feb 12, 2022