Share your repls and programming experiences

← Back to all posts
π in Ada
AmazingMech2418 (1104)

Here is a new addition to my series of pi approximations! This one is in Ada!

Update: Thanks to the addition of Nix, and some help from @ConnorBrewster , you can now run this in!

Here are the other approximations so far:
Zig + V -
Prolog -
Haxe -
Objective-C -
Pascal -
D -
Scala -
Reason -
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 @NoelB33 @TheForArkLD , @Warhawk947 , and @LizFoster 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).

This series is mostly over, but if I learn a new programming language that has floating point capabilities, get ready for a new addition! I have learned Assembly (GAS and NASM), BrainF, and Quil, but these ones don't support floating point in an easy-enough way. LOL! If adds COBOL, I am definitely looking forward to that one! Which one should I do next? Let me know what you think!

Also, I'm planning on making a powerful compiled language called Peregrine soon and an object-oriented variant called Falcon and will make pi approximations in both to add to the series!

Ideas for the next ones: Open to suggestions!

DynamicSquid (5068)

Would manually installing Cobol work? I think you can install it on Linux, but I'm not sure

AmazingMech2418 (1104)

@DynamicSquid Possibly, but I've tried and it won't work on, but I could do kind of like what I did with this one...

AmazingMech2418 (1104)

Next up might be WASM! :D