Share your repls and programming experiences

← Back to all posts
π in Emacs Lisp (Elisp)

I think I'm pretty much doing pi approximations in every language now, so, here it is in Emacs Lisp (Elisp), a dialect of Lisp!

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.

Credit to @NoelBryan, @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).

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, OCaml, Tcl, 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 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 https://repl.it/talk/learn/How-to-Get-a-List-of-All-Replit-Langauges/34411. 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.

AmazingMech2418 (910)

List of all other languages on Repl.it 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
Tcl
OCaml
Reason - New syntax of OCaml
WASM - WebAssembly
TestJ
Scala
NASM - Assembly; still working on it

List of languages that I might decide to do, but likely will not:

CoffeeScript - "Unfancy JavaScript"
C++ - Object Oriented C
Deno - Alternative to Node
Flow - JS Type Checker
TypeScript - Another, more well-known JS type checker.

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.

AmazingMech2418 (910)

@Warhawk947 Yes. I saw that, but it doesn't include enough documentation. No loops or functions there!

firefish (597)

@AmazingMech2418 Maybe you could try my own language: VLang? It's in the making, but it should contain the tools to do pi already. Here is the API for it, all you need to do is (try to) send a POST request to it with code and it'll give you back the output

AmazingMech2418 (910)

@johnstev111 I'm trying to do mostly real languages for now and then maybe do some of other replitors' languages like VLang for example. I was going to do L by request from someone other than its creator, but it didn't include loops or functions, so I could not do it.

firefish (597)

@AmazingMech2418 Ok, maybe a real language: GAS? (gnu assembler, you'll probably struggle with this if you are struggling with nasm)

AmazingMech2418 (910)

@johnstev111 I might do GAS after I figure out NASM.