Skip to content

Instantly share code, notes, and snippets.

View VictorTaelin's full-sized avatar

Victor Taelin VictorTaelin

View GitHub Profile
@VictorTaelin
VictorTaelin / ic.hs
Last active March 11, 2025 19:52
Minimal Interaction Calculus implementation in Haskell
import Control.Monad (when)
import Data.Char (chr, ord)
import Data.IORef
import Data.Word
import Debug.Trace
import System.IO.Unsafe (unsafePerformIO)
import Text.Parsec hiding (State)
import qualified Data.IntMap.Strict as IntMap
import qualified Data.Map as Map
import qualified Text.Parsec as Parsec
@VictorTaelin
VictorTaelin / claude_code_hvm_work.txt
Created March 5, 2025 02:18
Claude Code optimizes HVM3-Nano from 183 MIPS to 265 MIPS on Apple M3 // 217 MIPS to 328 MIPS on Apple M4
╭────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview! │
│ │
│ /help for help │
│ │
│ cwd: /Users/v/vic/dev/IC │
╰────────────────────────────────────────────╯
! cat InteractionCalculus.md

HOC - Thesis and Future Direction

At HOC, we believe Interaction Nets technology can lead to valuable market products. Two years ago, we raised $4 million to explore and validate this idea. During this period, we developed HVM and Bend—tools that significantly speed up functional and symbolic programs.

As we wrap up this research phase, we've identified the Symbolic AI market as our best opportunity. This market is rapidly growing, highly values computational efficiency, and aligns perfectly with HVM's strengths in

@VictorTaelin
VictorTaelin / hard_ai_debugging_prompt.txt
Last active March 1, 2025 23:03
Hard AI Debugging Prompt / SupTT Codebase
This is a debugging challenge.
Read the document below, and identify the bug.
---
# The Interaction Calculus
The Interaction Calculus (IC) is term rewriting system inspired by the Lambda
Calculus (λC), but with some major differences:
1. Vars are affine: they can only occur up to one time.
@VictorTaelin
VictorTaelin / spec.md
Created February 26, 2025 15:51
SupTT Spec

The Interaction Calculus

The Interaction Calculus (IC) is term rewriting system inspired by the Lambda Calculus (λC), but with some major differences:

  1. Vars are affine: they can only occur up to one time.
  2. Vars are global: they can occur anywhere in the program.
  3. There is a new core primitive: the superposition.

An IC term is defined by the following grammar:

@VictorTaelin
VictorTaelin / interaction_calculus.prompt
Last active March 7, 2025 02:49
Interaction Calculus .prompt
# The Interaction Calculus
The Interaction Calculus (IC) is term rewritting system inspired by the Lambda
Calculus (λC), but with some major differences:
1. Vars are affine: they can only occur up to one time.
2. Vars are global: they can occur anywhere in the program.
3. There is a new core primitive: the superposition.
An IC term is defined by the following grammar:
@VictorTaelin
VictorTaelin / another_fp_prompt.md
Last active February 26, 2025 03:05
yet another FP prompt

The Interaction Calculus

The Interaction Calculus (IC) is term rewriting system inspired by the Lambda Calculus (λC), but with some major differences:

  1. Vars are affine: they can only occur up to one time.
  2. Vars are global: they can occur anywhere in the program.
  3. There is a new core primitive: the superposition.

An IC term is defined by the following grammar:

@VictorTaelin
VictorTaelin / gist:befa5450e95d9126645b79e22acb2198
Created February 25, 2025 00:24
another challenging prompt
//./runtime.c//
//./reduce.hs//
# The Interaction Calculus
The Interaction Calculus (IC) is term rewritting system inspired by the Lambda
Calculus (λC), but with some major differences:
1. Vars are affine: they can only occur up to one time.
2. Vars are global: they can occur anywhere in the program.
3. There is a new core primitive: the superposition.
@VictorTaelin
VictorTaelin / prompt.txt
Created February 24, 2025 16:47
prompt to generate _test_.js
the current dir has the following files:
bench_cnots.hvml
bench_count.hs
bench_count.hvml
bench_sum_range.hs
bench_sum_range.hvml
bench_sum_range.js
bug_tmp
docs
@VictorTaelin
VictorTaelin / agi_moment_prompt.md
Created February 19, 2025 12:33
Another "AGI moment" prompt

Prompt

Create a λ-Term fold that, when applied to a Church nat N, a function F, an initial value X, and a Church N-Tuple, performs a right-fold over the N-tuple. In other words, create a generic fold<N,F,X,t> function for N-tuples. Example:

  • (fold λf.λx.(f x) F X λt(t 1)) == (F 1 X)
  • (fold λf.λx.(f (f x)) F X λt(t 1 2)) == (F 1 (F 2 X))
  • (fold λf.λx.(f (f (f x))) F X λt(t 1 2 3)) == (F 1 (F 2 (F 3 X)))

Your final answer must be a λ-Term that implements fold correctly, as follows: