Today's release of the Dart SDK and Editor is the first beta release, and contains performance and productivity improvements across the platform. This latest release helps Dart developers automate code evolution, produce smaller JavaScript code and deploy Dart web apps.
The Editor's analysis engine, responsible for reporting warnings and errors, is completely rewritten and is 20% faster at parsing and analyzing. Now, there’s no need to run all the unit tests just to discover a typo. The Dart Editor watches your back as you type.
In addition, Dart Editor makes it easier for developers to manage an evolving app. Some of the new features include:
Code completion has also improved. For example, completion is now camelcase aware. Type iE and Dart Editor finds isEmpty.
Compiling Dart to JavaScript now results in smaller code. For example, some Dart programs that use reflection and HTML can compile to JavaScript that is 3.7x smaller than previous compilation sizes.
Dart VM performance has also improved. Compared against the previous release of Dart, DeltaBlue is 33% faster and Tracer is 40% faster. This release also includes full SIMD acceleration in Dart VM.
Finally, deploying a Dart web app is now easier, with the beta pub deploy command. It creates a directory with your app's code and assets and prepares it for hosting on your favorite web server. You can use this command from Dart Editor or the pub command-line utility.
pub deploy
That's just the highlights - there are more improvements across the platform. You can read the full release notes for more details and changes. You can download the latest version of Dart Editor, including everything you need for Dart development, from dartlang.org. We look forward to your feedback!
Cube Slam is a Chrome Experiment built with WebRTC, an open web technology that lets you communicate in real-time in the browser (and in this case, play an old-school arcade game with your friends) without downloading and installing any plug-ins. In this post, we wanted to explain a bit about how Cube Slam works.
Cube Slam uses getUserMedia to access your webcam and microphone (with your permission, of course), RTCPeerConnection to stream your video to a friend, and RTCDataChannel to transfer the bits that keep the gameplay in sync. If you and your friend are behind firewalls, RTCPeerConnection uses a TURN relay server (hosted on Google Compute Engine) to make the connection. When there are no firewalls in the way, however, the entire game happens directly peer-to-peer, reducing latency for players and server costs for developers.
Cube Slam is the first large-scale application to use RTCDataChannel, which provides an API similar to WebSocket, but sends the data over the RTCPeerConnection peer-to-peer link. RTCDataChannel sends data securely, and supports an "unreliable" mode for cases where you want high performance but don't care about every single packet making it across the network. In cases like games where low delay often matters more than perfect delivery, this ensures that a single stray packet doesn't slow down the whole app.
RTCDataChannel only supports unreliable mode in desktop Chrome today. We're working on implementing the latest WebRTC spec, where we'll use the standard SCTP protocol to support reliable mode. WebRTC will also be available on Chrome for Android later this year, and you can try it now by flipping “Enable WebRTC Android” in chrome://flags. Several browsers are currently working on implementing WebRTC, and we’re looking forward to the day when you can have a Cube Slam face-off against your friends on any browser and any device.
To learn more about the tech in Cube Slam, you can check out our technology page and source code. Disable the shields! Destroy the screen! Have fun!
Justin Uberti is one of the co-creators of the WebRTC initiative, and leads the WebRTC engineering team at Google. Previously, Justin helped create Google+ Hangouts.
Posted by Ashleigh Rentz, Editor Emerita
--allow_large_results
percentile_cont()
SELECT percentile_cont(0.5) OVER (PARTITION BY room ORDER BY data) AS median, room FROM [io_sensor_data.moscone_io13] WHERE sensortype='temperature'
SELECT MAX(median) AS median, room FROM ( SELECT percentile_cont(0.5) OVER (PARTITION BY room ORDER BY data) AS median, room FROM [io_sensor_data.moscone_io13] WHERE sensortype='temperature' ) GROUP BY room
dense_rank()
SELECT DENSE_RANK() OVER (ORDER BY median) rank, median, room FROM ( SELECT MAX(median) AS median, room FROM ( SELECT percentile_cont(0.5) OVER (PARTITION BY room ORDER BY data) AS median, room FROM [io_sensor_data.moscone_io13] WHERE sensortype='temperature' ) GROUP BY room )
OVER()
PARTITION BY
ORDER BY
GROUP EACH BY
JOIN EACH BY
GROUP BY
JOIN BY
--use_cache
useQueryCache
--dry_run