Friday, 21 February 2014

This Week In Dart #21

The road to Dart 1.2 continues with the release of to the DEV channel. Full announcement here. Highlights include the addition of Dart Formatter, increased performance and stability, plus more support for attributes.

Diego Rocha has a great article on the all important topic of concurrency - vital in today's multi-core world. Worker: Dart concurrent programming does not have to be hard. Even features Fibonacci numbers!

cozy-porcupine. There - I said it! As you this is the codename for the latest angular.dart release which is at 0.9.8 so approaching 1.0 sometime soon. All the details over on Github.

I always enjoy talks from the Dart team themselves. Bob Nystrom's recent talk 'Dart for the Language Enthusiast' is available as an MP3 download and the slides are available too.

If you are interested in Dart game development, there's some interesting early footage of Fredrik Bornander's 'Lost Souls'

Bruno Skvorc has written a great article A Client-Server Dart App From Scratch. This is part one of a series starting with setting up a development environment and a Vagrant VM. SQL and PHPStorm are also touched upon.

Finally, I'd just like to mention that this blog should be picking up the pace soon. There's some more demo's on the way and a game. Have fun building with Dart this week! Thanks for reading - the visits, sharing and responses make it all worthwhile.

Thursday, 6 February 2014

Sierpinski Carpet

Returning to the world of fractals, we travel back nearly 100 years to the Sierpinski Carpet which was first described in 1916. Wacław Sierpinski was a Polish mathematician who made a great contribution to Set Theory. Not just carpets - the Sierpinski Curve and Sierpinski Triangle are the the other two famous fractals that carry his name.

This recursive function is quite intensive involving dividing the X,Y values repeatedly until they hit a multiple of 3 or 0. At this point X,Y can be determined to be Carpet or non-Carpet. As this blog requires it's demo's to be colourful, the colour is determined based on the raw X,Y values rather than the Carpet factor! To add some interactivity, the colour can be shifted and the size of the output adjusted.

Live example is visible here and you can get the Dart code on GitHub.