Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to LOLcode

Similar presentations


Presentation on theme: "Introduction to LOLcode"— Presentation transcript:

1 Introduction to LOLcode
I HAS 1337 CODE!!1!ONE Introduction to LOLcode

2 Disclaimer ONLY EXISTS IN THEORY!
Duh BUT! There are several attemps at making compilers for the language. sjl7678's interpreter is based on Lex/Yacc-style Python libraries. ploximeth's compiler is actually a Perl-based interpreter Tetraboy's implementation is a nifty PHP processor. Brian Egge has started a project to create a parser and interpreter for the Java runtime.

3 Origins LOL-speak originated from websites like:
Website for learning LOLspeak.

4 History First Lolcats attributed to anonymous image board 4chan around 2005 Lolcats.com was registered on June 14, 2006 The first image on "I CAN HAS CHEEZBURGER?" was posted on January 11, 2007 which was allegedly from the Something Awful website. The News Journal states that "some trace the lolcats back to the site 4chan, which features bizarre cat pictures on Saturdays, or 'Caturdays'." Lev Grossman of Time wrote that the oldest known example of ‘caturday’ "probably dates to 2006”, but later corrected himself in a blog post - caturday.com was registered on April 30, 2005

5 LOLspeak 101 It is not just the using of poor grammar and misspelling everything. There are definitive rules. Misspellings are consistent, and the pattern for grammar has an almost rhythmic pattern to it.

6 To make a Lolcat Photo of a cat
Large, white, usually all caps, sans-serif font Caption acts as a speech bubble, or description of the image. strangely-conjugated verbs, but a tendency to converge to a new set of rules in spelling and grammar Type of talk is known as pidgin talk, and frequiently are “snowclones” where nouns and verbs are replaces in a phrase

7 Themes for a Lolcat “Im in ur noun, verb-ing ur related noun.“
"I has a noun“ "Invisible noun“ "[noun] haz a flavor.“ "[adjective] cat is [adjective]", "[adjective] cat is not [adjective]" or "Your offering pleases [adjective] cat."

8

9

10

11

12

13

14

15

16

17

18 Lolcode Uses this “slang” to write code
Usually, if you understand the slang, even if you have no programming knowledge, you can figure out what's going on.

19 Hai World? HAI CAN HAS STDIO? VISIBLE "HAI WORLD!" KTHXBYE

20 Moar Ecsamples HAI CAN HAS STDIO? I HAS A VAR IM IN YR LOOP UPZ VAR!!1 VISIBLE VAR IZ VAR BIGR THAN 10? GTFO. KTHX KTHX KTHXBYE

21 And Moar?!1 HAI CAN HAS STDIO? PLZ OPEN FILE "LOLCATS.TXT"? AWSUM THX VISIBLE FILE O NOES INVISIBLE "ERROR!" KTHXBYE

22 Keywards btw – BTW <comment> - rest of the line is a comment
byes - BYES [<code> [<string>]] – exit with specified code, outputting string can-has - CAN HAS <file/module>? - Includes the file or loads the module, and dies on error. diaf - DIAF [<code> [<string>]] – exit with specified code, outputting string gimmeh - GIMMEH [(LINE|WORD|LETTAR)] <VAR> [OUTTA <filedesc>] - This inputs a line, word, or character from the specified file descriptor gtfo - This breaks out of the innermost loop. hai - Opens the program. i-has-a - I HAS A <var> - declares a variable im-in-yr - IM IN YR [<loop label>] – begins a loop. The label name really makes no difference in-mah - [<key> IN MAH]* <var> - a IN MAH b IN MAH var = var[b][a] Iz - IZ <cond>[?] [YARLY] <statements> [NOWAI <statements>] KTHX kthx - KTHX is the closing “bookend” for any block except the hai block. kthxbye - Closes hai block only. lol-r - LOL <l-value> R <expression> - assigns value to array location visible - VISIBLE <expression>[!] – prints out expression to std output.

23 Operators BIGR THAN (>) -> NOT BIGR THAN
SMALR THAN (<) -> NOT SMALR THAN LIEK ( == ) -> NOT LIKE BTW LOLCODE : // Standard a UP b : a + b UPZ a!![b] : a += b (b=1) a NERF b : a - b NERFZ a!![b] : a -= b (b=1) a TIEMZ b : a * b TIEMZD a!![b] : a *= b (b=1) a OVAR b : a / b OVARZ a!![b] : a /= b (b=1)

24 I has moar HAI CAN HAS STDIO? I HAS A VAR GIMMEH VAR IZ VAR BIGGER THAN 10? YARLY BTW this is true VISIBLE "BIG NUMBER!" NOWAI BTW this is false VISIBLE "LITTLE NUMBER!" KTHX KTHXBYE

25 Wher dis iz going? Support for the Parrot VM using the Parrot Compiler Toolkit Featured in Microsoft developer training seminars, TechEd 2007 Conference (Australia). PL/LOLCODE, a project headed by Josh Tolley, makes LOLCODE available as a server-side programming language inside PostgreSQL. Channel 9: Deep DLR, Microsoft Dynamic Language Runtime has an implementation of LOLCODE for testing purposes.

26 HOAM WERKS?! Explain what each line of the hello world example is doing in terms of a normal programming language.

27 Reffrances http://www.lolcode.com http://www.icanhascheezburger.com
has-gr.html


Download ppt "Introduction to LOLcode"

Similar presentations


Ads by Google