This file contains 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
I am attesting that this GitHub handle postspectacular is linked to the Tezos account tz1d4ThofujwwaWvxDQHF7VyJfaeR2ay3jhf for tzprofiles | |
sig:edsigtzC6ZGMWGVC7jWZBBe26iNdewHxc9oxJFq4b2mXo3nzovaoDW5b3V9wP6rVaQfDLVT7TS3vdBQiqMZaqsyxAbqDH1onUPP |
This file contains 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
[["adapt-dpi/src/index.ts","adjacency/src/bfs.ts","adjacency/src/binary.ts","adjacency/src/dfs.ts","adjacency/src/disjoint-set.ts","adjacency/src/mst.ts","adjacency/src/sparse.ts","api/src/api/assoc.ts","api/src/api/bind.ts","api/src/api/buffered.ts","api/src/api/clear.ts","api/src/api/compare.ts","api/src/api/contains.ts","api/src/api/copy.ts","api/src/api/deref.ts","api/src/api/dissoc.ts","api/src/api/enable.ts","api/src/api/equiv.ts","api/src/api/event.ts","api/src/api/fn.ts","api/src/api/get.ts","api/src/api/hash.ts","api/src/api/id.ts","api/src/api/indexed.ts","api/src/api/into.ts","api/src/api/keyval.ts","api/src/api/length.ts","api/src/api/meta.ts","api/src/api/object.ts","api/src/api/path.ts","api/src/api/predicate.ts","api/src/api/range.ts","api/src/api/release.ts","api/src/api/reset.ts","api/src/api/seq.ts","api/src/api/set.ts","api/src/api/stack.ts","api/src/api/tuple.ts","api/src/api/typedarray.ts","api/src/api/watch.ts","api/src/assert.ts","api/src/constants.ts","api/src/decorators/configurable.t |
This file contains 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
// uses Math.exp() approximation from: | |
// https://www.musicdsp.org/en/latest/Other/222-fast-exp-approximations.html | |
// @ts-ignore: decorator | |
@inline | |
function fastexp9(x: f64): f64 { | |
// prettier-ignore | |
return (362880+x*(362880+x*(181440+x*(60480+x*(15120+x*(3024+x*(504+x*(72+x*(9+x)))))))))*2.75573192e-6; | |
} |
This file contains 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 { bench } from "@thi.ng/bench"; | |
import { map, range } from "@thi.ng/transducers"; | |
export class Vec2 { | |
buf: Float32Array; | |
constructor(buf: ArrayBuffer, off: number) { | |
this.buf = new Float32Array(buf, off, 2); | |
} |
This file contains 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
function tokenizeSexpr(src) { | |
let curr = ""; | |
const scopes = [[]]; | |
const $word = () => { | |
if (curr) { | |
scopes[scopes.length - 1].push(curr); | |
curr = ""; | |
} | |
}; | |
for(let i = 0; i < src.length; i++) { |
This file contains 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 { | |
area, | |
centroid, | |
clipConvex, | |
convexHull, | |
points, | |
polygon, | |
rect, | |
scatter, | |
withAttribs |
This file contains 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
// // // // | |
// ///// // //// // //// ///// //// ///// ////// | |
// // ///// // ///// // // // // ////// // // // | |
// //// // // ///// // // ////// // ///// //// // | |
// // // // // // // // // // // // // // | |
// ///// // // ///// ///// //// // ///// ///// /// | |
// | |
// Head over to thi.ng/shader-ast for more details | |
const ast = require("@thi.ng/shader-ast"); |
This file contains 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
// deform code | |
vector4 planes[] = point(1, "planes", @id); | |
foreach(vector4 plane; planes) { | |
vector n = set(plane.x, plane.y, plane.z); | |
float d = dot(n, @P) + plane.w; | |
// check if point is "above" intersection plane | |
// since the plane normal always points away from each sphere's center | |
// this will select all points intersecting a neighbor sphere | |
if (d > 0) { |
This file contains 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 { DisjointSet } from "@thi.ng/adjacency"; | |
import { cosineColor, GRADIENTS } from "@thi.ng/color"; | |
import { identity, partial } from "@thi.ng/compose"; | |
import { serialize } from "@thi.ng/hiccup"; | |
import { rect, svg, text } from "@thi.ng/hiccup-svg"; | |
import { fitClamped, wrap } from "@thi.ng/math"; | |
import { IRandom, Smush32 } from "@thi.ng/random"; | |
import { | |
buildKernel2d, | |
comp, |
This file contains 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
const tx = require("@thi.ng/transducers"); | |
const txb = require("@thi.ng/transducers-binary"); | |
// ANSI clear screen esc seq | |
const CLEAR = "\x1b[2J\x1b[;H"; | |
// CA dimensions | |
const WIDTH = 72; | |
const HEIGHT = 24; |