How do i save an compile a program in befunge-93?
what do i need to save the file as? (like: fileName.what)
How do i compile it?
views:
30answers:
1
+1
A:
Befunge is typically an interpreted language. In fact it was designed to be difficult to compile because the programs are self-modifying (but that hasn't stopped people from trying to write a compiler).
You should save the file however you like (a .bf
extension is typically used) and run the interpreter (bef), passing the filename as a command line argument.
You can see the usage instructions in the source code for the interpreter.
Mark Byers
2010-04-08 20:42:43
do i have an interpreter on my computer automatically though or do i have to download one? Where do i do this at?
David
2010-04-08 20:45:56
@David: The reference implementation is found here: http://catseye.tc/projects/bef/. You download the source files and compile it using your favorite C compiler. There are some notes here: http://catseye.tc/about/prereqs.html#ansi_c
Mark Byers
2010-04-08 20:47:38
@David: And I hope you are aware that Befunge is an esoteric / joke language? ;-)
Mark Byers
2010-04-08 20:50:12
i am aware but i thought it might be fun to learn. I don't understnad how to use the intepreter. Is that source code you linked me to something i have to compile and run then? how do im compile it on my computer?
David
2010-04-08 20:53:32
@David: Yes, you compile the source to get an executable called `bef`, or `bef.exe` on Windows, and you can run that from the command line to execute your Befunge source.
Mark Byers
2010-04-08 20:58:53
how do i compile it though? i only know how to compile .java files with javac. im sort of new at this.
David
2010-04-08 21:00:38