Share your repls and programming experiences

← Back to all posts
π in Reason
AmazingMech2418 (1045)

I think I'm pretty much doing pi approximations in every language now, so, here it is in Reason Node.js!

Reason Node.js is a version of the Reasonml programming language that compiles into Node.js before running.

The issue with NASM has been fixed, but I still need to figure out float addition, subtraction, multiplication, and division before the NASM approximation will be ready.

Here are the other approximations so far:
Tcl -
C++ -
TypeScript -
CoffeeScript -
Elisp -
Clojure -
Scheme -
Erlang -
Elixir -
Julia -
Nim -
Crystal -
F# -
Lua -
Dart -
R -
Haskell -
Raku -
Rust -
Go -
Swift -
C# -
Bash -
Kotlin -
Ruby -
Java -
QBasic -
Fortran -
Forth -
Python and Node.js (Node is linked in post) -
C -

Credit to NoelBryan, TheForArkLD , @Warhawk947 (personal request for the ping), and LizFoster (the @ is removed so they don't get annoying pings every time I post) for inspiring these approximations. Most of these use the Nilakantha Series, although I also use the arctangent method (multiplying the radian arctangent of 1 by 4 to get pi and getting the arctangent with an infinite series) in three of them (Python, Node, and C).

I don't know currently which one is next. If you have any suggestions, please let me know! I would prefer to save esolangs for last. Some examples for ideas for the next ones are like Quil, Scala, etc.

By the way, I'm starting to run out of languages, so please suggest any you would like to see me do. There are now no (or at least very few) official languages left other than esolangs, but there are some other languages (like OCaml, Quil, etc.) that can be found using the method in my tutorial at Though, I am saving esolangs for last (or close to last). After I finish the approximations using the Nilakantha Series, I will go through all of the languages again and do another algorithm (I'm thinking either trapezoidal sums or Monte Carlo). I will also then make a tutorial on transpiling programming languages.

List of all other languages on that I have not done that I plan to at least eventually do:

BrainF - Esolang
Emoticon - Esolang
Bloop - Esolang
Unlambda - Esolang
Quil - Quantum Instruction Language
NASM - Assembly; still working on it

List of languages that I will not do:

BASIC - Already did QBasic and there is not a large enough difference to make me decide to do BASIC as well.
Roy - There is not enough documentation online to do Roy. (I can find pretty much nothing)
Static - Static does nothing... It is just a makefile and it does nothing when you run it.
Flow - JS type checker which seems to not actually work
Deno - Alternative to Node, but runs exactly as TypeScript repls do
WASM - WebAssembly; Doesn't seem to work on and isn't even meant to be programmed in, just compiled into.
OCaml - Doesn't work on
TestJ - I thought it was the J programming language, but it is just Java which I have already done...

AmazingMech2418 (1045)

@CubeyTheCube LOL! Scala was my last of the series though...

AmazingMech2418 (1045)

@CubeyTheCube By the way, for your e^x calculation, I'd recommend using the infinite series by Euler himself (also the entire basis of Euler's identity).

CubeyTheCube (24)

@AmazingMech2418 It showed up as 2 comments for me, so I deleted one. Weird.

AmazingMech2418 (1045)

@CubeyTheCube Well, what was the other comment then? I couldn't see it.

CubeyTheCube (24)

@AmazingMech2418 I said I already have implemented it in scratch with 4 opers, so I want to do something more difficult, and you seem active in the repl community.

CubeyTheCube (24)

@AmazingMech2418 Cubey says that instead of saying “LOL!” or “XD”, you should say “Xd”, due to the fact that Leibniz is still alive. This is not a conspiracy theory, this is a fact.

CubeyTheCube (24)

@AmazingMech2418 How do I do stuff with matrices in Python?

AmazingMech2418 (1045)

@CubeyTheCube Um... Leibniz died 300 years ago... Anyways, for matrices, use a multidimensional array using lists.

zplusfour (898)

I don't think you can make it with SQL...
Cuz there is no variables, but you can make a table and name a cloumn as a variable!
But you shouldn't, Only if you need ;)

DeBeast591 (135)

How about doing Pi in txt? I've done it before. :)

pi = 3.14159265359

ChezCoder (1597)


like the song says:
uv come a LOoooooOoooOOOOOOooOoOOOOOOOOng way

awesome10 (231)

I have said it before, and I will say it again


pi = 3

yes, I know how amazing this is

Highwayman (1444)

Well then. I have been gone too long. Hollyyyy s**** lol.

AmazingMech2418 (1045)

@Highwayman LOL! Next up is Scala. Any suggestions for after that? (like anything that is not an esolang other than Quil?)

Highwayman (1444)

@AmazingMech2418 asm. jk. Idk I don’t very many languages. Hm... uhhhhh dam idk. Also WASM does have a human readable format that doesn’t actually look too bad.

AmazingMech2418 (1045)

@Highwayman WASM doesn't work on for some reason and I already did Bash.