1. DLP Flash Christmas Competition + Writing Marathon 2024!

    Competition topic: Magical New Year!

    Marathon goal? Crank out words!

    Check the marathon thread or competition thread for details.

    Dismiss Notice
  2. Hi there, Guest

    Only registered users can really experience what DLP has to offer. Many forums are only accessible if you have an account. Why don't you register?
    Dismiss Notice
  3. Introducing for your Perusing Pleasure

    New Thread Thursday
    +
    Shit Post Sunday

    READ ME
    Dismiss Notice

LOLCODE: some cool programming shit

Discussion in 'Tech Support' started by Garret P.I., Mar 27, 2008.

  1. Garret P.I.

    Garret P.I. Backtraced

    Joined:
    May 30, 2007
    Messages:
    420
    Location:
    Seattle, WA.
    HAI
    {
    //Okay, since this is sort of the DLP forum's default tech hangout... I figured //I'd drop this here.

    //Whilst out surfin the intertoobs I happened upon something pretty funny.

    //By now, unless yer livin' under a rock or something, you've run into the whole LOLCats thing.

    //Well, turns out that some programmers liked the whole messed up grammar thing, and decided to try to write... you got it... a LOL compiler

    //Here's some sample code snips.

    HAI
    CAN HAS STDIO?
    VISIBLE "HAI WORLD!"
    KTHXBYE

    //Starting off with the venerable Hello world program.

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

    //A step up into throwing and catching errors.

    HAI
    CAN HAS STDIO?
    I HAS A VAR
    GIMMEH VAR
    VISIBLE "You said " N VAR N " !!"
    KTHXBYE

    //and then variable declaration and input *That's right... Gimmeh is the command for inputting a value.*

    //check it out.

    //http://blog.notdot.net/archives/32-LOLCode.net-Now-your-LOLCats-can-use-the-CLR!.html
    //and
    //http://lolcode.com/
    }
    KTHXBYE
     
    Last edited: Mar 27, 2008
  2. Gullible

    Gullible Headmaster

    Joined:
    Jan 31, 2006
    Messages:
    1,112
    Location:
    Sitting in front of a broken compooter, lolololol
    Lol, awesome.

    I suck at any kind of code but this is just...WOW!
     
  3. Garret P.I.

    Garret P.I. Backtraced

    Joined:
    May 30, 2007
    Messages:
    420
    Location:
    Seattle, WA.
    Personally I like the O NOES feature

    It's like a throw catch block, except it appears to catch errors without an explicate throw.

    This could have all sorts of fun applications.

    I'm also hoping that structs will be called Kittehs
    example code

    I HAS A KITTEH
    { IT HAS FUR; //predefined object type array
    IT HAS NOZE; //predefined object type linked list
    IT HAS CLAUSE; //defined data ports
    IT HAS MOUF; // stdio input output
    IT HAS COOKIE; //string
    IT HAS EATED COOKIE; // char array
    IT HAS NUMBERED VAR NAMED FRED; //int
    } KITTEH NAME IS HARLEY;
     
  4. Oz

    Oz For Zombie. Moderator DLP Supporter

    Joined:
    Jan 31, 2008
    Messages:
    9,028
    Gender:
    Female
    Location:
    Baile Átha Cliath
    Lol, a friend was telling me about this yesterday. It's a funny, if a bit pointless, idea.
     
  5. Skeletaure

    Skeletaure Magical Core Enthusiast ~ Prestige ~ DLP Supporter

    Joined:
    Mar 5, 2006
    Messages:
    2,819
    Location:
    United Kingdom
    High Score:
    13,152
  6. Oz

    Oz For Zombie. Moderator DLP Supporter

    Joined:
    Jan 31, 2008
    Messages:
    9,028
    Gender:
    Female
    Location:
    Baile Átha Cliath
  7. fuubar

    fuubar Headmaster

    Joined:
    Nov 17, 2007
    Messages:
    1,101
    lol.

    You know what the really sad thing is though? I work as a CS tutor at my school and I've seen people who tried to use code that looked something like this on there homework assignments...
     
  8. Garret P.I.

    Garret P.I. Backtraced

    Joined:
    May 30, 2007
    Messages:
    420
    Location:
    Seattle, WA.
    They've gotta work on the O HAI, I UPGRADED YOUR RAM management, the cat in CEREALIZIBLE box interface as well as the THESE R MY INTERWEBZ LET ME SHOW THEM TO U and KOM NOM NOM and DURRRRRRKOM feature sets.

    Sandboxed code will of course take on a whole new meaning.

    Once that's done the ceiling is the limit (as set by ceiling cat)
     
    Last edited: Mar 27, 2008
Loading...