Skip to content

Instantly share code, notes, and snippets.

View MendyBerger's full-sized avatar
💭
Don't even ask... 🤦

Mendy Berger MendyBerger

💭
Don't even ask... 🤦
View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active April 30, 2024 07:18
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯

Irreducible control flow in Wasm

This is a summary of current discussions, and a follow-up to our recent meetings, prompted by the issue here. Anyone who's been following along with the last few weeks of discussions and presentations might wish to skip directly to the follow-up part.

What is irreducible control flow?

Reducible control flow is the control flow directly representable through semi-structured control flow constructs (loops, conditionals, and break/continue). It can be characterised in terms of a property of the control flow graph that all loops are single-entry. For more details, see the diagram and "Reducibility" subsection here.

Irreducible control flow is roughly "everything else". For example, goto into the middle of a loop would result in irreducible

@lhorie
lhorie / longest-keyword-sequence.md
Last active November 14, 2022 23:21
What's the longest keyword sequence in Javascript?
@yurydelendik
yurydelendik / get_dwarf_info.py
Last active March 20, 2022 17:54
Extarct DWARF-like information from binary WASM
#!/usr/bin/env python
"""Utility to extract .debug_info section and print that in JSON format.
"""
import argparse
from collections import OrderedDict
import json
import logging
from math import ceil, log
import os
@binji
binji / CustomSectionTextFormat.md
Last active April 18, 2022 07:26
CustomSectionTextFormat.md

Custom sections in the text format

This page describes a proposal for representing custom sections in the text format.

Rationale

Currently it is impossible to round-trip a WebAssembly module between the binary and text formats without loss of information because there is no way to

@RickCogley
RickCogley / curl-to-matrix-text-readme.md
Last active February 25, 2024 01:45
Testing curl to matrix.org

Testing the matrix.org client-server API

Matrix is:

an open standard for decentralised communication, providing simple HTTP APIs and open source reference implementations for securely distributing and persisting JSON over an open federation of servers.

It's pretty fantastic, if you think on the massive problem of fragmentation all across the web. They've created an easy to use API, and you can do a kludgy test using curl from the terminal (*nix, mac, win). See: http://matrix.org/docs/howtos/client-server.html

It's pretty straightforward to do a quick test. I have an account at https://matrix.org / https://vector.im, so I used that to get a token.