Moto is a new programming language developed by David Hakim and Ken Kocienda. The official website for Moto can be found at www.projectmoto.org. 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 news.gmane.org. 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 http://perso.wanadoo.fr/alban.minassian. (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 'Cyb.org' Pena has made some really cool little "Powered By" style images for Moto, you can find them here.
Prerequisites
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
--prefix=/path/to/dir
- This option specifies where you would
like Moto to be installed. A good choice is /usr/local/moto
--with-apache=/path/to/apache
- This specifies where the
installation should look to find the apache libraries and headers. The path is actually
optional, and if you supply just --with-apache
configure will look in the
standard places. It is popular to install apache in /usr/local/apache
, so this option
would be --with-apache=/usr/local/apache
. Red Hat does things a little
differently if you installed Apache from RPM's. See below for Red Hat specific
instructions.--with-mysql=/path/to/mysql
- This option is very similar to the apache
option above. The path is also optional, and if it is left blank then configure will
look in the standard system locations. It is popular to install mysql in
/usr/local/mysql
, so this option would for --with-mysql=/usr/local/mysql
Once again, Red Hat does things differently if you install MySQL from RPM's, see below.--with-pgsql=/path/to/pgsql
- Similar to the mysql configure
options from above. If PostgreSQL is install in a standard place then you can leave the
path off. A typical non-standard installation location is /usr/local/pgsql .--with-layout=UNIFED|REDHAT
- This option defines how the installation
will be laid out on your system. There are two choices for the --with-layout
option, REDHAT and
UNIFIED. UNIFIED is the default, and what this means is that the entire install
will be placed in to directory that you specified for the --prefix
option.
If you specified UNIFED then your --prefix directory will look something like this after
installation is complete:
drwxr-xr-x 2 root root 4.0k Feb 5 22:32 bin/
drwxr-xr-x 3 root root 4.0k Feb 5 22:32 include/
drwxr-xr-x 2 root root 4.0k Feb 5 22:21 lib/
drwxr-xr-x 2 root root 4.0k Feb 5 22:21 mod/
drwxr-xr-x 5 root root 4.0k Feb 5 22:21 mx/
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
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).
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/mod_moto.so /usr/local/apache/libexec/
shell# /usr/local/apache/bin/apachectl start
Of course, substitute your own system paths for the ones in the example.
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/libphp4.so
What you want to do is to add Moto to the list of modules that gets loaded when apache
starts:
LoadModule moto_module libexec/mod_moto.so
Setup apache to recognize .moto files as candidates for DirectoryIndex listings.
<IfModule mod_dir.c>
DirectoryIndex index.html index.shtml index.moto
</IfModule>
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.
$declare(int counter = 1) $declare(int i) <html> <head> <title>moto test</title> </head> <body> $for(i = 4; i >= counter; counter++) <h$(counter)>Moto Rules!</h$(counter)> $endfor ${ while(counter >= 1) { print "<h" + counter + ">Moto Rules!</h" + counter + ">\n"; counter--; } }$ </body> </html>