Talk:LOLCODE
Jump to navigation
Jump to search
Suggestions for Syntax/Spec Changes
It appears that BUKKIT is more analogous to struct or record in other languages, rather than array. Should this be changed in the description spec?
For an actual array, perhaps a syntax such as
I HAS A <var> ITZ A SHELF, BTW possibly allow typed arrays: I HAS A <var> ITZ A SHELF OF <type> for declaration, and <var> R [THE] <numbr>'TH BOKS ON <shelf-name>, BTW THE is optional. Apostrophe is mandatory, separates TH from numbr, which could be a variable of type NUMBR - THE J'TH BOKS ON ... for retrieval, and [THE] <numbr>'TH BOKS ON <shelf-name> R <value> for assignment should be considered. (SHELF instead of BUKKIT, as changing the BUKKIT to this would be a breaking change)
There is also the possibility of a set type:
I HAS A <var> ITZ A BAG, BTW typed sets possibly: I HAS A <var> ITZ A BAG OF <type> for declaration, PUT <value> IN <bag-name> to include a value in the set, (does not throw an error if it's already in the set) TAEK <value> OUTTA <bag-name> to exclude a value from the set (does not throw an error if it's not in the set) <value> IZ IN <bag-name>, O RLY? ... to test whether a value is in the set.
Freetrav (talk) 14:08, 8 May 2018 (UTC)
It is not enough to programming.
I tried to writed a Pseudo-LOLCODE, it includes MATH library. Can the real LOLCODE supports Math, Random thing generator, Turtle, etc. in its standard libraries? --PrySigneToFry(Talk) 2024年5月3日 09:23 (UTC+8)
- what does this have to do with it not being emough formprogramming. als why is it not? its pretty much just python and is defenitely usesable Gggfr (talk) 10:17, 5 December 2024 (UTC)
Pseudo-LOLCODE code to implement cos(x)
HAI 11.45.14 HOW IZ I cosine YR x AN YR iter BTW Taylor's expansion of the cosine function I HAS A t ITZ 1 I HAS A f ITZ 1 IM IN YR loop TIL BOTH SAEM f AN iter MOD OF f AN 4, O RLY? YA RLY t R (t + ((x ^ f) / (I IZ frac YR f MKAY))) NO WAI t R (t - ((x ^ f) / (I IZ frac YR f MKAY))) OIC f R f + 2 IM OUTTA YR loop FOUND t IF U SAY SO I HAS A pi ITZ 3.1415926535897932384626 BTW Except that idiots don't know this I HAS A degree ITZ A NUMBR I HAS A input ITZ A YARN I HAS A input2 ITZ A YARN GIMMEH input input IS NOW A NUMBR input2 IS NOW A NUMBR degree R input VISIBLE I IZ cosine YR degree AN YR input2 MKAY! KTHXBYE