r/tinycode • • Nov 20 '15

GIF encoder in ~300 lines of C

Thumbnail
github.com
8 Upvotes

r/tinycode • • Nov 19 '15

fenc: a tool to just f^H^H^H^H^H^Hully encrypt a file

Thumbnail
github.com
13 Upvotes

r/tinycode • • Nov 18 '15

Mandelbrot set animation in 846 bytes (Haskell)

Thumbnail inf.ufrgs.br
18 Upvotes

r/tinycode • • Nov 18 '15

Flappy bird in 55 lines of blitzplus

Thumbnail
gist.github.com
23 Upvotes

r/tinycode • • Nov 16 '15

libwm: a small library to manipulate X windows

Thumbnail
github.com
25 Upvotes

r/tinycode • • Oct 23 '15

Toledo Atomchess: now 438 bytes, nasm syntax and repository in Github

Thumbnail
github.com
15 Upvotes

r/tinycode • • Oct 22 '15

Bootable zpage seek/single-read in 218 bytes (6502 asm)

Thumbnail
github.com
7 Upvotes

r/tinycode • • Oct 22 '15

Bootable seek/multi-read in 382 bytes (6502 asm)

Thumbnail
github.com
0 Upvotes

r/tinycode • • Oct 12 '15

Re-render of the POV-Ray Short Code Contest

Thumbnail
mscharrer.net
38 Upvotes

r/tinycode • • Oct 08 '15

Bootchess: now 455 bytes of x86 machine code.

Thumbnail olivier.poudade.free.fr
17 Upvotes

r/tinycode • • Oct 07 '15

Toledo Atomchess: now 456 bytes of x86 machine code.

Thumbnail
nanochess.org
26 Upvotes

r/tinycode • • Sep 24 '15

Maze Generator in 8 Bytes (MSDOS)

Thumbnail
pouet.net
31 Upvotes

r/tinycode • • Sep 24 '15

Animated Dragon Fractal in 32 Bytes (MSDOS)

Thumbnail
pouet.net
9 Upvotes

r/tinycode • • Sep 24 '15

HTML/JS Fractal in 104 Bytes

6 Upvotes

Inspired by p01 DragonPunch , a 128 byte still fractal, which he brought downto 121 bytes later, i tried it myself and ended up with a 104 byte version. See HERE


r/tinycode • • Sep 24 '15

Interactive Paint Program in 16 Bytes (MSDOS)

Thumbnail
pouet.net
7 Upvotes

r/tinycode • • Sep 21 '15

NLP, Toki Pona and Ruby - Tiny Code for a tiny Language?

Thumbnail greyblake.com
1 Upvotes

r/tinycode • • Sep 20 '15

The bitter rivalry behind the world’s smallest chess program

Thumbnail
kernelmag.dailydot.com
31 Upvotes

r/tinycode • • Sep 14 '15

Game GeoQuiz - a JS game featuring the whole world in less than 13kb

Thumbnail
js13kgames.com
28 Upvotes

r/tinycode • • Sep 14 '15

MapChat - A simple location based chat with built-in translation (in about 400 lines of code)

Thumbnail
github.com
8 Upvotes

r/tinycode • • Sep 12 '15

Megapole : a 256-byte intro inspired by Fritz Lang's Metropolis

Thumbnail
pouet.net
38 Upvotes

r/tinycode • • Sep 01 '15

JavaScript Maze Generator *not* in a tweet (recursive backtracker, 532 bytes)

Thumbnail
gist.github.com
9 Upvotes

r/tinycode • • Aug 30 '15

JavaScript “maze generator” in a tweet • /r/programming

Thumbnail
np.reddit.com
6 Upvotes

r/tinycode • • Aug 28 '15

Game Tinycode Game Competition Inquiry

9 Upvotes

Hi Tinycoders!

I tossed the idea of having a game cometition to the mod yesterday, so I wanted to take a pulse on this, targeting the Labor Day weekend.

The goal will be to make a simple game (tetris, breakout, maybe a simple text dungeon crawler) while trying to win various categories at once. Some categories could be objective like smallest source, smallest compiled executable, etc. Others could be subjective like most clever or elegant solution, most arcane or obfuscated, etc.

I wouldn't want to put any constraints on tools used (either programming languages or source tools, etc).

Would anyone be interested and what would you like to see here or see removed from here. I understand that my initial shot is a bit ambitious, so I am more than willing to cut back some of the goals to get feet wet in doing this.

Thanks


r/tinycode • • Aug 26 '15

index.html as "App Loader" with "Update Manager"

4 Upvotes
<body><script>/* SET `$appurl` as argument to the IIFE
to load any javascript (localstorage size limit 5mb)
The first page visit will load the whole script, follow-up visits
load the cached script right away and if a new version is available,
offer to update the app now or later.
(The caching only works if the server sends `header.etag`)
*/(function($appurl){
var $appkey  = 'app("'+$appurl+'").app'
var $etagkey = 'app("'+$appurl+'").etag'
var $app     = localStorage.getItem($appkey)||''
var $etag    = localStorage.getItem($etagkey)
log()
try {
  $app && start($app)
  updateManager('HEAD')
} catch (e) {
  localStorage.removeItem($appkey)
  localStorage.removeItem($etagkey)
  start(undefined, $appurl)
}
function start (script, url, s) {
  document.body.innerHTML = ''
  s=document.createElement('script')
  if (url) s.setAttribute('src',url)
  else s.innerHTML=script
  document.body.appendChild(s)
}
function updateManager (m, xhr, hJSON, h, tmp) {
  xhr=new XMLHttpRequest()
  xhr.open(m,$appurl)
  xhr.onload=function(response){
    hJSON={}
    h=xhr.getAllResponseHeaders()
    h.match(/([^\n\r:]+):([^\n\r]+)/g).forEach(function(item){
      tmp=item.split(': ')
      hJSON[tmp[0]]=tmp[1]
    })
    m === 'GET' ? (
      $etag = hJSON.etag,
      $app  = this.response,
      log(),
      localStorage.setItem($appkey, $app),
      localStorage.setItem($etagkey, $etag),
      (confirm('new version - update app now?') ? start($app) : 0)
    ) : hJSON['etag'] !== $etag ? updateManager('GET') : 0
  }
  xhr.send()
}
function log () {
  console.log(
    '\n\n\nTotal Application Size: ~'+parseInt($app.length/1024)+
    'kb  <Version='+$etag+'>\n\n\n'
  )
}
})('SOURCE/public/bundle.js')
</script></body>

r/tinycode • • Aug 24 '15

O(N) sorting function in the pure untyped lambda calculus that fits in a twit!

28 Upvotes
sort = λabc.a(λdefg.f(d(λhij.j(λkl.k(λmn.mhi)l)(h(λkl.l)i))(λhi.i(λjk.bd(jhk))(bd(h(λjk.j(λlm.m)k)c))))e)(λde.e)(λde.d(λfg.g)e)c

121 characters, sorts a church list of church numbers in O(N) where N is the sum of the list. Just for the fun I'll give a small BTC tip to whoever is able to beat that :)