/ttb-diff-approach

A different approach for Text To Brainf**k compared to my original implementation with BFI.

Primary LanguageBrainfuck

TTB (Text To Brainf**k)

What?

Different approach instead using fancy-pants math to convert text to Brainf**k as done in BFI:

The format produced is near identical to what I used in Brainless Bot.

Only real difference is:

Brainless Bot
>>++++[<++++++++>-]<..               Space (x2) = 32
== VS ==
TTBDA
>>++++[<++++++++>-]<..                    Space = 32

It can also produce a compact format (--compact=<int>) if you don't want the comments.

>+++++[<+++++++>-]<.>>++++[<++++++++>-]<.>>+++++[<
+++++++++++++++++>-]<-..>>++++++[<+++++++++++>-]<.
>>++++[<++++++++>-]<.>>++++[<++++++++++>-]<.>>++++
+[<+++++++++++++++++>-]<-.>>++++++++++[<++++++++++
>-]<+.>>++++++++++[<++++++++++++>-]<.>>++++++++++[
<+++++++++++>-]<++++++.>>++++[<++++++++>-]<.

You can have all the code one 1 line if you want by specifying compact as 0.

Check test/gitignore.bf for an example.


Why?

bored 🤷‍♂️