Projects

Filter by tag:

Filter by language:

Sort by complexity:

Separatrix

C++ & Python
systemsresearchtools

Structural testing framework for C/C++ codebases that localizes faults by scoring how much small input perturbations make control flow diverge, rather than by counting coverage. An LLVM instrumentation pass compiles targets to a behavioral graph (nodes are functions and basic blocks, edges carry branch conditions and source locations) and injects a runtime that records per-edge traversal counts into bucketed multisets. A chaos engine generates perturbations and a divergence detector diffs each node's outgoing-edge profile against baseline to produce a sensitivity map. The core mechanism is divergence localization: crediting every node whose profile diverges across the full corpus, not just the first bifurcation point, which collapses to near-chance on staged bugs. Validated on Magma fault benchmarks across three targets forming an alignment continuum: lua, where SBFL is inapplicable because debug-subsystem bugs don't surface in observable output, achieves region-level AUC 0.97 vs coverage 0.89 on a bug-blind corpus; sqlite3 shows divergence still beating coverage (0.61 vs 0.47) under weak corpus-fault coupling; md4c is the misaligned pole where input variation concentrates on a bug-irrelevant hot loop, matching SBFL rank at top 2% but not beating it.

Agentc

Rust & Python
AIsystemstools

JIT optimization runtime that intercepts LLM API calls in multi-step agent pipelines and reduces token spend without touching application code. Ships three components: a profiler that monkey-patches provider clients at import time, capturing every inference call (full prompt/response, token counts, latency, model, cost) into a structured SQLite trace with OTel gen_ai.* semantic conventions and five waste detectors that surface dollar-denominated savings estimates; a semantic memoization layer using exact-hash lookup on the hot path and LSH over 256-dimensional embeddings as a secondary tier for semantically-similar prompts; and a JIT optimizer that applies cost-ranked rewrite rules (ContextCompress, ParallelBranch, ModelDowngrade, StateDrop) only after accumulating enough observations on hot call sites, with shadow-mode sampling at 2% providing ground-truth divergence to enforce per-rule accuracy budgets. Cold calls pass through unchanged; optimization engages only when the empirical cost model has real data to rank proposals. Rust core with PyO3 bindings handles trace ingestion and embedding capture; the profiler's redundant-call detector guides promotion of high-repetition sites into the memoization layer.

tbjit-alloc

C++ & Python
systemsresearch

A JIT specializing memory allocator that interposes on malloc/free via LD_PRELOAD and compiles per-call-site allocation routines at runtime. Each call site is identified by a hashed return address; a runtime profiler accumulates per-site histograms of request sizes and object lifetimes into sparse fixed-capacity tables, and once a site crosses a heat threshold the JIT emits a specialized fast path tuned to its observed behavior, picking among strategies like bump allocation and thread-local free lists. Memory is carved from 2 MiB segments backed by transparent hugepages, with a pagemap holding one bit per region to make free-path is_managed checks O(1) instead of a segment scan. A lifetime classifier tags sites Reap/Hold/Unknown to drive segment reclamation and a conditional-hugepage policy, while shadow-mode sampling continuously validates JIT'd paths against the generic allocator and deoptimizes on any divergence. Under realistic LD_PRELOAD deployment the interposition trampoline dominates and per-call latency lands at parity with glibc; the lifetime-aware THP policy cuts allocator RSS by up to 74% (41% end-to-end) on allocation-bound workloads where partially-filled segments would otherwise fault whole hugepages.

Cache Explorer

C++
systemstools

A full-stack cache profiling tool built on a custom LLVM instrumentation pass. Compiles C, C++, Rust, and Zig with injected memory tracing, runs the trace through a multi-core cache simulator with MESI coherence, TLB simulation, 3C miss classification, and prefetch modeling, and streams results to a Monaco-based web UI in real time. Hardware presets include Apple M-series, Intel Core, AMD Zen, and custom configurable hierarchies. Detects false sharing, supports selective instrumentation for large codebases, and sandboxes untrusted code via Docker.

loci

Rust & Python
systemsresearchtools

Local-first personal document search engine built on a custom retrieval stack rather than wrapping an existing index. A Rust daemon watches configured directories, extracts text (PDF, HTML, EPUB, DOCX, markdown), and serves queries over a Unix socket from a hand-built compressed inverted index: PForDelta posting lists with skip tables (plus a SIMD-BP128 codec benchmarked against it), BM25F field-weighted scoring, and document-at-a-time WAND early termination verified exact against exhaustive scoring, returning sub-millisecond top-k on a 20k-document corpus. The original piece is the temporal model: every query and open is logged, and per-directory forgetting curves are fitted by right-censored MLE with AIC selection across Weibull, log-normal, and Gompertz survival families (hierarchical Bayesian pooling via NumPyro offline), so ranking blends lexical relevance with how likely a document still matters to you. Includes a SPLADE-style learned sparse retrieval pipeline (PyTorch training to ONNX, custom CUDA sparse-MVM kernel with CPU fallback) and a keyboard-driven TUI that exposes the per-signal score breakdown.

glance

C++
systemstools

Terminal CSV inspection tool that avoids loading entire files into memory. Uses mmap for zero-copy file access with lazy parsing so only rows needed for display are actually parsed, combined with SIMD-accelerated newline counting (ARM NEON on Apple Silicon, SSE2 on x86-64) for fast row counting on unparsed data. Type inference samples the first 100 rows to classify columns as int64, float64, currency, date, bool, or enum, enabling numeric sorting and typed JSON export. Automatic delimiter detection scores candidates by field-count consistency. Includes SQL-like filtering, column selection, sorting, and multiple output formats. Interactive pager with vim keybindings, horizontal scrolling, and in-place search handles multi-million row files in under a second.

C++ Orderbook

C++
systemsfinance

High-frequency trading order matching engine achieving ~2M orders/second throughput. Single-threaded design with pre-allocated fixed-size memory pool eliminating all allocations in the hot path. Aggressive function inlining to maximize instruction cache hits, cache-line aligned data structures, and branch prediction hints ([[likely]] vs [[unlikely]]) on critical paths.

pulse

C++
toolsmisc

Concentrated habit tracking application based in the terminal. Pulse, as the name suggests, prompts the user everyday to record if they completed different tasks that they designated to be reminded of. By leveraging just two separate files and a mediator design pattern, the program spawns a small team of medical professionals to record habit progress, manage user configuration, and report results to the reader as requested. Meant to be unobtrusive yet robust and insightful, I use pulse daily to record habits I want to enforce for myself on a daily, weekly, and monthly scale.

Prediction Market Stat-Arb Bot

Python
financeAI

Real-time arbitrage detection across prediction markets using hybrid event matching. Leverages NLP via a two-phase approach with keyword filtering to pre-screen candidate pairs, then semantic similarity via sentence transformers (80%+ confidence) to identify equivalent events across platforms. Calculates net profit accounting for all fees (maker/taker, gas, bridge costs) and detects both standard and inverse arbitrage opportunities. Live terminal dashboard with Discord webhook alerts.

systems

Real-time packet analyzer built on raw sockets and libpcap. Implements protocol parsers for TCP, UDP, DNS, and HTTP/HTTPS (TLS handshake inspection only), with multi-threaded capture to handle high-throughput interfaces without packet drops. Provides bandwidth usage breakdowns, connection tracking, and protocol distribution analytics for debugging network behavior.

financeresearch

Quantitative trading research platform using statistical arbitrage and cointegration analysis for crypto pairs trading. Implements Johansen cointegration tests to identify mean-reverting pairs, Bayesian modeling for regime detection, and momentum tests for trend identification. Includes a backtesting engine to evaluate strategy performance across historical data.

Vinyl

Python & JavaScript
tools

macOS server that surfaces real-time Apple Music playback as a transparent OBS overlay. Queries the Music application directly via AppleScript through osascript, bypassing any API dependency to get exact playback position unavailable from external APIs. FastAPI backend serves a Jinja2-rendered HTML page that OBS ingests as a Browser Source. HTMX handles full widget refreshes on track changes while a client-side JS interval ticks the progress bar locally at a 1-second interval, with a lightweight sync fetch every three seconds reconciling against ground truth: handling pause, seek, and skip without a full page reload. Album artwork is fetched from the iTunes Search API, cached at ~/.cache/vinyl, and served with Cache-Control: no-store to force fresh loads on track change. Distributed as a launchd service via an install script that generates and registers a .plist, making it fire-and-forget after initial setup.

Claude Code FallbackPublished as an official package on PyPI

Python
AItools

Log-based monitor that detects Claude Code usage limits by parsing JSONL session logs and sends native OS notifications. Uses lightweight file watching instead of process wrapping, background threads for non-blocking log parsing, and shell function injection to enable seamless mode switching. Works in any terminal environment including tmux and SSH while keeping full user control over API fallback decisions. Published as an official package on PyPI.

ArXiv Search Tool

Python
researchtools

Research paper search using token-level Jaccard similarity to find conceptually related papers beyond keyword matching. Tokenizes abstracts, computes set intersection/union ratios, and ranks results by similarity score. Supports filtering by ArXiv category, date ranges, and author, with query parsing to handle complex boolean logic.

Daily News ReportThis was actually my first coding project outside of the classroom

Python
misc

Automated news digest that reads user-selected categories, calls an API for summaries, and uses an email service to send out daily reports on a cron schedule. My first project outside of the classroom.