This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { assert } from "./utils.js"; | |
| type Awaitable = unknown; | |
| export class Fusser { | |
| buffer: Uint32Array; | |
| init: () => Awaitable; | |
| action: (v: number) => Awaitable; | |
| private canceled: boolean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createWriteStream } from "node:fs"; | |
| import { access, readFile } from "node:fs/promises"; | |
| import { tmpdir } from "node:os"; | |
| import { isAbsolute, join, relative } from "node:path"; | |
| import { pipeline } from "node:stream/promises"; | |
| import * as esbuild from "esbuild"; | |
| import { componentNew, transpile } from "@bytecodealliance/jco"; | |
| const WASI_ADAPTER_URL = "https://github.com/bytecodealliance/wasmtime/releases/download/v36.0.2/wasi_snapshot_preview1.command.wasm"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Any, Dict, Generic, List, Type, TypeVar | |
| import ntcore | |
| import wpilib | |
| import wpiutil.log | |
| nt = ntcore.NetworkTableInstance.getDefault() | |
| T = TypeVar("T") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * DOM utilities to ease the pain of document.createElement. | |
| */ | |
| type NonNull<T> = T extends null ? never : T; | |
| type CopyNullable<Src, Dst> = Src extends null ? Dst | null : NonNull<Dst>; | |
| type Falsy = null | undefined | false; | |
| /** | |
| * A slightly relaxed Node type for my DOM utilities. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Stopwatch { | |
| constructor(name, silent = false) { | |
| this.silent = silent; | |
| this.samples = []; | |
| this.reset(name); | |
| } | |
| reset(name) { | |
| this.name = name; | |
| this.last = performance.now(); |
OlderNewer