Skip to content

Instantly share code, notes, and snippets.

View sunny-g's full-sized avatar

Sunny Gonnabathula sunny-g

View GitHub Profile
@sunny-g
sunny-g / todays_refactor_kind2_sonnet.md
Created August 7, 2024 15:57 — forked from VictorTaelin/todays_refactor_kind2_sonnet.md
Today's Kind2 refactor by Sonnet 3.5 - 1 hour of work

good morning! I'd like to ask your help factoring some Kind2 files. it is a proof lang like the CoC, very minimal. I just want to change the style of global definitions. please cat the from_to.txt file I just wrote

Good morning! I'd be happy to help you with factoring your Kind2 files. Let's start by looking at the contents of the from_to.txt file you've written.

'''sh
cat from_to.txt
'''
# OLD STYLE:
@sunny-g
sunny-g / tt.hs
Created August 10, 2024 00:05 — forked from VictorTaelin/tt.hs
yet another...
import Control.Monad (forM_)
import Data.Char (chr, ord)
import Debug.Trace
import Prelude hiding (LT, GT, EQ)
import System.Environment (getArgs)
import System.Exit (exitFailure)
import Text.Parsec ((<|>))
import qualified Data.Map.Strict as M
import qualified Text.Parsec as P
@sunny-g
sunny-g / ulam.hoon
Created September 15, 2024 17:09 — forked from belisarius222/ulam.hoon
ulam -- self-describing hoon data structures
=>
|%
+$ ulam
$~ [%coin *coin]
:: leaves
::
$% [%coin =coin] :: atom, noun, or compound coin
[%path =pith] :: hoon path syntax
[%page =mark noun=*] :: %foo|bar, bar is coin blob
::
@sunny-g
sunny-g / spec.md
Created February 26, 2025 16:19 — forked from VictorTaelin/spec.md
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:

@sunny-g
sunny-g / ic.hs
Created March 11, 2025 12:39 — forked from VictorTaelin/ic.hs
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