On Mon, Apr 11, 2011 at 3:17 PM, Josh Cheek <josh.cheek / gmail.com> 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 Gawlowski

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.