Opentopia Directory Encyclopedia Tools

Qu

Encyclopedia : Q : QU : QU : Qu



 

Qu is a computer programming language, comparable to Python, Ruby, Perl and many others - but much faster and with simpler syntax. An information page is available at http://centrin.net.id/~marc/

The language is semi-dynamic, and optionally strongly typed, with full object orientation. All variables in the language are first class objects.

The design and implementation focuses on compactness and speed, using the [GNU Lightning] Just In Time compiler (JIT).

Examples

# Ackermann
if not () # get input;
println("Ackermann's function ...")
println("Enter a number on the command line!")
else
NUM = Int([0])
printf('Ack (3,%d): %d\n', NUM, Ack(3, NUM))
;;
sub Ack(m, n) # one way
if m == 0 return n + 1
elif n == 0 return Ack(m - 1, 1)
else return Ack(m - 1, Ack(m, n - 1));;
;;
# alternate way
sub ackermann (m, n)
return m ? (n ? ackermann (m - 1, ackermann (m, n - 1)) :
ackermann (m - 1, 1)) : n + 1
;;
# A simple GTK+ program
use Gtk (*)
app = application("GTK+ for Qu!") # required
app.author = "Irv Mullins"       # optional
app.date = "May 5, 2005"         # optional
win = window(app.name)
win.set_default_size(400,300)
win.set_icon_from_file("qu.gif") # custom icon in titlebar
qu = image("qu.gif")             # picture for window
win.add(qu)
win.show_all()         # shows self and all child controls.
app.main               # start GTK+ main loop...

External links

Qu is free to download, comes with complete source, documentation, and example programs.

  1. [Qu Home Page]
  2. [GTK module for Qu]
  3.  


    From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
    All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.


Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: