Skip to content

Instantly share code, notes, and snippets.

View darinkishore's full-sized avatar

Darin darinkishore

View GitHub Profile
@darinkishore
darinkishore / module.py
Last active February 11, 2026 01:15
peter thrill’s diabolical dialectic the module
“””
dspy.Dialectic v3 — Generic Hegelian dialectical reasoning module.
Works with ANY DSPy signature, like ChainOfThought or ReAct.
Follows the multi-signature orchestration pattern (Pattern 2 from DSPy architecture).
Usage:
# Works with any signature
dialectic = Dialectic(“question -> answer”)
dialectic = Dialectic(“question, context -> answer: int, confidence: float”)
@darinkishore
darinkishore / 00_overview.md
Created February 8, 2026 22:10
DSPy Module System: Complete Architecture Reference (for Rust rewrite)

DSPy Module System: Complete Architecture Reference

Written for the oxide Rust rewrite. Self-contained -- no DSPy source access required.

What DSPy Is (In One Paragraph)

DSPy is a framework for programming with language models where you declare what you want (via typed signatures), not how to prompt. The framework handles prompt construction, output parsing, and -- critically -- automatic optimization of prompts and few-shot examples. The module system is the backbone that makes all of this possible.

The Core Insight

@darinkishore
darinkishore / investigate.py
Created January 20, 2026 02:16
dspy rlm intro gist
import json
import os
from datetime import datetime
from pathlib import Path
import dspy
class AnalyzeAndUnderstand(dspy.Signature):
"""
@darinkishore
darinkishore / error_design.md
Created January 9, 2026 00:40
error design

Errors: The Other Half of the Map

Types tell one story: what success looks like.
Traits tell another: what capabilities exist and how they compose.

Errors are the missing half of the map: how those capabilities actually fail in the real world.

If types are the coordinates of valid states, errors are the geography of refusal:

@darinkishore
darinkishore / user-setup.sh
Created May 31, 2025 22:45
User Dev Setup - For Lambda/HPC clusters with existing user accounts
#!/bin/bash
# User Setup - For when you already have a user account (Lambda, etc)
# Just run this as your normal user, it'll use sudo when needed
set -e
echo "🚀 User Dev Setup - For existing accounts"
echo "========================================"
echo "Running as: $USER"
echo ""
@darinkishore
darinkishore / simple-setup.sh
Created May 31, 2025 22:41
Simple GPU Dev Setup - Just Essentials: developer user, Node.js via mise, Python with uv, Claude Code CLI, VSCode SSH compatibility
#!/bin/bash
# Simple GPU Dev Setup - Just the essentials, no BS
# Core: developer user, Node.js, Python/uv, Claude Code, VSCode SSH support
set -e
echo "🚀 Simple Dev Setup - Essentials Only"
echo "===================================="
# Must be root
@darinkishore
darinkishore / quick-setup-auto.sh
Last active May 31, 2025 22:13
Fully Automated GPU Development Environment Setup Script - No prompts, installs Fish, Helix, dev tools, Node.js 22, Python/uv, and Claude Code CLI
#!/bin/bash
# Ultimate setup script - fixes workspace permissions too
# Works in minimal containers and GPU platforms
set -e
echo "🚀 GPU Dev Environment Setup"
echo "============================"
echo ""
@darinkishore
darinkishore / quick-setup.sh
Created May 31, 2025 21:42
GPU Dev Environment Quick Setup - Master script that orchestrates complete development environment setup including tools, shells, and configurations
#!/bin/bash
# Master setup script that orchestrates the complete dev environment setup
# This runs all setup scripts in the correct order
set -e
echo "🚀 GPU Dev Environment Quick Setup"
echo "=================================="
echo ""
@darinkishore
darinkishore / container-setup.sh
Last active May 31, 2025 21:53
One-command setup script for SF Compute containers - installs dev tools, mise, uv, Node.js, and Claude Code
#!/bin/bash
# Robust setup script that works in minimal containers
# Works even without sudo pre-installed
set -e
echo "🚀 Starting dev environment setup..."
# First, ensure we're running as root
if [ "$EUID" -ne 0 ]; then
@darinkishore
darinkishore / gh-auth.sh
Created May 31, 2025 21:35
GitHub CLI authentication helper - provides interactive options for web browser or token-based authentication
#!/usr/bin/env bash
# Helper script to authenticate with GitHub CLI
set -euo pipefail
echo "GitHub CLI Authentication Helper"
echo "================================"
echo ""
echo "This will help you authenticate with GitHub to clone private repos."
echo ""