hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Tuesday, 20 October, 2020 UTC

WebAssembly shell with a real filesystem access in a browser

I've built and open-sourced a new thing - WebAssembly shell with a real filesystem access in a browser. It's powered by WebAssembly, WASI, Asyncify and File System Access API, and, I believe, shows just how powerful Web can be today when its different ... more


Monday, 4 March, 2019 UTC

Building fast interpreters in Rust

This is a cross-post that was originally published in the CloudFlare blog In the previous post we described the Firewall Rules architecture and how the different components are integrated together. We also mentioned that we created a configurable Rust ... more


Monday, 30 April, 2018 UTC

Simple pattern matching for ES6

View on GitHub Simple pattern matching for ES6 (no transpilation!) Property matching const { match } = require('xmatch'); match(obj, [ ({ x }) => console.log('x', x), ({ y }) => console.log('y', y), ({ z }) => console.log('z', z), // Exhaustive ... more


Saturday, 3 June, 2017 UTC

Parsing JavaScript using SpiderMonkey from Rust

View on GitHub SpiderMonkey AST is largely compatible with ESTree, and can be made fully compatible by overriding AST builders via options. Additionally, SpiderMonkey, unlike all the other JavaScript engines, exposes its parser via a public API - Reflect.parse ... more


Wednesday, 10 May, 2017 UTC

Reducing test cases for JavaScript tooling

At some point, I've performed testing of one Go-based streaming JavaScript minifier for compatibility with real-world code. I've decided to run it against CDNjs repo (https://cdnjs.com/libraries) as a source of all the possible popular libraries, which ... more


Saturday, 6 May, 2017 UTC

Emscripten + Rust: how to interop with real JavaScript

My slides from RustFest 2017: Rust ⇋ JavaScript from Ingvar Stepanyan ... more


Friday, 30 September, 2016 UTC

How we brought HTTPS Everywhere to the cloud (part 1)

This is a cross-post that was originally published in the CloudFlare blog CloudFlare's mission is to make HTTPS accessible for all our customers. It provides security for their websites, improved ranking on search engines, better performance with HTTP/2, ... more


Tuesday, 19 April, 2016 UTC

Tabs vs spaces: the ultimate argument

Did you know that using specific code style can affect your JavaScript performance? Gave a 1.5x performance boost in my case ;) That beautiful moment when you change indentation from spaces to tabs and your function suddenly becomes short enough to get ... more


Wednesday, 21 October, 2015 UTC

GOTOs in JavaScript are now possible

And I'm back with my crazy experiments. Currently I'm actively playing with Ragel - state machine compiler that generates highly optimized code for streaming lexers, scanners etc. in a set of languages (C, Java, Ruby, C#, ...). Unfortunately, it didn't ... more


Thursday, 13 August, 2015 UTC

ES6 modules are dead, long live C preprocessor!

Did you know you could use C preprocessor even for JavaScript files? (yes, it doesn't care about syntax that much) Say, we want to implement C-like "modules" (inclusions) in JavaScript. Create first file 1.js (filenames don't matter) like this: ... more


Sunday, 9 August, 2015 UTC

ECMAScript Syntax Graph

Ever wondered how ECMAScript syntax spec would look like if represented as a graph? Wonder no more - I just built one for fun! Here it is in SVG: If your browser doesn't support SVG, you can view PNG version instead ( but be careful on metered connections ... more


Saturday, 8 August, 2015 UTC

ECMAScript decorators on functions

This one particular question is being often raised around the usage of the new ECMAScript decorators proposal: why can't I use it for regular function declarations? Well, the answer is simple: hoisting :( Since JS hoists up function declarations, those ... more


Sunday, 12 July, 2015 UTC

Started work on ES6 -> asm.js conversion

View on GitHub I know this sounds crazy, but I always wondered why do we always give out such a speedup technique as asm.js (it speeds up code in all the modern browsers!) to developers from other languages if we can use it for own code in JavaScript ... more


Saturday, 16 May, 2015 UTC

[Potentially ES7] function bind syntax in Babel

View original post Babel 5.4 was just released and with it comes support for a new experimental ES7 syntax proposed by Kevin Smith (@zenparsing) and implemented in Babel by Ingvar Stepanyan (@RReverser). Warning: This syntax is highly experimental and ... more


Sunday, 8 February, 2015 UTC

Tail recursion and 6to5

Just added tail call optimization to 6to5, so it became the first ES6 implementation across all the browsers and transpilers to have this feature: Unfortunately, generic tail call optimization is still too complex thing as for transpiler level and it ... more


Friday, 17 October, 2014 UTC

Gulp plugin for wrapping JavaScript code with source maps support

View on GitHub When using classic templating solutions (like Lo-Dash / Underscore templates / own regexps / etc.) for wrapping JavaScript code, you're manipulating code as strings under the hood, and so losing any inner structure and location information. ... more


Thursday, 28 August, 2014 UTC

aster

View on GitHub aster - AST-based code builder What's that aster is reactive builder specialized for code processing and transformations. It's built with debugging in mind and makes building JavaScript code more reliable and faster. You may want to check ... more


Monday, 4 August, 2014 UTC

Using Mozilla AST with UglifyJS

Hi there. I'm continuing my work on tools for manipulating SpiderMonkey AST - as creating new as well as improving existing ones. This time it was UglifyJS. It's great JavaScript minifier, but what always bothered me (and other developers) was incompatibility ... more


Tuesday, 29 July, 2014 UTC

Added ES6 support to Acorn

Worked on and added following ES6 features support to Acorn - small, fast JavaScript parser: Unicode Code Point Escape Sequences ( \u{ABCDEF} ). Numeric Literals (octal, binary). Arrow Functions. Spread Element. Classes. Destructuring assignments. Computed ... more


Sunday, 27 July, 2014 UTC

A few more words on Acorn-JSX

Initially this was part of my email response to Lou Husson after mentioning Acorn-JSX in Facebook React Community Round-up #20 and reaching me out, but decided that someone else might find it useful too. UPD (June 12, 2015) : Facebook deprecates own ... more