Other High Level Language Systems

by Warren Young and Wade Hatler

Most Palm programs these days are written in C, but if C isn't your favorite language, there are many alternatives to choose from. Other sections of this FAQ have covered the extremely high level and extremely low level Palm development tools. This article will focus on the middle ground, standard programming languages which have little in common other than being "not C".

Java

There are several projects to bring Java to the Palm, but a full Java Virtual Machine takes up a lot of memory and demands a certain amount of CPU power, both of which the Palm is short on. The only products available so far are therefore subsets of Java.

VisualAge Micro Edition is a Java environment for the Palm based on IBM's VisualAge for Java product. The IDE runs on Windows and Linux, and generates Java bytecode, which is interpreted by IBM's traditional-style JVM. The JVM takes up 150 KB on the Palm. The "Individual Package", which does most everything you'd want, is free. There's also a "Collaborative Package" that adds a code repository and version control for $100 per developer.

Sun's Java 2 Platform line is divided into three parts. The low end is the Java 2 Micro Edition (J2ME), and one configuration of J2ME is called MIDP, or Mobile Information Device Profile. The MIDP package includes a specially-optimized version of the JVM called the KVM. (That's 'K' as in "just a few Kilobytes".) The KVM and MIDP libraries together range from 80 KB to 160 KB. It is available for free under the terms of Sun's Community Source License for research and development purposes. Commercial terms are negotiated on a case-by-case basis. As I write this (2001.01.13), there is no simple commercial version yet. That is, there are no commercial IDEs that take care of distribution royalties and such. It is expected that developer products will become available sometime before the middle of 2001.

Jump converts Java .class files that follow certain guidelines to native Palm executables. This is not a full Java implementation and it is not a Java Virtual Machine. Since this is a hybrid product, it isn't quite as flexible as either programming in C or using a full Java Virtual Machine. It appears to be in active development, open source style.

Waba is a free (GPL'd) subset of Sun's Java which lets you use regular Java development tools. The catch is, it only handles a subset of the JVM bytecode, and you must use a different class library. Within these restrictions, you can develop programs that run on the Palm and Windows CE devices, as well as any other OS that has a JVM. The runtime is 73 KB.

There are several extensions of the base Waba package. The first is SuperWaba, which adds WinCE/PocketPC support, Java AppletViewer support, and other things. There is also a GUI builder called VisualWaba. Finally, there's Waba Jump, which is a tool that converts your Waba projects to Jump, so you can build native Palm executables without a dependence on the Waba JVM.

There is an abandoned "Java on Palm" project called Ghost Machine.

Basic

Ron Nicholson's HotPaw Basic (formerly CBasPad) is a tiny BASIC interpreter for the Palm. It's a lot like the GW Basic that came with older versions of MS-DOS. It has good support for the Palm API, including things like forms, serial I/O, database creation, etc. The free demo will run up to 4 small programs, so if your needs are simple you might not have to buy the full $20 version. HotPaw Basic doesn't have a separate runtime, so to distribute your programs you have to require your users to buy their own copy of HotPaw Basic.

NS Basic/Palm is a commercial product in the Visual Basic style. It has a Windows IDE with a full GUI builder and debugger. It generates pCode PRC files, which are interpreted by a separate 77 KB runtime. NS Basic costs $100.

AppForge is an add-on for Visual Basic. It adds a new project type to the New Project screen, which is a hybrid Windows/Palm project. You can develop in the Windows environment, and generate native Windows executables. (These executables look just like a Palm program, down to Palm-like controls and a fixed 160x160 window.) Then, when you're ready to generate a Palm executable, you run the "Upload Project" off the new AppForge menu, which builds the program to a PRC file and sets it up for synching to your Palm device. The runtime is about 300 KB, and the environment costs $700. There's a competitive upgrade from most of the other non-free tools on this page for $400.

SmallBasic is a free, GPL'd Basic interpreter of the QuickBasic stripe: no line numbers, structured programming conventions, yet not as complete or powerful as the above products.

Pascal

If you're a Delphi user, there's a tool in development that will bring a Delphi-like environment to the Palm platform called PocketStudio. The web site doesn't actually say so, but I presume that it runs in Windows, and generates native binaries for the Palm. The product is slated to be released Q2 2001.

Another product-in-development is High Speed Pascal. The author originally wrote Pascal compilers for the Amiga and the Atari ST, both of which used similar processors to today's Palm devices. This is a totally new product which will be a tightly-integrated IDE/compiler combination like Borland's recent Pascal tools. (There is a command line compiler, however.) HSPascal's dialect is described as "Turbo Pascal 5" -- an extension of "Silver Book" Pascal, but without objects. (Objects are planned for a future version.) As of July 2001, the plan is to release HSPascal "soon", but no firm date has been set. The projected price is $75.

Python

Pippy is a port of Python to the Palm. It's limited in various ways (e.g. you can't dynamically load modules from a file, since Palm OS doesn't have filesystems yet), but it appears to be quite functional even at this early stage.

Tcl

Palm Tcl is a port of Tcl 7.6 (an older but still useful version of the language) to Palm OS 3.0 and higher. There is as yet no IDE, but programming user interfaces in Tcl is notably easy.

Forth

Quartus Forth is a complete Forth compiler/interpreter system that runs entirely on the Palm device. It takes source code in MemoPad or DOC files and compiles it to efficient M68K machine code; it is capable of doing anything C can do. The free version is only limited in that it cannot build standalone PRC files -- it can only act as an interpreter or an on-demand compiler. The registered verision is $70.

Scheme

LispMe is a well-rounded, free Scheme compiler for the Palm. It's designed for quickly trying out code ideas, but it is powerful enough that you could conceivably develop an entire Palm application with it. It's entirely hosted on the Palm.

Smalltalk

Pocket Smalltalk is a free, Windows-hosted Smalltalk environment that generates standalone PRC files.

Squeak is another free Smalltalk system. Its main difference is that it's virtual-machine based for portability. For that reason, it cannot generate standalone PRC files: you have to install a very large runtime on the Palm to run Squeak applications. Currently, I only have heard rumors that people have gotten Squeak to work on a Palm, so this may well be vapor at this point.

Other Languages

CASLSoft's CASL is a high level cross-platform language, which looks most similar to Pascal to me, though the company describes it as similar to Visual Basic or JavaScript. CASL has a Windows IDE where you can write and debug your programs. It then generates a pCode PRC file, which gets interpreted by a separate 44 KB Palm runtime. (There's also a Windows runtime.) GUIs in CASL are built with Tcl/Tk-like source code, which is the easiest way of building a GUI that I know of short of a full drag-and-drop UI builder. The basic CASL package costs $85. There is also a $200 add-on which converts CASL code to C, which you can compile with PRC-Tools to make programs that will run standalone, without the CASL interpreter.

Copyright © 2000-2001 by Warren Young, © 1997 by Wade Hatler. All rights reserved.