Skip to content
← Back to Community
π in LOLCODE
Profile icon
AmazingMech2418

This is an approximation of pi in the famous language of the lolcats: LOLCODE. This all started because

@Warhawk947
said in https://repl.it/talk/share/FIRST-C-PROJECT/33478 that
@LizFoster
should do a pi approximation in every language and I said "Imagine pi in LOLCODE or Emoticon or some other esolang..." and
@Warhawk947
said not to even think about it, so here it is! By the way, this uses the Nilakantha Series.

Voters
Profile icon
Camto
Profile icon
N0p3
Profile icon
TheForArkLD
Profile icon
Navinor
Profile icon
ChezCoder
Profile icon
Kai_Justice
Profile icon
NoelB33
Profile icon
AmazingMech2418
Comments
hotnewtop
Profile icon
ch1ck3n
HAI CH1CK3N I HAS A VAR AMAZE ITZ TRUE VISIBLE SMOOSH "AMAZE = " AMAZE MKAY KTHXBYE
Profile icon
AmazingMech2418

@ch1ck3n
Thank you!

Profile icon
ChezCoder

This is a beautiful piece of art...

Profile icon
AmazingMech2418

@ChezCoder
LOL! Thank you!

Profile icon
ChezCoder

@AmazingMech2418

HAI 1.3 VISIBLE "Your Welcome, keep doing what you do!" KTHXBYE
Profile icon
AmazingMech2418

@ChezCoder
There's a LOLCODE 1.3?

Profile icon
ChezCoder

@AmazingMech2418
idk pretty sure

Profile icon
ChezCoder

@AmazingMech2418
yes there is, check the code here https://esolangs.org/wiki/LOLCODE

Profile icon
AmazingMech2418

@ChezCoder
It looks like there is even 1.4. I think Repl.it only supports 1.2 though...

Profile icon
NoelB33

For some reason this totally freezes up my screen for like 10 seconds.

Profile icon
AmazingMech2418

@NoelBryan
That happens to me too. It's because LOLCODE doesn't run loops smoothly and locks up the browser while the loop runs.

Profile icon
NoelB33

Ok

@AmazingMech2418
BTW nice pi approximation

Profile icon
AmazingMech2418

@NoelBryan
I just reduced the loop length, so it shouldn't lock up too badly now.

Profile icon
NoelB33

It doesn’t even lock up now!

@AmazingMech2418

Profile icon
AmazingMech2418

@NoelBryan
That's great!

Profile icon
AmazingMech2418

@NoelBryan
Also, thank you!

Profile icon
Navinor

<3

Profile icon
[deleted]

strange language....

Profile icon
LizFoster

That is a beautiful coding language #w#

Profile icon
AmazingMech2418

@LizFoster
LOL! The grammar police would not agree though...

By the way, I'm VERY excited! The CEO of Repl.it just upvoted my post!!! (The Snake in BASIC one, not this)

Profile icon
LizFoster

@AmazingMech2418
Oh, cool! I've talked with him once or twice, he's quite nice. ^ ^

Profile icon
AmazingMech2418

@LizFoster
Yeah. I saw that comment thread. He didn't actually comment on my post, but is one of the 8 upvoters!

Profile icon
AmazingMech2418

@LizFoster
However, I just made a post that is Pong in BASIC, so maybe, he'll comment on that one!

Profile icon
AmazingMech2418

@LizFoster
(⊙o⊙) THE CEO OF REPL.IT COMMENTED ON MY POST! It was asking about what a bug I found with the CLC command in BASIC, but still, THE CEO OF REPL.IT COMMENTED ON MY POST!

Profile icon
LizFoster
Profile icon
AmazingMech2418

@LizFoster
Thank you!

Profile icon
AmazingMech2418

@LizFoster

image

Profile icon
LizFoster
Profile icon
AmazingMech2418

@LizFoster
The CEO of Repl.it upvoted my Pong repl as well now! Also, as you probably already saw since you were mentioned in it since it was inspired by your many pi approximations, I just learned Forth and created a pi approximation in it! And yes, I'm learning all of the classic (old) languages (already BASIC and now Forth...). Maybe, if Repl.it adds it, I might also try and learn COBOL!

Profile icon
LizFoster

@AmazingMech2418
I feel like even if I released π approximations compilation 4, it'd get no attention, since so many people are doing them now... T~T

Profile icon
AmazingMech2418

@LizFoster
I think it would easily get a lot of attention! After all, you started the trend of pi approximations, so people look towards yours anyways more. Anyways, really everyone is doing the same algorithms that you have already done (of course, I've done the Nilakantha Series and arctangent method which you have not done yet, but a lot of people are doing Riemann Sums, the Chudnovsky Algorithm, etc. which you started). However, with yours, everyone can always learn something because you use different algorithms each time instead of just putting the same algorithm into multiple languages like many people are doing. Also, I can tell you that if you post it right now, it will be #1 on "hot" in Talk...

Profile icon
LizFoster

@AmazingMech2418
Ah, okay! I guess you're right. I'm glad I've started something good here either way! ^ ^*

Profile icon
AmazingMech2418

@LizFoster
So, are you going to post it?

Profile icon
LizFoster

@AmazingMech2418
Yeah, I will ^ ^* It's not quite finished yet, though, so it may be a day or two.. T~T

Profile icon
LizFoster

@AmazingMech2418
How many approximations would you like to see on the fourth installment? I have six (I believe) lined up currently, but I want more. The problem now is, I've already done most of the mainstream and easy-to-find approximations, so it is harder to find fresh ones.. T~T

Profile icon
AmazingMech2418

@LizFoster
I think 10 might be good if you can do that. Also, have you tried Wolfram MathWorld? https://mathworld.wolfram.com/PiApproximations.html

Profile icon
AmazingMech2418

@LizFoster
Also, maybe try trigonometric infinite series?

Profile icon
LizFoster

@AmazingMech2418
Yes, I have tried both Wolfram MathWorld π pages, and I can't find much that is very understandable or easy(ish) to articulate... I am also using pi314, and Wikipedia, but still nothing that I haven't done before that doesn't hurt my mind.. I should really just look deeper, though.

Profile icon
AmazingMech2418

@LizFoster
Wikipedia has some infinite series for radian trigonometry that you can use to calculate pi. I sent you the link a few days ago (maybe a few weeks... I've lost track of time lately). I've mainly done the arctangent method, but you should also be able to do sine and cosine as well.

Profile icon
LizFoster

@AmazingMech2418
Yeah, true. I'll get right on it!

Profile icon
AmazingMech2418

@LizFoster
Also, you could do the continued fraction thing at https://en.wikipedia.org/wiki/Pi#Transcendence too.

Profile icon
AmazingMech2418

@LizFoster
That same Wikipedia page has quite a few other infinite series that I don't think you have done before.

Profile icon
TheForArkLD

Next : π in APL
Next Next : π in Fortran90

Profile icon
AmazingMech2418

@TheForArkLD
I wish I could do Fortran in Repl.it...

Profile icon
TheForArkLD

@AmazingMech2418

1st : Make Bash project
2nd : Make fortran file(test.f90)
3rd : Type gfortran test.f90
4th : Type ./a.out

Profile icon
AmazingMech2418

@TheForArkLD
So, kind of like what I did with Forth? I used gforth for Forth...

Profile icon
TheForArkLD

@AmazingMech2418
(Next Next Next : DefLang)

Profile icon
TheForArkLD
Profile icon
AmazingMech2418

@TheForArkLD
I finished APL...

Profile icon
TheForArkLD

@AmazingMech2418
Thanks :D(Probably,Fortran is easy than APL)

Profile icon
AmazingMech2418

@TheForArkLD
Yeah. Fortran is actually used some today still... I don't think anyone uses APL...

Profile icon
TheForArkLD

@AmazingMech2418
Yes,but APL have friend,name is J

Profile icon
AmazingMech2418

@TheForArkLD
And Fortran is done now too!

Profile icon
TheForArkLD

@AmazingMech2418
Thanks!
Next : DefLang?(My original language,it’s works on nodejs)

var fs=require('fs') var defl=require('deflang') defl(fs.readFileSync('main.dfl').toString()
Profile icon
TheForArkLD
Profile icon
TheForArkLD

@AmazingMech2418
(This is my language if you can it then please make it :))

Profile icon
xxpertHacker

Why lol code though? It's not the worst but still.

Profile icon
AmazingMech2418

@StudentFires
Read this post and you'll understand... I took it as a challenge...

Profile icon
xxpertHacker

@AmazingMech2418
Yeah, I read it before commenting.

Profile icon
AmazingMech2418

@StudentFires
So, why are you saying "Why lol code though? It's not the worst but still."? It was a challenge (or at least I took it as one. I'm very competitive.)

Profile icon
xxpertHacker

@AmazingMech2418
I found this out weeks ago? You told me before. I have work I need to do, so I'm held up for about a whole month right now. I can't go off and calculate Tau in every language.

Profile icon
AmazingMech2418

@StudentFires
Why would you need to? You have pi!