mirror of
https://github.com/m4rcel-lol/m5rcode.git
synced 2025-12-06 11:03:57 +05:30
58bcb87fd7ec8bfe5f773070ced3c0567dfd27ea
m5rcode – The Unofficial Polyglot Programming Language
m5rcode is an experimental polyglot programming language written with a blend of Python, JavaScript, PHP, C#, and C++.
It uses obfuscation and cross-language embedding to allow developers to write multi-language scripts in a single file (.m5r).
The project includes a custom REPL shell (m5rshell) and an interpreter for .m5r files.
✨ Features
-
Polyglot Language Core
- Mix Python, JavaScript, PHP, CSS, C#, and C++ in a single
.m5rfile. - Interpreter extracts, executes, and blends code blocks.
- Supports obfuscation for added challenge and uniqueness.
- Mix Python, JavaScript, PHP, CSS, C#, and C++ in a single
-
m5rshell – The REPL Shell
- Interactive REPL for testing code snippets.
- Commands:
new,nano,run,fastfetch,credits,exit,cd
- Developer-friendly CLI for creating & running
.m5rscripts.
-
.m5r File Runner (Interpreter)
- Executes
.m5rpolyglot files directly. - Efficient, multi-language-aware execution engine.
- Provides fast output even for obfuscated code.
- Executes
🔧 Requirements
- Python 3.8+
📦 Installation
Clone this repository:
git clone https://github.com/m4rcel-lol/m5rcode.git
cd m5rcode
⚡ Quick Start
Run the REPL shell
python3 m5rshell.py
📝 Example
Here’s a hello.m5r script that prints Hello world in all supported languages:
<?py
_ = ''.join([chr(c) for c in [72,101,108,108,111,32,119,111,114,108,100]])
print(_)
?>
<?js
(function(){
var x=[72,101,108,108,111,32,119,111,114,108,100];
var s='';
for(var i of x){ s+=String.fromCharCode(i); }
console.log(s);
})();
?>
<?php
${a}=array(72,101,108,108,111,32,119,111,114,108,100);
echo implode(array_map('chr',${a})) . "\n";
?>
<?css
body { color: #00ff00; background: black; }
?>
<?cs
Console.WriteLine(string.Join("", new int[] {72,101,108,108,111,32,119,111,114,108,100}.Select(c => (char)c)));
?>
<?cpp
int arr[] = {72,101,108,108,111,32,119,111,114,108,100};
for(int i = 0; i < 11; i++) std::cout << (char)arr[i];
std::cout << std::endl;
?>
📂 Project Structure
m5rcode/
├─ m5rshell.py # The REPL shell
├─ m5r_interpreter.py # The .m5r polyglot interpreter
├─ files/ # Sample m5rcode scripts
├─ utils/ # Handling everything
├─ commands # Commands handling
├─ version.txt # Version of m5rcode showing on fastfetch command
├─ requirements.txt # Modules u need to install for m5rcode to work.
└─ README.md
🤝 Contributing
Contributions are welcome!
If you want to add support for more languages, open an issue or PR.
👥 Credits
- Creator: m5rcel
- Contributors: The m5rcode community
📜 Where can I install m5rcode from?
You can install m5rcode from it's official website pythonjs.cfd hover over and copy paste to your browser.
Description
Languages
Python
100%