Skip to main content

Posts

New site for Dart news and articles

For the latest Dart news, visit our new blog at  https://medium.com/dartlang .

Generate a Snapshot for Faster App Startup

A new article published to DartLang.org shows you how to generate your own Dart VM snapshot , which can help your app start quicker. A snapshot is a "sequence of bytes that represents a serialized form of one or more Dart objects." The VM can load a snapshot more efficiently than raw source code. This is especially important for mobile devices, where every CPU cycle impacts the battery. Dart VM engineer Siva Annamalai writes about the different kinds of snapshots, what they are used for, and how you can generate and load them. Your feedback really counts. Please join the conversation at the Dart mailing list , and ask questions at Stack Overflow . (Photo credit: http://www.flickr.com/photos/purplemattfish/3020016417 )

Dart Team Launches Quick Video Tutorials

The Dart Team, in partnership with Marakana, launched "Dart Tips", a new series of quick video tutorials and introductions to the Dart language and libraries . Each episode in this series is approximately 5 minutes long, so you can watch them anytime. There are six episodes now, with more planned. Seth Ladd, Dart developer advocate, tells us more: "These short videos have very specific topics, which means it's easy to find examples and explanations for exactly the right topic you are searching for. Plus, as a bonus, we've published the full transcript below each video, for the times you want to read instead of watch." Some topics include built-in types like strings and booleans, runtime modes, functions, and more. The first six videos are embedded below, or you can watch them all on dartlang.org . Enjoy! A simple Dart script Runtime modes Variables Strings, numbers, and booleans Collections Functions are fun, pt 1 ...

New Dart Editor Release Brings map() Back

Dart Editor has a new build and several of the recent breaking changes have been incorporated (including the popularly requested switch from mappedBy() to map()). Eric Clayberg  fills us in on the details : A new Dart Editor build is available at  www.dartlang.org/editor .  Ch ang es include: Auto completion for imports (dart:, package: and relative). Cleanups for: Date -> DateTime, new Date.fromString -> DateTime.parse, and new Uri.fromString -> Uri.parse Several and various changes to the context menu and the Navigate top-level menu. The standalone VM can now be used to generate snapshots: dart --generate-script-snapshot= foo.dart.snapshot foo.dart, and dart --use-script-snapshot=foo. dart.snapshot foo.dart Fixed an issue with changing perspectives in the plugins distribution. Files in packages directories are now opened read-only. Bug fixes and UX cleanup. Breaking Change List: Deprecated Element.elements has been rem...

Breaking Change: Iterable.mappedBy is now Iterable.map, List.skip/take return Iterables

mappedBy(), we hardly knew ye!! Florian Loitsch  tells us the reason   for the name change to  map()   :  We are reverting the name-change to 'map'. I got a lot of feedback, and the name is clearly not working for most of you. We are therefore reverting back to "map". In order to avoid mistakes we will also make the return-type (and dynamic type) of List.map be an Iterable, and not a List. This will, hopefully, make it more clear that the result is a lazy wrapper instead of an eager evaluation. For consistency we changed the return-type of List.skip and List.take to be an Iterable too. We are going to keep the mappedBy method in the implementation (next to "map") for several weeks, so you have the time to migrate. The List.skip/take methods will furthermore continue to return Lists (even though their return type is "Iterable"). When we finish the transition "mappedBy" will go away, and skip/take will return Iterables ...

New Iterable API Can Filter, Transform, and More

Dart engineer Florian Loitsch has published a new article on Dart M3's Iterable interface . Available today as a preview, you can use Iterable to filter, transform, chain, and more. Many of the collection methods have moved up to Iterable. Florian writes: Iterable was extended with many Iterable-returning methods. These are lazy methods in that they only wrap the original instance. They do not immediately perform any work. Instead, it is the iterators of the wrapping objects that do the actual work. As a consequence it is possible to modify the original Iterable (adding new elements, or deleting them) and the wrapping iterable will see the changes. (Of course, it is still not allowed to change an iterable while an iteration is in progress.) New methods include methods to skip the first elements ( skip()  and  skipWhile() ), or to ignore remaining elements ( take()  and  takeWhile() ). We furthermore moved the Collection methods  map()  and  ...

New Dart Editor Build With Expanded Exception Debugging and Autocompletion in Import Statements

Dart Editor has new build. Eric Clayberg  fills us in on the details : A new Dart Editor build is available at  www.dartlang.org/editor .  Ch ang es include: Added a new launch configuration for Chrome packaged apps. Add the ability to specify the break-on-exceptions behavior in the debugger (break on all exceptions, uncaught, or no breaking). The editor now supports autocompletion in import statements! Improved labeling on empty Dart search results More navigation menu enhancements Fix for resolving package: imports in dart scripts in HTML files Various analysis and editor fixes Breaking Change List: Window.requestLayoutFrame is being renamed to window.setImmediate- it's functionally equivalent. The API is essentially a microtask API for executing callbacks after the current stack has unwound but before the next event and the rename is intended to be clearer about that. We've also improved the underlying behavior on IE (to use window.setImmed...

Important New Dart Editor Build with Support for New Dart Libraries

Dart Editor has a very significant new build that integrates support for many of the new v2 libraries. Eric Clayberg fills us in on the details  and warns that this build is likely to break existing code : A new Dart Editor build is available at  www.dartlang.org/editor .  Ch anges include: Mixin support in code completion and refactoring. Revised navigation menu items on editor context menu. Items only appear when applicable New “Find all” item to search for all declarations of a method In the command-line debugger, selecting a running isolate will display all the libraries for that isolate, and all the top-level variables for those libraries.  For both debuggers, break-on-exceptions is now enabled by default (Issue 4765). Added a new wizard for creating Chrome apps. Thanks to Adam Singer for the template for this wizard! Added a new wizard for creating a web-ui application. Thanks to Chris Buckett for the CL to make this happen! Editor ...