15 October 2003: Q 4.5
is now available. This release
sports a new GGI (general graphics interface) module and some
improvements in the debugger.
10 Dec 2003: Q goes SourceForge!
As of Dec 2003, Q has now become a SourceForge-hosted
project. That
means that eventually this website and the download area will migrate
to SourceForge, and there will also be CVS access there so that you can
always get your hands on the very latest and greatest development
sources. Right now neither file releases nor CVS are available yet (I
hope to finish this before the end of December), but I have already set
up two mailing lists for discussion of Q
development and usage. Enjoy!
15 Dec 2003: The
SourceForge CVS
Repository
is now online and file releases for the latest stable versions should
soon show up in the Download
Area, too!
NOTE: The software on this page is free software distributed
under
the GNU
General Public License and can be obtained in the global Download
section at the end of this page. The different packages are also listed
both on the Freshmeat
website and in the FSF
Software
Directory. Links to the Freshmeat record for each package are given
in the
"SEE ALSO" sections of the descriptions below. I always announce new
releases on Freshmeat as soon as they become available. Thus, if you
have
registered a Freshmeat account and you'd like to be informed about new
releases,
just use the "Subscribe to new releases" option on the Freshmeat
project pages.
SEE ALSO: COPYING README NEWS ChangeLog FAQ Manual (HTML) Manual (PDF) Freshmeat Download
Q
is a modern functional programming language based on term
rewriting. It is simple,
powerful, extensible, portable, fast and easy to use:
Simple - Programs are just collections of equations which are used to evaluate expressions in a symbolic fashion.
Powerful - Despite its conceptual simplicity, Q is a full-featured functional programming language with a modern syntax, curried function applications, dynamic object-oriented typing, exception handling, POSIX style multithreading, and a comprehensive standard library.
Extensible - Q has a libtool-based C interface which makes it easy to extend the interpreter with your own primitives.
Portable - Q runs on BeOS, FreeBSD, Linux, Mac OS X, Solaris and Windows. Porting to other modern Unix-based platforms should be a piece of cake.
Fast - Well, as an interpreted language Q is certainly not as fast as native machine code, but it has an efficient interpreter which byte-compiles scripts in an eye blink and executes them about as fast as interpreted Lisp or Haskell.
Easy to use - Just throw together some equations, run the
interpreter and start to evaluate
expressions. Q scripts can be run from the command line or within GNU
Emacs. For Windows, a graphical shell for editing and running Q scripts
is also
available.
As a practical programming language, Q comes with batteries included: Q's
system interface comprises low-level file functions,
process and thread handling, Berkeley sockets, regular expression
matching, and more. Also included are interfaces to GNU dbm (simple database
software),
ODBC (the industry standard open
database interface), John W. Eaton's GNU
Octave (popular open source math software), IBM's Data
Explorer (powerful scientific visualization package), GGI (a portable graphics
interface) and John
Ousterhout's ubiquitous Tcl/Tk
(portable user interface toolkit and scripting language).
The base package includes a Q mode for GNU Emacs/XEmacs and a syntax
file to enjoy syntax highlighting for the Q language in
the
advanced KDE editor Kate. The
Windows version also provides a graphical application called Qpad for
editing and running Q scripts (see below). We also have a plugin which
lets you run Q sessions in GNU TeXmacs,
the free scientific
text editor. To
install, extract this q-texmacs.tar.gz
tarball into
your /usr/share/TeXmacs/plugins directory.
Code samples: To whet your appetite, here are some scripts for your browsing pleasure: hello.q - the infamous "hello world" example; fib.q - Fibonacci function, implemented iteratively; huffman.q - Huffman codes in Q; primes.q - the stream of all prime numbers, using Erathosthenes' sieve; queens2.q - the 8 queens problem, shows how to implement backtracking in Q; dijkstra.q - Dijkstra's shortest path algorithm, implemented with Q-Graph; dgram.q - a simple client/server example showing how to transmit datagrams over a socket; and midi_examp.q - some basic realtime MIDI functions, written using the Q-Midi module. Please note that these are basic examples. More examples can be found in the various packages below.
Documentation: Full documentation can be found in the Q
language manual
(HTML, PDF). The HTML
documentation is also available as a tarball.
And there is an introductory paper on Q-Midi which includes a brief
overview of Q's main features
(PDF).
QpadSEE ALSO: License.txt ReadMe.txt Download
The Qpad package is a complete binary distribution of the Q programming system for Windows. Besides the Q programming tools it also includes the Qpad application, a Windows frontend for the Q interpreter which provides a script editor and a "log" pane through which you can interact with the interpreter. You can use this application to edit and run Q scripts under Windows.
Q-GraphSEE ALSO: COPYING README NEWS ChangeLog Freshmeat Download
Q-Graph is an add-on library to deal with combinatorial graphs, a data structure consisting of nodes and edges connecting the nodes. Graph theory and algorithms play a major role in countless applications such as network design and optimisation, traffic planning, routing, scheduling and visualization, and so graphs have become one of the cornerstones of applied discrete mathematics and computer science. The package implements a graph data type and the usual operations on graphs. It also contains graphed, a full-featured graph editor (requires Tcl/Tk). A sample implementation of Dijkstra's shortest path algorithm is also included. The entire package is written in Q, and thus it also provides an example of a substantial Q application.
Q-MidiSEE ALSO: COPYING README README-Player NEWS ChangeLog Freshmeat Download
Yep, Q finally plays music, too! :) More precisely, it can "talk" to MIDI, the "Musical Instrument Digital Interface". MIDI is the standard protocol for controlling synthesizers and other compatible equipment. Want to learn more about MIDI? Jeff Glatt's MIDI Technical Fanatic's Brainwashing Center is a good place to start.
Q-Midi is Q's MIDI module which allows you to write MIDI applications in the Q programming language. Q-Midi runs on top of MidiShare, Grame's excellent "MIDI operating system" which is GPL'ed software, too. Q-Midi provides access to most basic MidiShare functionality, including realtime processing of MIDI messages and standard MIDI file access. This release of Q-Midi also includes a sample MIDI player/recorder written using Q-Midi (requires Tcl/Tk). The currently supported platforms are Linux, OS X and Windows. The Windows version has been tested on Windows 98 and 2000. An introduction to Q-Midi is now available (PDF, examples).
Also available: Scale 1.1, a Q-Midi software for experimenting with just and microtonal tunings. This program is based on Clarence Barlow's harmonicity theory and implements several new algorithms for the rationalization and visualization of musical scales. Requires a Linux system with Octave, OpenDX and Tcl/Tk (as well as Q-Midi, of course); see the download links below. You can find a description of the algorithms and the software in this report: Musical scale rationalization (PDF).
SEE ALSO: COPYING README NEWS ChangeLog Freshmeat Download
Q-Audio is a digital audio interface for Q. The package contains two modules which together provide the basic functionality needed to write digital audio applications in the Q programming language. The audio module implements a (near-)realtime audio interface on top of Phil Burk's PortAudio library (http://www.portaudio.com), and the sndfile module allows you to access sound files in various formats using Erik de Castro Lopo's libsndfile library (http://www.zip.com.au/~erikd/libsndfile). This package works on FreeBSD, Linux, OS X and Windows. Other UNIX systems supporting the OSS sound driver should work as well, but have not been tested yet.
The Q programming system and the various add-on packages are
distributed under the GNU
General Public License (GPL). The relevant items can be downloaded
by
clicking
on the appropriate links below. Both source and various binary packages
are provided. All binary packages are for the x86
architecture.
Please see the RELNOTES file for further
information and installation instructions, and also note the
requirements for each package; additional information about
required third-party software can be found below.
For your convenience, we also provide Linux RPMs for the GGI and
MidiShare libraries required by some packages, since these libraries
are only distributed as source tarballs at this time. Please note that
GGI is distributed under a BSD style license by the GGI project, while MidiShare is
GPL'ed software distributed by Grame.
Some of the packages above may require additional third-party software. Links to download these items are provided below.
More detailed information about the mailing lists and a web-based
interface to subscribe to the lists can be found by following the links
above.
Here are some links to related work:
Links to software which also uses term rewriting as an underlying computational model. If you have anything to add to this list please let me know.