NanoNote ports: Yacas & 4th (Forth interpreter, compiler)
2 minutes read | 351 words by Ruben BerenguelLast saturday I was in a porting mood, and tackled two interesting packages to have in the Ben NanoNote: yacas and 4th.
Yacas (Yet Another Computer Algebra System) is a very interesting application to have in such a small device. The best calculator I have used is my old faithful HP49g. But in these days, it is bulky, heavy and slow. It was superseded by m48 (a HP48+ emulator) inside my iPod Touch. Quite nice: the HP48 is programmable, has graphing capabilities and quite a good computer algebra system.
However, the NanoNote is a computer. It has a fully featured (fully as in you can put whatever you want in it, if you are able to do so) operating system, and as such, can hold far more than a pocket calculator. And it has a real keyboard, not a fake touch keyboard as in the iTouch or a (horrible) plastic keyboard like the HP49g.
It turned out to be easier than I expected. The process needs a previous step, like Gnugo did. You have to compile it in your host system, and then use an intermediately generated file to cross-compile. I am almost done in writing a completely automatic Makefile that handles everything for you. As it stands, it is quite messy moving files around, but the program is usable.
The other, 4th is a multi-platform Forth interpreter and compiler. My first try of porting a Forth system was gforth, but it didn’t work: gforth compiles itself (more or less), and in a cross-compilation process this is really hard to handle. The developers even acknowledge it in the INSTALL file.
Fortunately, 4th is easy to cross-compile on purpose and indeed, it worked like a charm. I didn’t need to do anything more than write the Makefile and copying the libraries to the Nano afterwards. I’m also halfway writing a decent Makefile that copies these libraries where 4th can find them in the Nano.
Related posts:
Gcal: the ultra-powerful command line GNU calendar
Unpacking my Ben NanoNote
My first port to the Ben NanoNote: gnugo
Another Ben Nanonote port: pmars
ParseList(ScrambleList(Relateds(Linux, Programming)),10)