Polymer 3.0 preview

Preview of main features and updates of upcoming Polymer 3.0
29 August 2017   1896

At the 2017 Polymer Summit in Copenhagen, devs team announced one of the biggest changes to developer workflow:

  • Polymer is moving from Bower to npm.
  • We're switching to using ES6 modules instead of HTML Imports.

At the moment, team is still previewing these changes and waiting for a feedback. An if you are starting a new project, they recommend to use Polymer 2.x. Developers will try to make migration process as smooth as possible.

The Polymer 3.0 API will be essentially identical to the 2.x API. All of the classes, mixins, elements, template system, and other APIs that are a part of Polymer 2.x are being ported to modules, including the Polymer 1.x legacy syntax. All of the knowledge that Polymer developers have will translate directly to Polymer 3.0.

Also, a tool called Polymer Modulizer will automate the conversion of your current elements and apps to Polymer 3.0. This tool will be available immediately as part of the preview and has already been tested against the Polymer library and the full set of Polymer elements.

Why developers decided to move to other technologies?

According to the team, moving to ES6 modules and npm has several advantages:

  • Polymer becomes more compatible with the workflow and tools that a huge number of JavaScript developers are familiar with.
  • Polymer elements and applications will run without any polyfills on recent versions of Chrome, Opera, and Safari. When Edge and Firefox ship custom elements and shadow DOM, Polymer will run polyfill-free on those browsers, too.
  • You'll be able to work with regular JavaScript libraries more easily, whether you're importing a Polymer element into a library, or using a libraries inside an element.

Since the beginning, Polymer has used HTML Imports to load dependencies. HTML Imports have a lot of benefits:

  • Web-native loading mechanism. No build tools are required to load code using HTML Imports.
  • Transitive loading of dependencies with ordered evaluation. That is, if A imports B, and B imports C, C and B are loaded and evaluated before A.
  • Deduplication of dependencies by URL. Each import is downloaded and evaluated only once, even if imported multiple times.
  • Native HTML parsing.

Also, moving to npm will make Polymer packages seamlessly available to the millions of npm users, and allow Polymer packages to easily use other packages from the massive npm ecosystem. 

Learn more at official website

What is Vim.Wasm?

Small introduction to Vim port to WebAssembly with screenshot and developer notes
16 July 2018   90

Vim.wasm is experimental fork of Vim editor to compile it into WebAssembly using emscripten and binaryen.

Developer added some notices:

  • Please access from a desktop browser (Chrome/Firefox/Safari/Edge). Safari seems the best on macOS.
  • Please avoid mobile networks. Your browser will fetch some large files (up to 2.5MB).
  • vim.wasm takes key inputs from DOM keydown event. Please disable your browser extensions which affect key inputs (incognito mode would be the best).
  • This project is very early phase of experiment. Currently only tiny features are supported. More features will be implemented (please see TODO section). And you may notice soon on trying it... it's buggy :)
  • If inputting something does not change anything, please try to click somewhere in the page. Vim may have lost the focus.

The goal of this project is running Vim editor on browser by compiling Vim C sources into WebAssembly. 

Vim.wasm screenshot
Vim.wasm screenshot 

WebAssembly frontend for Vim is implemented as a new GUI frontend. C sources are compiled to each LLVM bitcode files and then they are linked to one bitcode file vim.bc by emccemcc finally compiles the vim.bc into vim.wasm binary using binaryen and generates HTML/JavaScript runtime.

You can find more info at GitHub.