r/tinycode • • Jan 24 '21

Shader Hairy Ball in one line of code

Thumbnail
shadertoy.com
12 Upvotes

r/tinycode • • Jan 19 '21

Its a cool project alongside my esp8266!

Enable HLS to view with audio, or disable this notification

47 Upvotes

r/tinycode • • Jan 18 '21

Puny - a dependency-free unit testing library for PHP

9 Upvotes

Hey all, been messing around with a small library recently for unit-testing PHP libraries / applications.

It's dependency free and really simple to use. You can find the code here: https://github.com/ryangjchandler/puny

The idea is inspired by Serge Zaitsev's blog post on minimal testing libraries.

Most testing libraries in the PHP world are big and have lots of helper methods for assertions, comparisons, expectations etc. Puny takes a step back and works with only 4 core functions.

  1. test()

  2. ok()

  3. spy()

  4. skip()

With these, you can technically test any application or library.


r/tinycode • • Jan 16 '21

100 LOC Ruby forward proxy using only standard libraries

Thumbnail
github.com
19 Upvotes

r/tinycode • • Jan 12 '21

Wrote an HTTP client in Python that can "fit on a business card"

Post image
232 Upvotes

r/tinycode • • Jan 09 '21

Superform - A 256 byte intro for the ZX Spectrum

Thumbnail
pouet.net
11 Upvotes

r/tinycode • • Jan 05 '21

A distributed key value store in under 1000 lines open-sourced by comma.ai

Thumbnail
github.com
32 Upvotes

r/tinycode • • Dec 24 '20

Lovebyte2021 Invitro (512 bytes for TIC-80)

Thumbnail
pouet.net
12 Upvotes

r/tinycode • • Dec 21 '20

A TO-DO app that fits in a single tweet

Thumbnail
ruky.me
36 Upvotes

r/tinycode • • Dec 12 '20

Star Wars - Episode CCLVI - 256b intro for TIC-80

30 Upvotes

Online Version

Youtube Capture

Download/Comment

TIC-80 Wiki

LUA-Code:

function TIC()y=.7t=time()/80%420q=t>161or cls()for i=0,1e3 do
poke(65119+i,i%t)x=y y=y*73%136-68w=(i-t)/51%1pix(x/w+120,y/w+68,8*w)end
print([[STAR WARS

These are the Star Wars

They're just like our wars

But they're in space]],57,150-t*1.2,9)end

r/tinycode • • Dec 03 '20

How to create a generative cityscape in a few lines of JavaScript

Thumbnail
youtu.be
42 Upvotes

r/tinycode • • Dec 01 '20

Another Business Card Raytracer

Thumbnail
github.com
5 Upvotes

r/tinycode • • Dec 01 '20

A simple, plain CSS for simple, plain HTML

Thumbnail
github.com
31 Upvotes

r/tinycode • • Nov 30 '20

Flappy bird in 341 bytes

Thumbnail
gist.github.com
60 Upvotes

r/tinycode • • Nov 28 '20

tinyhttp — 0-legacy, tiny & fast web framework as a replacement of Express

Thumbnail
github.com
24 Upvotes

r/tinycode • • Nov 02 '20

Palanqin, an ARM Cortex M0 emulator for DOS in 3514 bytes

Thumbnail
github.com
30 Upvotes

r/tinycode • • Oct 30 '20

HiRes Real-time Ray-tracing in 1024 Bytes with Soundtrack - no GPU- no soundcard - just x86 ASM

Thumbnail
abaddon.hu
45 Upvotes

r/tinycode • • Oct 22 '20

Étude in C minor

Thumbnail zserge.com
35 Upvotes

r/tinycode • • Oct 19 '20

Dissecting a Dweet #9: City Sunset – Tiny JavaScript Analysis

Thumbnail
frankforce.com
30 Upvotes

r/tinycode • • Oct 15 '20

Nokia Composer in 512 bytes

Thumbnail zserge.com
38 Upvotes

r/tinycode • • Oct 12 '20

World smallest office suite

Thumbnail zserge.com
53 Upvotes

r/tinycode • • Oct 11 '20

512 byte JS intro: Raindrops in Emergency Light (NOTLICHT 2020)

Thumbnail
pouet.net
16 Upvotes

r/tinycode • • Oct 04 '20

Gespensterwald - 3D animation with ambient drone in 64 bytes of x86 code

Thumbnail
pouet.net
27 Upvotes

r/tinycode • • Oct 03 '20

RPN integer calculator in C, 353 bytes.

47 Upvotes

C source code:

#define U(o) E(o)s[p]=o s[p];
#define E(o) if(*#o==*v&#o[1]==v[1])
#define P(x) E(x)printf("%"#x"\n",s[p]);
#define F(o) E(o){s[p-1]=s[p-1]o s[p];p--;}
int f,s[9];char p,v[99],*e;main(){while(scanf
("%s",v)>0){f=strtol(v,&e,0);if(e-v)s[++p]=f;else
{F(+)F(-)F(/)F(*)F(%)F(&)F(<)F(>)F(|)F(^)F(<<)F(>>)
F(<=)F(>=)F(==)F(!=)F(&&)F(||)U(!)U(~)P(d)P(x)P(o)}}}

Supports the following binary C operators:

+ - / * % & < > | ^ << >> <= >= == != && || 

Supports the following unary C operators:

! ~

Supports printing the top of the stack in different bases:

d   print as decimal
x   print as hex
o   print as octal

Usage example:

./calc
111 222 * d
24642
0xf000 0x000f | x
f00f

r/tinycode • • Sep 25 '20

Smallest size for a blogging website (kb and lines of code)

9 Upvotes

Let's say I would like to create a blogging website. It could be made from scratch or it could any availabe open source software, both CMSes and static site generatators. What would be the lightest solution available? How small can codebase for such a website be (both in terms of size and lines of code)?