HNHacker News
TopNewBestAskShowJobs

sethladd

263 karma · joined April 22, 2009

Web engineer and Developer Advocate @ Google, currently rocking Dart and HTML5.
submissionscomments
sethladd··on How serious is Google about Dart?
To be fair, people use Dart in production right now, too. In fact, there are high profile Google projects being written in Dart (unfortunately, they aren't released yet). See Blossom's post for one example: http://www.ramen.io/post/46936028144/we-are-switching-to-dar...
sethladd··on How serious is Google about Dart?
Can you elaborate on your claim that Dart designers optimized Delta Blue when porting it to Dart?

Here's the Dart code for Delta Blue: https://github.com/dart-lang/benchmark_harness/blob/master/e...

Here's the JavaScript code for Delta Blue: https://code.google.com/p/v8/source/browse/branches/bleeding...

I see a JS class for Constraint, and a Dart class for Constraint.

I see a JS class for Strength, and a Dart class for Strength.

This goes on and on. In fact, I see a top-level function for chainTest() in both JavaScript and Dart.

sethladd··on How serious is Google about Dart?
Did you file a bug for the date parsing?

Thanks for using Dart!

sethladd··on Dart Is Not the Language You Think It Is
[disclaimer: I work on the Dart team]

The Dart VM is 2X faster than V8 on a few benchmarks already. Check out https://www.dartlang.org/performance We've still got a bunch of work to do, but the initial results are encouraging.

sethladd··on Dart vs Java – the DeltaBlue Benchmark
I opened https://github.com/xxgreg/deltablue/issues/1 to request updated numbers.
sethladd··on Dart vs Java – the DeltaBlue Benchmark
[disclaimer: I work on the Dart team]

I talked to our VM engineers, and they mentioned that the Benchmarks Game does not perform a warm-up before it runs the benchmark. This affects the Dart performance, because the Dart VM does not yet have on-stack replacement (OSR). Both Java and V8 have OSR so they perform better in the Benchmarks Game.

If you look at Dart's benchmark harness, https://github.com/dart-lang/benchmark_harness, you'll see that we perform a small warm up before we start measuring. It would be cool if Benchmarks Game did a warmup, too.

We plan to implement OSR but it's not there yet.

sethladd··on Core libraries stabilize with Dart's new M4 release
I would say that one of Dart's goals is certainly toolability. We ship a Dart Editor, and an analyzer, that supports refactoring, code completion, jump to definition, and more.

[disclaimer: I work on the Dart team.]

sethladd··on Core libraries stabilize with Dart's new M4 release
One of my favorites: http://glyph3d.com "Glyph3D is a font atlas generation tool. It enables game developers / artists to create beautiful font atlas maps using various filter effects."
sethladd··on Core libraries stabilize with Dart's new M4 release
Correct. The optimizations are landing now/soon. Feedback welcome!
sethladd··on We are Switching to Dart
[disclaimer: I work on the Dart team]

1) We have unit tests and mocks built-in. Check out https://www.dartlang.org/articles/dart-unit-tests/

2) We have JS-interop. Check out http://www.dartlang.org/articles/js-dart-interop/

3) We have tutorials for Web UI. Check out http://www.dartlang.org/docs/tutorials/

Hope that helps!

sethladd··on Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart
A couple of clarifications:

* Dart compiles to JavaScript, Silverlight did not. * Dart is actively being developed, Silverlight is not. * Dart does not require any plugins, Silverlight did. * Dart natively supports the DOM, Silverlight did not.

[disclaimer: I work on the Dart team]

sethladd··on Why dart2js produces faster JavaScript code from Dart
[disclaimer, I work on the Dart team]

While I do believe our Dart/JavaScript interop story will continue to be refined, I do want to point out that the days of javascript: URLs and eval are nearly over. The Web is getting a stronger security model through CSP [1] (content security policy). New restrictions put in place by CSP include turning off eval, new Function, inline JavaScript, and more. This is a very good thing, because it reduces the attack vectors for XSS and more.

[1] http://www.html5rocks.com/en/tutorials/security/content-secu...

sethladd··on Why dart2js produces faster JavaScript code from Dart
Good point, Dart2js isn't the only compiler that can apply optimizations. I believe Closure Compiler also performs optimizations. Both GWT and Closure have been out for years, to be fair. :)

[disclaimer: I work on the Dart team]

sethladd··on Start — Dart web framework inspired by Sinatra
[disclaimer, I work on the Dart project]

You might be interested in checking out http://pub.dartlang.org which is our repository of Dart packages. Meanwhile, we're still in beta, so I hope to see more projects when we hit 1.0.

sethladd··on Start — Dart web framework inspired by Sinatra
[disclaimer, I work on the Dart team]

Yes, one of the long term goals of the language is standardization. The project is open source, we have external committers, and we've taken numerous patches. Pull Requests welcome!

sethladd··on Ask HN: What production sites are powered by Google Dart?
(disclaimer, I work on the Dart team)

Thanks for the question!

We released Dart as a Technology Preview last year, which means we released very early in the project's life cycle. We've been collecting feedback and updating/refactoring the language, libraries, and tools. We've recently started releasing Milestone builds, which are essentially beta builds of the SDK and tools. The language does not anticipate backward breaking changes (but we still anticipate adding features like mixins). The libraries are currently undergoing changes, driven by feedback from the community and internal users.

The question if you should use Dart now depends on when you need to ship your projects. Too much will be changing to bet on it to ship your project in Q1 2013. However, my impression is that if you're shipping in Q2 or after, Dart should be a good bet.

The Dart community and team is standing by to help if you have any questions or concerns. You can find us at misc@dartlang.org, dartbug.com, and Stack Overflow.

sethladd··on Ask HN: What production sites are powered by Google Dart?
From: http://support.google.com/mail/bin/answer.py?hl=en&answe...

"In general, Gmail supports the current and prior major release of Chrome, Firefox, Internet Explorer and Safari on a rolling basis."

I interpret this as IE10 and IE9, at least for Gmail.

sethladd··on Ask HN: What production sites are powered by Google Dart?
(disclaimer: I work on the Dart team)

Good question!

The language does not anticipate backwards breaking changes (modulo any bugs we find in the spec), though we expect to add features like mixins.

The libraries are going through changes now, especially with the introduction of the new Streams API: http://news.dartlang.org/2012/11/introducing-new-streams-api...

The time is good to check out Dart and let us know what features you need for your next commercial project. However, with the libraries evolving right now, I probably wouldn't use Dart for something I need to ship in Q1 of 2013.

We love feedback, and there are a ton of features what work today (package manager, compiler to JavaScript, editor, etc) so we hope to hear from you soon :)

sethladd··on Ask HN: What production sites are powered by Google Dart?
This answer might help: http://programmers.stackexchange.com/questions/164273/does-d...

Also, performance is looking good: https://www.dartlang.org/performance/

sethladd··on Javascript Alternatives
I also wrote this response a while ago, which has additional details: http://news.ycombinator.com/item?id=4530903
sethladd··on Javascript Alternatives
You might be interest in Portable NaCL (aka PNaCL). http://www.chromium.org/nativeclient/pnacl
sethladd··on Javascript Alternatives
OK, I'll bite. In what ways does Dart reek of Java?

* Dart has top-level variables and functions, Java does not. * Dart has optional static types, Java does not. * Dart programs start at main(), Java does not (see static initializers) * Dart has factory constructors, Java does not. * Dart has true lexical scope and nested functions, Java does not. * Dart doesn't need to be compiled into bytecode, Java does. * Dart's classes have implicit interfaces, Java does not. * Dart has auto generated getters and setters for fields, Java does not. * Dart has one-line function syntax, Java does not. * Everything in Dart is an object, Java has primitives. * Dart has only library privates, Java has public/protected/package/private. * Dart starts quicker than Java.

In all fairness, both Dart and Java and JavaScript use { } and ;

sethladd··on Why is Dart keeping certain cruft from other languages?
One of Dart's goals is to become a compelling and useful option for developers of many backgrounds to write awesome modern web apps. Compiling to JavaScript is crucial, as JavaScript is the lingua franca of the web. Embedding a Dart VM into a browser gives even greater performance for Dart apps and support for features such as snapshots (a quicker startup from a serialized binary heap).
sethladd··on Why is Dart keeping certain cruft from other languages?
This is true, and a known bug: http://code.google.com/p/dart/issues/detail?id=1533
sethladd··on Why is Dart keeping certain cruft from other languages?
The original post was about a "slightly better java", so you're right, I tried to enumerate some features that might be interesting to a Java developer.

I really don't like X vs Y stuff (too many subtle and contextual issues), so I'm just trying to help the original commenter dig a little deeper.

sethladd··on Why is Dart keeping certain cruft from other languages?
> ActionScript

From my understanding, ActionScript is a gradually typed language. Contrast with Dart, which is optionally typed. In Dart, static type annotations do not affect the runtime semantics of the code. In ActionScript, the types do affect the runtime semantics.

sethladd··on Why is Dart keeping certain cruft from other languages?
If Dart, at first blush, looks familiar, then we've done our job. :) We freely admit that our job was not to make the world's most pure or esoteric language. Dart is a tool to get real jobs done and to be easy to use for a wide range of developers. Our hackathon experience shows that our learning curve is low.

That being said, if you poke around and try the language, you'll see quite a few significant improvements and exciting features. I wouldn't say it's "slightly better", I would say there are some significant enhancements.

Some significant improvements include:

* Isolates for shared-nothing concurrency. Shared-state threads are error prone.

* Optional types. You don't always need to prove the entire world is validated by some ceremonial type checker. Web programming especially is a workflow where you want to "write some code, hit reload" and iterate as fast as possible. Also, sometimes you just can't express what you want with your type system. Optional types is a way to say "I was going to cast to Object anyway, so let's dispence with the pleasantries and just use var."

* Everything is an object. No more "some things are primitives, some things aren't."

* Arbitrarily sized integers. 'nuff said.

* Not everything has to be in a class. Dart has top-level functions. This makes utility libraries significantly easier to use.

* A package manager as a native part of the ecosystem. This encourages 3rd party developers to share code early.

* Significantly faster start up. Go ahead and print out all the classes that are loaded when you run a simple Hello World program with the JVM. We'll wait. :)

* (related to the above) All Dart programs actually start running with main(). Turns out, this is not the case in JVM, due to how statics are initialized.

* Snapshots. Load code and libraries from a serialized binary heap. Significant startup performance improvements.

* Compile-time constants. These are canonicalized, and make for easy way to share data across isolates (they are immutable, for instance).

* Named optional parameters, with default values.

* All exceptions are uncaught.

* Throw any object. So you can throw "This is a crazy one-off error"

* Dartdoc comments can have markdown. This is awesome. :)

* A file can have a mix of classes and top-level functions.

* Lexical closures! (no more need for anonymous inner classes)

* Operator overloading.

* Method cascades. See http://www.dartlang.org/articles/m1-language-changes/#cascad...

All that really matters is "Are real developers more productive and having more fun? Are real developers launching more exciting apps?" That is the true test for Dart or any web language. Our experience is that evolutions, not revolutions, are a successful way to adoption.

Disclaimer: I'm a long time Java user and I have respect for the platform. I've written books on it, and launched many apps with it.

← PreviousPage 3 of 3