Skip to content

Instantly share code, notes, and snippets.

@WebReflection
Last active March 2, 2019 12:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WebReflection/776bb563101d075ad5a25863820e691f to your computer and use it in GitHub Desktop.
Save WebReflection/776bb563101d075ad5a25863820e691f to your computer and use it in GitHub Desktop.
⚠ NSFW + Warning: You Cannot Unsee ⚠
/*! porn.js (NSFW) */
let Ɛ = 'b';
()=> {} // Shemale // arrow
()=>{} // // arrow
Ɛ=> {} // Straight // arrow
Ɛ=>{} // // arrow
Ɛ=> Ɛ // Gay / Anal // identity (arrow)
Ɛ==Ɛ // // equality
Ɛ=Ɛ // // assignment
Ɛ=>Ɛ // // identity (arrow)
Ɛ===Ɛ // Rocco Siffredi // strict equality
@WebReflection
Copy link
Author

WebReflection commented Mar 2, 2019

What Can I Learn From This ?

  • if a multi line comment starts with an exclamation mark, as in /*!, minifiers and tools are usually instructed by default to not remove those comments, 'cause important. Minifiers and tools that modify that /*! into /*, after leaving the comment intact, are also considered obtrusive because the next minifier pass would .... oooops ! remove the comment that was supposed to remain (licenses, authors, etc)
  • JS variable names are not just those starting with [a-zA-Z_$] followed by [0-9a-zA-Z_$]*, there are hundreds of extra unicode characters allowed by the ECMScript language specification. You can find more about this in this Valid JavaScript variable names in ES5 post.
  • the only reason the code works out of the box in console via copy and paste, is that let Ɛ = 'b'; ends with a semicolon ;. In JavaScript, semicolons are fundamental to explicitly mark the end of a statement, assignment, or expression. There are cases where semicolons are not necessary, as the code itself shows for every other new line, but if you put parenthesis in some line, the code would break. As example, using (Ɛ)=>Ɛ instead of Ɛ=>Ɛ would make the code break. As summary, if you want to avoid surprises with your code, be always explicit and use semicolons, or be always fully aware of when these can fail.
  • developers asked more than once to TC39 members if there could be a standard empty function, as ()=>{} is, and a standard identity one, represented by Ɛ=>Ɛ. As of today, there's still no proposal to bring to the language such common use cases.
  • in JS there is a difference between == and ===. This might be obvious for most, but I've written already in 2010 what's the big deal with == and ===, and you can find an even deeper explanation in MDN.
  • the variety of porn is unbelievable and I couldn't represent all cases via JS syntax. Cases like ({}) => ({}) for lesbians, as example, wouldn't have look too good syntax wise, so apologies if you feel underrepresented by this gist.
  • Rocco Siffredi is a very famous, but not too young, Italian porn character, and I'm Italian, and not too young, too so .... go Rocco !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment