Get Your Moto On
corz writes "Has PHP got you down? Are you tired of writing those Perl CGI scripts? Why not check out The Moto Programming Language. Released under the GPL, Moto allows for two modes of execution: interpreted and compiled. Moto is different from the rest of the field in that you can develop a site using interpreted mode for quick testing, then when the site is ready for production you can compile the it into an Apache DSO and serve it straight from memory. If you are looking to learn a new language, or would like to help with development, consider giving Moto a chance. Go download it now."
If this functionality really doesn't exist in Python/Perl/whatever, I wish "they"'d start working on it instead of inventing a completely new language to learn, which is probably not as good as what's already out there.
If it does - I'm sure somebody will point out how to do this with their pet language.
The idea of Moto as both a compiled and interpreted language is noble (although not original; most Common LISP and Smalltalk implementations have both interpreted and compiled environments), but I urge them to reconsider their misguided language design strategy. They don't even need to come up with their own language; building a native code compiler for an established language like Python or Ruby would be a much greater boon to the open-source community at large.
The $xxx type constructs are almost legacy at this point. Embedded blocks of code can be written in moto like
<HTML><BODY>
${
String foo = "world";
print "hello "+foo;
}$
</BODY></HTML>
For every $xxx keyword (called a moto construct) there is an embedded block parallel.
-Dave
Moto allows for two modes of execution: interpreted and compiled. Moto is different from the rest of the field in that you can develop a site using interpreted mode for quick testing, then when the site is ready for production you can compile the it into an Apache DSO and serve it straight from memory...
This is somewhat analogous to using Perl and mod_perl. If that's the only reason to use Moto, I'd stick with Perl instead.
-Bill
SlashSig Karma: Excellent (mostly affected by moderatio
Rather than spending time creating a PHP alternative, its a pity that some of the development effort hasn't been put into making PHP more of a stable and standard language.
Moto isnt necessarily in the same market as PHP. Moto was designed so that you can write an application and sell it as a DSO without ever having to worry about people stealing your code. In other words, Moto is a great alternative to PHP for companies that would like to be able to sell a compiled product, while at the same time not giving up the low development times.
PHP is RAPIDLY becoming bloat-ware, and its a shame - cos it's nice.
I couldnt agree more. Having all the functions in the global namespace really is annoying. Why not at least give Moto a try and evaluate it based on its own merits, instead of disregarding it because "its not PHP."
Check it out, and join the mailing list (moto-subscribe@webcodex.com) if you have any questions or suggestions that you would like to make. We would definately love to hear them.
It's today's daily Slashvertisement! And to think I thought they were joking...
I still don't get what Moto has that other languages don't. If it's performance you're talking about, then why not just write a Python compiler? Honestly, it's not *that* hard, especially compared to writing a new language. And more importantly, Python is the most flexible language ever created. You can eschew brackets and semicolons, or you can use them (yes, the new Python supports semis). You can program in traditional imperative style, or more powerful functional style; most useful functional features are already built into Python, and the Xoltar toolkit provides the rest. And Python Server Pages, well, rule.
Moto could theoretically become a niche language, a la Ruby. But it's not going to overtake Perl and Python - good.
The point of HTML preprocessors isn't to make it easier to write HTML, it's to make it easier (possible) to write dynamic HTML on the server end.
Not to mention, the use of mod_perl, PHP, and so on, is often not necessarily to preprocess HTML, but rather to generate it in the first place, sometimes from pieces.
Either way, maybe a new HTML would be nice. I guess we'll see.
--Dan
A bit off topic of the actual news, but related to many comments....
If you are looking to compile your PHP (to not make source viewable, make it faster, etc etc) check out Zend's SafeGuard Suite...
Ok, I'll agree that the usual apprach to PHP and the approach taught in the tutorials and the various programming php books does mix them together but there's nothing that forces that approach.
:
echo $h->as_html():
You won't see it in any of my sites.
You'll see code more like
<?
$h = new HTML();
$h->load_from_template('homepage.txt');
?>
If you want to mix presentation and data that's your business.
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter