Tag Archives: APL

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

Complicated Plea for Simplicity

Last year at the 2008 Dyalog APL Conference in Lo-Skolen, Helsingør, Denmark. Along with most of the normal presentations on what’s new and what’s been going on with the company, there was a Presentation done by John Scholes. John is one of the oldest developers of Dyalog APL, having been with the company since day 1 almost 26 years ago, as far as his computers go, he likes them to work, he’s not too fussed what it runs, as long as it does the job in hand. Johns presentation; a Plea for simplicity is here:

This was an absolutely brilliant presentation, and a big relief for a lot of people after a very long day of conferences, to have something amusing like this was great.

However, John Scholes has created a new youtube post, for those that don’t know what a Palindromatic expression is, it is an expression that looks the same, irrelivant of which way you read it. So from the person that brought you the plea for simplicity comes a Palindromatic APL Expression for Phi.

For those that don’t know about APL, have a look here APL is one of the oldest programming languages, it’s an interpreted array language mainly for mathematicians, with it’s own character set, mayking it very fast to use for people that know what they’re doing with it, but very difficault to learn if you don’t know APL, as almost every function has it’s own character as apposed to most languages you might have seen that use words for their functions.