This is actually my second post, I deleted the first post because I changed the default markup from HTML to Markdown. This means I can easily add nicely syntax highlighted code to my posts. Which will come in handy since the blog will largely be about code.

To prove it, here is a Mandlebrot Set generator in Moya Code:

<?xml version="1.0"?>
<moya xmlns="">
    <macro docname="main">
        <!-- <breakpoint /> -->
        <echo>Generates an ASCII mandelbrot set</echo>
        <echo>Run with "moya run mandel.xml -e mandel"</echo>
    <macro docname="mandel">
        <let xsize="80" ysize="20" max_iteration="50"/>
        <let-str chars=" .,~:;+*%@##"/>
        <let xrange="0...xsize" yrange="0...ysize" />
        <for src="yrange" dst="pixy">
            <let y0="(pixy/ysize) * 2 - 1" row="''" />
            <for src="xrange" dst="pixx">
                <let x0="(pixx/xsize) * 3 - 2"
                     x="0" y="0" dst="0" iteration="0"/>
                <while test="(x*x + y*y) lt 4 and iteration lt max_iteration">
                    <let xtemp="x*x - y*y + x0"
                         y="2*x*y + y0"
                         iteration="iteration + 1"/>
                <let row="row + chars[iteration % 10]" />

I've used this code as a benchmark for Moya since it was capable of running such code. It is a good benchmark because it represents the worst case performance for Moya Code.

To try it out, save the above code as mandel.xml and run the following:

moya run mandel.xml -e mandel

Add the --breakpoint switch if you want to step through the code.

Recent Posts

Moya 0.6.0 Released

I'm happy to announce the release of Moya version 0.6.0. This version contains a number of new […]

Creating a Wiki with Moya - Screencast

I'm starting a series of screencasts on how do build a web application in Moya. In part 1, I show […]

Moya 0.5.14 Released

I'm pleased to announce the release of Moya 0.5.14. Moya is a web application platform written in […]

Moya Context Python Interface

The Context class is an interesting data-structure Moya uses to implement much of the features of […]

Moya 0.5.12 released!

Moya 0.5.12 was recently released. Moya is a language and web application server built in Python. […]

Moya discussion group

I've just create a Google discussion group for Moya. Sign up if you are interested in this project. […]

Moya Package Index

Just live is Moya Package Index, a site where you can find and download packages for Moya. If […]

Encrypted Notes with Moya

Encrypted Notes is an application written in Moya, and only the second Moya website online (the […]

A BrainF*** interpreter written in Moya

Have you heard of Brainf***? It's an esoteric programming language, with only 8 commands. It's […]

Moya is a new web development platform written in Python

In this post I'm going to try and pitch Moya to you, Dragon's Den style. Moya has been my hobby […]

Markdown in Posts

This is actually my second post, I deleted the first post because I changed the default markup from […]