I'll leave this here. Basically, these days, Monkey's compiler ('Trans') compiles itself, and it uses that target to do it. It's also a very useful target for small command-line tools, and not to mention game-servers.
Most programming languages do this kind of thing. For example, you'll find C++ compilers which were written in C and C++. Basically, if the compiler can compile the language you created, you can likely remake what you'd be using (The compiler) in that language. And from there, everything optimization and feature related is sparked. At that point, you just keep having it compile itself.
But, for this reason 'Trans' (With a bit of work) can compile to any of Monkey's targets. Which would actually be pretty awesome for making say, a JavaScript web-compiler. And with services like 'CompileOnline', this would be a lot better on their servers (If they were to add Monkey as a language), as your client would be doing the work. Or even though it's not the greatest platform, there's the option of recompiling 'Trans' with the unofficial 'Java Tool' target, announced by devolonter. Which would make compiling on most systems even easier, though it would probably be best to just recompile an STDCPP version afterward.
And of course, since this is standard C90/C99 and C++98/C++0X (Or even possibly C++1X) compatible code it generates and uses internally, you can recompile the Linux output for an embedded machine, like the Raspberry Pi (Which several of us have done).
|