Skip to content

Instantly share code, notes, and snippets.

@VictorTaelin
VictorTaelin / question.txt
Created May 6, 2025 21:55
Insanely hard prompt - question and answer
-- OldCheck:
-- (omitted)
# The Interaction Calculus
The [Interaction Calculus](https://github.com/VictorTaelin/Interaction-Calculus)
is a minimal term rewriting system inspired by the Lambda Calculus (λC), but
with some key differences:
1. Vars are affine: they can only occur up to one time.
2. Vars are global: they can occur anywhere in the program.
-- OldCheck:
-- (omitted)
# The Interaction Calculus
The [Interaction Calculus](https://github.com/VictorTaelin/Interaction-Calculus)
is a minimal term rewriting system inspired by the Lambda Calculus (λC), but
with some key differences:
1. Vars are affine: they can only occur up to one time.
2. Vars are global: they can occur anywhere in the program.
@jlia0
jlia0 / agent loop
Last active May 27, 2025 15:55
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
import { DurableObject } from "cloudflare:workers";
export class MyDurableObject extends DurableObject<Env> {
public sql: SqlStorage
constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env);
this.sql = ctx.storage.sql
}
@anglinb
anglinb / runAwaitingScopeClose.ts
Created February 28, 2025 21:38
Shows how to invoke a scoped effect in a cloudflare worker and return the result while keeping it alive for the scope to close.
import { Duration, Effect, Either, Scope, Cause } from 'effect';
// This function allows you call to a scoped effect, return the response
// then use the ctx.waitUntil api to ensure the worker continues
// to run until the scope is done closing. It handles, success,
// failures and defects.
const runAwaitingScopeClose =
<Input, S extends Response, E>(effect: (input: Input, env: Env, ctx: ExecutionContext) => Effect.Effect<S, E, Scope.Scope>) =>
(input: Input, env: Env, ctx: ExecutionContext): Promise<Response> => {
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active May 25, 2025 20:33
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@lucas-barake
lucas-barake / event-handler.ts
Last active May 4, 2025 11:11
How I Handle WebSockets in Web Apps
import { Effect, type Schema } from "effect";
export type EventHandler<A, I, X> = {
readonly channel: `/${string}/`;
readonly schema: Schema.Schema<A, I>;
readonly handle: (data: A) => Effect.Effect<void, X, never>;
};
export type InfallibleEventHandler<A, I> = {
[K in keyof EventHandler<A, I, never>]: EventHandler<A, I, never>[K];
@VictorTaelin
VictorTaelin / conversation_2024-08-28T19-40-20-814Z.md
Last active March 26, 2025 03:54
conversation_2024-08-28T19-40-20-814Z.txt

Refactoring Kind's switch with ChatSH

(This is a readable version of my ChatSH session. For the full log, click here.)

Taelin: Hello. We're going to refactor an aspect of the implementation of the Kind language. Are you ready? Start by doing 'ls', then 'cat kind-lang.cabal' to get familiar with the repo.

ChatSH: Certainly! I'm ready to help you refactor an aspect of the Kind language implementation. Let's start by examining the repository structure and the contents of the Cabal file.

ls &amp;&amp; echo "---" &amp;&amp; cat kind-lang.cabal
@madyanalj
madyanalj / config.ts
Created August 8, 2024 10:15
Effect RPC with Cloudflare Workers
import { Effect as E, Schema } from "@effect/schema"
import {
BooleanFromSelfOrString,
NonEmptyObject,
ObjectValue,
} from "@o/shared"
import { ConfigProvider, Context, Layer } from "effect"
const WorkerBinding = <T extends object>() =>
NonEmptyObject.pipe(
@Zafnok
Zafnok / LEARN.md
Last active April 18, 2025 23:12
Understanding how HVM works

Understanding how HVM works

Introduction

HVM takes the ideas of Interaction Combinators and combines it with the ideas of Type Systems, Functional Programming, and Compilers, to create an implementation of Yves Lafont's ideas into a highly parallelized runtime.

Resources

Start with the HVM whitepaper and HOW page of the repo, and if that makes sense to you, great! You're probably too smart for everything after. Otherwise, read into the next sections to develop the knowledge you're missing.

Intro to Lambda Calculus

Much of the Interaction Combinator papers are written with an audience presumed to be familiar with lambda calculus, so it is good to have some knowledge here before jumping into the Interaction Combinators section.

  • [Programming Languages](htt