LOLCODE!

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
Spyder
Sith Marauder
Posts: 4465
Joined: 2002-09-03 03:23am
Location: Wellington, New Zealand
Contact:

LOLCODE!

Post by Spyder »

Hai!

I has a link!

Code: Select all

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

Code: Select all

HAI
CAN HAS STDIO?
I HAS A VAR
GIMMEH VAR
VISIBLE "You said " N VAR N " !!"
KTHXBYE
This guy's prime factoring program

Code: Select all

BTW LolCode Implementation of a program I had to write for my Java class, a long time ago.
BTW LolCode Spec 1.2, with GOIN UP/DOWN as laid out here: http://forum.lolcode.com/viewtopic.php?pid=2406#p2406
BTW There might be some syntax/usage/logic errors around, but that's to be expected in a language that's still forming and doesn't have a standard compiler.
HAI
    BTW Define some useful functions
    HOW DUZ I SGN YR SPEECHINGS
        GOIN DOWN 0 AN SPEECHINGS MKAY
        O RLY?
            YA RLY
                FOUND YR -1
            NO WAI
                FOUND YR 1
        OIC
    IF U SAY SO
    HOW DUZ I ABS YR SPEECHINGS
        FOUND YR PRODUKT OF SPEECHINGS AN SGN SPEECHINGS
    IF U SAY SO
    
    I HAS A WHATUSAY
    I HAS A factor1 ITZ 1
    I HAS A factor2 ITZ 0
    I HAS A numOfFactors ITZ 0
    VISIBLE "Input a number to be factored."
    GIMME WHATUSAY
    WHATUSAY IS NOW A NUMBR
    VISIBLE "Factors of " AN WHATUSAY AN ":"
    IM IN YR loop
        GOIN UP ABS WHATUSAY AN PRODUKT OF factor1 AN factor1 MKAY
        O RLY?
            YA RLY
                GTFO
        OIC
        
        BOTH SAEM 0 AN MOD OF WHATUSAY AN factor1
        O RLY?
            YA RLY
                factor2 R QUOSHUNT OF WHATUSAY AN factor1
                numOfFactors R SUM OF numOfFactors AN 1
                VISIBLE "[" AN factor1 AN "," AN factor2 AN "]"
                VISIBLE "[" AN PRODUKT OF factor1 AN -1 AN "," AN PRODUKT OF factor2 AN -1 AN "]"
        OIC
        factor1 R SUM OF factor1 AN 1
    IM OUTTA YR loop
    BOTH SAEM 1 AN numOfFactors
    O RLY?
        YA RLY
            VISIBLE "Note: This number is a prime number."
    OIC
KTHXBYE
:D
:D
User avatar
Tasoth
Sith Devotee
Posts: 2815
Joined: 2002-12-31 02:30am
Location: Being Invisible, per SOP

Post by Tasoth »

that makes my head hurt and my urge to kill the developer is rising.
I've committed the greatest sin, worse than anything done here today. I sold half my soul to the devil. -Ivan Isaac, the Half Souled Knight



Mecha Maniac
User avatar
Resinence
Jedi Knight
Posts: 847
Joined: 2006-05-06 08:00am
Location: Australia

Post by Resinence »

Tasoth wrote:that makes my head hurt and my urge to kill the developer is rising.
Actually it's surprisingly easy to read, and the syntax is pretty standard. As well as being very much like plain (bad) english. It's not as bad as I would have expected.
“Most people are other people. Their thoughts are someone else's opinions, their lives a mimicry, their passions a quotation.” - Oscar Wilde.
User avatar
Zablorg
Jedi Council Member
Posts: 1864
Joined: 2007-09-27 05:16am

Post by Zablorg »

Tasoth wrote:that makes my head hurt and my urge to kill the developer is rising.
Oh come on now, this is just classic! I want everything to be coded this way!
Jupiter Oak Evolution!
User avatar
Fingolfin_Noldor
Emperor's Hand
Posts: 11834
Joined: 2006-05-15 10:36am
Location: At the Helm of the HAB Star Dreadnaught Star Fist

Post by Fingolfin_Noldor »

I think my brain spontaneously combusted as well. :shock: :x
Image
STGOD: Byzantine Empire
Your spirit, diseased as it is, refuses to allow you to give up, no matter what threats you face... and whatever wreckage you leave behind you.
Kreia
User avatar
General Zod
Never Shuts Up
Posts: 29211
Joined: 2003-11-18 03:08pm
Location: The Clearance Rack
Contact:

Post by General Zod »

I LOLed. :D
"It's you Americans. There's something about nipples you hate. If this were Germany, we'd be romping around naked on the stage here."
Enforcer Talen
Warlock
Posts: 10285
Joined: 2002-07-05 02:28am
Location: Boston
Contact:

Post by Enforcer Talen »

Time for lolcatbible.

Yes, its real.
Image
This day is Fantastic!
Myers Briggs: ENTJ
Political Compass: -3/-6
DOOMer WoW
"I really hate it when the guy you were pegging as Mr. Worst Case starts saying, "Oh, I was wrong, it's going to be much worse." " - Adrian Laguna
User avatar
Davis 51
Jedi Master
Posts: 1155
Joined: 2005-01-21 07:23pm
Location: In that box, in that tiny corner in your garage, with my laptop, living off Dogfood and Diet Pepsi.

Post by Davis 51 »

Dude, I want a compiler for this so bad.
Brains!
"I would ask if the irony of starting a war to spread democracy while ignoring public opinion polls at home would occur to George W. Bush, but then I check myself and realize that
I'm talking about a trained monkey.
"-Darth Wong
"All I ever got was "evil liberal commie-nazi". Yes, he called me a communist nazi."-DPDarkPrimus
User avatar
Zablorg
Jedi Council Member
Posts: 1864
Joined: 2007-09-27 05:16am

Post by Zablorg »

Do they have the command "Caturday"?
Jupiter Oak Evolution!
User avatar
Dooey Jo
Sith Devotee
Posts: 3127
Joined: 2002-08-09 01:09pm
Location: The land beyond the forest; Sweden.
Contact:

Post by Dooey Jo »

That's horrible and a sign of a future where everyone has forgotten the languages of old and speaks only in internet memes. It is a dark future; a cyberpunk future; a retarded, drooling future.

Does "FAIL" throw an exception in that language?

Code: Select all

IT IS DANGEROUS
  FAIL "snarp"
OH SNAP
  WHAT HAPPEN?
PWNT
Image
"Nippon ichi, bitches! Boing-boing."
Mai smote the demonic fires of heck...

Faker Ninjas invented ninjitsu
RThurmont
Jedi Master
Posts: 1243
Joined: 2005-07-09 01:58pm
Location: Desperately trying to find a local restaurant that serves foie gras.

Post by RThurmont »

There really does need to be an interpreter for that...I'm disturbed by the fact that I'm pretty much understanding what it says.
"Here's a nickel, kid. Get yourself a better computer."
User avatar
Einhander Sn0m4n
Insane Railgunner
Posts: 18630
Joined: 2002-10-01 05:51am
Location: Louisiana... or Dagobah. You know, where Yoda lives.

Post by Einhander Sn0m4n »

Davis 51 wrote:Dude, I want a compiler for this so bad.
Seconded. Even I, the non-coding script-kiddie, can understand and learn to code with this.
RThurmont wrote:There really does need to be an interpreter for that...I'm disturbed by the fact that I'm pretty much understanding what it says.
HA! if an MBA can understand this, I most certainly can!
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

User avatar
Starglider
Miles Dyson
Posts: 8709
Joined: 2007-04-05 09:44pm
Location: Isle of Dogs
Contact:

Post by Starglider »

Oh joy, it's INTERCAL for 4chan tards. But without any of the subtlety or skill.
RThurmont
Jedi Master
Posts: 1243
Joined: 2005-07-09 01:58pm
Location: Desperately trying to find a local restaurant that serves foie gras.

Post by RThurmont »

[quoteHA! if an MBA can understand this, I most certainly can![/quote]

I'm not an MBA, and I've been getting heavily into programming in my spare time, as a hobby, in the past year (working towards learning Ruby and C primarily at this point). I'm understanding it because portions of it are obviously analogous to Ruby or C code, for example, VISIBLE appears to mean "printf" or "puts" and "KTHXBYE" "end."
"Here's a nickel, kid. Get yourself a better computer."
User avatar
ThatGuyFromThatPlace
Jedi Knight
Posts: 691
Joined: 2006-08-21 12:52am

Post by ThatGuyFromThatPlace »

I would love to have seen the effort that went into this go into a natural-language programming language.
As it is, this stuff makes my brain hurt something fierce, but it has some elegance to it as well, I wouldn't mind programming in it, but I'd have to be drunk off my ass to actually write anything that retarded.
[img=right]http://www.geocities.com/jamealbeluvien/revolution.jpg[/img]"Nothing here is what it seems. You are not the plucky hero, the Alliance is not an evil empire, and this is not the grand arena."
- The Operative, Serenity
"Everything they've ever "known" has been proven to be wrong. A thousand years ago everybody knew as a fact, that the earth was the center of the universe. Five hundred years ago, they knew it was flat. Fifteen minutes ago, you knew we humans were alone on it. Imagine what you'll know tomorrow."
-Agent Kay, Men In Black
User avatar
Raptor 597
Sith Devotee
Posts: 3338
Joined: 2002-08-01 03:54pm
Location: Lafayette, Louisiana

Post by Raptor 597 »

On phongn's posted implementations page the lolpython thing is pretty need, what with coding Fibonacci numbers and all.
Formerly the artist known as Captain Lennox

"To myself I am only a child playing on the beach, while vast oceans of truth lie undiscovered before me." - Sir Isaac Newton
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

ThatGuyFromThatPlace wrote:I would love to have seen the effort that went into this go into a natural-language programming language.
Like AppleScript or somesuch? A purely natural-language language would be unworkable as the grammar is too imprecise.
Post Reply