SlideShare a Scribd company logo
1 of 20
Download to read offline
The best web language.
                   language
  Which is the best programming language for you?



                                        Perl?
PHP?
       OR
Python? Ruby?
      ASP?
The one true answer is:

             LOL Code!!1one




LOLCode is an esoteric language by geeks with too much free time.
There are multiple lolcode interperters, parsers, and even compilers.




                                                            “Laser Cats”
I wrote the first working lolcode parser
                     And the first lolcode powered website.
                     I am one of those geeks.
“LOLCode By O'RLY”
Basic Usage

              CODE SNIPPET
                !BEWARE!



HAI <- Opening tag

MUST HAS STDIO <- Require File

VISIBLE quot;HAI WORLD!quot; <- Print

KTHXBYE <- Closing Tag
Variables
                CODE SNIPPET
                  !BEWARE!


I HAS COLOR1 <- Initiate Variable

I HAS COLOR2 IZ GREEN
             ^- Initiate and Set Var
COLOR1 IZ RED
           ^Set existing var
More Variables
             CODE SNIPPET
               !BEWARE!

VISIBLE “COLOR IS &COLOR1&”
      ^- Print with Var replacement.
IVAR IZ 1 < Set var to 1.
IVAR UPUP!< Increment twice.
IVAR UPUP!
          < IVAR is 3.

BTW THIS IS A COMMENT
     ^- Use BTW to comment line.
Control Structures
                CODE SNIPPET
                  !BEWARE!


IZ &IVAR& == 1           < IF.
    BTW IF
    VISIBLE quot;YEAH RLYquot;
    VISIBLE __SKY__ <-Print Constant
NOWAI
    BTW ELSE        <- ELSE
    VISIBLE quot;NOWAIquot;
KTHX
IF Control Structure
               CODE SNIPPET
                 !BEWARE!
IZ &IVAR& == 1 < IF.
    BTW IF
    VISIBLE quot;YA RLYquot;

ORLY &IVAR& == 2
                        < ELSEIF
    VISIBLE quot;ORLYquot;

ORLY &IVAR& == 2
                              < ELSEIF
    VISIBLE quot;ORLY RLYquot;

NOWAI
                          <- ELSE
    VISIBLE quot;NOWAIquot;
KTHX
Arrays
                  CODE SNIPPET
                    !BEWARE!
ARRAY IZ BUCKET
                    < Create Bucket
^Variable Name

       0 FISH quot;zeroquot; !! < Numerical

       1 FISH quot;onequot; !! < Keys

                                 < String Keys
       two FISH quot;twoquot; !!

BUCKET

                                 <- Prints “two”
VISIBLE &ARRAY#two&
Multidemensional Arrays
                   CODE SNIPPET
                     !BEWARE!
ARRAY IZ BUCKET
                          < Create Bucket
^Variable Name

       0 FISH quot;zeroquot; !!

       three FISH IZ BAG <- Use bag or buckets
           !! FISH quot;threequot; !!
           !! FISH quot;twoquot; !!
                   ^New Dimension
       BAG

BUCKET

                                  <- Prints “two”
VISIBLE &ARRAY#two,1&
BAG Arrays
                   CODE SNIPPET
                     !BEWARE!
ARRAY IZ BUCKET
                          < Create Bucket
^Variable Name

       0 FISH quot;zeroquot; !!

       three FISH IZ BAG <Create           BAG
           !! FISH quot;threequot; !!
           !! FISH quot;twoquot; !!
       BAG ^BAG uses auto
                 incremented keys.
BUCKET

                                  <- Prints “two”
VISIBLE &ARRAY#two,1&
Looping
                 CODE SNIPPET
ARRAY IZ BUCKET    !BEWARE!
                                < Create Bucket
    0 FISH quot;zeroquot; !!
    1 FISH quot;1quot; !!
    2 FISH quot;2quot; !!
BUCKET

                                    <- Foreach
IM IN UR ARRAY ITZA NUMBA

       VISIBLE quot;&NUMBA&!quot;
         ^Prints “zero!1!2!”
KTHX
Functions
                CODE SNIPPET
                  !BEWARE!


SO IM LIKE UPPING WITH VAR VAR2=0
          ^Var Name            ^Arguments   ^Default
                                             Value
    VAR UPUP!
             <- Increment VAR
    I FOUND MAH VAR<- Return VAR

KTHX <End Function

VISIBLE quot;FOUR UP? ITZA quot;.UPPING(4)
        ^Prints “5”
Advanced Features
                 CODE SNIPPET
                   !BEWARE!
THEVAR IZ GOLD

VARNAME IZ THEVAR

VISIBLE &&VARNAME&& <-Prints “GOLD”
         ^- Variable Variable

ALWAYZ SKY IZ BLUE <- Set Constant

VISIBLE __SKY__ <- Print Constant
Embed in HTML
                CODE SNIPPET
<html>            !BEWARE!
<head>
<title>LOL Power</title>
                               <- HTML
</head>
<body>                          Subset of XML



HAI
MUST HAS STDIO
VISIBLE quot;<!-- Copyright 2007 Jeff
Jones, www.tetraboy.com -->nquot;
VISIBLE quot;HAI WORLD!quot;
KTHXBYE
          ^ Code in tags is parsed.
</body>
</html>
SQLite Databases
                   CODE SNIPPET
                     !BEWARE!
CAN HAS SQL? <- Include SQL Lib
DBASE IZ GETDB('lolz')<-Select      DB File
FUNNAHS IZ DBUCKET(
               ^Get Array from DB
    &DBASE&,

    quot;CAN I PLZ GET joke ALL UP IN funnahsquot;
)
     ^LOL-SQL.
     “Select joke from funnahs”
SQLite Databases, Part Deux
              CODE SNIPPET
                !BEWARE!
CAN HAS SQL? <- Get Array from DB
DBASE IZ GETDB('lolz')
FUNNAHS IZ DBUCKET(&DBASE&,quot;CAN I PLZ
GET joke ALL UP IN funnahsquot;)

                             < Loop It
IM IN UR FUNNAHS ITZA JOKE

 VISIBLE quot;<P>quot;.&JOKE#joke&.quot;</P>quot;

       ^Print each joke
KTHX
       (dbucket returns assoc array)
Tetra LOLCode Parser

How to make a new lang work?

With little to no work?
    Convert it to PHP!
How?
 preg_replace!
 function lol_core_parse($code)

 Takes incoming code and runs through 36 regular expressions

 /e is your new best friend.
Tetra LOLCode
       Works with apache!
Easiest way to run .lol on apache?
  Set .lol to parse as PHP
  Use PHP's prepend/append
  Output Buffering to catch LOL
  Parse src
  Write source to temporary file
  Include temporary file
More info?


http://www.lolcode.com
Official Website


http://www.tetraboy.com/lolcode/
My LOLCode website, powred by LOLCODE!


irc.freenode.net #lolcode
Community IRC Channel. (I Hope noone still goes there..)


MailChimp LOL Parser
Based on my lolcode parser, download their improved version.

More Related Content

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

Featured

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

The best web language: LOLCODE!!!

  • 1. The best web language. language Which is the best programming language for you? Perl? PHP? OR Python? Ruby? ASP?
  • 2. The one true answer is: LOL Code!!1one LOLCode is an esoteric language by geeks with too much free time. There are multiple lolcode interperters, parsers, and even compilers. “Laser Cats”
  • 3. I wrote the first working lolcode parser And the first lolcode powered website. I am one of those geeks. “LOLCode By O'RLY”
  • 4. Basic Usage CODE SNIPPET !BEWARE! HAI <- Opening tag MUST HAS STDIO <- Require File VISIBLE quot;HAI WORLD!quot; <- Print KTHXBYE <- Closing Tag
  • 5. Variables CODE SNIPPET !BEWARE! I HAS COLOR1 <- Initiate Variable I HAS COLOR2 IZ GREEN ^- Initiate and Set Var COLOR1 IZ RED ^Set existing var
  • 6. More Variables CODE SNIPPET !BEWARE! VISIBLE “COLOR IS &COLOR1&” ^- Print with Var replacement. IVAR IZ 1 < Set var to 1. IVAR UPUP!< Increment twice. IVAR UPUP! < IVAR is 3. BTW THIS IS A COMMENT ^- Use BTW to comment line.
  • 7. Control Structures CODE SNIPPET !BEWARE! IZ &IVAR& == 1 < IF. BTW IF VISIBLE quot;YEAH RLYquot; VISIBLE __SKY__ <-Print Constant NOWAI BTW ELSE <- ELSE VISIBLE quot;NOWAIquot; KTHX
  • 8. IF Control Structure CODE SNIPPET !BEWARE! IZ &IVAR& == 1 < IF. BTW IF VISIBLE quot;YA RLYquot; ORLY &IVAR& == 2 < ELSEIF VISIBLE quot;ORLYquot; ORLY &IVAR& == 2 < ELSEIF VISIBLE quot;ORLY RLYquot; NOWAI <- ELSE VISIBLE quot;NOWAIquot; KTHX
  • 9. Arrays CODE SNIPPET !BEWARE! ARRAY IZ BUCKET < Create Bucket ^Variable Name 0 FISH quot;zeroquot; !! < Numerical 1 FISH quot;onequot; !! < Keys < String Keys two FISH quot;twoquot; !! BUCKET <- Prints “two” VISIBLE &ARRAY#two&
  • 10. Multidemensional Arrays CODE SNIPPET !BEWARE! ARRAY IZ BUCKET < Create Bucket ^Variable Name 0 FISH quot;zeroquot; !! three FISH IZ BAG <- Use bag or buckets !! FISH quot;threequot; !! !! FISH quot;twoquot; !! ^New Dimension BAG BUCKET <- Prints “two” VISIBLE &ARRAY#two,1&
  • 11. BAG Arrays CODE SNIPPET !BEWARE! ARRAY IZ BUCKET < Create Bucket ^Variable Name 0 FISH quot;zeroquot; !! three FISH IZ BAG <Create BAG !! FISH quot;threequot; !! !! FISH quot;twoquot; !! BAG ^BAG uses auto incremented keys. BUCKET <- Prints “two” VISIBLE &ARRAY#two,1&
  • 12. Looping CODE SNIPPET ARRAY IZ BUCKET !BEWARE! < Create Bucket 0 FISH quot;zeroquot; !! 1 FISH quot;1quot; !! 2 FISH quot;2quot; !! BUCKET <- Foreach IM IN UR ARRAY ITZA NUMBA VISIBLE quot;&NUMBA&!quot; ^Prints “zero!1!2!” KTHX
  • 13. Functions CODE SNIPPET !BEWARE! SO IM LIKE UPPING WITH VAR VAR2=0 ^Var Name ^Arguments ^Default Value VAR UPUP! <- Increment VAR I FOUND MAH VAR<- Return VAR KTHX <End Function VISIBLE quot;FOUR UP? ITZA quot;.UPPING(4) ^Prints “5”
  • 14. Advanced Features CODE SNIPPET !BEWARE! THEVAR IZ GOLD VARNAME IZ THEVAR VISIBLE &&VARNAME&& <-Prints “GOLD” ^- Variable Variable ALWAYZ SKY IZ BLUE <- Set Constant VISIBLE __SKY__ <- Print Constant
  • 15. Embed in HTML CODE SNIPPET <html> !BEWARE! <head> <title>LOL Power</title> <- HTML </head> <body> Subset of XML HAI MUST HAS STDIO VISIBLE quot;<!-- Copyright 2007 Jeff Jones, www.tetraboy.com -->nquot; VISIBLE quot;HAI WORLD!quot; KTHXBYE ^ Code in tags is parsed. </body> </html>
  • 16. SQLite Databases CODE SNIPPET !BEWARE! CAN HAS SQL? <- Include SQL Lib DBASE IZ GETDB('lolz')<-Select DB File FUNNAHS IZ DBUCKET( ^Get Array from DB &DBASE&, quot;CAN I PLZ GET joke ALL UP IN funnahsquot; ) ^LOL-SQL. “Select joke from funnahs”
  • 17. SQLite Databases, Part Deux CODE SNIPPET !BEWARE! CAN HAS SQL? <- Get Array from DB DBASE IZ GETDB('lolz') FUNNAHS IZ DBUCKET(&DBASE&,quot;CAN I PLZ GET joke ALL UP IN funnahsquot;) < Loop It IM IN UR FUNNAHS ITZA JOKE VISIBLE quot;<P>quot;.&JOKE#joke&.quot;</P>quot; ^Print each joke KTHX (dbucket returns assoc array)
  • 18. Tetra LOLCode Parser How to make a new lang work? With little to no work? Convert it to PHP! How? preg_replace! function lol_core_parse($code) Takes incoming code and runs through 36 regular expressions /e is your new best friend.
  • 19. Tetra LOLCode Works with apache! Easiest way to run .lol on apache? Set .lol to parse as PHP Use PHP's prepend/append Output Buffering to catch LOL Parse src Write source to temporary file Include temporary file
  • 20. More info? http://www.lolcode.com Official Website http://www.tetraboy.com/lolcode/ My LOLCode website, powred by LOLCODE! irc.freenode.net #lolcode Community IRC Channel. (I Hope noone still goes there..) MailChimp LOL Parser Based on my lolcode parser, download their improved version.