With the advent of WebAssembly (home) there has never been a better time to learn Rust on top of your existing JavaScript and Node.js knowledge for high performance computing in the browser, on the server and on the edge.

Adding Rust to your tech stack on top of Node.js is a match made in heaven as Rust provides advanced support for WebAssembly and WebAssembly binary format is runnable in Node.js.

With this deep dive, you will get up and running using Rust. …


The Schwartzian transform is a technique used to improve the efficiency of sorting a list of items (Wikipedia).

You should use this algorithm when sorting based on comparison of the elements of an array.

We will use Typescript for type checking.

$ mkdir schwartzian-transform
$ cd schwartzian-transform
$ npm init -y
$ npx typescript --init
$ touch index.ts

Add the following scripts in the package.json file:

{
"name": "schwartzian-transform",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prestart": "tsc",
"start": "node index.js"
},
"keywords": [],
"author": "",
"license": "ISC"
}

Inside…


The promise of WebAssembly is an exciting one.

What is WebAssembly ?

WebAssembly is a virtual Instruction Set Architecture (ISA) for a stack machine. Generally, an ISA is a binary format designed to execute on a specific machine. However, WebAssembly is designed to run on a virtual machine, meaning it’s not designed for physical hardware.

The virtual machine allows WebAssembly to run on a variety of computer hardware and digital devices. The WebAssembly ISA was designed to be compact, portable, and secure, with small binary files to reduce download times when deployed as part of a web application.

It’s easy to port the bytecode…


A short overview on evolving in your career in software.

Big picture

As a software architect, you will need to:

  • Keep many different components in your mind instead of focusing on a single one
  • Have a rudimentary knowledge of how they all work together
  • focus on the picture, not the implementation details

Developers must understand one or a few components to a deep level of understanding. As an architect, you will need to understand many different components but at a higher level. …


Original post written by James Snell (many thanks to him)

Understanding the Node.js event loop is crucial for optimising Node.js performance.

Several years ago, I was called out by a customer to help them resolve some performance issues they were having in their Node.js application. They were experiencing massive event loop blocking issues in their server, getting a whole 5 requests per second — and, in one extreme case, an event loop delay of over one minute!

After reviewing some of the preliminary background details, the first question I asked them was simple: “Are you using Promises?” When they all looked at me and said “yes”, my immediate response, without even…


Original article written by Gabriele Tomassetti (many thanks to him)

This is an article similar to a previous one we wrote: Parsing in Java, so the introduction is the same. Skip to chapter 3 if you have already read it.

If you need to parse a language, or document, from JavaScript there are fundamentally three ways to solve the problem:

  • use an existing library supporting that specific language: for example a library to parse XML
  • building your own custom parser by hand
  • a tool or library to generate a parser: for example ANTLR, that you can use to build parsers…

Golang examples compared to Node.js

(original open source: https://github.com/miguelmota/golang-for-nodejs-developers — I added and modified a lot of examples for more context, conciseness and JS idiomaticness)
Will add WebAssembly examples — so keep coming back!

This guide full of examples is intended for people learning Go that are coming from Node.js, although the vice versa can work too. This is not meant to be a complete guide and it is assumed that you’ve gone through the Tour of Go tutorial. …

Florian GOTO

Still learning

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store