m5rcel { Marcel } 58bcb87fd7 Update cmd_dir.py
2025-10-04 11:52:43 +02:00
2025-10-04 11:52:43 +02:00
2025-09-08 22:11:19 +02:00
2025-09-08 22:11:19 +02:00
2025-10-04 11:49:52 +02:00
2025-10-04 11:49:37 +02:00
2025-09-10 13:31:39 +02:00
2025-09-08 22:10:47 +02:00
2025-09-09 17:15:07 +02:00

m5rcode The Unofficial Polyglot Programming Language

Polyglot Status

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 .m5r file.
    • Interpreter extracts, executes, and blends code blocks.
    • Supports obfuscation for added challenge and uniqueness.
  • m5rshell The REPL Shell

    • Interactive REPL for testing code snippets.
    • Commands:
      • new, nano, run, fastfetch, credits, exit, cd
    • Developer-friendly CLI for creating & running .m5r scripts.
  • .m5r File Runner (Interpreter)

    • Executes .m5r polyglot files directly.
    • Efficient, multi-language-aware execution engine.
    • Provides fast output even for obfuscated code.

🔧 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

Heres 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
No description provided
Readme 126 KiB
Languages
Python 100%