I believe, they have a strong reason why they choose to create a
(slightly) new language.
Just like when they supported Android.
I will stand to watch their progress, to see the brighter path they
are creating with this.
Don't worry google teams, 1st time always the hardest one.
Keep up the good work!
rgrds,
Rico
Zexx writes:
> VM is actually a good idea, but maybe not right now. Because while
> waiting for everyone to create their VM for their preferred
> language,
Why limit the VM to one language? You establish *one* VM on the
client side, and you can deploy a whole family of languages with it.
Tschö,
Torsten.
--
Torsten Bronger Jabber ID: torsten...@jabber.rwth-aachen.de
or http://bronger-jmp.appspot.com
Florian Bösch writes:
> On Oct 12, 1:11 pm, Torsten Bronger <torsten.bron...@gmail.com> wrote:
>
>> Why limit the VM to one language? You establish *one* VM on the
>> client side, and you can deploy a whole family of languages with
>> it.
>
> [...]
>
> Q: What is the point of transfering bytecode AND source, that's
> even more data then just source.
>
> A: no right answer to that.
You wouldn't transfer source code. Instead,
<script type="application/my-great-vm" src="/path/to/bytecode.vm"/>
would only load bytecode.
Binary compatibility is really hard to maintain,
this is what Java does, this is by example why it's hard to reified
generics in Java.
So providing a generic VM has a high cost.
R�mi
On 10/12/2011 01:37 PM, Torsten Bronger wrote:
> Hall�chen!
>
> Florian B�sch writes:
>
>> On Oct 12, 1:11 pm, Torsten Bronger<torsten.bron...@gmail.com> wrote:
>>
>>> Why limit the VM to one language? You establish *one* VM on the
>>> client side, and you can deploy a whole family of languages with
>>> it.
>> [...]
>>
>> Q: What is the point of transfering bytecode AND source, that's
>> even more data then just source.
>>
>> A: no right answer to that.
> You wouldn't transfer source code. Instead,
>
> <script type="application/my-great-vm" src="/path/to/bytecode.vm"/>
>
> would only load bytecode.
>
> Tsch�,
> Torsten.
>
1. the source code is loaded on demand, only when necessary to display
error information.
2. The browser comes with an integrated language (DART) and debugger,
but the browser also allows the download of byte code compiled from
other languages.
In that case, when an error occurs, the internal debugger is not used
and instead, the user must have installed an external debugger and the
browser session must have been invoked from that debugger, establishing
a communication channel between them.
That is the way it works with the Flash player, its VM, and the
downloaded abc bytecode, and it works fine!
If one wants to debug a program, one should use the appropriate tools.
The browser doesn't have to do it all.
But still, I believe the browser should have one predefined language
with an integrated debugger, for all those people who just want to use
notepad (or vim).
Em 11/10/12 12:37, Torsten Bronger escreveu:
> Hall�chen!
>
> Florian B�sch writes:
>
>> On Oct 12, 1:11 pm, Torsten Bronger<torsten.bron...@gmail.com> wrote:
>>
>>> Why limit the VM to one language? You establish *one* VM on the
>>> client side, and you can deploy a whole family of languages with
>>> it.
>> [...]
>>
>> Q: What is the point of transfering bytecode AND source, that's
>> even more data then just source.
>>
>> A: no right answer to that.
> You wouldn't transfer source code. Instead,
>
> <script type="application/my-great-vm" src="/path/to/bytecode.vm"/>
>
> would only load bytecode.
>
> Tsch�,
> Torsten.
>
Florian Bösch writes:
> To the others who suggested/asked by there needs to be source
> +bytecode. How do you think you're gonna debug bytecode?
Of course, while you *debug* your code, you let the browser load
source code and use special tools/plugins to debug it. For example,
I use Firebug for JavaScript. For Dart, we need such special tools,
too.
If you talk about JRuby and Jython, it's more due to the fact that their
specification
(Ruby/Python) was written with an interpreter in mind.
> Scala isn't bad, but then it was designed around the capabilities of
> the JVM.
That's true, by example, Scala has changed its number representation to
match the boxing/unboxing done by Java.
>
> Even considering bytecode vs source, you have to do verification on
> the bytecode you download so you don't open security exploits, and
> from earlier discussions with the VM guys it is just as fast to parse
> the source as to verify the bytecode.
I don't think it's true with the linear verifier introduced in Java 6
but as I said,
in my opinion, the best argument for using the source directly is that
you don't have to care about binary compatibility.
>
> I think the answer you are looking for is snapshots, which will
> basically load an isolate in the VM from a pre-started state saved in
> compressed binary form (and generating that snapshot allows dead code
> elimination as well). I don't know how the verification issue is
> handled in this case, but that is the plan for addressing startup
> performance of the VM.
>
> --
> John A. Tamplin
> Software Engineer (GWT), Google
Rémi
That isn't to say that I don't appreciate Dart. As a language Dart
seems good to me, and I'd definitely prefer it over JavaScript for
complex Web Development. However we are still trying to cling to the
idea that there can be a one-size-fits-all language for Web
Development, and the experience with JavaScript should be a strong
hint that that is not possible. Dart may be good for many problems,
might be appealing for many developers, but there will also be many
developers that dislike Dart and many situations where Dart is just
not the appropriate tool for the job.
I think the sooner we all realize that no single language can
dominate, the better for Web Development's sake. I believe the ideal
solution would definitely be some kind of universal VM. That way each
programmer could program in whatever is the language of he's
preference. The only major downside I see with this approach is coming
up with a VM that performs efficiently for any language.
More seriously, since UNCOL was proposed in the late 1950s(!),
there have been many such attempts (from Janus to ANDF). Although a
few were surprisingly
effective, most were not widely adopted nor did many survive.
I suggest the idea is fundamentally flawed. Although it's true you
can compile many things to the JVM, it is not a *good* Abstract Machine
for a wide range of languages: functional ones with lazy evaluation,
languages with strong support for concurrency, dynamic languages,
languages that aren't inherently object-oriented. Other languages compile
to the JVM not because it's a good match, but because it's an existing
platform that's not uncommon (although still far from universal).
The whole point of an Abstract Machine is that it's tailored to a particular
language or language family to provide primitives that an ideal machine
for that language would provide. Thus, the JVM is at heart designed for
Java; it implements primitives that an ideal machine for Java would have.
(You can also design more than one Abstract Machine for a language, each
with different trade-offs.) Prolog had (has?) WAM. Some are high-level (JVM);
some are really low-level abstract processors (eg, INTCODE), losing
type information.
Other languages can get by if they compile their ideal primitives into
(say) method
calls within the JVM, but as far as I know they don't get to add new
machine operations.
As you add more language types, you end up heading for a lowest common
denominator:
it's just like compiling to x86 code, in fact, except that some things
are probably easier
to compile to x86 machine code than to the JVM, despite x86 being a
pitiful architecture!
Charles Forsyth writes:
> [...]
>
> [...] I suggest the idea is fundamentally flawed. Although it's
> true you can compile many things to the JVM, it is not a *good*
> Abstract Machine for a wide range of languages: [...]
>
> [...] As you add more language types, you end up heading for a
> lowest common denominator: it's just like compiling to x86 code,
> in fact, except that some things are probably easier to compile to
> x86 machine code than to the JVM, despite x86 being a pitiful
> architecture!
The VM needn't be optimal for all languages but just good
enough(tm).
If Dart is successful, there will be compilers for transforming all
significant Web languages to Dart. While this works (as for
JavaScript now), I'd prefer a client-side VM instead.
It's worth looking at "Compiler Design: Virtual Machines" (Wilhelm &
Seidl, 2010)
[ http://goo.gl/xIegD ] to pick a recent example,
just to see the range of radically different abstract machine
architectures, to suit
four or five different classes of programming languages.
Also, I'd re-emphasise that portability isn't the main reason to use
an abstract machine:
the big gain is that it provides an ideal target machine, and
offers separation of concerns when implementing a compiler,
and the technique works well for that.
Still, if someone put a half-way decent (documented) one into every
browser, I'd not complain.
Perhaps a Dart abstract machine might fit the bill. (But if you're
designing one with
Isolates in mind, and with that as the basis for security,
that machine probably looks different from one with support for
shared-memory concurrency.)
On 15 October 2011 01:36, Pedro Rodrigues <rfd...@gmail.com> wrote:
I believe the ideal solution would definitely be some kind of universal
VM.
It's best to think of that as the computing equivalent of asking for
"world peace".
--Michael
JaBi writes:
> The virtual machine may not be quite general. Not every programming
> language is suitable for that purpose. Many conventional language,
> without adaptation is practically useless to run in the browser as a
> replacement for JavaScript. I would expect rather the creation of new
> languages that are inspired by existing languages like Java, C #,
> Python, Ruby, PHP, Basic, etc.
You mean a plethora of MyFavouriteLanguageSCRIPT languages like
C#Script, PythonScript, RubyScript? Perish the thought! Instead,
you should slightly adapt all these *existing* languages for the
browser.
So a nice project will be to reuse the C interface used by DartVM
to plug the JVM instead.
R�mi