Skip to content

Instantly share code, notes, and snippets.

View guest271314's full-sized avatar
💭
Fix WontFix

guest271314

💭
Fix WontFix
View GitHub Profile
@guest271314
guest271314 / promises-aplus-tests-jquery-3.0.0-pre.txt
Created April 14, 2016 17:08
promises-aplus-tests for jQuery-3.0.0-pre
Running "promises_aplus_tests" task
2.1.2.1: When fulfilled, a promise: must not transition to any other state.
✓ already-fulfilled
✓ immediately-fulfilled
✓ eventually-fulfilled
✓ trying to fulfill then immediately reject
✓ trying to fulfill then reject, delayed
✓ trying to fulfill immediately then reject delayed
@guest271314
guest271314 / javascript_engines_and_runtimes.md
Last active May 10, 2026 06:15
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@guest271314
guest271314 / shermes-wasi.md
Last active May 1, 2026 06:06
Compiling JavaScript to WASM with WASI support using Static Hermes
@guest271314
guest271314 / install_hosts.js
Last active April 27, 2026 02:43
WASM vs. WASM
import { webcrypto } from "node:crypto";
import { chmodSync, readFileSync, writeFileSync } from "node:fs";
import { exec } from "node:child_process";
const { dirname } = import.meta;
const encoder = new TextEncoder();
const decoder = new TextDecoder();
const args = process.argv.at(-1);
let runtime = "wasmtime";
if (args.startsWith("--runtime=")) {
@guest271314
guest271314 / nm_assemblyscript_wasip1_bytes.js
Last active March 12, 2026 04:49
Native Messaging with Uint8Array (non-JSON encoded)
//! nm_assemblyscript_wasip1_bytes.js
//! guest271314, 2-7-2026
//! Use case:
//! Native Messaging with Uint8Array (non-JSON encoded)
//! port.postMessage(new Uint8Array([255])) <=>
//! port.onMessage.addListener((message)=>console.log(message)//Uint8Array([255]))
//! https://issues.chromium.org/issues/40321352
//! https://issues.chromium.org/issues/40769448
//! Usage:
//! Run in browser DevTools or
@guest271314
guest271314 / compiling_standalone.md
Last active February 23, 2026 00:47
Compiling a standalone executable using modern JavaScript/TypeScript runtimes

Compiling a standalone executable using modern JavaScript/TypeScript runtimes

We have the same code working using node, deno, and bun.

E.g.,

bun run index.js
@guest271314
guest271314 / quico-bundle.js
Created February 1, 2026 20:29
quico bundled
// https://github.com/colocohen/quico
// node_modules/quico/h3_server.js
import dgram from "node:dgram";
import { createRequire as createRequire2 } from "node:module";
// node_modules/@noble/hashes/utils.js
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
function isBytes(a) {
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
}
@guest271314
guest271314 / nonsense.md
Created January 4, 2026 22:17
guest271314 vs. Gemini
@guest271314
guest271314 / sha1-uint8array.min.js
Last active December 25, 2025 23:58 — forked from robertrypula/web-socket-server.js
WebSocket - binary broadcast example (JavaScript runtime agnostic implementation without any dependency)
// deno bundle https://raw.githubusercontent.com/kawanet/sha1-uint8array/main/lib/sha1-uint8array.ts sha1-uint8array-bundle.js
// bun build --minify sha1-uint8array-bundle.js --outfile=sha1-uint8array.min.js
var z=function(t){if(t&&!w[t]&&!w[t.toLowerCase()])throw new Error("Digest method not supported");return new E},p=function(t,e,i,s){if(t===0)return e&i|~e&s;if(t===2)return e&i|e&s|i&s;return e^i^s},B=function(){return new Uint8Array(new Uint16Array([65279]).buffer)[0]===254},y=[1518500249|0,1859775393|0,2400959708|0,3395469782|0],w={sha1:1};class E{A=1732584193|0;B=4023233417|0;C=2562383102|0;D=271733878|0;E=3285377520|0;_byte;_word;_size=0;_sp=0;constructor(){if(!u||_>=8000)u=new ArrayBuffer(8000),_=0;this._byte=new Uint8Array(u,_,80),this._word=new Int32Array(u,_,20),_+=80}update(t){if(typeof t==="string")return this._utf8(t);if(t==null)throw new TypeError("Invalid type: "+typeof t);const{byteOffset:e,byteLength:i}=t;let s=i/64|0,r=0;if(s&&!(e&3)&&!(this._size%64)){const h=new Int32Array(t.buffer,e,s*1
@guest271314
guest271314 / harmony.md
Last active December 25, 2025 23:57
Why I use node, deno, bun, qjs, tjs at the same time

Why I use node, deno, bun, qjs, tjs at the same time.

Winds up being a (not the) rather comprehensive JavaScript toolbox. The idea being for the modern JavaScript programmer can use all of the tools available for a given requirement, task or job, without preference for any. No external bundlers or compilers are needed. No frameworks are needed. I can use qjs or tjs for systems with minimal RAM and disk space; and when I want to use Web API's deno makes an effort to provide those interfaces. In some cases I can run the exact same code in bun, deno, and node, which provides a means to perform 1:1 testing as to performance.

There's probably a few things I am unintentionally omitting below. These are just a brief synposis. I'll update accordingly.