Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hellerve/compfuck

A compile-time Brainfuck compiler, in Carp
https://github.com/hellerve/compfuck

brainfuck carp compiler

Last synced: 22 days ago
JSON representation

A compile-time Brainfuck compiler, in Carp

Awesome Lists containing this project

README

        

# compfuck

Brainfuck translated to Carp at compile time. Just add `(compf "")` to
your program, and the equivalent Carp code will be emitted and compiled into your program.

## Wat

Basically, this is a quick example macro that proofs that the compile-time environment of
Carp is quite capable of emitting complex code. This program in particular uses
string-based code emission, meaning that we analyze the source and emit Carp code based on
it. I don’t expect this to be very fast, but that’s not the point.

Ultimately, there is no point.

## Usage

```clojure
(load "compfuck.carp")

; print the ascii charset and then some
(compf "+[+.]")
```


Have fun!