News for hackers. Stuff that matters.
Re:Dart vs Java — the DeltaBlue Benchmark by dvt on Thursday May 23, 2013 @03:21AM (#5755695)
There are many problems with this benchmark, as discussed here: http://www.reddit.com/r/programming/comments/1e2jhr/dart_vs_...

IMO DeltaBlue is a terrible benchmark typology anyway. Benchmarks have to be localized for them to mean anything; and even then, they don't mean much 90% of the time. Dart's pretty neat (editing a book about it atm), but this kind of language zealotry is just silly. Dart is hardly a silver bullet. And many of the truly interesting features (mixins, isolates, fancier mirrors) are yet to be implemented or incomplete. Definitely keep an eye out for Dart, but don't fall all over yourself thinking that it outperforms Java (whatever that even means).

Re:Dart vs Java — the DeltaBlue Benchmark by mda on Thursday May 23, 2013 @04:47AM (#5755851)
Why do you think this is language zealotry? I am very interested in a language that gives benefits of dynamic languages and speed of statically typed ones. So benchmarks like this are important and I wish more of the octane benchmark was also ported to Java and pitted against dart for comparison.

Also check this one: http://dartogreniyorum.blogspot.ch/2013/05/performance-optim...

and later with Simd:

http://dartogreniyorum.blogspot.ch/2013/05/dart-beats-java-i...

Btw, I think even with the modifications made to Java version mentioned in the link you gave, I think latest version of dart now beats Java.

Edit: Author of blog post also compared Richards and Tracer benchmarks: http://bonovox.be/blog/dart-vs-java-richards-and-tracer/

Re:Dart vs Java — the DeltaBlue Benchmark by xxgreg on Thursday May 23, 2013 @06:37AM (#5756111)
Sure, take all benchmarks with a grain of salt.

However it's worth noting that deltablue has been used to benchmark polymorphism in Smalltalk, Self, the JVM, and V8.

Some of Nickolay's numbers are from a version of the code written at Sun labs, presumably for the very purpose of benchmarking the JVM.

I think it's safe to conclude that in many cases the DartVM already performs similarly to the JVM, albeit with a much better start up time.

Charles Nutter has some interesting follow up comments here:

http://blog.headius.com/2013/05/on-languages-vms-optimizatio...

Basically concluding that it's not static typing that matters, but predictable types.

Re:Dart vs Java — the DeltaBlue Benchmark by bad_user on Thursday May 23, 2013 @04:13AM (#5755792)
The comment linked on Reddit by parent is by Charles Nutter, of JRuby fame.
Re:Dart vs Java — the DeltaBlue Benchmark by discreteevent on Thursday May 23, 2013 @05:15AM (#5755913)
This video (https://developers.google.com/events/io/sessions/324431687) is from the V8 guys. Its mainly about V8 and the massive complexity of their codebase because of all the tricks they have to do to work around the problems with making js performant (even if its still unpredictable and memory intensive). At the end they cover a bit about the dart vm.

For anyone who has worked on a large codebase with a fundamentally unsound architecture or inconsistent requirements you can feel their pain and understand their motiviation in making dart. Basically they are trying to show that if they just change the architecture of js a little bit to make dart then they can get twice (currently) the performance and a lot less complexity. They knew they could do this because they used to work on smalltalk vms. (I think that in another way dart is actually an algol-like trojan horse for the invasion of smalltalk because there's a load of ex-smalltalkers on the team and you can never cure those guys).

What's a little tragic about it is that they can't figure out why people aren't jumping all over dart (yet). The tragedy lies in the fact that they are partly responsible for it by hiding just how bad js is in terms of performance through their heroic efforts on V8. Then again the video is titled "Web Languages and VMs: Fast Code is Always in Fashion". The last word in the title shows that they probably do have their suspicions as to why people aren't immediately flocking to dart.

Re:Dart vs Java — the DeltaBlue Benchmark by Ygg2 on Thursday May 23, 2013 @05:43AM (#5755973)
I won't lie. I'd love for JS currently to be replaced by version 2.0 that starts mostly fresh. Hell, I'd love for AXR to replace current HTML+CSS. However this is impossible, given the way Internet functions (still got those sites from 1995 there, good luck migrating that to JS2).

That said Dart isn't that JS2. Perhaps that languages will never exist at all. I assume that what web might need is a VM that can run various languages on. And Javascript as web bytecode just doesn't sound right to me.

Re:Dart vs Java — the DeltaBlue Benchmark by ahoge on Thursday May 23, 2013 @06:37AM (#5756108)
> That said Dart isn't that JS2.

To me, it is. Dart fixed everything which was wrong with JavaScript. There is proper lexical scoping, a lexically scoped `this`, no type coercion, build-in classes/inheritance, built-in dependency handling, built-in annotations/doc-comments, and good tooling is also possible.

It really does scale and it's very nice to work with. Plus, there are a bunch of nice features like lambdas, mixins, and named arguments.

> Javascript as web bytecode just doesn't sound right to me.

Yea, it's kinda icky, but there doesn't really seem to be a way around it. Fortunately, dart2js' output is reasonable in terms of size and performance. Unfortunately, it doesn't work in IE8.

Re:Dart vs Java — the DeltaBlue Benchmark by Ygg2 on Thursday May 23, 2013 @10:01AM (#5756823)
To each his own I guess. I guess for me Dart doesn't capture a lot of JavaScripts good sides I guess (the homoiconity of JSON and JS). Also Google being the main sponsor just makes me slightly wary of it, thought its probably just my own paranoia.
Re:Dart vs Java — the DeltaBlue Benchmark by ahoge on Thursday May 23, 2013 @12:44PM (#5757831)
> the homoiconi[ci]ty of JSON and JS

There is a package for making interacting with JSON more seamless and JavaScript-like:

http://pub.dartlang.org/packages/json_object

> Google being the main sponsor just makes me slightly wary of it

In that regard, I clearly prefer Google over Oracle or Microsoft. I was also happy with Sun back in the days.

Re:Dart vs Java — the DeltaBlue Benchmark by laughfactory on Thursday May 23, 2013 @09:22AM (#5756660)
As a newcomer to web dev and Dart, all I can say is Dart rocks! It actually makes sense as a language (versus js). But that's just my opinion. I highly recommend checking it out if you're tired of Javascript's idiosyncrasies.
Re:Dart vs Java — the DeltaBlue Benchmark by mark_l_watson on Thursday May 23, 2013 @09:39AM (#5756734)
I agree! I am also a new DART'ster. I don't get the same warm fuzzy feeling as using Clojure, but Dart seems to be a very practical language. I have been experimenting with very simple REST services and front end apps and like it so far. I am converting a small Clojurescript + Clojure app to DART to get a better feel for the language and frameworks.
Re:Dart vs Java — the DeltaBlue Benchmark by pgsandstrom on Thursday May 23, 2013 @02:37AM (#5755626)
Much more interesting than the benchmark was the ease with which the author seem to have translated dart to java. I'm still new to web development, but each line of javascript I write makes me long for a more java-like language.
Re:Dart vs Java — the DeltaBlue Benchmark by chrisbu on Thursday May 23, 2013 @03:04AM (#5755667)
"Much more interesting than the benchmark was the ease with which the author seem to have translated dart to java"

Dart was initially slated for being "boring". It's comments like this that start to show that being familiar and unsurprising is sometimes a worthwhile goal.

Re:Dart vs Java — the DeltaBlue Benchmark by k__ on Thursday May 23, 2013 @03:52AM (#5755756)
really? It's the opposite for me.

When I write Java I always feel like I'm using bigger tools than needed. Like anonymous classes, when I just need a anonymous function etc.

Re:Dart vs Java — the DeltaBlue Benchmark by tosh on Thursday May 23, 2013 @04:07AM (#5755778)
When people say they like/long for Java I usually understand that they like the tooling support and robustness of language/api/libraries and ecosystem in general.

I think Dart looks very promising in that regard especially when you compare it to JavaScript without feeling as heavyweight as Java.

Dart is actually a very terse and expressive language. Less ceremony and feels much more like other dynamic languages like Python or Ruby. Yet having optional typing and simple semantics it is one of the dynamic languages with extraordinary tooling support.

In a way Dart gives you the best of both worlds. It takes the good parts and leaves out the bad :)

Re:Dart vs Java — the DeltaBlue Benchmark by k__ on Thursday May 23, 2013 @05:13AM (#5755905)
Yeah, the tooling of Java is nice. But it kinda seems like Java would be not usable without them. Also the code-generators are giving me the willies D:
Re:Dart vs Java — the DeltaBlue Benchmark by PommeDeTerre on Thursday May 23, 2013 @07:48AM (#5756283)
It depends on the style of Java code being written.

There was a period from 1995 until around 2001 or so where much Java code was developed without using IDEs. It was generally simpler, with shallower class hierarchies, and much less emphasis on design patterns. Such code could be easily written, understood and maintained without using extensive IDEs and other tools.

Things changed once Eclipse and other IDEs started to become more widespread, and some people went overboard using design patterns that are impractical to work with without the use of IDEs, or otherwise introducing complexity that just didn't arise earlier.

It's still possible to write the simpler, sensible style of Java code. It's just that most people who lean that way end up using C++, Go, Python, or some other language instead.

Re:Dart vs Java — the DeltaBlue Benchmark by xxgreg on Thursday May 23, 2013 @06:55AM (#5756161)
Nikolay has also ported the Richards and Tracer benchmark.

http://bonovox.be/blog/dart-vs-java-richards-and-tracer/

Re:Dart vs Java — the DeltaBlue Benchmark by channi on Thursday May 23, 2013 @06:16AM (#5756052)
I suggest google employees should write "work for google" everywhere they comment or blog or say something about google projects. I bet half of the hype will just go away then
Re:Dart vs Java — the DeltaBlue Benchmark by afsina on Thursday May 23, 2013 @06:23AM (#5756077)
How about discussing on merit, not finger pointing? (not a Google employee)
Re:Dart vs Java — the DeltaBlue Benchmark by joegaudet on Thursday May 23, 2013 @02:31AM (#5755613)
Hardly an apples to apples comparison.

Porting code written for VM a to VM b by some rubric hardly seems like a fair comparison.

Re:Dart vs Java — the DeltaBlue Benchmark by xxgreg on Thursday May 23, 2013 @06:48AM (#5756146)
Yes - benchmarks need to be ported very carefully to make sure they measure something meaningful. What makes you think that there are problems with this port?

It is an old well used benchmark, used for benchmarking object-oriented code with polymorphism.