Saturday, 14 December 2013

Peano Curve

For this demo we travel back to the 19th Century Peano Curve - a space filling curve discovered 1890 by Italian mathematician Guiseppe Peano. He went on to some interesing work in Fractals.

Whilst researching the Peano curve, I found the best way to implement it was recursively and a Python sample showed a neat example using Turtle Graphics. Turtle Graphics was always in those computer books I grew up with (1980s!) complete with robot turtle usually with a pen attached. I had never actually code anything using it- turns out a basic turtle class is pretty easy so I chose this to implement this demo. It is a very fun abstraction / model. I threw in some colour to liven things up and rendered to the HTML5 Canvas. Hopefully I will revisit the turtles soon and have an animate implementation of the Curve. For now, here is the live demo and the GitHub.

Can someone work on the robot for me? I'll bring the pens :-)

This Week in Dart #19

Back after a small hiatus caused by the American Thanksgiving Holiday and the British theatre tradition of pantomime! Here's a catch up TWID...

The Dart DEV channel was updated Dart Editor version 1.0.3_r30939 (DEV) and the Dart SDK version I am enjoying the new clearer tooltips.

The Rosetta Code site provides source code for classic computer demos and problems in a variety of languages. On one page I noticed 173 programming languages! I was happy to see that many of them had Dart versions. Well worth checking out.

Dart Dares kicked off on G+ is a bit of fun coding challenge that started with a Secret Santa problem. See the post here. I hope this continues into the new year!

Minecraft creator Notch has continued to Tweet his Dart and WebGL experiments. He also announced he will be taking part in LD28 48 hour game challenge using these technologies. As usual he will be streaming the weekend.

I'm off to watch Notch - watch out for another HTML5 GFX demo later on the blog.

Monday, 2 December 2013

Interactive Isometric Landscape Generator - Dart HTML5 Canvas

Landscape generation has always got my attention - starting with fault line graphics generation back on the 8-bit Dragon 32. That required some patience! I have spend a good deal of hobby computer time on various GFX experiments. OpenGL rather makes my non-maths brain hurt so I've settled for various pseudo 3d projections. Oddly I had never used the Isometric projection so I decided to dust down some old JS code and rewrite it in Dart with a new look.

The live demo is here and the code is on github. There's few things I would like to do to this such as add more palettes, more controls so you can sculpt the landscape to your liking.

A game would be fun to write - a little clone of Q-bert (another 8-bit favourite of mine!

Monday, 25 November 2013

This Week In Dart #18

This week the Dart Editor was updated to version 1.0.0_r30338 (DEV) and the Dart SDK to version

Dart Channels were revealed this week - see the announcement here. With 1.0 being released, those wishing for a stable build will not want a weekly update. This blog will largely track the DEV channel (so no change really).

Spark describes itself as 'A Chrome app based development environment with a reusable library of GUI widgets'. This application was given some publicity this week with some coverage over at CNET and others.

The Chrome Dev Summit had a presentation on Dart: If you have used Dart for a while, the first part of the presentation will be familiar but there's some great detail in there later on about how dart2js works so it is well worth watching.

The WebUI mailing list has closed now that library is old news. Long live the dart-web which will cover everything web related for Dart. See the announcement.

Eclipse Con 2014 will feature a presentation 'Developing the Dart Editor' by Eric Clayberg and Dan Rubel. Hopefully there will be a video of that one.

That's it for now. Have a great Darty week!

Friday, 22 November 2013

Countdown Timer In Polymer

After an overly long hiatus, some code is back on the blog. This was mostly due to the great advances being made in Dart making Polymer very difficult to keep up with! Also the early versions had rather chunky JS output which thankfully is now a fraction of the size and compiling to JS was awkward. Thankfully we now have 1.0 and stability!

This example is for a countdown timer implemented as a web component. The code has been through a high number iterations so perhaps could do with a little polishing. It shows off the StopWatch class as well as handling numeric text boxes and even a little animation.

Code is over on GitHub and the live demo is here. I'd like to add a few more features to this app so I can use it for real. A Chrome OS version is quite possible too.

Next sample will be a graphical HTML5 demo featuring some Isometric graphics.

Monday, 18 November 2013

This Week In Dart #17 - The 1.0 Special

Dart has reached 1.0! The announcement was made on the 14th of November at the Devoxx Conference - Dart 1.0 is here! Huge congratulations to the Dart team on this amazing milestone and to the community which fuels the ecosystem. Let the era of the fast web and productive web tools begin!

The official announcements on the DartLang site, Google Plus and the Chromium blog.

This week the Dart Editor was updated to reach version 0.8.10_r30104 and Dart SDK to version The splash screen has lost the Beta tag and now reads Dart instead of DART. The

The release made the headlines in the tech press. Here's selection of links:

The press played up the 'controversy' angle of course but it was great seeing Dart highlighted to a wider audience. Traffic on this blog has been up since Dart 1.0 and #DartLang was trending on Google Plus on the day of release.

Don't miss this Dart 1.0 interview with Lars Bak and Kasper Lund at Devoxx 2013

The Dart 1.0 release caught the attention of Minecraft creator Notch:

This week's TWID has been very 1.0 focussed - for a broader news update check out the latest Dart Weekly. Have a great week!

Thursday, 14 November 2013

Dart 1.0 Is Here!

Announced at the Devoxx Conference - Dart 1.0 is here! Huge congratulations to the Dart team on this amazing milestone and to the community.

The official announcements on the DartLang site, Google Plus and the Chromium blog.

Great to see #DartLang trending on G+. Expect more updates in this weeks TWID post!

Friday, 8 November 2013

This Week In Dart #16

This week the Dart Editor was updated several times to reach version 0.8.10_r30104 and Dart SDK to version A range of updates to the SDK, Polymer pub build and a range of new samples including Google Maps. Here's the announcement.

The number of the week has been 1.0 - there's no date other than 'soon'. This was prompted by a call to package authors on 'to get your package ready for Dart's release' - full details here. There's a chance we will see 1.0 in 2013 or early 2014. I speculate Polymer stability (the api not the running code!) will decide this. Given the massive updates in the past few weeks, this is probably not to far away. The new samples are clearly to attract new developers especially with the highlighting on Angular on the new Welcome screen (available at any time from the Dart Editor tools menu). Documentation too is feeling more finished. There was also this commit of a new splash screen.

Chris Strom has shared some practical advice for getting a package ready for 1.0 in the post Upgrading for 1.0 (Wha?).

If you are a Mac person (and a large chunk of this blog readership is!) you may be interested in this Homebrew formula to install the Dart Editor, SDK etc. It does make me wonder if Dart needs better packaging, native packaging for 1.0 or soon after. For example a MSI for Windows Users and a Debian repository for Ubuntu. Share a comment below if you have something to share here.

That's it for now - expect the code samples on this blog to start appearing again 'soon' :-).

Sunday, 3 November 2013

This Week In Dart #15

Dart Editor version 0.8.7_r29341 and Dart SDK version were released this week. Some tidy up the libraries for JSON, Platform and a refactoring of Isolate. Various fixes and improvements to the editor's code completion. See the change log for all details.

Minecraft creator Notch caught the attention of Dart developers when he tweeted 'I'm so nervous and hyped about Minecon, I'm considering learning Dart'. I just had to revisit a certain meme...

If you have ever wanted to ask the Dart team anything, and you are going to Devoxx, your wish has come true. The Dart team are in Antwerp to host a Q & A and Buzzword bingo session. More details here.

Size matters (especially JS size) and Kevin Moore has some reflections on the progress of Dart in this blog post. Looking positive!

This keyboard is being a little temperamental so I will sign off will I still can type. Have a great week!

Monday, 28 October 2013

This Week In Dart #14

Apologies for the slight delay in this edition of TWID - I was doing a sponsored cycle at the weekend! I was also putting Crouton back on my Chromebook. Some more installing still to do. If you have any feedback on TWID such as the schedule or content, please leave a constructive comment! Also let me know if you have created or found something that deserves to be covered.

The Dart Editor was updated to version 0.8.5_r28990 and the Dart SDK to version This release includes performance, stability and features updates. Polymer has had drastic changes - see the mailing list for advice on porting - sure a complete guide will pop up soon. The usual samples have been updated and other docs are on their way. One very positive change is the reduction of the JS produced when deploying a Polymer application. For more details see the announcement.

Packages are at the core of Dart and to aid understanding, pub commands are being renamed:

  • pub install is now pub get
  • pub update is now pub upgrade
  • pub deploy is now pub build

    Naoto Hc's blog has a post regarding usage of symbols whilst implementing Conway's Game of Life in Dart. Source Code available. This is a good example of a non-Polymer/non-WebUI web application written in Dart.

    Just a short TWID this week - back with another demo before TWID15 if this install goes well!

  • Saturday, 19 October 2013

    This Week In Dart #13

    No update to the Dart Editor or Dart SDK this week. There was a lot of activity on the mailing list trailing upcoming updates to Polymer.dart and Dartium. The main points for Polymer.dart: size of the output JS will be dramatically reduced, initialisation has changed and main() will be going away. The next release will be very significant!

    Video Discussion - iForms Autopsy and discuss of Dart, Dart Web Toolkit and Polymer:

    If you are in the SF area, there is a StageXL Hands-On Codelab
    "Whether you're looking to build the next Angry Birds or just find interesting ways to display your company's financial data, StageXL & Dart offer everything you need for 2D graphics or games. The StageXL library gives you access to all the best techniques & tools traditionally used by Flash™ & Starling developers"

    WebGL continues to be popular with Dart. Check out this Dart/WebGL port of the Processing sketch "Untangle" over on Paul Sanderson's blog.

    After all that, if you need to unwind why not play a game of EyeBurst - a Halloween inspired web game. Dart source code is available too. Some nice bat animations there!

    Saturday, 12 October 2013

    Binary Clock Revisited

    The Binary Clock HTML5 Canvas demo has proved to be one of the most popular demos on this blog. I thought it would be interesting to visit it again in a Polymer project. It is a fairly simple rewrite as custom Polymer.dart element. I didn't see the need for databinding it. Some initialisation is carried out as required - I am still clearing up in my mind the lifecyle of a custom element. All a learning process!

    The code is available on Github. It is part of a larger Polymer project, rather having a repo per demo. It was a little tricky to deploy to HTML/JS and there's important optimisation bugs which the Dart team are still working on. Once these are cleared up, there'll be a nice demo site with all the examples from the blog on it. Not too far in the future!!

    This Week In Dart #12

    Are you ready for a Polymer.dart heavy edition of TWID? Let's go...

    The Dart Editor was updated to 0.8.1_r28355 and the Dart SDK to This updated includes performance, stability and features updates. The find feature (always an important part of a text editor!) has key binding fixes. Dartium now provides a Dart REPL at all times - not just when a breakpoint is reached. Polymer.dart brought fully up to date with Polymer.js which brought some important changes and updates.

    The DartLang site has an extensive tutorial - Define a Custom Element - Create a custom HTML element using Polymer. If you are looking to move onto Polymer from Web UI then stop on by Matt Butler's blog for 12 tips for porting 'Polymer Plunge'. If that isn't enough for you, check out Seth Ladd's 47 mini samples for Polymer over on GitHub.

    vdrones 0.12.0 shows some impressive 3D visuals. Watch this short video then pop along to the website to fly around for yourself!

    Diving down from the UI level, the core of Dart has been making advances as shown in this benchmark for Sudoku solving that was shared on G+. Prolific Dart blogger Chris Strom hit a milestone of 900 daily blogs in a row - an impressive benchmark for us other bloggers to follow!

    Finally Happy Birthday Dart! Yes Dart turned 2 years old on 11 October - many happy returns.

    Tuesday, 8 October 2013

    Minecraft Screenshot Viewer Server in Server Side Dart

    Dart and Minecraft are my favourite two time sinks right now so when I had and ideas to combine the two I just had to try it out! Previously I had written a wxPython screenshot viewer and it was a fun project that proved popular on my old Python blog. For non-players of the game, pressing F2 takes an instant screenshot (and saves it into your .minecraft) folder but there is no built in way to view them. This results, for me anyway, in a lot of great screenshots I never look at!

    Currently I don't know of any desktop GUI library for Dart so it has to be a web app. On the plus side this means displaying png graphics files is going to be very easy.

    Dart makes it very easy to build a HTTP server. As we are working Server side we can use dart:io which also includes file access. HTTPServer is the key class and we are provided with a HttpRequest object which gives the URL (e.g. ) that the web browser requests a resource with. For the full code see GitHub.

    If you don't have the game and want to try out this code, just change the path to point at any folder containing png files (no sub-folders are read).

    I have quite a few ideas to extend this - leave a comment if you have a suggestion!

  • Caching files in memory instead of reading from the disk every time.
  • Recording some statistics for access.
  • Refresh images shown without restarting the server.
  • Showing the files date.
  • Test on Windows.

  • Saturday, 5 October 2013

    This Week In Dart #11

    The Dart Editor and SDK was updated to version 0.7.6_r28018. There's a number of new features for the Editor - REPL in Dartium, a new HTML/CSS editor, faster dart2js and new Polymer.dart samples. The official Dart site has a good round-up of the features with graphs & screenshots.

    And whilst you are over at, you should cast an eye over this article The Event Loop and Dart. It does get a little confusing with a few notes on Dart bugs that complicate things but there's key Dart concepts here.
    If you are feeling a little lost, Seth Ladd's Path Finder example might get you back on the right track! As usual the code is available on GitHub.

    The Polymer.dart revolution continues but there was an important clarification on the mailing list re:WebUI support:
    One thing to keep in mind is that Web UI is still maintained. We're not adding new features, but we're ensuring it still works.
    See here for the full post on Google Groups.

    This resource doesn't seem new but I stumbled across it for the first time this week and bookmarked it quickly. gives Dart Code examples and there equivalents in Python, Javascript and C#.

    That's it for this editon of TWID. Build something great with Dart in the week ahead!

    Monday, 30 September 2013

    Download Client Side Data As A File Using The Dart Language

    A quick Dart tip! I am working on an update to the Dart Class Generator and wanted to improve the User experience from COPY + PASTE. In HTML5, it is possible to send data from a variable to the client as a file download from client side code. Best of all it is really easy to code - this example is for text.To use put a call to this in your button handling code.

      void downloadFileToClient(String filename, String text){
        AnchorElement tl = document.createElement('a');
        tl..attributes['href'] = 'data:text/plain;charset=utf-8,' + Uri.encodeComponent(text)
          ..attributes['download'] = filename

    That's it - nothing server side required at all! I should emphasise this is also possible in pure JS - can't comment on browser support.

    Saturday, 28 September 2013

    This Week In Dart #10

    The Dart Editor and SDK was updated to version The most interesting new feature being the 'Deploy Polymer App' menu option as it shows Polymer.dart is clearly being adopted very quickly and WebUI being pushed out within just a few builds.

    Oreilly Media carried the article 'Build Reusable Widgets for the Web with Polymer and Dart' by Seth Ladd. This step by step guide takes you through creating a control with autocomplete.

    The Dart community is growing with Dartisans having 3100+ members and StackOverflow having 1500 Dart Questions.

    Dart engineer Emily Fortuna (pictured!) presents at the Seattle GDG Devfest, Sept 28. "Dev Fest is an all-day event for you to learn new Google technologies."

    In case you missed it, this blog carried the post 'Top 5 Live Websites Already Using The Dart Language' which has turned out to be the most popular post on this blog so far! It's great to see Dart out in the real world.

    Have a great week and build something awesome with Dart!

    Tuesday, 24 September 2013

    Top 5 Live Websites Already Using The Dart Language

    Update Mar 2015 -

    Here's an updated Top Ten List of Dart websites and companies who use Dart.

    Update Jan 2015 -

    This post is from 2013. For a more extensive and up to date list, please see 'Who Uses Dart' on the official Dart site. Thanks!

    The Dart is still heading towards that magical 1.0 release but that is not stopping pioneering developers using the language. It is not just limited to internal tools. Already there are several live public websites running real applications in Dart. Let's take a look at them.

    Google's German Election Map was written using Dart. It provides a Google Maps display of the results by district. "Dart is used for the UI, and to draw the district boundaries".

    Staying with maps for a moment, Counties Power Outages is a New Zealand site for tracking power faults and scheduled work.

    VectorShapes describes itself as 'an App Bazaar for designers, artists and developers looking for different ways to incorporate web technology into their craft'. This site was built with Dart and SVG and is well worth a look.

    Blossom is a 'Lean Product Management' web tool written in Dart and has been in production since early this year. The tool is aimed at start ups but has some big names in its Happy Customers list.

    Finally Woven a new community site "Woven is a Miami-based startup dedicated to helping groups work together more effectively. We’re building an online platform that helps groups coordinate their activities around a shared cause."

    Feel free to leave a link to your Dart Language powered website in the comments below!

    Monday, 23 September 2013

    This Week In Dart #9

    The Dart Editor and SDK was updated to version with the Performance and Analysis fixes. Also the Dart Editor was given a TODO comment feature. Interestingly the option to create a new Web_UI project has been removed.

    Recently Google pushed Chrome desktop apps and one of the Dart Editor team members is working on a Chrome App called Drake. Drake describes itself as 'A Chrome app based web development environment' and is written in Dart. I will trying this out very soon!

    Seth Ladd has updated his Polymer.dart samples "Auto-complete, GWT Contacts example, and polymer-element-ification for the Polymer.dart mini-samples.". These samples have proved invaluable for most of my Polymer experiments. Also don't miss his up to date presentation on Dart from the JavaZone conference.

    Chris Strom shared a blog post regarding unit testing of a Dart canvas application.

    Staying with HTML5, dart-webgl a re-write of lessons to Dart. Take the web into the third dimension! I can see Teapots in front of my eyes already...

    Friday, 13 September 2013

    This Week In Dart #8

    After a little summer break, TWID is back! I have missed researching and writing this part of the blog very much. Thanks for your patience.

    The Dart Editor and SDK was updated to version with Search, Performance and Analysis fixes.

    The DartLang website has an updated Polymer.dart section. This is packed with examples and advice for upgrading from WebUI. A recent build of the Dart Editor also allows creation of a Polymer.dart app from the 'New Application...' menu.

    Over on Tumblr is PixelCycle movies - my favourite is the missle command one. These were created with Pixel Cycle which was written in Dart with some Go server side.

    I had a quick go too!

    Finally Kevin Moore shared some impressive Dart performance (dart2js) graphs on G+ and numbers which show some impressive advances.

    Wednesday, 11 September 2013

    Starr Rose

    We continue our adventures in Dart and Canvas, with the Starr Rose. This mesh is named after its creator mathematician Norton Starr. Of course, I am keeping it colourful and also adding an interactive element. Click on the canvas to draw a Rose - create an autumnal scene which is fitting as we reach the end of another summer.

    Code is available on GitHub and the live demo is here. You may note that this is the first of the Diving Into Dart demo's to use Polymer. Also all Polymer demos will be linked into a single repository.

    Tuesday, 3 September 2013

    Brief Hiatus

    I am busy this week on PyWeek 17. Writing a game in 7 days is very demanding so the blog will be quiet. Anyone fancy organising a Dart Game Jam? :-)

    Tuesday, 27 August 2013

    Barnsley Fern Fractal

    When selecting an idea for this week's demo, I wanted to do something new and settled on the fern fractals. The Barnsley fern is a super simple algorithm that produces amazingly natural looking images. These look just like the ones in my garden!

    The online demo is here (click on the canvas to draw a new fern) and the code is on GitHub.

    Tuesday, 6 August 2013

    Triangles And Bouncy Text

    This is a reworking of an OpenGL example from the Pyglet library for Python. I have toned down the colours for this version - it was previously a Christmas demo.

    The demo is online here and the code is here.

    The canvas context is a good object to use the cascade operator with '..'. It soon becomes tedious to type crc.this, crc.that and crc.nextthing. Be careful not to fall for my mistake of adding a semi-colon after every method call!


    To generate the path of the text, the main function calculates a path of points stored in a list. This uses dart:math and the trigonometry functions. These work in radians, oddly there are not radian conversions build into this library. This is documented in this bug which also contains the code (a convenient copy&paste) to implement them.

    Saturday, 3 August 2013

    This Week In Dart #7

    The Dart Editor and SDK was updated to version r25630. Highlights include fixes and performance improvements to code completion, analysis improvements and updated Todo.MVC sample.

    Seth Ladd's presentation to JAXConf was put online. Has he ever done a presentation not including kittens! :-)

    Interested in Angular and Dart? James deBoer has written a skeleton project available on GitHub. This has a wonderful 3 (yes only 3) step README to get started.

    VectorShapes describes itself as 'an App Bazaar for designers, artists and developers looking for different ways to incorporate web technology into their craft'. This site was built with Dart and SVG and is well worth a look.

    Kevin Moore was interviewed by InfoQ on the subject of Dart. MP3 file and transcipt are available here!

    Coming up soon on the blog... there will be another digestable HTML5 demo and a look at that game I have started to convert to Dart. Have a great week coding Dart!

    Friday, 2 August 2013

    Get 'With' It Dart! One Thing Dart Could Learn From

    UPDATE : Turns out the cascade operator does work as I expect - my syntax was a bit off as only the final semi-colon is required! This works today - yippee! :


    Thanks to those who provided me with such rapid feedback!

    Dart has a great feature - the cascade operator - that helps construct a new or returned configured object fast.

        ..text = 'Ok'

    But oddly it doesn't seem to work if you have an existing reference:


    This will give an error.

    Consider the following Dart code snippet:


    It would nice to have the cascade operator work this way or have a With ... End With statement (from to use (I'll use curly brackets so it is C style) like so:

      with crc

    Before I raise a feature request, I'd love to hear what you think. It is a nice to have but I think it helps make it clearer and more consistent. Are you with me? :-)

    Monday, 29 July 2013

    This Week In Dart #6

    The Dart Editor SDK updated to R25388. This little snippet caught my eye '2,000 additional editor tests added to build (now at 5,000)'. The analysis engine has also had some fixes and expansion.
    For those interested in polymer, check out Seth Ladd's examples on GitHub. In particular the Simple Custom Element example is very handy when getting started or when troubleshooting something more complicated.
    Two interesting package updates - the self explanatory gifencoder and an isometric 3D library StageXL_Isometric.

    Sorry to end on a sad note, but this week we had to bid a final farewell to Ginger the chicken who posed for my profile picture on GitHub. You were a chicken of great personality - so long and thanks for all the eggs!

    Sunday, 28 July 2013

    A Binary Clock In Dart

    Binary Clocks - simple stuff, just the time in binary right? Well, it turns out that is not the case. Some transfer the 4 digits of the time into 4 binary numbers. Critics have pointed out that this binary coded decimal is not pure enough and scientifically insufficiently geeky.

    Of course, this is all just a bit of fun. They are rather impractical! I liked it colourful for this blog so that was my main aim when I set about the task of writing my own (as a Dart WebUI Component - I guess it will be polymer.dart soon). The Dart libs have and easy method to get milliseconds since epoch. To get seconds we can simply round to 1000. For display, I chose 24 bits and decided to show previous times. This means our binary number updates at the LSB more often (right hand side of our string of 1's and 0's. The clock would look rather static other than at the right edge so I mirrored the display which gives some pleasing patterns. This gives time for around 200 days - so on some planet, this could be quite useful! Code as always on Github.

    Thursday, 25 July 2013

    Deprecation and the Dart Editor

    It took me a while to find out why some methods in the Dart Editor were being shown like this - this means the method or property is deprecated.

    Turns out work is going on to improve this - they will appear as build warnings too and not just in the Editor. I was looking at bit of code using Path and the tool tip stated that Path was deprecated and the exact day it would be removed in August. (No screenshot sorry!). As the libraries progress, most developers will appreciate this feature especially on larger projects.

    Sunday, 21 July 2013

    This Week In Dart #5

    This week in Dart, the Dart Editor/SDK was updated to build 25017. Thanks to the Dart team for all their hard work.

    Developers have not been slow to get started on polymer.dart (the successor to WebUI). There's some useful notes on converting existing WebUI apps that could save you a lot of time!

    I was surprised to learn Dart has posters available and they look great! Grab PDF's for lexical scope and isolates.

    Finally, for a different Dart weekly update, try the excellent Dart Weekly email newsletter which also has good coverage of the updates of the community Dart packages.

    Saturday, 20 July 2013

    Fractal Trees In Dart

    I do love a good fractal - a titchy bit of code to produce a wonderful landscape or snowflake or, in this case, a tree. For the background see this clear article

    You can try out the tree maker here and get/view the code here on GitHub.

    Originally, this bit of code was part of a game produced during a jam. It was tidied up and put in a JS page. Conversion to Dart was straightforward.

    Saturday, 13 July 2013

    This Week In Dart #4

    The Dart Editor and SDK was updated to version R24898 and gained the BETA tag:

    The big news this week was announcement of polymer.dart - the Dart version of Polymer. This will eventually replace the WebUI library. The good news is the impact on existing code is fairly small - modification to some syntax. Eventually this should lead to the removal of the 'build' step. Full details were announced in this blog post.

    Two framework updates this week:

    • bootjack - "Bootjack is a porting of Twitter Bootstrap in Dart.".
    • dart-decouple - "Decouple library for Dart, includes: IoC Container and Event Aggregator (Pub/Sub Pattern)"

    Finally an older demo of dart that I stumbled across today that looks rather cool :-) Have a good Dart week!

    Sunday, 7 July 2013

    This Week In Dart #3

    Yes I skipped a week with this little feature of the blog. It a quiet week the previous week probably due to the time of year.

    A couple of non-English language Dart videos have popped up. For the Spanish speaking:

    For the Italian Speaking:

    More visuals were provided by Peter Schonefeld's SVG and Box2D demo.

    Finally, time is almost always an issue so why not Learn Dart In 15 Minutes

    Have a good week and do something great with Dart!

    Saturday, 22 June 2013

    Diamond Square Algorithm

    One of my favourite areas of computer graphics is landscape generation. During the September 2012 PyWeek I was able to try out the Diamond square algorithm for my Mars based game. Just a simple zap-zap affair I'm afraid!

    I was curious to see how Dart would cope with this number crunching task. Of course, it worked well :-)

    Turns out it works well - you can try the demo here- it redraws every second. There's a bit of work to be done to tidy up the edges slightly but for a first iteration it works well enough.

    The basic code for the HTML and class are on github - add to a WebUI project to get up and running.

    This Week In Dart #2

    The big news this week is Dart going into BETA - congratulations to all the team for reaching this important milestone!

    The release notes carry all the detail. There's been a big focus on performance with dart2js, Dart VM and the Dart Editor all getting boosts. (Given I am currently developing a HTML5 game in Dart on an Atom netbook, I was very pleased to hear this!)

    The release was covered on a number of the big sites including engadget and InfoQ

    On there is an interesting weather package - weather_underground_api

    Finally, as a follow up to last weeks cheat sheet, the writers have listened to feedback and there are already some updates for mobile and tablet appearing on the project's github page.

    Sunday, 16 June 2013

    This Week In Dart #1

    There's been a number of interesting Dart related projects and resources springing up this week. Here are a few highlights.

    The Dart Cheat Sheet
    is a very handy reference to bookmark. Has anyone managed to print it neatly?

    Angular.js has announced a port to Dart:

    Pluralsight have published a Dart Web Applications online course.

    Finally the Dart Editor/SDK had its usual weekly update to R23799 - with refactoring and editor improvements. More details in the Change Log.

    Monday, 10 June 2013

    Dartclass Got Types! (Optionally)

    My first live Web UI app, 'Dartclass' has had a little update. It has Type Declarations which are, of course, optional in true Dart style.

    Properties/Observables -"daftspaniel" becomes String name = "daftspaniel";

    Methods - int.getAge becomes int getAge(){}

    The notation of int.getAge is a bit funny but it allows spaces to separate the list of items and is easy to type. I'd welcome feedback on that choice and any other aspect of the tool. It would be easy to add an alternative character. I first consider an underscore but it requires the SHIFT key on my keyboard. Hope this helps you get started coding some great ideas.

    Next for Dartclass, I'd like it to generate a basic HTML file for Web Components.

    Pub Deploy Bug To Be Aware Of

    Dart is still maturing as an environment, so if you start working in it you should expect the odd issue.

    Dart has a command 'Pub Deploy' to create a regular JS web deployable version of your project. It works great for a first release of such a big feature. Unless you are using GIT. 10983: Pub deploy fails if out/ is in .gitignore.

    Easy enough to get .gitignore out the way, deploy and then put it back. A fairly painless workaround. Enough of a frustrating GOTCHA to be worth highlighting. Makes me wonder where they are going long term with this tool. I don't think DEPLOY should depend on a particular VCS. Odd.

    Wednesday, 5 June 2013

    Class Wizard

    I like the editor that comes with the SDK but I hate the look of a new blank file! So I wrote this little tool to generate the basic code of a class. I find it good for working on ideas too. Feedback appreciated!

    Dart Class Wizard Tool - Update Should really have the BETA tag on this :-) There's various small updates being published to this URL. Should settle down soon.

    Code is on GitHub

    Converting A Game From Python and PyGame To Dart

    I am working on converting my PyWeek game to Dart. Work in progress screenshot:

    Here's the Python Version

    Friday, 24 May 2013

    Dart on FLOSS Weekly

    This episode of FLOSS weekly (on the excellent Twit network), finally gave me the push to try Dart for real! It gives a great overview of the language and the hosts ask some insighful questions such as browser support and comparisons with jQuery.