Skip to content

Instantly share code, notes, and snippets.

@RYSF13
RYSF13 / sig.c
Created January 17, 2026 01:40
My signature program
/*Robert*/R,y,a,n;main(z,t){for(y=-15;15/*[email protected]*/
>y++;puts(""))for(a=-60;a++<25;putchar(32+z))for(R=n=z=0;
z++<90&&R*R+n*n<1e4;R=t)t=(R*R-n*n)/50+a*2,n=R*n/25+y*4;}
@RYSF13
RYSF13 / snake.asm
Last active January 9, 2026 13:24
A fully functional Snake game written in GNU Assembler without libc
/* -------------------------------------------------------------------
PROGRAM: SNAKE (ASSEMBLY & ELF HACK)
TARGET: Linux (x86 32-bit)
AUTHOR: Robert Ryan(gh@RYSF13)
[COMPILE COMMAND]
as --32 snake.asm -o s.o && \
ld -m elf_i386 --oformat binary -Ttext 0x08048000 s.o -o snake && \
rm -f s.o && chmod +x snake && ./snake
------------------------------------------------------------------- */
@RYSF13
RYSF13 / r01hash.c
Created January 5, 2026 10:50
A simple custom 32-bit non-cryptographic hash function in C
// R01-hash
r01h(d,l)char*d;{int h=0x9E3779B1;for(i=0;i<l;i++)h=(h<<5)|(h>>27),h^=
d[i],h+=(h<<12)^(h>>22),h*=0xCC9E2D51;h^=h>>17;h*=0x1B873593;h^=h>>3;}
@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.