On Mon, Apr 11, 2011 at 3:17 PM, Josh C. [email protected]
wrote:
Ruby isnât translated to Assembly, you must interpret it.
YARV generates byte code. The byte code is interpreted by the Ruby VM.
The Ruby VM runs on an operating system. The Operating system runs on
machine code.
Ruby can run on machine code, or it wouldnât run at all. The
question is how many intermediary steps are needed to get it running,
and at what costs (itâs generally easier, it appears, to run a dynamic
language on some sort of interpreter, if only to make an abstraction
only once).
The hypothesis was that you could implement any language. C falls within
that set. The leak is that JavaScript does not have the properties of
assembly.
It doesnât need them. The compiler takes care of that.
Since IE9 was just released to the general public, hereâs an MSDN
article on Chakra:
http://blogs.msdn.com/b/ie/archive/2010/03/18/the-new-javascript-engine-in-internet-explorer-9.aspx
IE9 is a latecomer to the âcompile JSâ party, too. Googleâs V8 is one
of the first.
There is a reason you donât write systems level code with
interpreted languages, because they have very different properties. Wouldnât
implementing a systems level language in an interpreted language cause the
systems level language to lose the attributes that make it a viable choice
for such a domain?
Thatâs a question of optimization.
Even GCC has several optimization switches; some more, some less
dangerous to apply to code.
Câs whole reason of existence is that it is a higher level language
than assembly with the compiler taking care of translating the
constructs of the higher level language into something that a CPU
understands.
Hmm, seems to be because you CCâd me in your response to the ML, so when I
hit reply, gmail sent it to you instead of the list. I changed the recipient
of this one, hopefully weâre back on list. You might change your client to
avoid that, it seems unlikely that Iâll be the only one to do this.
Yup, back on list. Though, IME GMail doesnât change the reply-to
header (maybe it got borked somewhere).
â
Phillip G.
Though the folk I have met,
(Ah, how soon!) they forget
When Iâve moved on to some other place,
There may be one or two,
When Iâve played and passed through,
Whoâll remember my song or my face.