Share your repls and programming experiences

← Back to all posts
π in LOLCODE
h
AmazingMech2418 (894)

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.

Commentshotnewtop
ChezCoder (1498)

This is a beautiful piece of art...

ChezCoder (1498)

@AmazingMech2418

HAI 1.3
VISIBLE "Your Welcome, keep doing what you do!"
KTHXBYE
AmazingMech2418 (894)

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

NoelB33 (314)

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

AmazingMech2418 (894)

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

NoelB33 (314)

Ok @AmazingMech2418 BTW nice pi approximation

AmazingMech2418 (894)

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

NoelB33 (314)

It doesn’t even lock up now! @AmazingMech2418

[deleted]

strange language....

LizFoster (606)

That is a beautiful coding language #w#

AmazingMech2418 (894)

@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)

LizFoster (606)

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

AmazingMech2418 (894)

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

AmazingMech2418 (894)

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

AmazingMech2418 (894)

@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!

AmazingMech2418 (894)

@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!

LizFoster (606)

@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

AmazingMech2418 (894)

@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...

LizFoster (606)

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

AmazingMech2418 (894)

@LizFoster So, are you going to post it?

LizFoster (606)

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

LizFoster (606)

@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

AmazingMech2418 (894)

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

AmazingMech2418 (894)

@LizFoster Also, maybe try trigonometric infinite series?

LizFoster (606)

@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.

AmazingMech2418 (894)

@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.

LizFoster (606)

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

AmazingMech2418 (894)

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

TheForArkLD (710)

Next : π in APL
Next Next : π in Fortran90

AmazingMech2418 (894)

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

TheForArkLD (710)

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

AmazingMech2418 (894)

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

TheForArkLD (710)

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

AmazingMech2418 (894)

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

TheForArkLD (710)

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

TheForArkLD (710)

@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()
TheForArkLD (710)

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

xxpertHacker (387)

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

AmazingMech2418 (894)

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

xxpertHacker (387)

@AmazingMech2418 Yeah, I read it before commenting.

AmazingMech2418 (894)

@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.)

xxpertHacker (387)

@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.

AmazingMech2418 (894)

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