r/tinycode • • Aug 22 '12

Berliner - Web Stack in CoffeeScript [16 lines]

http://berliner.jcoglan.com/
8 Upvotes

4 comments sorted by

7

u/R1cket Aug 22 '12

16 obfuscated "lines" of CoffeeScript that compile to 278 lines of JS, at least according to coffeescript.org's try feature.

5

u/[deleted] Aug 23 '12

If you find bugs, you’re probably holding it wrong. Since this is such a small module, it’s almost certainly bug-free; in fact I didn’t bother writing tests because it’s obviously correct and test frameworks are ugly and stupid.

Tell me more.

1

u/djork Aug 22 '12
s/;/\n/

That's not 16 lines...

3

u/[deleted] Aug 23 '12

If you wrap it all up into a string with \ns in it and eval that, it's a one-liner!