Sunday, 29 March 2015

This Week In Dart #25 - Dart 1.9 and Chrome Dart VM Special

Dart 1.9: 'The release you’ve been await-ing for' - was released. This is the biggest release of Dart since 1.0. Highlights include async and await keywords, enums, an isolates API, a new server implentation of the Dart Analyzer, an accelerated regular expression engine and a new source code formatter. For full details see the release notes.

The significant release of Dart was overshadowed somewhat by the strategic decision not to proceed with merging the Dart VM into Google Chrome. This was covered in the post Dart for the Entire Web. The blog post most significant statement is:

In order to do what's best for our users and the web, and not just Google Chrome, we will focus our web efforts on compiling Dart to JavaScript.

Also revealed is that Google Ads, the core of Google's advertising business, is committed to Dart as are other internal customers.

The Dart VM has a future though, as I tweeted this week:

The Dart VM story was covered in the major news outlets.

Reception to this news has been understandably mixed, with a lot of questions being asked. The strategy makes Dart's appeal wider overcoming some of the 'Chrome only' perception. This change will free the VM from the web browser restriction and complexity. If nothing else it frees up a huge amount of effort for other features. With customers like Googe Ads, Dart is clearly a success without the VM in the browser and that compelling story can be pushed further forwards.

The landscape of web scripting has move forwards since the Dart project was initiated. It has contributed to the debate and was never a replacement for JavaScript which was always going to be part of the web and constantly improving. More plans and information is likely to emerge at next month's Dart Developers Summit.

Finally, from Damon Douglas, a great example of Dart playing Tic Tac Toe in two browsers using Polymer, and Google Drive Realtime API tictactoe.dart

Wednesday, 25 March 2015

Dart POW - ( Package Of The Week) #3 : dnd Drag and Drop

Who is ready for another - Dart POW? A weekly look at an interesting Package on

dnd is a package for creating Drag and Drop for Dart web apps with mouse and touch support.

Make sure you check out cool live demos!

Feel free to leave a comment with suggestions for the next Dart POW post! Don't be too shy to suggest your own package :-)

Sunday, 22 March 2015

This Week In Dart #24

Top story this week is the availability of the release candidate for version 1.9 which is available on the DEV Channel. This is closely followed by the opening of registration for the first Dart Developer Summit (April 28-29) - should be a great couple of days of Dart Sessions which will be streamed and recorded.

A new article appeared on the ACM website, with details of the new async and generator features. This gets quite involved but is a good read!

The Dart Enhancement Proposals repository has grown already with some great ideas, for example Generic Methods in Dart.

Jana Moudrá has an interesting post on two Dart packages for sortable lists & drag and drop.

Finally, Dart Pad gained a very important feature - code completion!

Friday, 20 March 2015

Copper Bar Animation Atari/Amiga 16 bit Style

It has been sooo long since there was a frivilous colourful demo on this blog! Here is a fun throwback to the 16bit era of home computing.

As usual there is a LIVE DEMO and the code is available on GITHUB. Enjoy!

Thursday, 19 March 2015

Dart POW - (Package Of The Week) #2 : wsk_angular - WSK Material Style for Angular + Dart

Who is ready for another - Dart POW? A weekly look at an interesting Package on

wsk_angular is an implementation of Material Design in AngularDart with Googles Web Starter Kit. The package is in BETA, and there are some interesting samples to try out of controls, themes and layouts.

Feel free to leave a comment with suggestions for the next Dart POW post! Don't be too shy to suggest your own package :-)

Sunday, 15 March 2015

This Week In Dart #23

Dart Pad (Alpha) appeared this week on the DartLang website. It lets you write and run Dart/HTML/CSS on a web page. It is impressively fast and I can see it as a very useful tool for trying things out.

The DartLang site carried some details from TC52 - which discussed 'discussed a number of additional language features for Dart - including async, tear-offs and null-aware operators'. Also launched this week is the Dart Enhancement Proposals repository - 'A DEP is a detailed, concrete proposal to change part of the core Dart platform. "Platform" usually means the Dart language itself, but DEPs may also apply to core libraries or other tools that ship with the Dart SDK'.

Google's Anders Sandholm released a set of slides titled 'Speed and programmer productivity' which reviewed Dart in 2014. As well as mentioning internal projects and external projects using, it mentions Dart being targetted for mobile apps. Very exciting news!

Finally, the Dart 'Game of Life Meme' is still going! Here's and interesting implementation by Jimmy Forrester-Fellowes.

Thursday, 12 March 2015

Dart POW - ( Package Of The Week) #1 : modern_charts

New feature for the blog - Dart POW! A weekly look at an interesting Package on

modern_charts is a great canvas based graphs package with support for Bar, Gauge, Line, Pie/Donut and Radar graphs.

The API is nice and straightforward too - didn't take long for me to create a LineChart:

import 'dart:html';
import 'package:modern_charts/modern_charts.dart';

void main() {

  DataTable table = new DataTable(
 [['Categories', 'Bears', 'Giraffes', 'Rabbits'],
  ['Monday', 12, 23, 25], ['Tuesday', 23, 24, 26],
  ['Wednesday', 24, 23, 21], ['Thursday', 44, 25, 21],
  ['Friday', 23, 24, 22], ['Saturday', 25, 10, 24],
  ['Sunday', 24, 12, 28]]);

  Map options = {
    'colors': ['#cbcbcb', '#00aa00', '#990000'],
    'series': {
      'labels': {
        'enabled': true

  LineChart chart = new LineChart(document.body);
  chart.draw(table, options);


Feel free to leave a comment with suggestions for the next Dart POW post! Don't be too shy to suggest your own package :-)

Tuesday, 10 March 2015

Dart Alive! - Part 2 : Google Using Dart

Last time, we had a look at 10 sites and companies that are using Dart. This time we take a look at Google and how they use Dart. Of course, this will only cover external sites - I (sadly) have no secret inside knowledge of what is going on in the Google-plex and. like most companies, the more interesting ideas will be kept under wraps! So we must assume that this list is actually a lot longer :-)

Google Internal Tools

Who Uses Dart gives us a little glimpse of internal use of Dart.

  • Google internal customer support tool Built with Polymer.dart.
  • Google internal tool for marketing Built with AngularDart.
  • Non-Public Websites

  • Adwords for video - Built with AngularDart, this help advertisers manage campaigns.
  • Public Websites

  • Google Express - Built with AngularDart, this app manages driver and courier logistics.
  • Google fiber - High speed internet roll out.
  • Issue Mover for GitHub
  • Dart Lang unsurprisingly Dart is written (partly) in Dart as are many tools.
  • Google Elections used Dart for an Election results application (German and Brazilian elections) but this is not currently online. Hopefully it will reappear for the UK General Election!

    Very interesting to Dart being used on high demand sites such as Election results and Google's core business of advertising.

    Next time we will take a look at notable Open Source projects written with Dart!

    Saturday, 7 March 2015

    This Week In Dart #22

    It has been quite a while since the last TWID! It has been an interesting week for Dart so a good chance to kick it off again. Watch out for more weekly features on the blog.

    The journey to 1.9 continues and it is taking a bit longer than usual - Kevin Moore explains why and the new features. Kevin has also commented on the announcement that the Angular 2.0 project is switching to Typescript in the wonderfully titled post

    You can try out 1.9 now by using the unstable channel for Dart. Two features I am looking forward to hitting stable are the improved analyser and an improved code formatter. It's great when the tools are working WITH you!

    Hacker News has a great discussion thread for Q+A's on the new Dart Enhancement Proposals.

    Finally, catching up with some slightly older news, Dart Designer has been released. - "Graphical tooling based on Eclipse Sirius for the Dart programming language." - Check out the video below.

    Thursday, 5 March 2015

    Procedural Generation : Part Seven : World Data Structure Optimisation

    The next version of Dart (1.9) will have some optimisations for the Map class. A discussion about this on the mailing list made me think of the Map used for the Dungeon demo. Dart currently has no 'real' 2D arrays so a simple map was used with a string key of the x and y co-ordinates. Creating and joining those strings takes a bit of work, so perhaps a List of Lists would be a better way. Let's use the Stopwatch class and see if we get an improvement.

    class block{}
    class point{ int x; int y; point(this.x,this.y);}
    main() {
      Map testMap = new Map();
      List testLol = new List();
      List dataPoints = new List();
      Stopwatch watch;
      print("Set up maps.");
      for(int i=0;i<100;i++)
      for(int j=0;j<100;j++){
        testMap["$j-$i"] = new block();
        dataPoints.add(new point(j,i));
      print("Set up list of lists.");
      for(int i=0;i<100;i++){
        List row = new List();
        for(int j=0;j<100;j++){
          row.add(new block());
      print("Run tests.");
      watch = new Stopwatch();
      for(int j=0;j<8000;j++){
        dataPoints.forEach((p) => testMap["${p.x}-${p.y}"]);
      watch = new Stopwatch();
      for(int j=0;j<8000;j++){
        dataPoints.forEach((p) => testLol[p.x][p.y]);

    Results were the Map taking around 26 seconds and the List taking about 1.4 seconds. This was running from the Dart Editor. From the command line, the map was just under 20 seconds (probably debugging overhead) and the List took about the same time. So moving forward with the world generation, List of Lists seems the way to go!