|
News
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!
There are some issues that still need to be resolved:
1) Windows users will probably need Cygwin to install it. In the future, it may be easier to provide a precompiled version for Windows, because I can't re-write the config.sh shell script for DOS. And however horrible DOS is I want sbf to run natively on it if possible.
2) Some of sbf's documentation may be out of date, and the "-h" flag shows at least one flag that sbf no longer supports (hint: it's -s)
3) Java, Lisp, and assembly still don't work.
4) bf2C (the extra program made with "make extra") is massive, because rather than make the program more complicated, I just linked more files together. Bad practice I'm sure, but it works, and it demonstrates the (easy) way to interface with sbf's functions and steal its code. Perhaps later I'll make a better implementation of bf2C that is leaner and does it the harder (but better) way. Later.
5) THE OPTIMIZATION FLAG (-o ) IS STILL USELESS and the code is written only so I have room to add it in later. Again, there is currently NO OPTIMIZATION done on anything. Writing an optimizer is what will take sbf from 0.9 to 1.0. Until even a basic optimizer is written, sbf will go all the way to 0.9.42 if it has to.
Most of those caveats (all but the last) are relatively minor and can be worked with easily. I look forward to any feedback and anyone willing to contribute to the optimizer.
Top
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.
Top
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.
So that's it. I hope those of you who use C++ understand the C++ translation. It's largely adapted from the C translation, with a few changes made because C++ just likes to do things differently. Enjoy!
Top
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.
All in all, I basically bullshitted a brainfuck-to-Python translation. I need to hurry up and put a release up here.
Top
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.
sbf seeks to solve that. It has an interpreter, compiler, and translator to a variety of languages (assembly, C, Lisp, Perl) all rolled into one. Sure, it's not less than 200 bytes, but it's portable, it has all brainfuck utilities you'll ever need (it can even count how many of each brainfuck command you use), and it has documentation. Plus, it doesn't gloss over issues like EOF or EOL - it explicitly converts between ASCII 10 and \n on platforms like Windows that have more complicated line endings, and it allows users to select different EOF behaviors depending on their program, so a program that works with no change on EOF can be used with sbf just as easily as one that requires returing 0 on EOF or returing -1 on EOF.
Top
Newer | No older entries
|
|