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
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.
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
This day is Fantastic!
Myers Briggs: ENTJ
Political Compass: -3/-6 DOOMerWoW
"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
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
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.
[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."
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