LyME is a port of LME ("Lightweight Math Engine", the heart of SysQuake) to Palm OS handheld devices. It implements more than 240 commands, functions and operators, mostly compatible with Matlab. It requires Palm OS 3.1 and at least 1 MBytes of memory free.
Install MathLib.prc first (unless it has already been installed for another application or it is included in the device ROM), then LyME.prc.
Launch LyME by tapping its icon.
Write expressions in the top field, tap the Eval button or write return (topright-to-bottomleft Graffiti stroke), and read the result in the bottom field.
To enter parenthesis or operators, you can also tap one of the symbols at the botton of the screen.
To enter a function or to check its arguments, tap fn and the bottom right of the screen, scroll the list, and tap the function you want. You can also tap outside the list to discard it.
Previous commands can be retrieved with the arrows at the top left of the screen. The command field can be cleared completely with a tap on the C near the arrows. An Edit menu is also available for the usual Cut/Copy/Paste/Undo commands; tap the window title "LyME" or the menu button below the screen.
To stop execution, press the Page Down key until the Eval button label is displayed. Note that built-in functions cannot be interrupted; evaluating fft(1:1000) may force you to perform a soft reset (see the documentation of your handheld).
Some commands produce graphical output. Graphics replace the text output below the command field.
Graphics and text output may be toggled with the T and G buttons at the top of the screen.
Graphics are usually scaled to fill the graphics area. No axis is drawn, because of the constrained screen size. To check the scale, tap anywhere in the graphics area and read the coordinates of the point below the pen.
Most graphical functions support an additional argument to specify the color.
There are two kinds of programs in LyME: scripts and functions. Scripts are simply collections of statements, variable assignments and expressions which are evaluated exactly as if they were written in the command field. Functions (collected in libraries) have input and output arguments, and local variables. They cannot modify the workspace variables you define from the command field or from scripts. Both scripts and functions are entered in an editor window, and are saved in a persistant database. Standard Edit menu commands are available to Cut, Copy and Paste text in LyME or between LyME and other Palm applications such as Memo Pad.
To program a script in LyME, tap the Edit button and (new). Replace "untitled" with a script name (such as "test"). Write your statements, typically one per line, below.
When you're ready, tap OK or Load. OK just stores your new script in the LyME database, while Load also executes it.
To program functions in LyME, tap the Edit button and (new). Replace "untitled" with a library name (such as "stats" or "control"). Write all your functions below.
When you're satisfied, tap OK or Load. OK stores your new library in the LyME database, while Load also issues a "use" command to LME to make your functions available from the command line. You can then test your library.
To edit again your script or your library, tap the Edit button, then pick its name from the list. The "Load" button will remove the previous definitions and replace them with the new ones.
When you execute a function and an error occurs, the library name, the function name and the line number are displayed. If you tap somewhere on the library or function name, then tap the Edit button, LyME displays directly the offending line to help you correct the bug.
Here is an example of a problematic function.
Tap Load, then write bugfn. LyME stops when it tries to write to the 10th element of the 3-by-3 matrix.
Tap the function name in the error message ("bugfn"), then tap the Edit button to jump to the line where the error occured.
To use a library when you restart LyME, tap the Ld (load) button and the name of the library. The command to do the same is "use libraryname".
You can also use this command in another library; note however that functions in nested libraries are hidden, unless their library is explicitly used where they are called.
If you use frequently the same libraries, you may want to use them automatically at startup. Select Startup Commands in the File menu, then type any command you want to be executed every time you launch LyME or Clear All.
Another useful command is info: info l lists the currently loaded libraries; info f lists all referenced functions, with parenthesis for those not compiled yet; info b lists the builtin functions and operators; and info v lists the variables with their type and size.
Libraries are synchronized, but those deleted on the Palm device are currently preserved on the desktop computer.
To transfer a library to another Palm device, you can beam it via infrared. Select Beam in the File menu, align your device to the destination device, and tap the library to be sent in the list. The receiving device will display a dialog box asking if the library should be accepted; if OK, the library will be stored in the LyME database.
Another way to exchange libraries with the outside is to convert it to or from a Memo Pad note. To export a library, edit it (Edit button), then select Export in the File menu; a new Memo Pad note is created. To import a library, create a new library (Edit button, then (New)), then select Import in the File menu and choose the first line of one of the Memo Pad notes; its entire content will be inserted in the library.
LyME and its documentation: Copyright 1997-2001, Calerga. All rights reserved. LyME may not be redistributed without the prior written permission of Calerga.
The user assumes all the risks caused by the use of LyME and the results obtained with LyME. Under no circumstance will Calerga, Yves Piguet, or resellers be responsible for any loss of money, time, data, goods, or lives.
While it's based on the same computation engine and language, SysQuake has a completely different graphical system, whose goal is nearly-instantaneous interactivity with the mouse. This interactivity opens a new dimension (effect of parametric variations, relationships between different figures, etc.) and permits the user to get an intuitive understanding of his/her problems and to solve them more efficiently. SysQuake also has file support, extensions, large high-quality numerical libraries, a user interface which supports much more options, print support, and many other features.
LyME runs on much slower hardware (typically 1000 times slower); it's useful for small-to-medium-size problems and is located somewhere between high-end scientific calculators and desktop numeric software such as Matlab, with which it's largely compatible.
For more information about SysQuake and LyME, please visit http://www.calerga.com.
MathLib is a free shared library that can be used by any OS 2.0+ Pilot program that needs IEEE 754 double precision math functions. It's distributed under the terms of the GNU Library General Public License, and is freely available with full source code and documentation at the MathLib Information web page. It's not a part of the LyME program, and you're not paying anything for its use; a copy is simply included in this archive for your convenience. Thanks, Rick!