Mantra is a new dynamically typed language that I am creating using Python(I know ;-)), during reading of my book Crafting Interpreters. Since I am a student and don't have that much money with me right now, I am going to make this language and repo open source to promote the book and my learnings, so that more people can buy the book and support the author.
Hopefully you guys are gonna like the language I am writing here, It's going to follow C style implementations, with a flavour of some amount of Python.
Since Mantra is an interpreted language, we are going to keep the scope pretty limited, implement few data types, operators and GC, just enough to be a good Turing complete language(surely not like BrainFuck). The hope is to have simple usable API, that helps me understand the know-how's of how to design and implement a programming language(not sure how much effort to make a good one). Heck I have seen very few in the modern times, as programmers are busy creating new JavaScript libraries, rather than learning something that actually increases experience.
Btw, I got the name Mantra from ChatGPT and I think it's the best use of AI as I often find myself getting annoyed getting not a good name for my projects. Also not sure why, but I am getting this primeagen's voice while writing this, maybe I have watched too many of his videos, but he is surely the one that inspired me to do this in one of his videos recently.
If someone really liked this project and is interested in building a full LLVM fronted compiler together do let me know as I am kind of interested on that one too.
Hello world in Mantra syntax is simple,
// this is a comment
print("hello world, from Mantra");
- Booleans
- Numbers (int and floats)