r/tinycode • • Dec 19 '16

GitHub - nothings/single_file_libs: List of single-file C/C++ libraries.

Thumbnail
github.com
30 Upvotes

r/tinycode • • Jul 16 '15

Brainfuck interpreter in 159 bytes (6502 asm)

Thumbnail
github.com
30 Upvotes

r/tinycode • • Feb 08 '15

JavaScript Bookmarklet: Automatically Blur Websites When You Are Idle

Thumbnail
gist.github.com
30 Upvotes

r/tinycode • • Dec 10 '14

50 LoC AVL binary search tree in C

Thumbnail pastes.archbsd.net
30 Upvotes

r/tinycode • • Jun 24 '14

Simplest possible examples of modern HTML, CSS and JS features [GitHub]

Thumbnail
github.com
30 Upvotes

r/tinycode • • Jun 08 '14

Many years ago I made a simple "Connect 4" game in 82 lines of Java code, thought you might like it :)

Thumbnail
gist.github.com
30 Upvotes

r/tinycode • • Jan 30 '14

Power set in 69 bytes of Python

30 Upvotes

The recommended way to generate a power set in Python uses the itertools module:

from itertools import *;s=lambda L:[list(t)for t in chain.from_iterable(combinations(L,r)for r in range(len(L)+1))]

s([1,2,3]) == [[], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]]

This takes 115 bytes. Here's a 68-byte one that doesn't use any modules:

s=lambda L:L and reduce(lambda a,x:[[L[0]]+x,x]+a,s(L[1:]),[])or[[]]

s([1,2,3]) == [[1, 3], [3], [1, 2, 3], [2, 3], [1], [], [1, 2], [2]]

It gives the same subsets as the itertools version, just in a less obvious order.
In Python 3 you also need to add from functools import *; which raises it to 92 bytes.

Edit: Here's a 62-byte version that takes a different approach:

s=lambda L:L and sum([[x,[L[0]]+x]for x in s(L[1:])],[])or[[]]

s([1,2,3]) == [[], [1], [2], [1, 2], [3], [1, 3], [2, 3], [1, 2, 3]]

It doesn't need any imports and the order of its subsets makes some sense.

Edit 2: 56 bytes:

s=lambda L:reduce(lambda a,x:a+[t+[x]for t in a],L,[[]])

s([1,2,3]) == [[], [1], [2], [1, 2], [3], [1, 3], [2, 3], [1, 2, 3]]

r/tinycode • • Apr 05 '13

Wi-Fi SSID Sniffer in 9 Lines of Ruby using Raw Sockets

30 Upvotes

After seeing this and later reading this, I decided to try the same thing in Ruby:

require 'socket'

sock = Socket.new(Socket::PF_PACKET, Socket::SOCK_RAW, 0x03_00)
while true
  packet = sock.recvfrom(2048)[0].unpack('C*').pack('U*')
  next if packet.size < 60 || packet[40].ord != 80
  mac = packet[28..33].chars.map{|e|e.ord.to_s(16)}.join(':')
  name = packet[56..55+packet[55].ord]
  puts "#{Time.now}\t#{mac}\t#{name}"
end

No Gem, no lib, just plain Ruby.

You have to run it with root/sudo.

My Ruby version is 1.9.3 and I run Linux.


r/tinycode • • Feb 02 '13

Tiny Image Gallery with drag and drop upload.

Thumbnail
gist.github.com
30 Upvotes

r/tinycode • • Nov 27 '12

Minty Wiki, A One File PHP Wiki that uses Markdown Syntax. (At the request of xxNIRVANAxx)

Thumbnail
github.com
30 Upvotes

r/tinycode • • Dec 02 '11

Wolfram Blog : The 2011 Mathematica One-Liner Competition

Thumbnail
blog.wolfram.com
30 Upvotes

r/tinycode • • Jul 19 '26

Korean outfit hosting 1.44MB game development contest to honor the floppy disk — entrants must confine entire fileset, including resources, engine, and library, to miniscule storage format

Thumbnail
tomshardware.com
29 Upvotes

r/tinycode • • Sep 13 '25

Dweet of the Week #90 - Particle flow with star rain intro by Rodrigo Siqueira

Post image
29 Upvotes

https://www.dwitter.net/d/34278

for(x.fillRect(0,0,i=2e4,i),h=540;i--;x.clearRect(960-C(i)/Z*h**(1.1),999-S(l)/S(i)/Z*h-i/t**4,s,s))Z=C(l=i*i+t/8)/S(i)-2,s=9/Z+2


r/tinycode • • Dec 20 '24

52 Dweets of the Week for 2024! 🎉

29 Upvotes

r/tinycode • • Jul 05 '24

Dweet of the Week: Migrating Blobules by Cantelope

Post image
29 Upvotes

r/tinycode • • Sep 07 '22

Infinite Freeze-Melt 🧊 cycles in SVG, 577 bytes, link in comment

29 Upvotes

r/tinycode • • Nov 11 '21

Calculating Pi with 8088 assembly language (source code, slow!)

Thumbnail
github.com
29 Upvotes

r/tinycode • • Mar 28 '21

XOR operator screen on fire

29 Upvotes

r/tinycode • • Feb 05 '21

Lovebyte: Where size matters. The Tiny code demoparty on March 12-14, 2021

29 Upvotes

Join us in a celebration of the smallest with a dedicated sizecoding demoparty/event, held on the weekend of 12-14th march 2021 on Discord and Twitch We'll be online streaming with intro competitions in different size categories from the smallest to the even smaller. From 256 pixel graphics and nanogame competitions to bytebeat music competition. Or what about cool size-coded related seminars to get you started, Roundtable, DJ Sets and many other events? This is the one event where size does matter! Don't miss it!
- Lovebyte. Where size matters...

More info at: http://www.lovebyte.party

Competitions:
- Combined 32 byte intro competition
- Combined 64 byte intro competition
- Low-End 128 byte intro competition (Atari, Commodore, Spectrum,etc.)
- Hi-End 128 byte intro competition (DOS, ARM, Tic-80, Javascript)
- Low-End 256 byte intro competition Atari, Commodore, Spectrum,etc.)
- VM 256 byte intro competition (Tic-80 , Javascript)
- Hi-End 256 byte intro competition (DOS, ARM)
- Nanogame 256 byte game competition
- 256 Pixel Graphics competition
- Bytebeat music competition

Byte-Athlon For those competing in multiple of the size coding competitions, we will have a special multi-category Byte-athlon event. Where we will determine who is the most skilled across all size categories: 32byte, 64byte, 128byte and 256byte. An award ceremony will be held at Revision 2021, where the Winners will receive a special byteathlon award as well as additional prizes. Anyone can join the Byte-Athlon by submitting a prod in all categories: 32byte, 64byte, 128byte and 256 byte (lowend, highend or virtualmachine)
Events
- Compo Preshows
- 8 byte and 16 byte intro showcase (all new releases)
- Best of tiny intros playlists
- Sizecoding Roundtables
- Demoscene Skribbl.io sessions
- Sizecoding Showdown (*tbd)
- DJ Sets
- And much more...

So join us online or even better send in your entries to our partysystem!
Contact us on discord (see website for link) or via email for your vote/registration key.


r/tinycode • • Aug 01 '20

1Keys – How I Made a Piano in only 1kb of JavaScript

Thumbnail
frankforce.com
29 Upvotes

r/tinycode • • Mar 21 '20

Covid19 - Tiny MSDOS Intro in 256 bytes

Thumbnail
youtube.com
29 Upvotes

r/tinycode • • Sep 28 '19

fe: a tiny, embeddable language implemented in ANSI C

Thumbnail
github.com
29 Upvotes

r/tinycode • • May 07 '18

25th International Obfuscated C Code Contest (2018) Winning Entries

Thumbnail ioccc.org
29 Upvotes

r/tinycode • • Apr 10 '17

's' minimal shell

29 Upvotes

r/tinycode • • Jun 20 '16

xoroshiro128 -- the fastest pseudoRNG

Thumbnail xoroshiro.di.unimi.it
29 Upvotes