Brainfuck

0.1.0

A Brainfuck interpreter written in Swift. Just because!
nerdsupremacist/Brainfuck.swift

What's New

2020-04-04T18:27:29Z

Brainfuck.swift

A Brainfuck interpreter written in Swift.

Installation

Swift Package Manager

You can install Brainfuck.swift via Swift Package Manager by adding the following line to your Package.swift:

import PackageDescription

let package = Package(
    [...]
    dependencies: [
        .package(url: "https://github.com/nerdsupremacist/Brainfuck.swift.git", from: "0.1.0"),
    ]
)

Usage

Brainfuck.swift comes with a parse and a set of eval functions.

You can use the directly with the program as a string:

let program = """
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
"""

let output: String = eval(program: program) // Hello World!\n
print(output)

Contributions

Contributions are welcome and encouraged!

License

Brainfuck.swift is available under the MIT license. See the LICENSE file for more info.

Description

  • Swift Tools 5.2.0
View More Packages from this Author

Dependencies

Last updated: Sat Oct 10 2026 15:39:19 GMT-0900 (Hawaii-Aleutian Daylight Time)