Skip to content

Instantly share code, notes, and snippets.

View M-logique's full-sized avatar

M. logique M-logique

View GitHub Profile
@M-logique
M-logique / cursed_lambda.py
Created March 2, 2025 17:40
A mind-bending, unreadable Python script that abuses the Y-Combinator, walrus operators, and lambda functions to achieve maximum obfuscation. It prints a decrypted message and, based on its length, either recurses or reveals the answer to life itself. Use at your own risk.
(lambda f: (lambda x: x(x))(lambda y: f(lambda *args: y(y)(*args))))( # Y-Combinator
lambda self: (
# Walrus operator chaos with a lambda
(x := " ".join(map(lambda z: chr((ord(z) - 1) if z != " " else 32), "Uifsf jt op tqppo!"))),
print(x), # Print obfuscated message
# Even length check madness
(lambda: (self, (lambda: print(f"Life's answer: {(a := 42)}")))[(t := len(x)) % 2])()
)[-1] # Return last item, ensuring callable madness
)()
@M-logique
M-logique / dm_closer.go
Created March 1, 2025 15:09
Fast discord dm closer written in golang
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"sync"
"time"
)
class QuantumMetaProcessor:
"""
This class provides a revolutionary way to solve all world problems
using advanced quantum algorithms (just kidding, it's nonsense).
"""
def __init__(self, quark_lambdaizer=lambda x: x[::-1]):
"""
Initializes the quantum meta-processor.
@M-logique
M-logique / hello_world.py
Created March 1, 2025 14:39
This script showcases a low-level Python memory hack to make a string callable.
"""
Overview of the Script:
------------------------
This script demonstrates an advanced memory manipulation technique in Python, allowing an immutable
string (like "Hello World!") to be called like a function. Normally, in Python, calling a string directly
raises a TypeError, but by modifying Python's internal memory structures, we can bypass this restriction.
Why Was This Script Written?
----------------------------
This script was created as an experiment to manipulate Python’s interned strings in a way that is