Monday, October 29, 2012
- Replace some methods with getters
- Renaming some types
- Removing abstract keyword for methods without a body
- New “Organize Imports” action
- New migration Clean Ups - replacing some methods with getters; renaming some types; removing “abstract” keyword for methods without body.
- Enhanced “Extract Method” refactoring to allow changing parameter types
- In the command-line debugger, we added the ability to pause a running isolate.
- Improved how we display null value objects in the debugger.
- Updated samples based on language and pub changes
- Fixes for inline method and local
- Fixes for syntax highlighting
- Fix to automatically refresh out-of-sync resources
- Fixes to better handle package symlinks in search and the files view.
Thursday, October 25, 2012
In the article, Siggi writes:
Dart web components provide templates, data binding, and encapsulation, to help you write web applications at scale. An early version is available in the dart-web-components project.
Dart web components combine the ideas of web components and MDV, adapting them to work well with Dart. Dart web components take advantage of advanced browser features when possible, emulating missing features when necessary.
There's more work to be done, with support for Web Components in Dart just getting started. Now is a good time to try out the project and talk to us in the Dart mailing list or ask questions on Stack Overflow.
|Make your code faster (Photo by Slooby)|
- Perform a warm-up before measuring code performance.
- Ensure the code does not raise any errors when run in checked mode.
- Run your benchmark in production mode with debugging disabled.
Tuesday, October 23, 2012
I've already started moving implementation classes out of dart:coreimpl and making them a private member of dart:core. I'll continue to move the rest over the week.
Once the move is done, we intent to re-expose some of the same functionality in other libraries.
If you are currently using any of the classes in dart:coreimpl, you can make a local copy for your program to use, and file a bug for a feature request in the library area on http://dartbug.com/new.
Starting with r13974, you'll find that isNaN, isInfinite, isEven, isOdd, isNegative on numbers are now getters. In the same CL I updated the fixnum pkg where I also change isZero, isMaxValue and isMinValue.
In general the fix should be easy:
d.isNaN() -> d.isNaN, ...
Learn how to build HTML5 games with Dart in this video from Kevin Moore. Kevin walks you through his open-source Pop Pop Win! game.
Kevin used HTML5 canvas, Web Audio API, and more. He also uses his BOT pub package, which is a collection "of (mostly) general libraries to make working with Dart more productive." You can see all the code to Pop Pop Win! on Github. The game even works on desktop and mobile!
Monday, October 22, 2012
Friday, October 19, 2012
On Monday, we will submit a change to bleeding-edge enforcing the new optional parameter syntax and semantics, as described in the spec.
Until now, both the vm and dart2js have been running in a backward compatible mode, where named arguments could still be passed to optional positional formal parameters, which is not allowed under the new rules.
If you want to check before Monday whether your code is going to break, please use the flag --reject_named_argument_as_positional for both the vm and dart2js.
To learn more about these changes, read about how named optional params and positional optional params are specified differently.
As always, we encourage you to join the Dart mailing list, ask questions on Stack Overflow, and file feature requests and bugs at dartbug.com. Thanks!
One of the big features of the Dart M1 release is our package manager, pub. You can discover, install, and manage 3rd party Dart libraries with pub. Pub is a command-line app with Dart Editor integration, as well as a hosting service for Dart packages. We've been uploading select packages, but soon you'll be able to upload your own packages to pub.
I sat down with two of the pub engineers, Bob Nystrom and Nathan Weizenbaum, to learn more about pub and what's on the roadmap.
Q) What exactly is a package?
Bob: It’s a directory containing Dart code and all of the other stuff that goes along with it: tests, docs, examples, resources. It also has metadata that describes the package and its dependencies–the other packages it relies on.
Nathan: It’s important to note that Dart applications can be packages even if they don’t export any libraries and they’re not going to be re-used anywhere. As long as it declares its dependencies in a pubspec, pub considers it a package.
Q) I see some import statements like 'package:foo/foo.dart'. What is the package: there for?
B: At some point, I’ll write down the full explanation for why that’s needed. The short answer is that it “flattens” your import paths so that imports across transitive dependencies work. The simple answer is “it’s how you import code that’s in a package.”
N: “package:” is the magic that lets pub do its work. It tells Dart to look for imports in the “packages” directory, rather than just looking relative to the importing file. Pub generates this directory and fills it with your dependencies, allowing them to be imported.
Q) What happens when I run 'pub install' ?
B: In short, it makes sure all of your package’s dependencies are installed and wired up so that you can use them. I wrote up a more detailed description of what happens from pub install.
N: If a “pubspec.lock” file exists, “pub install” will install the locked versions of all the packages. This is very useful for application packages, since they can make sure that all their developers -- and more importantly, the deployment servers -- are using exactly the same versions of all their dependencies. This helps prevent unexpected breakages.
Q) What package managers did you study when you designed pub?
Bob: For the pub app, the main ones I looked at were RubyGems, bundler, and npm. I also did a bit of reading on maven, apt-get, easy_install and probably a couple of others I’m forgetting. I briefly checked out LuaRocks, Chicken Scheme’s package management system and a bunch of other random ones too.
For pub.dartlang.org, I continually had rubygems.org, npmjs.org, pypi.python.org, and cpan.org open in other tabs for design ideas.
Nathan: The biggest inspiration for pub’s installation model was definitely Bundler, from which we picked up the install/update dichotomy. The version constraints follow in the footsteps of many major package systems for other languages, and make use of the semantic versioning spec.
Q) How can someone publish a package to pub.dartlang.org?
B: Right now, there’s no way to upload your own package. We’re building out a user experience to do that now and should have that in place relatively soon. In the meantime, file a bug with the title “Request to host package - <your package name>” and we’ll upload it for you. Make sure to include a path to a repository (usually github) where we can download it.
N: Once user uploading is allowed, it’ll be very easy to publish a package. You’ll just need to run a single command, either through the Dart editor or from the command line, and pub will make sure your package is in good shape and then push it up to pub.dartlang.org.
Q) What do you have planned for pub?
B: The next big thing will be letting you upload your own package and getting us out of that loop. After that, there’s a long list of features we want to add. For pub itself, we want commands for linting your package to see if it’s following our guidelines, building and compiling your package to something deployable, running your tests, and other stuff.
For the site, there’s a bunch of discovery things we want to do now that we’re starting to get some data. Stuff like “here’s the most downloaded packages”, “here are the packages that are the most depended on”. We want to make the site automatically show you which packages are the most prominent and loved in the community.
Also, there’s a bunch of stuff we can do to make your life as a package author better: things like automatically running your tests, generating reference docs from your code and showing it on the site, displaying your README, etc.
Q) What advice do you have for new package authors?
B: Follow the guidelines but don’t feel your package needs to be “done” before you put it out there. Everything is versioned specifically to enable things to grow and evolve over time.
N: Make use of other packages! Pub makes it so easy to depend on other packages, there’s no reason not to use them if they provide useful functionality.
Q) I have a good idea for pub. How can I send feedback?
B: Bring it up on the mailing list or file a bug. Filing a bug will make sure we look at, bringing it up on the list will solicit more discussion from the entire community.
N: Keep in mind that there are a lot of features we want to add to Pub, and only two of us working on it. If we don’t immediately address your suggestion, don’t despair; we’ve seen it, and we’ll keep it in mind.
Q) How can I learn more about pub?
B: Read the docs! We have lots.
N: If the docs don’t fully answer your questions, feel free to ask them on the mailing list. If we don’t answer it, one of the other community members will.
Thanks to Bob and Nathan, and thanks to all our Dart library authors that are already getting their code ready for pub.
Thursday, October 18, 2012
|Lars Bak from Stange Loop conference|
|Slide from Strange Loop presentation|
Tuesday, October 16, 2012
With this version of the Dart SDK, we’ve made several improvements and added many features:
- A faster Dart Virtual Machine that on some Octane tests outperforms even V8.
- An HTML library that works transparently on modern browsers.
- An easy to use editor.
- Pub, a new package manager
- Dartium, a Chromium build with native Dart support.
- A server-side I/O library.
Thursday, October 11, 2012
Tuesday, October 9, 2012
- We now support showing an in-line type hierarchy view (Command-T on the Mac and Ctrl-T for Linux and Windows).
- We have a new Quick Fix to import or create a type when it is used as invocation target.
- General work to the Eclipse plugins including:
- cleaning up some spurious menu contributions,
- adding menu items to invoke dart2js and dartdoc
- and adding the ability to open Dart files in non-Dart projects
- Several code completion enhancements, including:
- support for both named and optional parameters
- showing proposals for function parameter names following unary-?
- improved proposals for cascades
- Web components support is now enabled on Dartium launches by default.
- The .project metadata file has been moved out of the user's source directory.
- The html and css editors now use a default indent of two spaces.
- 6 analysis fixes, as well as fixes to the debugger, Outline view, feedback dialog, auto-update, and our analyze-as-you-type feature.
Monday, October 8, 2012
If reading is more your thing, Seth also wrote up 9 Dart myths debunked.
As always, the Dart team wants to hear what you have to say. Join the discussion in the Dart mailing list, ask questions on Stack Overflow, or file bugs and feature requests on dartbug.com. Thanks for trying Dart!
Wednesday, October 3, 2012
So once again, we’d like to welcome TypeScript. We think the web has suffered from too little choice for too long, and we think that the future of large-scale web development is looking brighter than ever!
Monday, October 1, 2012
- We now have analysis as you type! You're now alerted about errors as you type without first having to save the file.
- Debugger expression evaluation - when paused at a breakpoint in Dartium it's now possible to evaluate expressions. You can access this feature from the 'Show Expressions' toolbar button in the Debugger view. This is a Dartium only feature currently; support for the command-line debugger is forthcoming.
- We have two new quick fixes; one for creating a class and one for creating a constructor.
- Fixes for debugging command-line and Dartium apps when used with Pub and the packages directory.
- Tweaks to the @deprecated and @override presentation.
- And fixes to the cleanups, to our auto-update, for a debugger crash with Dartium, as well as 11 analysis fixes.