Beremiz is a fun, experimental language based on the stack-based principles of Porth, created by Alexey Kutepov. While Beremiz is designed to be playful and educational, it's not intended for serious programming. Its performance is limited because it runs on top of Lua, making it relatively slow.
The name Beremiz is inspired by the character Beremiz Samir, known as "The Man Who Counted." He was created by Júlio César de Mello e Souza, a Brazilian teacher and writer better known as Malba Tahan.
Ensure you have Lua installed on your system. You can download it from the official Lua website.
Clone this repository locally:
git clone https://github.com/AdaiasMagdiel/beremiz.git
cd beremiz
There are two ways to run Beremiz code:
-
Using the REPL:
lua main.lua
-
Passing a file:
lua main.lua [file]
You can find several example files in the examples
folder to help you get
started. Here are some key examples:
- Factorial: A program that calculates the factorial of a number.
- Pythagorean Theorem: Demonstrates the calculation of the hypotenuse in a right-angled triangle using the Pythagorean theorem.
- Quadratic Equation: Solves quadratic equations and finds their roots.
- FizzBuzz: Implements the classic FizzBuzz problem, printing numbers from 1 to 15 but replacing multiples of 3 with "Fizz", multiples of 5 with "Buzz", and multiples of both with "FizzBuzz".
For a complete understanding of the Beremiz language, we recommend exploring our detailed documentation. It covers from basic syntax to advanced features.
This project uses Leste for test cases. Ensure that Leste is installed and run the tests with:
leste -vx
Contributions are welcome! If you have suggestions for improvements or new features, please create an issue or submit a pull request. Please ensure your code adheres to the existing style guidelines and includes appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.