2017-03

Exercise: text as Unicode clock faces

[2017-03-15] dev, javascript, unicode

In this blog post, we explore how arbitrary ASCII text can be encoded as Unicode clock faces:

> clocksToPlain('🕔🕘🕖🕕🕖🕜🕖🕜🕖🕟🕒🕑')
'Hello!'

I’m explaining ideas by Maggie Pint and @FakeUnicode.

Communicating Sequential Processes: an alternative to async generators

[2017-03-13] dev, javascript, esnext, async

In this blog post I present Communicating Sequential Processes (CSP) and how they can be used as an alternative to async generators. In the process, we will also take a look at the ECMAScript proposal that async generators are a part of: “asynchronous iteration

2017-02

ECMAScript 2018: the final feature set

[2017-02-28] dev, javascript, esnext, es2018, es proposal

The feature set of ECMAScript 2018 was finalized during the latest TC39 meeting (23-25 January 2018). This blog post describes it.

babel-preset-env: a preset that configures Babel for you

[2017-02-22] esnext, dev, javascript, babel

babel-preset-env is a new preset that lets you specify an environment and automatically enables the necessary plugins.

2017-01

ES proposal: Shared memory and atomics

[2017-01-26] dev, javascript, esnext, es proposal, concurrency

The ECMAScript proposal “Shared memory and atomics” by Lars T. Hansen has reached stage 4 this week and will be part of ECMAScript 2017. It introduces a new constructor SharedArrayBuffer and a namespace object Atomics with helper functions. This blog post explains the details.

Making transpiled ES modules more spec-compliant

[2017-01-20] dev, javascript, esnext, babel, jsmodules

A proposed “spec mode” for Babel makes transpiled ES modules more spec-compliant. That’s a crucial step in preparing for native ES modules. You’ll also learn how ES modules and CommonJS modules will interoperate on Node.js and how far along ES module support is on browsers and Node.js.

Communicating between Web Workers via MessageChannel

[2017-01-15] dev, javascript, clientjs, concurrency

Occasionally, you want Web Workers to communicate with each other. Doing so is not obvious as most Web Worker examples are about communicating between the main thread and a Web Worker. There, one uses postMessage() to send messages directly to the Worker. Alas, that doesn’t work for communicating between two Workers, because you can’t pass references to Workers around.

ES2020: import() – dynamically importing ES modules

[2017-01-09] dev, javascript, es2020, jsmodules

The ECMAScript proposal “import()” by Domenic Denicola is at stage 4 and part of ECMAScript 2020. It enables dynamic loading of ECMAScript modules and is explained in this blog post.

2016-12

A programmer evaluates the MacBook Pro (Touch Bar)

[2016-12-03] computers, apple

I got my new MacBook Pro this week. These are my first impressions of the machine. I’ve moved from a MacBook Air 13" to a MacBook Pro 13".

My dream notebook would have been a 13" version of the 12" MacBook. It’s a shame that Apple didn’t introduce such a machine, but I understand the decision to keep things simple. Accordingly, I changed the planning for my setup:

  • from iMac plus MacBook
  • to MBP plus LG UltraFine 5K display (as a docking station).

One benefit of this switch is that I won’t have to wait until new iMacs come out in order to have a large high-resolution display at home.

2016-11

Controlling access to global variables via an ES6 proxy

[2016-11-27] dev, javascript, esnext, js proxies

The following function evalCode() traces the global variables that are accessed while evaluating a piece of JavaScript code.