topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:06 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: LOLCODE: a silly snack in a silly language  (Read 7297 times)

Asudem

  • Member
  • Joined in 2015
  • **
  • Posts: 132
  • C# data manipulation junkie
    • View Profile
    • Donate to Member
IDEA: LOLCODE: a silly snack in a silly language
« on: December 07, 2015, 10:48 PM »
Greetings, and I am so excited to post my first snack request on the form! It's more of a challenge to anyone to learn a different coding language called LOLCODE

I want to see anything silly or useful this language can produce, and given that snacks are supposed to be fun and silly and only take a couple of hours, I'd like to see anything anyone can produce!

I will try every program posted in this thread!

Have fun!

EDIT: I just reread the "Read Me First" topic and I need to be specific. Based on the LOLCODE specs, I don't even know what I'd want... Hmmm... I got it! How about the user inputs a list, that list is passed to a function which sorts the array by name, returns it, and outputs it. A list-alphabetizer.
If I do it more than 2 times I want to automate it in C#!
« Last Edit: December 08, 2015, 06:49 AM by Asudem, Reason: Needed to be specific. »

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,642
    • View Profile
    • Donate to Member
Re: IDEA: LOLCODE: a silly snack in a silly language
« Reply #1 on: December 09, 2015, 07:13 PM »

Side note, if a dev gets fed up and writes part of key company code in LolCode and it works as intended, and later leaves, is that considered one of the computer crimes?


Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: IDEA: LOLCODE: a silly snack in a silly language
« Reply #2 on: December 13, 2015, 08:02 AM »
Why not COBOL?

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: IDEA: LOLCODE: a silly snack in a silly language
« Reply #3 on: December 13, 2015, 07:09 PM »
Why not COBOL?

COBOL is not a silly language. COBOL is an asinine language.
vi vi vi - editor of the beast

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: IDEA: LOLCODE: a silly snack in a silly language
« Reply #4 on: December 13, 2015, 10:57 PM »
Can you do web development in LOLCODE?

lifeweaver

  • Member
  • Joined in 2014
  • **
  • Posts: 22
    • View Profile
    • Donate to Member
Re: IDEA: LOLCODE: a silly snack in a silly language
« Reply #5 on: December 23, 2015, 06:55 PM »
Can you do web development in LOLCODE?

A minimal HTTP server written in LOLCODE by justinmeza

OBTW
    httpd.lol -- a minimal HTTP server written in LOLCODE
    example:
        ./lci httpd.lol
        point your favorite HTTP-getter to http://127.0.0.1:13337/lol.html
        ...
        profit?
    by Justin J. Meza, 2014
TLDR
HAI 1.4
    CAN HAS STDIO?
    CAN HAS SOCKS?
    CAN HAS STRING?

    HOW IZ I parse YR header
        I HAS A len ITZ I IZ STRING'Z LEN YR header MKAY
        I HAS A readin ITZ FAIL
        I HAS A file ITZ ""
        IM IN YR loop UPPIN YR index TIL BOTH SAEM index AN len
            I HAS A char ITZ I IZ STRING'Z AT YR header AN YR index MKAY
            BOTH OF BOTH SAEM char AN " " AN readin
            O RLY?
                YA RLY, FOUND YR file
            OIC
            readin, O RLY?, YA RLY, file R SMOOSH file AN char MKAY, OIC
            BOTH OF BOTH SAEM char AN "/" AN NOT readin
            O RLY?
                YA RLY, readin R WIN
            OIC
        IM OUTTA YR loop
        FOUND YR ""
    IF U SAY SO

    BTW bind to a local port
    I HAS A sock
    sock R I IZ SOCKS'Z BIND YR "127.0.0.1" AN YR 13337 MKAY

    IM IN YR loop
        BTW receive a connection
        I HAS A conn
        conn R I IZ SOCKS'Z LISTN YR sock MKAY

        BTW get a command
        I HAS A cmd
        cmd R I IZ SOCKS'Z GET YR sock AN YR conn AN YR 1024 MKAY
        VISIBLE "CMD IZ " AN cmd

        BTW parse the file name
        I HAS A name ITZ I IZ parse YR cmd MKAY
        VISIBLE "FIEL IZ " AN name

        I HAS A reply ITZ ""

        BTW get the file contents
        I HAS A file ITZ I IZ STDIO'Z OPEN YR name AN YR "r" MKAY
        I IZ STDIO'Z DIAF YR file MKAY, O RLY?
        YA RLY
            VISIBLE "FIEL NOT FOUND"
            reply R "HTTP/1.1 404 Not Found:3:):3:)"
        NO WAI
            VISIBLE "FIEL FOUND!"
            I HAS A data ITZ I IZ STDIO'Z LUK YR file AN YR 1024 MKAY
            I HAS A len ITZ I IZ STRING'Z LEN YR data MKAY
            I IZ STDIO'Z CLOSE YR file MKAY
            VISIBLE "LEN IZ " AN len
            VISIBLE "DATA IZ " AN data

            reply R SMOOSH "HTTP/1.1 200 OK:3:)"...
                    AN "Server: httpd.lol/0.1 (lci):3:)"...
                    AN "Context-Type: text/html:3:)"...
                    AN "Content-Length: :{len}:3:):3:)"...
                    AN ":{data}:3:)" MKAY
        OIC

BTW serve it up
VISIBLE "REPLY IZ " AN reply
I IZ SOCKS'Z PUT YR sock AND YR conn AN YR reply MKAY

        BTW buh-bye
        I IZ SOCKS'Z CLOSE YR conn MKAY
    IM OUTTA YR loop
KTHXBYE

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: IDEA: LOLCODE: a silly snack in a silly language
« Reply #6 on: December 23, 2015, 06:58 PM »
...

 :huh:

...

OK. I had to ask.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: LOLCODE: a silly snack in a silly language
« Reply #7 on: December 25, 2015, 01:24 AM »
 ;D