Instantly share code, notes, and snippets.


Unigine Valley Benchmark 1.0

Min FPS:
Max FPS:



OK, the amount of gotchas with unigine-superposition 1.0-6 benchmark is too damn high, which is a pity because it's awesome!!!

How to run Unigine Superposition Benchmark in ArchLinux

  • download the Linux (.run) version of Qt5.9, the latest version that works
  • make it executable chmod a+x
  • run it ./
  • skip the registration bit and when prompt about what to install, check Qt5.9 too (top checkbox) and don't change the default path (or do it and adjust following commands). You migt try to not install the tools and see how that goes.
  • use yaourt or pakku / pamac to install pakku -S --needed unigine-superposition and I suggest you do that after a sudo mount -o remount,size=20G,noatime /tmp. If it ends with an error, just sudo pacman -U the-big-tar-file-in-tmp
  • remove the Qt folder inside the unigine-superpos
View rel.js
/*! (c) Andrea Giammarchi - ISC */
const Rel = typeof Map === 'undefined' ?
function () {
const k = [], v = [];
return {
has: value => -1 < k.indexOf(value),
get: value => v[k.indexOf(value)],
set: value => {
const i = k.indexOf(value);
v[i < 0 ? (k.push(value) - 1) : i] = value;

How is ESM in NodeJS able to run any eecutable file as ES2015+ file ?

Example for a generic meta-url file:

#!/usr/bin/env node

View levenshtein.js
// (c) 2018 Andrea Giammarchi
function levenshtein(from, to)
const fromLength = from.length + 1;
const toLength = to.length + 1;
const size = fromLength * toLength;
const grid = new Array(size);
let x = 0;
let y = 0;
let X = 0;

This is a personal reminder about few things I need to remember wheneve I install the most basic Gnome on ArchLinux.

Minimal Installation

bash <(curl -s

The list of installed packages is here.


Enable WSL

Search for Turn Windows features on or off and enable Windows Subsytem for Linux

Install Debian from Windows Store

Go to Windows Store and seach for Linux Debian

Install from it, and configure it for the first time.


Solving the "ESM in NodeJS" Odyssey.

After months of discussions in a dedicated group, it's clear to me NodeJS is still stuck in finding a way to deliver native ESM to its users.

The "usual few" won't hear anything different from .mjs, but .mjs has been demonstrated to be not a solution neither.

Following few cases not covered by .mjs:

  • evaluation of any string, via CLI, or on demand, where there is no extension
  • tools that convert their syntax into JS, since it always worked to date (thanks to transpilers, bundlers, and loaders)
View proxy.js
const proxy = (target, handler) => {
handler = typeof handler === 'object' ?
Object.create(handler) : new handler;
return (handler.proxy = new Proxy(target, handler));
View Promise.listeners.js
(function (wm) {'use strict';
// original proposal via Oliver Dunk @oliverdunk_ via ES ML
// (c) Andrea Giammarchi - (ISC)
addListeners: {
configurable: true,
value: function addListeners(resolve, reject) {
var once = wm.get(this);