Posts

Announcing “Exploring ES6”

I’m glad to announce that the first version of my book “ Exploring ES6 ” is finally finished! It was much more work than I anticipated – the PDF has over 460 pages! I’m really happy with how it turned out. The complete contents of the book are available online , for free. The ebook version (PDF, EPUB, MOBI) costs about $30 (depending on the VAT in your country, you can pay more to support my work). Exploring ES6 is a living book : you can buy it now and will receive free updates until it is completely done. That may take a while, possibly until 2016. Once the book is done, there will also be a print version. New material will often be published on 2ality, before it is added to the book. For all further information on ”Exploring ES6”, please consult its website .

The Lost World of Joseph Mitchell

Image
In times past, people like Joseph Mitchell and Alfred Kazin , young men in an exciting city, could walk the streets and probe the neighborhoods of their fair metropolis discovering the characters, the disparate worlds of 20 th century New York and not get mugged, stabbed or beaten, but return with stories to beguile readers even in this new century in this very different world.   Those were the days. Kazin was a critic, an intellectual American force.   His forays were side trips, alternate excursions between essays about literature and writers and art in America.   He walked because he had to think; one act precipitated another.   His feet kept moving because he had somewhere to be (the public library, where he wrote some of his early work), all the while pondering the words and texts he wrote about inside out and back again. Joseph Mitchell came to writing and walking from the direction of journalism on a beeline into Manhattan.   A product of the farming l...

Story

Image
Col. Charles E. Shelton “The art of writing is the art of discovering what you believe.”   Gustave Flaubert In the early days of the Vietnam War, Charles Shelton, was shot down over Laos while taking reconnaissance photographs of Viet Cong and Laotian military POW camps on the shared border between the two countries.   It was his thirty-third birthday.   His plane was armed only with cameras, but his fighter jet escorts saw his parachute deploy, watched him float to the earth and land in the steaming jungle, and they talked to him repeatedly over his radio throughout the night.   He spent three days hiding from Viet Cong and Laotian patrols before being captured and transported back to one of the very prisons he had been sent to photograph.   Over the next years, he was tortured and beaten and robbed of his freedom.   In return, he killed three Viet Cong interrogators with a folding chair while he was locked in chains.   He attempted to escape numero...

New number and Math features in ES6

This blog post describes the new number and Math features of ECMAScript 6 . Overview You can now specify integers in binary and octal notation: > 0xFF // ES5: hexadecimal 255 > 0b11 // ES6: binary 3 > 0o10 // ES6: octal 8 The global object Number gained a few new properties. Among others: Number.EPSILON for comparing floating point numbers with a tolerance for rounding errors. A method and constants for determining whether a JavaScript integer is safe (within the signed 53 bit range in which there is no loss of precision). New integer literals ECMAScript 5 already has literals for hexadecimal integers: > 0x9 9 > 0xA 10 > 0x10 16 > 0xFF 255 ECMAScript 6 brings two new kinds of integer literals: Binary literals have the prefix 0b or 0B : > 0b11 3 > 0b100 4 Octal literals have the prefix 0o or 0O (yes, that’s a zero followed by the capital letter O; you’ll be fine if you use the first...

Deploying ECMAScript 6

This blog post describes the options you have for deploying ECMAScript 6 in current JavaScript environments. It is selective w.r.t. the amount of tools it covers. If you want a comprehensive list of tools, I suggest you look at Addy Osmani’s “ ECMAScript 6 Tools ”. Consult the blog post “ Using ECMAScript 6 today ” for an overview of ES6 features. Using ECMAScript 6 today What options do you have for using ECMAScript 6 today? ECMAScript 6 features are continually appearing in engines. You can look up which ones are already supported where in Kangax’ “ ECMAScript 6 compatibility table ”. I’d expect first JavaScript engines to fully support ES6 in late 2015 or early 2016. It will take longer until all current engines do so. Especially if you take support for legacy engines into consideration, compiling ES6 to ES5 will be the only viable option for using ES6 for quite a while. Compiling from source code to source code is also called transpiling . You can transpile ES6 either before deploy...