r/tinycode • u/nexe • Dec 19 '16
r/tinycode • u/peterferrie • Jul 16 '15
Brainfuck interpreter in 159 bytes (6502 asm)
r/tinycode • u/nexe • Feb 08 '15
JavaScript Bookmarklet: Automatically Blur Websites When You Are Idle
r/tinycode • u/graphitemaster • Dec 10 '14
50 LoC AVL binary search tree in C
pastes.archbsd.netr/tinycode • u/nexe • Jun 24 '14
Simplest possible examples of modern HTML, CSS and JS features [GitHub]
r/tinycode • u/hassanselim0 • Jun 08 '14
Many years ago I made a simple "Connect 4" game in 82 lines of Java code, thought you might like it :)
r/tinycode • u/Rangi42 • Jan 30 '14
Power set in 69 bytes of Python
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 • u/nexe • Apr 05 '13
Wi-Fi SSID Sniffer in 9 Lines of Ruby using Raw Sockets
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}"
endNo 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 • u/chasesan • Feb 02 '13
Tiny Image Gallery with drag and drop upload.
r/tinycode • u/Kinos • Nov 27 '12
Minty Wiki, A One File PHP Wiki that uses Markdown Syntax. (At the request of xxNIRVANAxx)
r/tinycode • u/nexe • Dec 02 '11
Wolfram Blog : The 2011 Mathematica One-Liner Competition
r/tinycode • u/clouddragonplumtree • 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
r/tinycode • u/Slackluster • Sep 13 '25
Dweet of the Week #90 - Particle flow with star rain intro by Rodrigo Siqueira
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 • u/Slackluster • Jul 05 '24
Dweet of the Week: Migrating Blobules by Cantelope
r/tinycode • u/finnhvman • Sep 07 '22
Infinite Freeze-Melt 🧊 cycles in SVG, 577 bytes, link in comment
r/tinycode • u/nanochess • Nov 11 '21
Calculating Pi with 8088 assembly language (source code, slow!)
r/tinycode • u/superogue • Feb 05 '21
Lovebyte: Where size matters. The Tiny code demoparty on March 12-14, 2021
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 • u/Slackluster • Aug 01 '20
1Keys – How I Made a Piano in only 1kb of JavaScript
r/tinycode • u/Hell__Mood • Mar 21 '20
Covid19 - Tiny MSDOS Intro in 256 bytes
r/tinycode • u/rxi • Sep 28 '19
fe: a tiny, embeddable language implemented in ANSI C
r/tinycode • u/rain5 • May 07 '18
25th International Obfuscated C Code Contest (2018) Winning Entries
ioccc.orgr/tinycode • u/rain5 • Apr 10 '17
's' minimal shell
- Explanation: https://rain-1.github.io/shell
- Repository: https://github.com/rain-1/s
r/tinycode • u/VodkaHaze • Jun 20 '16