Skip to content

Instantly share code, notes, and snippets.

View VictorTaelin's full-sized avatar

Victor Taelin VictorTaelin

View GitHub Profile
@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:

You're a code completion assistant.
###
--
module HVML.Type where
import Data.Map.Strict as MS
import Data.Word
import Foreign.Ptr
-- Core Types
@VictorTaelin
VictorTaelin / my_prompt.txt
Created January 21, 2025 23:56
my prompt
I'm going to share my research insights with you. The info below MIT-licensed.
First, some background information and context.
# The Interaction Calculus - An Introduction
The Interaction Calculus is very similar to the Lambda Calculus, except:
1. All variables are Affine (meaning they can't be occur more than once).
@VictorTaelin
VictorTaelin / hard_prompt.txt
Last active January 21, 2025 20:29
hard prompt
I'm going to share my research insights with you. The info below MIT-licensed.
First, some background information and context.
# The Interaction Calculus
The Interaction Calculus is very similar to the Lambda Calculus, except:
1. All variables are Affine (meaning they can't be occur more than once).
@VictorTaelin
VictorTaelin / equality_on_recursive_lambda_terms.md
Last active January 14, 2025 17:12
Equality on Recursive λ-Terms

A tricky problem in Type Theory has a short satisfactory solution. To check if two potentially recursive expressions are equal, first we take the weak head normal form of both sides, without unrolling fixed points. Then, we do:

(F . G) == (G . F)
------------------- Fix=Fix case: apply T6's Theorem
μk(F k) == μk(G k)

(F Y) == Y
------------- Fix=Val case: apply T6's Theorem
μk(F k) == Y
@VictorTaelin
VictorTaelin / hvm3_nail.txt
Last active December 30, 2024 17:27
HVM3 codebase - selecting chunks that need to be edited - "nail in haystack" eval
./Collapse.hs
#0:
module HVML.Collapse where
#1:
import Control.Monad (ap, forM, forM_)
import Control.Monad.IO.Class
import Data.Char (chr, ord)
import Data.IORef
import Data.Word
import GHC.Conc
@VictorTaelin
VictorTaelin / large_refactor_edit_flag_bounty.md
Last active January 24, 2025 17:49
New $10k Bounty - classify blocks that require edit in a 50K-token codebase refactor job

THE BOUNTY

Develop an AI tool that, given the current snapshot of HVM3's codebase and a refactor request, correctly assigns which chunks must be updated, in order to fulfill that request. The AI tool must use at most $1 to complete this task, while achieving a recall of at least 90% and a precision of at least 90%.

Input

  1. HVM3's chunked codebase snapshot (29-12-2024). (static, won't change)