Remembering the Logo Language
Jeff Atwood from Coding Horror just posted about the Logo language. Like him, and many of the commenters in his post, that language had a great influence in my own career. I could say that my contact with Logo was responsible for making me gain interest for software development. And yes, I didn't know it was a easy-to-read LISP language too…
Everything began in 1990, when I was 10 years old. I started to have computer classes in my college. At that time, computer classes meant to learn a programming language: the first year was Logo, some Basic variant on next year. After that, we would learn to use Wordstar and then some database programming with dBase III. Ah, good old days!
It was my first contact with computers. We used a Apple II clone, Exato, with a Logo implementation called MLogo. According to my professor, it was Microsoft Logo; unfortunately I couldn't find any references on this to confirm… If you have some MLogo disk image lost somewhere that can be emulated, please comment!
Thanks to Logo is was able to learn and practice things "normal people" only learn years later, for example, mathematical concepts like angles and some basic trigonometry. I remember being surprised to know that a circle is just a polygon with some many sides you just don't notice. I also learned procedural programming by breaking bigger problems into small procedures.
It was very funny to spend some hours just drawing pictures and playing with the repeat command.
In 1999 I had another contact with Logo during my graduation in Computer Science. Apparently my C professors were fans of Logo too, and they proposed a exercise to make a simple Logo interpreter, consisting of a simple shell and basic drawing operations: forward, left, right and the repeat command.
I was so excited while implementing it, that I ended up implementing a lot more features than previously planned. I implemented most drawing functions, color changing, pen modes, and repeat (loop) command with nested blocks.
That code was left hibernating in my old HD until now. After reading that nostalgic post from Jeff, I decided to release it under GPL at Google Code, so it doesn't got lost someday. It uses a portuguese Logo dialect, and the source code comments are also in portuguese.
I don't plan to evolve that code, but maybe I would rewrite it in another language or platform when I have time. The source is just for study purposes (but don't forget it is a beginner C programmer's code, so be aware that it may contain some WTF code
).
Impressively, I was able to run the original 1999 executable using DOSBox, an MS-DOS emulator. I was even able to run RHIDE, the IDE which comes with DJGPP I used to develop the original code! It is not just for running old games
I did some minor modifications to make it work in win32. Originally the code was written using the free DJGPP/GNU toolchain and the GRX graphics library for DOS environment, so the executable was not working in Windows Vista.
Thankfully, GRX is multi-platform, and with some little modifications I was able to make it compile and run under Wascana (an Eclipse/CDT/MinGW bundle). So, the executable available for download can be run directly on Windows.
You can download it and see some screenshots here.
Credit for the Exato PRO photo: Idalio Manuel.
I also rediscovered Logo programming recently and was pleasantly surprised to find that there are very good implementations available for Linux. I even discovered an implementation for Palm OS that runs on Pocket PCs if you use the styletap platform.
I wouldn’t do any serious programming with it but it’s good fun