APL – Coming to a Robot Near You

APL on the C3Pi

One of the biggest joys of being the CTO of Dyalog is that you get to write code to help evaluate prototypes of proposed language features, or new tools and tutorials that we are planning to make available. This past week has been one of the most exciting for a very long time, because it started with Jason and Liam presenting me with the first fully-assembled Dyalog-built C3Pi clone!

The first Dyalog-build C3Pi CloneJason Rivers has been constructing the hardware, and Liam Flanagan is responsible for the port of Dyalog APL to the Raspberry Pi, which will be the seat of the “brains” of the robot. We have been talking to the folks at Quick2Wire over the winter about this project, primarily with Romilly Cocking, who is one of those select individuals who can boast that he has already achieved the dream of every programmer.

This week, all the bits came together:
• Jason finished assembling the first C3Pi mockup (we are building 4 units to play with, while we wait for the finished item from Quick2Wire).
• The CTO purchased and charged two sets of six AA batteries.
Dyalog APL version 13.2 (Unicode edition only) passes our tests on the Pi, except for an issue with de-normal floating-point numbers caused by a known issue in the Linux kernel. We aim to officially release a free non-commercial version for the Raspberry Pi by mid-May, contact us for an advance copy if you can’t wait.
• Liam has built a shared library which interfaces APL to the I2C bus which is used to make life a little easier for an APL developer trying to use I2C. We use I2C talk to the Arduino which controls up to 11 outputs and 6 inputs, if I am reading the specification correctly. At the moment, we use three outputs for each of two motors: One analog output to control the speed and two digital outputs to activate the motor going either forwards or back.
• Liam has also constructed some temporary code we are using while we wait for the updated Quick2Link code to become available: This is a “command interpreter” running on the Arduino which accepts 3-byte commands {pin type, pin number, output value) over the I2C interface, providing a very easy mechanism for APL to drive the Arduino outputs.

Now, that’s a pretty exciting package to find on your desk on a Monday morning! OK, Monday afternoon, to be honest – the morning was spent with Fiona Smith, our first full-time Technical Writer – another person who will soon be contributing to our “Pi” project. Needless to say, I shortened every meeting for the rest of the week by 5 minutes, and thus managed to find the time to write some APL code capable of driving the robot (press “play” below).

We’ll be keeping the various bits of code up-to-date in repositories under https://github.com/APLPi. If you think you might want to build your own hardware and play along with us, Jason will soon be starting his own series of blog posts about how to build a C3Pi. I will write a bit more about the APL code, and the longer term goals of this project, in my next post.

GSE & APL Germany in Hamburg, 29th&30th April 2013

Gitte Christensen and Morten Kromberg will be attending the “GSE Arbeitsgruppe APL” meeting on April 29th, and speaking at the “APL Germany e.V.” meeting on April 30th, at ERGO Versicherungsgruppe AG. The key topics are likely to be performance, new language features proposed for version 14.0, and controlling robots using APL. Check out the complete agenda for the two days.

Ladies and gentlemen, boys and girls, welcome to “Dyalog blog”!

There are so many new activities at Dyalog, and so many new people taking a look at Dyalog APL – many of whom do not have the opportunity to attend traditional “APL User Meetings” – that I am starting a “blog” in the hope that this will provide the required bandwidth. The intention is to post regularly about activities at Dyalog – in particular in the development team – as seen through the eyes of the current CTO.

Coming Up Next…

OK, I do understand that modern blogs are supposed to at least appear spontaneous, but old habits die hard: I have a list of topics that I am currently writing up and hope to publish in the near future. I am hoping to strike a reasonable balance between discussing topics of interest to established APL developers writing and maintaining production applications, and newcomers who only just heard about APL.

I look forward to your feedback on how to prioritise the proposed topics, add to or delete from the list – or any other comments that will help me make this blog more useful – either in the form of public comments on this site or, if you prefer, private e-mail.

Posted in CTO