5 ms·
[disclaimer: I work on Dart VM] Even though Dart VM is not a deployment target for the client side code right now it is still an integral part of the developme
by mraleph 14y ago
[disclaimer: I work on Dart VM]
Even though Dart VM is not a deployment target for the client side code right now it is still an integral part of the development experience. It runs all your code while you develop (no need to compile to JavaScript just edit&refresh) and backs things like dart2js, dwc, pub which are all written in Dart itself.
- MatthewPhillips 14y agoRight, but the author here doesn't mention the Dart VM as a reason for the switch; they are not switching to get better performance in Chrome. They are switching because they like the language/ecosystem better. Also, IANAL but I'm pretty sure you don't have to include a disclaimer to post on the internet. No one is going to rush out and buy Google stock based on your comments so there is no conflict of interest to what you wrote.
- mraleph 14y agoYes, I agree with your point. Yet, I see quick edit&refresh as the part of the ecosystem. Hard to enable that without VM. [regarding the disclaimer: I add it for two reasons. First, I have seen people accusing others of hiding their bias, so I prefer to state my affiliation explicitly. Second, if anybody wants to ask any Dart VM related questions and get response they know where to ask :-)]
- _jmar777 14y agoSweet... so how does Dart compare with asms.js? /me ducks :)
- kyrra 14y agoSerious answer: The Dart2js compiler could easily take advantage of asm.js additions, and generate javascript code that uses asm.js. If asm.js does take off, all it can do is help Dart generate faster running code. Now, if we are talking about the DartVM, asm.js could be used as an argument not to include the DartVM in other browsers. But asm.js is still very much in it's infancy, so we really need to wait and see how it's adopted and how it progresses.
- _jmar777 14y agoThanks, I agree with your comments. I was mostly just trying to poke the bear, though (http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html) :)
- ryeguy 14y agoNo it couldn't. asm.js has no garbage collector. The only way to get dart running on asm.js would be to port the entire VM to asm.js, which afiak won't work since the dart JIT emits machine code at runtime.
- _jmar777 14y agoI don't think @kyrra was suggesting that Dart would compile completely to asm.js code, just parts where it makes sense (just like normal JavaScript uses asm.js only where it makes sense).
- mraleph 14y agoI think there are incomparable. Dart is not a subset of JavaScript. Dart is dynamically typed. But Dart is more than just a language now, it's ecosystem of tools and libraries.
- xxgreg 14y agoThe DartVM has supported for typed arrays too, so it probably wouldn't be much work to hack emscripten to generate Dart source code. It would be very interesting to see a benchmark of emscripten/SomethingMonkey/asm.js vs emscripten/DartVM. (Could also add emscripten/dart2js/V8 for giggles)
- munificent 14y agoEarlier you said: > That it is Dart isn't the story here; they don't even mention the Dart VM as a benefit for the switch. Which I think is equating Dart with the VM? Then you say: > They are switching because they like the language/ecosystem better. That sounds to me like Dart is the story then. The language/ecosystem is Dart, isn't it? Can that be separated somehow?
- MatthewPhillips 14y agoDart just happens to be the ecosystem they've chosen; there's no reason they couldn't have chosen ClojureScript, for example, which provides all of the same benefits (a more out-of-the-box experience). It's more of a post about their desire for a package manager and module loader being built into the language.
- deleted 14y ago[deleted]
- lennel 14y agowe've been using closure for a long time now, would you say the js dart produces is faster than extremely well annotated closure code (97%+ with all the optimisations turned on). The other big thing from our perspective is the closure library (and a bit of templates), without the library being available it just does not make sense to make the switch.
- coldtea 14y agoGuys, if you can get somebody to write a decent (say, Flask level) server side Dart framework, Dart could gain a lot of ground there. Server side is were people are looking for nicer solutions that what's available, even moving away from RoR towards more one-page-app friendly stacks. It's also an area were IE compatibility doesn't matter (because we're server side), whereas raw speed, good tooling, type checks and such matter a lot, so it plays to Dart's strengths, especially if it could provide both a freaking fast raw server performance (the way V8 is already 10x faster to PHP and Python) AND a good async story with futures, that for Node.js are bolted-on.
- Daegalus 14y agoSince I primarily enjoy using Dart on server-side and like to use it as a replacement for Node when I can, I am actually working on a CRUD framework with middleware for Dart. Inspiration comes from Express for Node, but it is similar to what you can achieve with flask. Give it a look, and file feature/bug requests if you want to see something or something breaks. I know of 1 person that implemented a Google Oauth endpoint with it, so it does work well. http://github.com/Daegalus/fukiya http://github.com/Daegalus/fukiya