I’ve oft thought JSX an under-utilized syntax. In the current day, JSX is
cruelly relegated to frontend component architectures. In my view, there’s much
to explore re using JSX as a way to represent other interesting things.
React is a library for declaratively specifying user interfaces. Jotai is a
complementary library for declaratively modeling state in a monadic way. When
these are used purposefully, what arises is a very sane MVC architecture built
with boring technology [1].
As part of my efforts on ts-unify , I
needed a way to represent ‘capturing’ and transforming values in a data
structure from one form to another. This article elucidates those extraction
semantics.
I’ve been playing with codemod transformations for TypeScript using
 jscodeshift (from Facebook) and
 ts-pattern . Working closely with
these has made me want a declarative type-aware codemod engine for TypeScript,
which I haven’t yet been able to find.
This interactive tool demonstrates a steganographic technique using Unicode variation selectors ( U+E0100 - U+E017F ) to encode hidden text within visible strings. By mapping ASCII characters to these invisible codepoints, messages can be embedded undetected - a potential vector for prompt injection attacks whereby LLMs may process hidden instructions.
The hkt-toolbelt library introduces kind reification - transforming abstract type-level functions into concrete runtime signatures. This enables point-free programming where compositions like Pipe<[Map<Inc>, Filter<IsEven>, Reduce<Add>]> become executable functions with 1:1 corresponding types. By bridging TypeScript’s type system with runtime code, we can write type-level pipelines that are…
Implementing the famous Collatz conjecture entirely within TypeScript’s type system, demonstrating type-level arithmetic and recursive computation. The sequence follows $n \rightarrow n/2$ if even, $n \rightarrow 3n+1$ if odd, conjecturing all positive integers reach 1. Using template literal types and conditional type recursion, we can compute Collatz<27> yielding the 111-step sequence…
This deep dive explores implementing mathematically-correct function composition with full type safety. We’ll build a compose function where compose<A, B, C>(f: B→C, g: A→B): A→C validates type compatibility at compile time, handle variadic arguments through recursive types, and ensure composed pipelines like compose(toString, Math.sqrt, parseInt) automatically infer as (s: string) => string…
Designing a type-safe plugin system in TypeScript that maintains strong typing guarantees while allowing extensible functionality. Using discriminated unions and generic constraints, we can build plugin architectures where registerPlugin<T extends Plugin>() enforces interface contracts at compile time. This approach enables dynamic feature extension while preserving full IDE support and preventing…
A performance-optimized, non-recursive implementation of a type-level array inclusion operator in TypeScript. By leveraging tuple spread syntax and conditional types instead of recursive patterns, we achieve Includes<[1, 2, 3], 2> evaluation in O(1) type instantiation depth rather than O(n). This technique improves compile-time performance for large tuple operations, avoiding TypeScript’s…
Implementing point-free (tacit) programming patterns in TypeScript using Higher Kinded Types to overcome traditional type system limitations. Point-free style eliminates explicit arguments, composing functions like pipe(map(inc), filter(isEven), reduce(add)) instead of x => x.map(inc).filter(isEven).reduce(add) . Through HKT encodings, we achieve true tacit programming where type inference flows…
Extending Higher Kinded Types with variadic composition patterns, enabling clean functional composition while preserving complete type information. Building on HKT foundations, this explores variadic compositions where Compose<[F, G, H, ...]> handles arbitrary function chains with full type inference. Using advanced tuple manipulation and distributive conditional types, we achieve compositions…
A comprehensive introduction to Higher Kinded Types in TypeScript, exploring how to encode and utilize these powerful abstractions from functional programming. HKTs enable type constructors that take other type constructors as arguments - imagine Functor<F> that works for any F<T> whether it’s Array<T> , Promise<T> , or Option<T> . Through encoding techniques using interface augmentation and…
Building composable type guard systems in TypeScript where runtime validation seamlessly integrates with compile-time type narrowing. Type guards like isString(x): x is string enable safe runtime checks, but composing them requires careful design. This explores combinators for union guards or(isNumber, isString): x is number | string , intersection guards and(hasName, hasAge): x is Person , and…
How many lambda calculus programs exist with exactly $N$ terms? This exploration dives into deep questions about computational complexity, from counting programs like (λx. x x) (λx. x x) to analyzing the non-computable BB(N) busy beaver function that grows faster than any computable sequence. We examine Chaitin’s constant $Ω$ and why determining program convergence connects to unsolved…
Using TypeScript’s asserts syntax to create imperative-style type mutations, moving beyond method chaining to more familiar iterative patterns for complex type operations.
Solving the classic string deduplication algorithm entirely within TypeScript’s type system using literal string types and recursive type manipulation.
TypeScript 4.1’s variadic tuple types enable building complex type-safe data structures through method chaining, where each operation expands the chain’s type signature at compile time.
TypeScript’s type predicates can modify the type of this itself, enabling self-modifying type behavior that approaches dependent types. By implementing is<K extends keyof ShapeTypes>(type: K): this is ShapeTypes[K] on abstract classes, we achieve compile-time type narrowing where shape.is('circle') transforms the shape variable’s type from Shape to Circle , unlocking properties like…
A functional TypeScript implementation of Dijkstra’s classic algorithm for parsing mathematical expressions, converting infix notation to reverse Polish notation for stack-based evaluation.
Attending the annual Slate Star Codex meetup in San Francisco’s Dolores Park, connecting with the rationalist community during my first summer in the Bay Area.
We explore a solution to finding Pythagorean triples with a product constraint, achieving O(√n) time complexity by reducing the problem to the well-known 3SUM problem.
Exploring methods to extract human-readable step-by-step solutions from Mathematica’s symbolic computation, addressing the black-box problem in automated mathematical derivation.
A JavaScript particle physics simulation using a quadtree spatial data structure to efficiently compute inter-particle forces, optimizing from O(n²) to near-linear complexity.
An interactive JavaScript simulation demonstrating the chaotic behavior of a double pendulum system, showcasing how small changes in initial conditions lead to dramatically different outcomes.
A fast O(n) heuristic for finding near-optimal oriented bounding boxes around point sets, using orthogonal linear regression to align rectangles with the natural orientation of the data.
An interactive demonstration of simple linear regression, showing how the least-squares method finds the best-fitting line through a set of data points by minimizing vertical distances.
An interactive visualization of quadratic Bézier curves, demonstrating how three control points define smooth parametric curves commonly used in computer graphics and design.
This is the blog of Alice Poteat. I’m a staff software engineer at volley - where I facilitate the dreams of our wonderful product team - and help unlock our shared vision for the future of “Netflix-style” interactive entertainment. 
 Among my current professional responsibilities are: 
 
 Coding. 
 Acting as technical project manager of various multi-team…