Skip to content

Instantly share code, notes, and snippets.

View RYSF13's full-sized avatar

Robert Yates Stanford RYSF13

View GitHub Profile
@RYSF13
RYSF13 / qip.c
Created November 8, 2026 03:26
qIP - 'smaller' twIP in only 114 bytes
/* qIP - tiny IP stack that only responds to pings
Based on Adam Dunkels's twIP
//dunkels.com/adam/twip.html for more info
*/
s[35];main(){for(;;)read(0,s,140),s[2]>>8&255^1|s[5]-8<<16||(s[5]+=524280,s[3]^=s[4]^=s[3]^=s[4],write(1,s,140));}
@RYSF13
RYSF13 / bf.c
Created November 8, 2026 03:14
World's smallest brainf**k interpreter in C
// Well, it breaks Kang Seonghoon's record(160B).
// 150 Bytes(without whitespace).
// I'm still finding a smaller one.
c,*d,*r=&d+1;main(a,b){char*v=1[d=b];for(;c=*v++%93;)for(b=c%7?a?c&16?r+=c-
61:c&1?*r-=c-44:syscall(5-c%3,c&2,r,1):0,0:v;b&&c|a**r;)v=main(!c,&a);d=v;}

Keybase proof

I hereby claim:

  • I am RYSF13 on github.
  • I am rysf13 (https://keybase.io/rysf13) on keybase.
  • I have a public key ASAC34w3noakk0FkgvSuoWXyRGb5UsHtrnJM9w8NtR5OjAo

To claim this, I am signing this object:

echo '[q]sa[ln0=aln256%Pln256/snlbx]sb48167999393454964631655snlbxq'|dc
@RYSF13
RYSF13 / moon.c
Last active February 14, 2026 12:07
Hardcore Lunar Observatory - Real-time Astronomical Rendering Engine in C
/*
* Hardcore Lunar Observatory
* Algorithms: Meeus, ELP, VSOP
* Author: Rober Yates Stanford(gh@RYSF13)
*/
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string.h>
@RYSF13
RYSF13 / snake.asm
Last active February 14, 2026 12:05
A fully functional Snake game written in GNU Assembler without libc
/* -------------------------------------------------------------------
PROGRAM: SNAKE (ASSEMBLY & ELF HACK)
TARGET: Linux (x86 32-bit)
AUTHOR: Robert Y. Stanford(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
------------------------------------------------------------------- */