Tag Archives: programming

Messing with Brainf*ck

Well, a couple of nights ago, I started toying with Brainfuck, for no reason other than I was just bored.

I was talking to a colleague about a Brainfuck interpreter on my Nintendo Wii, this was just a little bit of fun, but yesterday, he couldn’t sleep, as some of you may know, I work for a company that writes an APL Interpreter, so we’re not new to strange languages. What’s more obscure than APL, well, there’s loads of them, and Brainfuck is one of these. But how could we make use of obscure languages together? well, as Nic couldn’t sleep, he decided to write a Brainfuck Interpreter…. in APL…

For those that don’t know Brainfuck, here’s “Hello World!” in Brainfuck.
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

I’m not going to show all the code in here for the Brainfuck interpreter, as it would make my post huge, but it’s here (note, this doens’t actually show what APL can do, and makes it look like a procedural language.)

because APL Uses it’s own Character set you may need Apl385-Unicode font to actually read some of the code. that can be grabbed from the download area on http://www.dyalog.com

In the mean-time, here’s a quick screenshot of Brainfuck in APL in action:

apl1

And in the interest of saving some arguments, some will point out that ⎕←’Hello World!’ is _NOT_ Hello world in APL – I used this to show the same output – as interpreted, this is ok, as a program, I agree. it isn’t. – also note that I shortened the function name to “bf” just because that was easier to type :-)

Who knows. Maybe the “bf” function will be included in Dyalog. just for a little bit of fun. Well, it is, isn’t it! :-)

Jay.

World-Wide Programming Contest

Hi to all that read,

The company I work for along with a few other companies are now running a world-wide programming contest, with a nice prize to win at the end of $2000 plus a trip to our conference in Princeton, New Jersey in September. For those that don’t know, I work for a company called Dyalog LTD, they are a programming company creating an APL Interpriter.

This competition will be very good for anyone with a good mathematical mind, and for all people that would like to know more about the fantastic APL Language, be warned, it’s hard to get into, but very cool once you’ve cracked the code! For more information on the competition, you can look here, and for your copy of Dyalog APL to get started with the competition, you can apply for a student license here, or if you’re not a student and would like a non-commercial license, look here.

The competition requires completing some problems found on the Project Euler website These are very mathmatical problems, and must be completed in APL. Unfortunately I can’t enter it, (or at least not win) which is a shame, as it would be a good learning curve for my APL. I also can’t help any of you with the problems. but if you would like to enter, I can assure you the Conference in Princeton will be very good for anyone getting into APL. (and APL is a good thing to get into ;-) )

Enjoy, and I hope some of you that read this do have a look into the competition, and give it a go.

J