Skip to content

Instantly share code, notes, and snippets.

@subtleGradient
subtleGradient / hyperslice.SKILL.md
Last active January 9, 2026 01:30
Hyperslice Jr skill v0
name description
hyperslice
Technique for categorizing and organizing concepts along binary dimensions

some infinities are bigger than others, as are some kinds of "thing" gather examples, then gather slices, then organize slices

  1. gather a bunch of random specific things: {while pile of things is too small, add one more thing that is as different as possible to every other thing in the pile}
@subtleGradient
subtleGradient / vt-hig.pdf
Last active December 26, 2025 10:51
VT-HIG Cheat Sheet -- Virtual Terminal Human Interface Guidelines
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@subtleGradient
subtleGradient / thing-golf.SKILL.md
Last active January 9, 2026 01:35
Thing Golf v3.1 SKILL.md

Thing Golf v3.1 – Fear/Pain Aware PR Scoring (TS Monorepos)

Target: future AI/LLM selves with tools (git diff, FS, AST, config parsers). Domain: TypeScript monorepo PRs.


0. Core Idea

Don't measure lines or characters.

@subtleGradient
subtleGradient / FaxMachine.ts
Created October 2, 2025 21:52
FaxMachine.effect.ts
import {FileSystem, HttpClient} from '@effect/platform'
import {formData} from '@effect/platform/HttpBody'
import {Config} from 'effect'
import * as Console from 'effect/Console'
import * as Effect from 'effect/Effect'
const testFaxNumber = '+19898989898'
export class FaxMachine extends Effect.Service<FaxMachine>()('FaxMachine', {
accessors: true,
@subtleGradient
subtleGradient / AtomicComponent.ts
Last active January 3, 2026 13:42
Relay Effect component prop composition
import { Atom } from "@effect-atom/atom"
import * as AtomReact from "@effect-atom/atom-react"
import { type JSX, jsx } from "@effect-native/patterns/jsx-runtime"
import type * as Context from "effect/Context"
import { dual } from "effect/Function"
import * as Layer from "effect/Layer"
import type * as Types from "effect/Types"
export namespace AtomicComponent {
export interface FC<Props, E = never, R = never> {

Key Architectural Patterns

  1. Functional Pull-Oriented Dependency Injection - Every function receives dependencies through a deps parameter. No imports of other functions, no side effects in pure functions.

  2. Result Type Pattern - Functions that can fail return Result<T, E>. Functions that cannot fail return values directly.

  3. Deep Imports Only - No barrel files. Import directly from specific files: import {...} from '@tinkerbot/pure/git.ts'

  4. Workspace Protocol - Internal dependencies use workspace:* protocol in package.json

@subtleGradient
subtleGradient / Flarm.ts
Last active March 15, 2025 23:46
How should we name the Deps/Props type?
export type Flarm = {"some other kind of opaque object":true; [Symbol.dispose]():void}
export const Flarm = type({"'some other kind of opaque object'":'true'})
/*
https://gist.github.com/subtleGradient/e7cef476dee252c1529903cd2487f441
MooTools gang ✊
shamelessly stolen from Daniel Steigerwald's Evolu
then modified / extended by Tom Aylott
https://github.com/evoluhq/evolu-private/blob/main/packages/common/src/Result.ts
*/ /*
@subtleGradient
subtleGradient / FragmentSubscription.tsx
Last active January 25, 2025 19:11
RSC setState equivalent. Streaming server subscription re-renders via AsyncIterable ReactElements over the wire via RSC protocol and React 19
import "server-only"
import { StreamingFragment } from "@frens/reframe/Micro.ClientComponents"
import { ReactElement } from "react"
import { AsyncIterable$forEach } from "../etc/AsyncIterable$forEach"
import { MaybePromise, RenderQ } from "../types"
interface FragmentSubscriptionProps<Event> {
signal: AbortSignal
fallback?: ReactElement
@subtleGradient
subtleGradient / combine_files_to_markdown.ts
Created October 23, 2024 20:31
combine a bunch of files into a single markdown file to paste into an AI or whatever
#!/usr/bin/env -S bun
import { readdir } from "fs/promises"
// Function to read and format file content
async function readFileContent(filePath: string): Promise<string> {
const file = Bun.file(filePath)
const content = await file.text()
const extension = filePath.split(".").pop()
if (extension === "md" || extension === "mdx") return content.replace(/^(#+) /gm, "#$1 ") // increase heading levels by 1
const codeBlockSyntax = getSyntaxForExtension(extension)