Menu

sbf / News: Recent posts

Progress (or lack thereof) Report

I would like to apologize for the lack of updates to sbf. Two factors have contributed to this:

1) The translation. I am trying to do a restructuring of the brainfuck-to-language-X translation functions so that they are more efficient. Previously, the translate() function simply called the appropriate function for language X and was done, and all the real grunt work was done in the language X translation function. This means that several loops that did essentially the same things were repeated for each language. This is horribly inefficient. I am trying to restructure the code so that the translate() function does more of the grunt work, and only calls out to other language-specific functions when it needs to. I would have used function pointers and left it at that, but the damn java_header() function needs one more argument than all the other lang_header() functions, so I opted not to require them all to take an extra argument. And I'm not looking forward to writing the massive if { ... } else if { ... } else blocks that need to be written.... read more

Posted by Chris Lutz 2009-02-10

sbf 0.9.4 release

sbf is now up to version 0.9.4! There are two major features of 0.9.4 - Ruby and Unicode.

In 0.9.2, Ruby translation was iffy, if present. In 0.9.4, Ruby translation is as well supported as Perl and Python, including the infinite list.

Also in 0.9.4, UTF-8 support has been added for those who are growing tired of the old ASCII. Now your brainfuck programs can take advantage of that extra bit for more than just math! brainfuck programs can now properly display the creator of brainfuck Urban Müller's name. UTF-8 is supported by the interpreter, the translator for C, Perl, Python, and Ruby, and by the compiler.... read more

Posted by Chris Lutz 2009-01-05

New Features and Updates

A number of new features have been added, a number of broken things have been fixed, and a number of updates will soon be posted. Well, only one update, but you know how it goes.

New features:

-s option for simple translation. Instead of using confusing linked lists, it uses a flat array. Faster than linked lists, and code generated (and used) is easier to understand for newbies, but has inherent limitations on array size. Takes optional argument to specify the array size, defaults to 30,000 (the default in the original brainfuck implementation).... read more

Posted by Chris Lutz 2009-01-02

Sweet, sweet victory!

I have uploaded sbf to the tubes! At last, the taste of sweet, sweet victory!

Ahem. sbf, version 0.9.2, is now available for download in source code form at SourceForge.net. Just go to https://sourceforge.net/project/showfiles.php?group_id=246670&package_id=303658 and select the compression format of your choice (I recommend .tar.bz2 - it's the best compression of the three), and then download it!... read more

Posted by Chris Lutz 2008-12-22

Soon I promise

sbf source code and documentation will be online soon. I promise. I just need to iron out some interface issues. 0.9.something will probably be online by this time tomorrow. At the very least before Friday.

Posted by Chris Lutz 2008-12-17

More Languages

In the wake of Python, new languages have been added in varying stages of completeness.

I'm actually posting this now because of C++, which has been added, and now completely works. The C++ translation supports all the same things the C/Perl/Python translations do.

Lisp is coming along well. I'm not sure what's broken, but it won't be long.

I also added Java. (Boo! Hiss!) Actually I just shamelessly stole it from another C program I found laying around that translated brainfuck to Java. The input is broken, and it uses a finite list, but it does (mostly) work.... read more

Posted by Chris Lutz 2008-12-16

Python

I'm impressed to say that a Python translation has now been added.

This is an impressive achievement for me. I grew up a Perl man, and all I know about Python is that it's the devil. I've been waiting around on people I know who've been saying "I'm learning Python" for months, and I finally got sick and did a Google search and found a brainfuck interpreter written in Python where I could tell what the equivalent Python code was for each brainfuck command. I then delved deep enough into Python to figure out .append and .insert, so I could make an infinite list, and modified it a little to support different EOF behaviors.... read more

Posted by Chris Lutz 2008-12-06

What is sbf?

sbf stands for Sbf BrainFuck. It is a brainfuck interpreter, compiler, and translator.

What is brainfuck? http://en.wikipedia.org/wiki/brainfuck
brainfuck is an esoteric programming language. It is one of the smallest Turing-complete programming languages, with only 8 commands.

brainfuck was originally created by Urban Müller as a language with a compiler of less than 200 bytes (the compiler was written in Amiga assembly). Since then, many compilers and interpreters have been written for brainfuck in many languages and for many platforms. Often times, when they need to resolve a critical issue (what to do if someone reads a character after EOF), they resolve it in whatever way is the default, which lead to a proliferation of different ideas on how exactly brainfuck should be implemented. Also, because brainfuck is so easy to implement, many people would write a program, put it on the internet, and never touch it again. I've downloaded countless programs that probably have simple to fix errors, but I'm too lazy to struggle through their source code and figure it out, I can't contact the creator, and they left no documentation about how it works or how to fix it.... read more

Posted by Chris Lutz 2008-12-02