Skip to content

Instantly share code, notes, and snippets.

@RYSF13
RYSF13 / sqrt2.c
Created November 30, 2025 05:21
Calculate sqrt(2) to 2333 digits(use spigot)
a=1e3,b,c=1413,d,f[1414],n=800,k;main(){for(;b<c;
f[b++]=14);for(;n--;d+=*f*a,printf("%02d",d/a),*f
=d%a)for(d=0,k=c;--k;d/=b,d*=2*k-1)f[k]=(d+=f[k]*
a)%(b=100*k);}/* √2 2333 digits - Robert Ryan */
@RYSF13
RYSF13 / catch.c
Last active November 30, 2025 05:18
Catch me, if you can
main(){while(!fork())printf("Catch me if you can!"),sleep(1);}

λ-Complete

Introduction

In mathematical logic, the lambda calculus (also written as $\lambda-Calculus$) is a formal system for expressing computation based on function abstraction and application using variable binding and substitution.

lλbmdλ cλlculus?

λ-calculus consists of constructing lambda terms and performing reduction operations on them. A term is defined as any valid lambda calculus expression. In the simplest form of lambda calculus, terms are built using only the rules below.

This is just about the untyped λ-calculus.

Expressions

$x$: A variable is a character or string representing a parameter.