Code Monkey home page Code Monkey logo

coffeescript-from-hell's Introduction

coffeescript-from-hell

Title says it all, doesn't it?

Believe it or not: all of the snippets below are valid coffeescript and mostly compile into something weird...

Online coffeescript compiler

http://usefulthink.github.io/coffeescript-from-hell/ (by @pixelass and @ZauberNerd)

Example (by @pixelass)

this is a compiler for fun in CoffeeScript

story:
  it happened while 5 in many nerds drank many of beer and try to do fun while they play in CoffeeScript until this is what is the result

if you do not believe in this magic then scroll right and see for yourself in this example
it is true
this is valid and compiles in JavaScript

recommended:->
  have alcohol in blood for fun in here
  it is best if it is beer 
  that is responsible for drunk in head
  not too much or you is going in bed
  gin and tonic is ok if it is better for you in taste
  also not too much of it or you is a waste

now try to play for yourself in here

Some normal sentences that are totally valid coffeescript

we don't need it (by @usefulthink)

Drink a lot for yourself in the pub when you need it - me and my friends dont, do you?

ballmers peak (by @levito)

do not try coffeescript if you have alcohol in your blood

ball games (by @ZauberNerd)

throw the ball and try to catch it

future? (by @levito)

do you know if this is the future?

you = _error (by @ZauberNerd)

try to drink beer until youre drunk if this isnt happening do not stop unless they catch you

one pint (by @ZauberNerd)

drink for each of your friends one pint of beer unless youre drunk then stop or not go to work the next day

robot overlords (by @ZauberNerd and @usefulthink) - with instrumentation

I for one in many welcome our new robot overlords when they have cookies in their spaceship

ball games 2 (by @ZauberNerd)

we try to throw the ball until you catch it; at least one in many. if this isnt happening until dawn while we practice go home

coding style (by @ZauberNerd)

switch your coding style
  when your coworker isnt fluid in coffeescript.
  if he is fluid then do try to use it for everything in your company

about coffeescript

while coffeescript can be done in a beautyful way, a lot of it may
  break unless you pay a lot of attention.
  thats not how we like it

writing is easy - but reading... #(

don't like coffeescript (by @pixelass)

coffeescript is not my kind of language. The syntax is ugly and not understandable while it might be fun for people in ruby teams... 
unless he is a good developer and can do everything good then he can try to use it 

feed dog or cat (by @pixelass)

feed dog if dog is hungry unless cat is hungry
if cat is hungry then feed cat and do not feed dog until cat is not hungry and only feed dog when cat is not hungry

double negatives (by @pixelass)

you isnt not true in real and i isnt not do nothing wrong

timetravel (by @pixelass)

tomorrow is new Date. now is today while yesterday is not today or tomorrow

twitter (by @pixelass)

if you tweet @SomeBody then it is  him or her  in that tweet...

examples: 
  1: @GregorAdams is crazy in CSS and CSS isnt  CoffeeScriptShit
  2: @ZauberNerd is awesome in JavaScript and does not like CoffeeScript...

Famous Quotes

evidence (by @Shoom)

absence of evidence is not evidence of absence

~ Carl Sagan

life (by @Shoom)

Life is what happens while you are busy making other plans

~ John Lennon

be yourself (by @Shoom)

always be yourself... unless you suck

~ Joss Whedon

stay in bed (by @Shoom)

Dont stay in bed unless you can make money in bed

~ George Burns

flying (by @Shoom)

Flying is learning how to throw yourself at the ground and miss

~ Douglas Adams

success vs value

try not to become a man of success, but rather try to become a man of value

~ Albert Einstein

Make them do things by adding some bootstrap code

batman (by @ZauberNerd and @levito)

# bootstrap
gotham=0;ashes=8;help=' Batman!';dont='';you=die=(a)->a
shall=->document.write gotham++/help,\
# /bootstrap

# orig quote: "When Gotham is ashes, you have my permission to die."
# >

if gotham is ashes then help else dont
you shall not die until gotham is ashes

# <

A little bit of "language" "features"

myFunction = (a,b,c) -> console.log a, b, c

# now, lets call this, right - great that we may skip the parentheses, right?
myFunction 1, 2, 3
myFunction a:1, b:2, c:3
myFunction 1, b:2, c:3
myFunction a:1, b, c

Other programming languages

Clojure (by @pixelass)

;;this is valid Clojure:=>

  (defn recur [x]
  (if-not (zero? x) 
    (recur (+ x x)) 
    (recur (+ x 1))))

  (recur (1))


  (if (Boolean. false)
    "logical true" 
    "logical false")


  (defn copy-file [source-path dest-path]  
  (io/copy (io/file source-path) (io/file dest-path)))


  (copy-file 
  "/home/username/squirrel.txt" 
  "/home/username/burt-reynolds.txt")

coffeescript-from-hell's People

Contributors

buggy-implementation avatar levito avatar pixelass avatar zaubernerd avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.