Skip to content

Instantly share code, notes, and snippets.

@7etsuo
7etsuo / agenc_new.md
Created March 11, 2026 08:46
agenc_new.md

REFACTOR v5 — AgenC Modular Runtime Architecture

OS-inspired layered architecture. Thin kernel, typed contracts, everything is a plugin.

v5 — Ground-up redesign based on deep research into OS kernels (Linux LKM, seL4, QNX), plugin systems (VS Code, webpack Tapable, Grafana, Home Assistant), agent frameworks (LangGraph, OpenAI Agents SDK, Anthropic Agent SDK, AgentForge, Auton), and full coupling analysis of the actual codebase.


1. What's Wrong with v4

@7etsuo
7etsuo / chat.md
Created March 10, 2026 09:17
AgenC - Chat d0xum3n7

CHAT

Recommendation

The best research-backed fit for AgenC is:

An AgenC-owned, XMTP-style messaging network built around MLS for E2EE small-group communication, signed broadcast channels for large/public fanout, a federated relay/blob layer for transport and storage, and on-chain anchors/settlement for trust-critical events.

In practice, that means:

@7etsuo
7etsuo / deflate.c
Created January 9, 2026 15:12
deflate.c
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_BITS 15
#define MAX_LIT_CODES 288 /* Literal/length alphabet */
#define MAX_DIST_CODES 32 /* Distance alphabet */
/* Length codes: symbol 257-285 map to lengths 3-258 */
@7etsuo
7etsuo / mario.c
Created November 20, 2025 07:51
ASCII Marico
/**
* ASCII Mario Ultimate Scroller - A terminal-based side-scrolling platformer
* Built by Tetsuo and Grok 4.1!
*/
#define _POSIX_C_SOURCE 200809L
#include <ncurses.h>
#include <signal.h>
#include <stdbool.h>
@7etsuo
7etsuo / Except.c
Created October 26, 2025 08:28
custom exception handler in C using setjmp/longjmp
//// Except.h
#ifndef EXCEPT_INCLUDED
#define EXCEPT_INCLUDED
#include <setjmp.h>
#define T Except_T
typedef struct T { const char *reason; } T;
@7etsuo
7etsuo / mutex.c
Created October 13, 2025 09:45
90% of the time, I see people using volatile when they actually need a mutex.
#define _GNU_SOURCE
#include <errno.h>
#include <inttypes.h>
#include <locale.h>
#include <pthread.h>
#include <sched.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
@7etsuo
7etsuo / wan.md
Created September 23, 2025 02:56
Wan2.2-Animate in ComfyUI

System Prompt for AI Coding Agent: Ultra-Detailed Local Setup for Wan2.2-Animate in ComfyUI (Full Implementation with File Writes)

You are Dr. Akira Tanaka, a world-renowned AI systems architect and former lead engineer at NVIDIA's AI Labs, with 20+ years specializing in diffusion-based video generation pipelines, ComfyUI custom node development, and high-performance GPU optimization for enterprise-scale inference. You have personally optimized models like Stable Video Diffusion and AnimateDiff for Blackwell architectures, achieving 3x throughput gains via torch.compile and BF16 tensor cores. Your code is always production-ready: modular, commented, idempotent (safe to rerun with checks like if [ ! -d dir ]; then mkdir -p dir; fi; git pull if exists), and includes verbose logging for debugging (e.g., echo "[$(date)] INFO/ERROR: msg" >> LOG with levels). You NEVER hallucinate paths, filenames, or commands—stick strictly to verified details provided below. You have NO internet access, so ALL external resou

Level 4 - APOCALYPTIC Mode

You are a ruthless, unyielding photo critic in APOCALYPTIC mode, engineered to deliver savage, near-vulgar roasts that obliterate selfies for peak entertainment. Your core directive: Analyze the selfie with brutal precision, assign a merciless score, and unleash a gut-punching roast that's uniquely devastating.

Step-by-Step Reasoning Process (Chain-of-Thought):

  1. Age Check: First, evaluate if the person appears under 16 years old based on visual cues like facial features, body proportions, and context. If yes, halt and output ONLY the safe response. If no, proceed.
  2. Photo Analysis: Break down the selfie element-by-element:
    • Lighting: Identify disasters like harsh shadows, overexposure, or dim murkiness.
    • Composition: Spot chaos such as off-center framing, cluttered backgrounds, or awkward cropping.
  • Angles: Critique hideous choices like unflattering tilts or distorting perspectives.
@7etsuo
7etsuo / echos.c
Created August 1, 2025 12:38
echos.c
#include <math.h>
#include <raylib.h>
#include <raymath.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 720
@7etsuo
7etsuo / main.c
Created July 18, 2025 07:23
Turing-complete Scheme interpreter in C that supports lexical scoping, closures, continuations, and proper tail-call for tail recursion without stack growth.
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
typedef struct Obj *Obj;
typedef struct Kont *Kont;
enum Type { T_PAIR, T_SYMBOL, T_NUMBER, T_BOOLEAN, T_PRIMITIVE, T_CLOSURE, T_CONTINUATION };