High Level Languages Systems

Other High Level Language Systems

by Warren Young and Wade Hatler

Most Palm programs these days are written in C (DevToolsCCPP), 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 (DevToolsDataCollection) and extremely low level (DevToolsMisc) 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. Here's a Wiki for it with a FAQ, background, etc. There is also a GUI builder called Tauschke. 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's also a SuperWabaJump project in the works; see pilot.programmer.jump on news.falch.net for details.

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.

HB++ (aka Handheld Basic) is a VB-like development tool. It includes a true 68K compiler for object-oriented Basic language and provides with a very powerful integrated development environment, including debugger. There are lots of UI objects and you can define your own custom controls. Database support is provided with a nice conduit generator. HB++ alone costs €490. The enterprise edition (with a tool called "PalmServer" which allows access to corporate databases directly from the handheld device) costs €890. A fully functional (with nag screens) evaluation version can be downloaded from the web site.

iziBasic is an "OnBoard" basic compiler. Programs do not require a runtime; it generates a standalone prc. It costs 15$, but the demo version is functional enough to play with it. Please try it (even a newbie can create a nice application for PalmOS?). About iziBasic

The author has also developed another free onboard tool: LaFac, which supports 4 languages: Basic, pseudo C, pseudo Pascal and "Help" a proprietary "esoteric" language. About LaFac

 

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 that is now at v.2.1 is available in tre flavor, Standard, Professional and Enterpris, ranging in price from $69,99 to $599.99 (as of Aug-2004). A trial vesion is also available here.

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.

HSPascal has been released

There is another Pascal compiler :PP which stands for Palm Pascal; it's an "OnBoard" compiler PPCompiler

 

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. It has been stalled for over a year as of 2004 but the final version released did add the ability to load modules from memos. -- AndyDent - 30 Jun 2004

 

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. It generates standalone apps by linking the interpreter to the TCL source (stored as a resource) to create a single PRC. There is also free desktop IDE called Toucan written in TCL. It provides visual development of the forms, and building of the application.

 

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 $99.95.

Quartus Forth 2.0.0 is now available, with support for Palm OS 5, and enhanced functionality (including the ability to create ARM PNO modules).

QuartusHandheldSoftware - 30 Jul 2005

 

 

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.

 

Lua

Lua is a really nice open source script language with a very small runtime. A developer created a palm lua version. It looks cool, but unfortunately isn't open source, so you don't have access to the interpreter code, and can't bet your development time in something that can disappear.

 

Q: Why criticise Plua for not being open source when Quartus and other tools aren't either? A: That's not criticism, it's an observation and a concern. Software that is binary-only and produced by just a single programmer can become orphaned overnight (and frequently does). There are two ways of giving users confidence that that doesn't happen: either the software comes from a large, established company with a commitment to the product, or the software is open source. Furthermore, for something like a scripting language, a community can help create a large set of libraries quickly (see Perl and Python), while something like Plua has pretty limited functionality in comparison. There is nothing wrong with doing what the Plua developer did with Lua, but it may just not be the best choice for many developers given its current license and backing.

Note that the latest code is in the Yahoo Group plua including a Plua v2 beta based on Lua v5. It is very actively maintained, has links to SrcEdit (included in the OnboardC suite) and can load code from both memo and doc files.

As a prototyping language it is very useful because, unlike most, you don't need to compile separate resources for forms - it includes verbs to create a GUI right in the language. Python or C programmers will adapt very quickly.

-- AndyDent - 30 Jun 2004

There is an open source port of Lua for Palmos. Alpha versions can be found at http://www.sourcegorge.net/projects/luapalmos. The core and libraries such as the string library and math library have been ported. Some of the standard libraries are not ported yet, most notably the io library and system library. Also handling of memo or Doc databases has not been implemented.

 

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.

18 Aug 2004

Today: Sep 8, 2010