LME for Pocket PC is LME, the programming language of Sysquake, compiled in a simple application for Windows Mobile ARM-based handheld devices. It has been tested on a Dell Axim X30 device, but should also run on other Axim and HP iPaq devices.
LME for Pocket PC is a technology preview. Its user interface is basic, and there is support only for static graphics, not for interactive graphics. It is based on LME, a Matlab-compatible programming language aimed at numerical computing used in Sysquake and other products of Calerga since 1997. You should install it only if you want to bring Matlab compatibility in your pocket. There is no expiration date. We do not guarantee that LME for Pocket PC will be a supported product in the long term, but we intend to continue providing solutions for Pocket PC based on LME in the future.
LME for Pocket PC is neither Sysquake nor LyME. It has neither the interactive graphics of Sysquake nor its SQ file support which makes developing user interfaces so easy. It has not the simple yet efficient user interface of LyME, with its integrated text editor. It is more a first step in the direction of a full Sysquake on Pocket PC: it supports files input/output and extensions, like Sysquake. Its graphical capabilities are borrowed from Sysquake Remote, i.e. it is fully compatible with Sysquake without the interactivity. Some of the most powerful extensions have been ported: audio input/output, web services with XML-RPC and SOAP, and TCP/IP sockets. And you can develop yours in C. It even supports multithreading. But as a technology preview on the way to something more finished, it has not received its own product name.
LME for Pocket PC is provided as a .cab file. One way to install it is to download it to your Pocket PC device, to locate it in the File Explorer and to open it. LME and all its support files are installed in \Program Files\Calerga, with a shortcut to the application in the Programs folder.
At startup, LME loads extensions in the subdirectory LMEExt, executes the contents of lmestartup.txt if it exists, and restores the history of past commands from the file lmehistory.txt. All these directories and files must be located in the same directory as LME.exe. All of them are optional (lmehistory.txt is created when LME exits if it does not exist).
LME comes with libraries (files ending with the double suffix .lml.txt) which add useful functions in different domains, such as statistics, physical constants, signal processing or control. LME will find them only if they are in one of the directories enumerated in the Options. When you run LME for the first time, you should check in menu Tools>Options that the Paths of Libraries include \Program Files\Calerga\Lib .
When launched, LME presents a basic user interface with the following elements:
If the operating system supports it, you can rotate the screen; the layout will be optimized for the new orientation.
To discover the power of LME, you can execute small demonstrations, called code fragments. Code fragments are displayed as a tree with the menu Tools>Code fragments. To execute a fragment, double-tap its name. The command itself and the result are displayed. If the result is graphical, you can switch to text mode with the menu View>Text (or simply by pressing the Select hardware button when the command field is empty) to see the command.
All fragments are stored in the XML file lmecodefragments.xml. To see or edit its contents, you can use a text editor or open it in a browser which supports CSS2 style sheets.
Here are some commands you can try.
1+2*3
Simple expressions follow the standard syntax found in many computing languages; if they are not followed by a semicolon, the result is displayed.
To permit you to chain computations easily, LME stores the anonymous result of expressions into the variable ans, which you can reuse in the next expression:
ans + sin(pi/3)
To keep multiple results, you can assign them to other variables:
x = 5
Operators and functions also support complex numbers and matrices. This will compute the complex eigenvalues of a 2-by-2 matrix:
eig([1,2;-1,1])
In addition to numerical results, LME can display graphics. fplot plots a function, inline in the example below, over some range:
fun = inline('(x+0.3)^2+7*exp(-3*x^2)');
fplot(fun, [-2,3]);
To clear the figure, use clf. You can switch manually between graphics and text output with the View menu.
LME also supports audio input and output (provided the hardware it runs on does!) We begin by recording one second of audio samples in an array. Say something after you tap the Execute button. The semicolon is important here; we do not want to see 88100 samples scrolling on the screen. If you forget it, interrupt the execution by pressing the selection button of your handheld.
snd = audiorecord(1);
The samples are stored as an array of two columns, one for the left channel, one for the right. They can be played back:
audioplay(snd)
There are probably simpler ways to record audio on a Pocket PC device. But with LME, you can manipulate the samples easily. For instance, you can play them backward by flipping the array upside-down:
audioplay(flipud(snd))
To learn more about LME, you can follow the LME tutorial.
You can customize the way LME is working in the dialog displayed with the menu Tools>Options. Here is a description of the options:
LME for Pocket PC does not implement its own text editor. Functions are stored in library files. To make their editing easier, library files end with .lml.txt (double suffix). Tapping their icon in File Explorer should open them with the standard application used for editing text files, typically Pocket Word; the .txt suffix is hidden. When you create a new library, make sure you add a .lml.txt suffix and save it as text only. When you transfer libraries from a desktop application, for instance Sysquake, you should also add this suffix if you want to edit it on the Pocket PC device (LME also finds library files with a simple .lml suffix, but you cannot edit them as easily).
LME finds libraries in the directory Lib in the same directory as LME.exe. If you want to store libraries in other places, you should add directories with the Options dialog or the command path (see above).