-> Moto Documentation

Learning The Moto Programming Language

What Is Moto?
Getting Help
Installing Moto
Configuring Apache
Test Your Setup
Using The mmc Site Compiler
Temporary Mail Library

What Is Moto?

Moto is a new programming language developed by David Hakim and Ken Kocienda. The official website for Moto can be found at Moto can be used either as a interpreted language or it can be compiled to run at super quick speeds. Dave does a much better job of explaining the details of Moto, so flip over to his site, check out the features, read the whitepaper and download Moto.

The old mailing lists are available via the Gmane mail to news gateway. Just point your news reader to Archives are available for both the users list and the developers list.

There are also some forums on the Moto website where people occasionally post questions and problems, and sometimes answers.

Alban Minassian wrote a Moto howto in French, you can find it at (This appears to no longer be maintained)

Moto has a Freshmeat project page. You can subscribe to release announcements to keep up to date, or rate the project.

Michal '' Pena has made some really cool little "Powered By" style images for Moto, you can find them here.

Installing Moto


Configure Options

Currently there are four Moto specific configure options, plus several standard ones. To see a list of all the options, cd into the directory that you unpacked Moto into and type:

   ./configure --help

Here is a quick rundown of several that you might use:

Red Hat Installation

If you installed Apache, MySQL and PostgreSQL from RPM's then you all you will need to do is pass ./configure the standard tags. To install into /usr/local/moto your command would look like this:

   ./configure --prefix=/usr/local/moto --with-apache --with-mysql --with-pgsql --with-layout=REDHAT

Making Moto

After configure finishes doing its thing it will be time to make Moto:

  shell$ make
After that finishes you can optionally run some tests:

  shell$ make test
If you see some errors thats okay, its normal, and shouldn't hurt anything (hopefully).

Now its time to actually install Moto on your system. You will need to be root to do the next few steps, so go ahead and su now. If you have installed Moto on your system before you will probably want to backup your old install first (step 1 here):

  shell# mv /usr/local/moto /usr/local/moto17
  shell# /usr/local/apache/bin/apachectl stop
  shell# make install
  shell# ln -s /usr/local/moto/mod/ /usr/local/apache/libexec/
  shell# /usr/local/apache/bin/apachectl start
Of course, substitute your own system paths for the ones in the example.

A few notes here. If you have already installed Moto, and you made a symlink the first time, then you dont need to make the symlink again, it should still point to the one you originally made. Also, you need to be sure to stop apache before you 'make install' Moto. According to Dave, some OS's dont like it when you change .so files while they are in use.

You are now finished installing Moto, and its time to configure apache.

Configuring Apache


Locate your main apache config file, httpd.conf, and open it up with your favorite editior. There is usually a section that looks like this:

  # Dynamic Shared Object (DSO) Support
Sometimes there will already be modules there that are being loaded:

  LoadModule php4_module        libexec/
What you want to do is to add Moto to the list of modules that gets loaded when apache starts:

  LoadModule moto_module        libexec/
Setup apache to recognize .moto files as candidates for DirectoryIndex listings.

  <IfModule mod_dir.c>
      DirectoryIndex index.html index.shtml
Be sure to add the Moto handler for .moto file extensions, this will be under the <IfModule mod_mime.c> section:

  AddHandler moto .moto
That should be enough to get things rolling. Dont forget to restart apache after making any changes to your httpd.conf file.

Test Your Setup

To test and see if everything is working just copy the following script into a file,, and put it in your web directory. Enter in the url to the page and if you get a cheery message then everything is working properly.

$declare(int counter = 1)
$declare(int i)

<title>moto test</title>

$for(i = 4; i >= counter; counter++)
  <h$(counter)>Moto Rules!</h$(counter)>

  while(counter >= 1) {
    print "<h" + counter + ">Moto Rules!</h" + counter + ">\n";