Q is a modern-style functional programming language based on term rewriting. It is an interpreted language with dynamic typing and fairly good library support. If you are looking for a high-level scripting language for your Z, aside from the usual suspects (Perl/Python/Ruby), then you might wish to give it a whirl. It is also useful as an advanced programmable desktop calculator. Please refer to
http://q-lang.sourceforge.net/ for more details.
I've set up a little feed with all the needed bits and pieces
here. The binaries are for RC11 or later. The feed also includes additional dependencies which are not currently in the official pdaXrom feeds. All packages install into /usr/local. Here is a quick rundown of the packages which are available right now:
- q_6.2_armv5tel.ipk: The core of the interpreter, also includes the standard library, POSIX system interface, as well as the Curl, GDBM, GGI, ImageMagick, Octave, Tcl/Tk and XML/XSLT modules. (At this time, the ODBC and OpenDX modules are not supported in the pdaXrom version.)
- graph_1.4_armv5tel.ipk: Combinatorial graph library and editor. Requires Tcl/Tk.
- q-opengl_1.1_armv5tel.ipk: Q's OpenGL interface. Requires pdaXrom's mesa3d package.
- swig_1.3.22-q_armv5tel.ipk: A SWIG version which has been patched up to add support for Q. Makes it easy to build interfaces between Q and C/C++ libraries.
Please note that, as far as memory sizes on PDAs go, these packages and the dependencies need quite a bit of storage space, so you'll probably want to install them on a memory card.
Quick startup guide: After installing the q_6.2_armv5tel.ipk package, you should be able to run the Q interpreter in an xterm or on the console by just typing "q" (or "q filename.q" to run the given Q script). A bunch of sample scripts can be found in /usr/local/share/q/examples. Onboard help is available in the interpreter with the "help" command (this fires up the language manual in the GNU info reader); the manual is also available as HTML and PDF from q-lang.sf.net. Start out with Section 2 ("Getting Started"), that should get you started quickly. If you have emacs installed, you might also wish to install q-mode.el in /usr/local/share/q/etc into your emacs site-lisp directory, and enable Q mode in your .emacs file as described at the beginning of q-mode.el.
Please let me know how it works for you and feel free to post bug reports and other comments to this thread (or use the bug tracker and mailing lists at the q-lang.sf.net site). I'm currently working on porting other parts of Q's multimedia library (the audio interface, in particular), and I started working on an SQLite module to make up for the missing ODBC interface. I'll announce new modules in this thread as they become available for the pdaXrom version.
Enjoy!
Albert Graef