Thursday, August 20, 2015

A New Way to Share with DartPad

Back in May, we announced the release of DartPad 1.0, a clean and zero-install tool that helps you explore Dart. To create a seamless learning experience for both experienced and new developers, today we released embeddable pads! You can now add live Dart code to web pages.

Embeddable pads have the full power of the standalone DartPad:

Tutorials and guides can use embeddings to quickly demonstrate concepts on the fly:

You can also open embedded pads in DartPad to further edit and share code. For more information, view the embedding guide.

Head over to dartpad.dartlang.org and share your first pad! We hope you enjoy this new addition and provide us with feedback—remember, sharing is caring!

Posted by George He, Chief Sharing Operator

Tuesday, August 11, 2015

5% smaller output from dart2js

dart2js now produces up to 5% smaller output in the latest dev channel release of the Dart SDK.
We measured a 5% reduction on the minified and zipped dart2js output for one of the larger Dart-based apps in Google with source code size around 17MB. While we’ve seen a 5% reduction on a large app, your milage may vary and improvements are expected to increase with the size of your app. This improvement comes on top of a previous 3% reduction since the beginning of this year.
The idea behind the latest improvement is quite simple: The symbols that will occur most often in the generated output should be assigned the shortest minified names. So when minifying the code, we rename according to the frequency of each symbol in such a way that a high frequency results in a short name in the output.

This new frequency-based namer generally produces smaller output, which is great for deployment. It does however also result in different name allocations and thus “diffing” before/after the change will not produce useful outcomes. Furthermore, with the new scheme a small change in the Dart program might lead to major changes in the naming in the output. If output stability is more important than output size, you can still use the old namer. Simply use the option --no-frequency-based-minification when invoking dart2js.

We are making the new improved namer available on dev channel to get early feedback from you in time before the first release of 1.12 on the stable channel expected later this summer. Please give it a try and report any bugs you might find.

Posted by Stephan Herhut, Frequency-Based Minifier

Thursday, June 18, 2015

Null-aware operators and generalized tear-offs in Dart

Yesterday, on June 17, 2015, the 109th Ecma General Assembly approved the ECMA-408 3rd edition - Dart Programming Language Specification.



Main additions to the 3rd edition of the spec are

  1. null-aware operators and 
  2. generalized tear-offs

Null-aware operators are currently being implemented and tear-offs will follow.

The standard has been published on the Ecma Website.

Wednesday, June 3, 2015

Dart is now on GitHub

Dart is an open-source programming language, with contributors working on the language, libraries, tools, and packages. To make working with our community even easier, today we are announcing that we've fully settled into our new home on GitHub. We invite you to follow along and contribute at https://github.com/dart-lang.


The Dart SDK now has its own repository, joining the numerous Dart tools and packages already in our GitHub org. We’ve moved all the SDK issues over (keeping the original issue numbers!), and dartbug.com now points to GitHub's issue tracker for the Dart SDK.

Getting the SDK source is easy, and we've documented the contribution workflow. Our development tools are optimized for code reviews on Rietveld, Chromium's code review system, and they make it easy to start a review and cleanly land a patch. For very small patches, contributors can use a standard GitHub pull request.

One of the easiest ways to start contributing to Dart is to work on one of our packages. Individual packages (for example, args, http, and test) now have their own repos, complete with their own issue trackers and buildbots. To get started, check them out and find issues marked "help wanted". And of course, we encourage everyone to continue filing issues with dartbug.com.

We hope our move to GitHub helps more Dartisans become active participants in the future of Dart.

Monday, May 11, 2015

Dart Developer Summit videos now available

Dart developers met in San Francisco for two days in April 2015 to share stories, meet engineers, and learn about how to deploy Dart for the web, server, and mobile. If you missed the event, don't worry. You can now watch all the Dart Developer Summit presentations on YouTube.



Check out the playlist to see a wide range of content: case studies, insight into new features and libraries (such as async/await), a game engine built with Dart, deploying Dart to Internet of Things, deploying Dart on the server, using Dart in Google, and much more.

We also saw two new interesting experiments to bring Dart to mobile: the Dart for Mobile Services project and the Sky project.

A big thank you to everyone that joined us in person and on the live stream. We hope you enjoy the videos, and we'll see you in the Dartiverse!

Wednesday, May 6, 2015

Announcing DartPad: A friction-free way to explore Dart code

We believe developers deserve a fast iteration cycle, immediate feedback, and zero-install tools as they explore languages and APIs. To help both new and experienced Dart developers, today we are announcing DartPad 1.0, a friction-free way to try Dart code and APIs in your browser.

Developers new to Dart can use DartPad to experience the language and libraries. Experienced Dart developers will find DartPad the easiest way to experiment with the core APIs and learn new patterns and idioms. Everyone can use DartPad to share snippets of Dart code.

DartPad supports the full Dart language, the core libraries, and even HTML/CSS.



Easily discover APIs with DartPad's support for code completion.


Quickly find issues in your code with real-time errors and warnings.


Learn more about APIs with real-time docs.


Easily share your Dart code with DartPad's integration with Github's Gists.


We hope developers will find DartPad a useful tool. We're just getting started, and we appreciate any feedback. If you're curious how we built DartPad using open-source tools and workflows, check out our video presentation from the Dart Developer Summit.

- Luke Church and Devon Carew, Friction Fighters

Thursday, April 30, 2015

The present and future of editors and IDEs for Dart

When we started the Dart project in 2011, we challenged ourselves to deliver a structured and lightweight language that can be supported with productive editors and tools. To bootstrap the tooling ecosystem for Dart, we built Dart Editor to explore how to make Dart developers productive with code completion, source navigation, and static analysis.

Today, there are more editing and IDE options for a Dart developer than ever before. Developers are using a range of command-line tools, text editors, and full IDEs that support Dart. In what comes as no surprise, we've found that developers have very strong affinities to their particular editors, and that one size does not fit all. We've also learned that many developers are outgrowing Dart Editor, as they require source control support, plugins, extended customizability, and more.

To that end, we've shifted our strategy from focusing on a single Java-based editor, to focusing on low-level tools, the Dart Analysis Server, and plugins for editors. We are retiring Dart Editor at the Dart 1.11 release. WebStorm is the preferred IDE experience for Dart, and the Eclipse plugin for Dart will continue to be supported.

WebStorm and IntelliJ are full-featured IDEs, and both ship with the Dart plugin. The Dart plugin uses the Dart Analysis Server for its errors, warnings, quick fixes, and more. JetBrains editors have a robust plugin ecosystem, strong support for numerous languages and libraries, and are very customizable. Learn more about the various WebStorm editions and licenses, or download a WebStorm trial.

The Dart plugin for Sublime has strong community support, and is great for developers looking for a lightweight text editing experience for Dart. It now displays real-time errors and warnings from the Dart Analysis Server. It also supports numerous build commands (for dart2js, pub, etc.), syntax highlighting, and more.

We built DartPad for developers that want a friction-free introduction to the Dart language and libraries. DartPad, also based on the Dart Analysis Server, is perfect for dabbling in Dart, sharing snippets, answering Dart questions on StackOverflow, and exploring Dart APIs.

Another option is the Eclipse plugin for Dart, which we continue to support. The Eclipse plugin, which currently shares most of its code with Dart Editor, is powered by the Dart Analysis Server.

Server-side Dart developers can use Observatory for profiling, debugging, insights, and more. Observatory isn't an editor or IDE, but its real-time VM stats and debugger are a great complement to your editor.

The tooling ecosystem for Dart has come a long way. Stay productive!