From 91532eac8a5608b816e5deef9b5c6db81d35a491 Mon Sep 17 00:00:00 2001 From: zekkie Date: Wed, 25 Sep 2024 18:23:06 +0200 Subject: [PATCH 01/11] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b7edc1f..088fd88 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ ![RizzScript-removebg-preview (1)](https://github.com/user-attachments/assets/58008d30-28e5-4cd9-ab47-d0fbd159c90e) -![GitHub License](https://img.shields.io/github/license/zekticezy/rizzscript) ![GitHub top language](https://img.shields.io/github/languages/top/zekticezy/rizzscript) ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/zekticezy/rizzscript) ![GitHub Created At](https://img.shields.io/github/created-at/zekticezy/rizzscript) ![GitHub last commit](https://img.shields.io/github/last-commit/zekticezy/rizzscript) ![GitHub Release](https://img.shields.io/github/v/release/zekticezy/rizzscript?display_name=release&label=latest%20compiler%20version) ![Website](https://img.shields.io/website?url=https%3A%2F%2Frizzscript.zekkie.dev) +![GitHub License](https://img.shields.io/github/license/zekticezy/rizzscript) ![GitHub top language](https://img.shields.io/github/languages/top/zekticezy/rizzscript) ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/zekticezy/rizzscript) ![GitHub Created At](https://img.shields.io/github/created-at/zekticezy/rizzscript) ![GitHub last commit](https://img.shields.io/github/last-commit/zekticezy/rizzscript) ![GitHub Release](https://img.shields.io/github/v/release/zekticezy/rizzscript?label=latest%20compiler%20version) + ![Website](https://img.shields.io/website?url=https%3A%2F%2Frizzscript.zekkie.dev) ------ @@ -64,4 +65,4 @@ This project is licensed under the **MIT License** - see the LICENSE file for de **For questions or feedback, feel free to reach out**! If you encounter any bugs, make sure to report them on our [issues tab](https://github.com/zekticezy/RizzScript/issues). - GitHub: [zekticezy](https://github.com/zekticezy) -- Website: [RizzScript Website](https://rizzscript.zekkie.dev) \ No newline at end of file +- Website: [RizzScript Website](https://rizzscript.zekkie.dev) From e9b58f5843de00466da436ec0498ee2fdd993be9 Mon Sep 17 00:00:00 2001 From: zekkie Date: Wed, 25 Sep 2024 18:26:55 +0200 Subject: [PATCH 02/11] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..af64044 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 zekkie + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 35d8153aef4a65d7374f1aaed1697a3bca237ebc Mon Sep 17 00:00:00 2001 From: zekkie Date: Wed, 25 Sep 2024 18:28:03 +0200 Subject: [PATCH 03/11] Update README.md From e772c4c4827e08e0910098c33606e052f7b10747 Mon Sep 17 00:00:00 2001 From: zekkie Date: Wed, 25 Sep 2024 18:28:55 +0200 Subject: [PATCH 04/11] Update README.md --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 088fd88..388beaf 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,6 @@ *Not JavaScript! Just Python. And brainrot. God fuckin damnit this sucks* # Welcome to the **RizzScript** repository! - ------- - -## Overview **RizzScript** is a brainrot programming language based off Python, designed for making Python worse than it already is. ## Features From 8d6c6f34a9f2ffa5de5fce10a6d5395b77014de4 Mon Sep 17 00:00:00 2001 From: zekkie Date: Wed, 25 Sep 2024 18:30:10 +0200 Subject: [PATCH 05/11] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 388beaf..3a735da 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,8 @@ To create a new RizzScript file, create a new file with the `.rizz` or `.rizzscript` extension. Here’s a simple example: -``` -skibidi hello_world(): - based("Hello World!") +```rizz +hawktuah "Hello World!" ``` ## Syntax Overview From 66509c947d1dbe8522ec4cad092e88ecc3583df9 Mon Sep 17 00:00:00 2001 From: zekkie Date: Wed, 25 Sep 2024 18:31:22 +0200 Subject: [PATCH 06/11] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..a7e18a0 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +me@zekkie.dev. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From 51d2032c454227d1424a4c075e0cac44768fa7f0 Mon Sep 17 00:00:00 2001 From: swagman21 Date: Thu, 26 Sep 2024 18:46:40 +0200 Subject: [PATCH 07/11] Working on adding more shit --- .gitignore | 3 ++- compiler.py | 24 +++++++++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index e79411f..d1419bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -hello_world.rizz \ No newline at end of file +*.rizz +*.rizzscript \ No newline at end of file diff --git a/compiler.py b/compiler.py index ee21011..85ebcc2 100644 --- a/compiler.py +++ b/compiler.py @@ -39,7 +39,7 @@ def syntax(code): 'ongod': 'true', 'bet': 'or', 'cook': 'input', - 'ohio': 'import', + 'fanumtax': 'import', 'diddy': 'try', 'goofy': 'for', 'ahh': 'for', @@ -49,13 +49,22 @@ def syntax(code): 'pluh': 'while', 'ratio': 'elif', 'phonk': 'lambda' - } - + for brainrot_word, python_word in translations.items(): code = code.replace(brainrot_word, python_word) + + # Handle missing closing parentheses for print and input + lines = code.splitlines() + for i in range(len(lines)): + if lines[i].strip().startswith("print("): + if lines[i].count('(') > lines[i].count(')'): + lines[i] += ')' + elif lines[i].strip().startswith("input("): + if lines[i].count('(') > lines[i].count(')'): + lines[i] += ')' - return code + return "\n".join(lines) file_path = input("Enter the path of your .rizz file: ") @@ -64,12 +73,9 @@ def syntax(code): brainrot_code = file.read() python_code = syntax(brainrot_code) - + exec(python_code) - - function_name = python_code.split('(')[0].split()[-1] - exec(f'{function_name}()') - + except Exception as e: print("Error:", e) From 99243d97d5c3b30474a6c12cb795edeca67d0743 Mon Sep 17 00:00:00 2001 From: swagman21 Date: Thu, 26 Sep 2024 18:46:57 +0200 Subject: [PATCH 08/11] Forgot something for print( --- compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler.py b/compiler.py index 85ebcc2..7ff519c 100644 --- a/compiler.py +++ b/compiler.py @@ -34,7 +34,7 @@ def syntax(code): 'skibidi': 'def', 'sigma': 'if', 'cooked': 'else', - 'hawktuah': 'print', + 'hawktuah': 'print(', 'cap' : 'false', 'ongod': 'true', 'bet': 'or', From 01634a3aa53d3149910e0d77f25f56e5eaa2777b Mon Sep 17 00:00:00 2001 From: swagman21 Date: Thu, 26 Sep 2024 18:47:22 +0200 Subject: [PATCH 09/11] Update compiler.py --- compiler.py | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler.py b/compiler.py index 7ff519c..6940f52 100644 --- a/compiler.py +++ b/compiler.py @@ -41,7 +41,6 @@ def syntax(code): 'cook': 'input', 'fanumtax': 'import', 'diddy': 'try', - 'goofy': 'for', 'ahh': 'for', 'gronk': 'none', 'rizz': 'class', From aeea3f3ee8f15be90afa17b8ca3eb698ad17525e Mon Sep 17 00:00:00 2001 From: swagman21 Date: Thu, 26 Sep 2024 18:47:36 +0200 Subject: [PATCH 10/11] Update compiler.py --- compiler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler.py b/compiler.py index 6940f52..323b028 100644 --- a/compiler.py +++ b/compiler.py @@ -46,8 +46,7 @@ def syntax(code): 'rizz': 'class', 'opium': 'return', 'pluh': 'while', - 'ratio': 'elif', - 'phonk': 'lambda' + 'ratio': 'elif' } for brainrot_word, python_word in translations.items(): From 62c70c2d37bba7848083923f30bc31f792bc51a6 Mon Sep 17 00:00:00 2001 From: swagman21 Date: Thu, 26 Sep 2024 19:06:33 +0200 Subject: [PATCH 11/11] Working on icon files. Added error detection. --- compiler.py | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler.py b/compiler.py index 323b028..bbc6dcb 100644 --- a/compiler.py +++ b/compiler.py @@ -52,7 +52,6 @@ def syntax(code): for brainrot_word, python_word in translations.items(): code = code.replace(brainrot_word, python_word) - # Handle missing closing parentheses for print and input lines = code.splitlines() for i in range(len(lines)): if lines[i].strip().startswith("print("):