#esoteric-python

1 messages · Page 102 of 1

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

True
sick hound
#

!e

__debug__ = False
print("test")```
night quarryBOT
#

@sick hound :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 | SyntaxError: cannot assign to __debug__
sick hound
#

ef

tribal moon
#

go to your command line

sudden willow
#

!e
print(_:={"__debug__":False}["__debug__"])

tribal moon
#

and write python and then write print(__debug__) it should be True

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

False
tribal moon
#

exit, and write python -O, and print(__debug__) it should be False

sudden willow
#

ooo

#

setting fake debug to false 😎

sick hound
#

interesting

sudden willow
sick hound
#

what does the -o mean?

sudden willow
#

-O : remove assert and __debug__-dependent statements; add .opt-1 before .pyc extension; also PYTHONOPTIMIZE=x

sick hound
#

wack

sudden willow
#

!e
"attempt at an infinite loop with a list comprehension without memError #4390" print(_:=["_"], (_, _.append(_), _.pop())for _ in _)

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 2
002 |     print(_:=["_"], (_, _.append(_), _.pop())for _ in _)
003 |                     ^
004 | SyntaxError: Generator expression must be parenthesized
sudden willow
#

hm

sick hound
#

!e
print([[i.append("e"), i.pop(0), print("e")][2] for i in [["e"]] for j in i])

#

huh

#

!e
print([[i.remove("e"), i.add("e"), print("e"), i][3] for i in [{"e"}] for j in i])

sudden willow
#

why i.pop(0)? doesnt .pop already just pop the last item in the list

sick hound
#

i.pop(0) pops the first element

sudden willow
#

oh

sick hound
#

!e
print([[i.remove("e"), i.add("e"), print("e"), i][3] for i in [{"e"}] for j in i])

#

!d set

#

!e
print([[i.clear(), i.add(__import__("random").choice("1239ajv90jeq909qjvj9qej")), print("e"), i][3] for i in [{"e"}] for j in i])

sudden willow
#

forgot a "

sick hound
#

ah

#

wierd

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

001 | e
002 | e
003 | [{'j'}, {'j'}]
sick hound
#

why are there 2 e's

#

lol

sudden willow
#

!e
print(lambda x: if (y := 6) == x: ...)

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     print(lambda x: if (y := 6) == x: ...)
003 |                     ^
004 | SyntaxError: invalid syntax
sudden willow
#

walrus no worky in lambda 😭

sick hound
#

what does ...

#

do?

sudden willow
#

its == pass

#

!e
print(....__class__())

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

Ellipsis
next flame
#

@sudden willow thats because you cant have a if statement in a lambda

#

only if expr

sudden willow
#

you cant?

#

thats weird

#

i thought you could

next flame
#

you cant do print(if (y := 6) == x: ...) either

#

because thats a if statement

sick hound
#

wack

next flame
#

you can do print(blah if (y := 6) == x else blah2)

#

with an if expression

sick hound
#

how does walruses work in list comprehension?

sudden willow
# sick hound wack

its one of the things i use in my obfuscation algorithm to generate print statements

#

!e

print(chr(ord(True.__str__()[0]).__sub__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__()))))))))))))).__add__(chr(ord(True.__str__()[1]).__sub__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True.__int__().__add__(True))))))))))))))).__add__((....__class__().__str__())[2]).__add__(....__class__().__str__()[2]).__add__(chr(ord(True.__str__()[1]).__sub__(True.__int__().__add__(True.__int__().__add__(True.__int__()))))))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

Hello
sick hound
#

replace all the True with __debug__

#

kek

sudden willow
#

__debug__.__bool__().__int__()

sick hound
#

wait can you abuse truthy vars?

#

!e

print(__file__.__bool__.__int__())```
night quarryBOT
#

@sick hound :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | NameError: name '__path__' is not defined
sick hound
#

huh

#

i was lied to

#

by stack overflow

next flame
#

__bool__ not bool()

sudden willow
#

well true == 1 so anything that returns true yea

sick hound
#

!e

print(__name__.__bool__.__int__())```
night quarryBOT
#

@sick hound :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | AttributeError: 'str' object has no attribute '__bool__'
sick hound
#

?

sudden willow
next flame
#

bool() falls back to __len__ if __bool__ doesnt exist iirc

sudden willow
#

!e

print(__name__)
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

__main__
sudden willow
#

!e

print(__name__.__str__()[0])
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

_
next flame
#

!e print(__name__.__len__().__bool__().__int__())

night quarryBOT
#

@next flame :white_check_mark: Your eval job has completed with return code 0.

1
sudden willow
#

interesting

sick hound
#

ah there instead of True

#

lmfao

sudden willow
#

!e
print(__name__.__bool__())

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | AttributeError: 'str' object has no attribute '__bool__'
sudden willow
#

quirky

sick hound
#

!e
py print(chr(ord(__name__.__len__().__bool__().__str__()[0]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))))))))))))).__add__(chr(ord(__name__.__len__().__bool__().__str__()[1]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__()))))))))))))))).__add__((....__class__().__str__())[2]).__add__(....__class__().__str__()[2]).__add__(chr(ord(__name__.__len__().__bool__().__str__()[1]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))))))

night quarryBOT
#

@sick hound :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     py print(chr(ord(__name__.__len__().__bool__().__str__()[0]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))))))))))))).__add__(chr(ord(__name__.__len__().__bool__().__str__()[1]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(
... (truncated - too long)

Full output: https://paste.pythondiscord.com/siyinixedu.txt

sick hound
#

um

#

wait oh

#

invalid syntax

#

!e

print(chr(ord(__name__.__len__().__bool__().__str__()[0]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))))))))))))).__add__(chr(ord(__name__.__len__().__bool__().__str__()[1]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__()))))))))))))))).__add__((....__class__().__str__())[2]).__add__(....__class__().__str__()[2]).__add__(chr(ord(__name__.__len__().__bool__().__str__()[1]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))))))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

Hello
sudden willow
#

pretty cool

sick hound
#

now just need to get rid of those pesky numbers

#

and boom

#

greatest obfsc algorithm out there

sudden willow
#

oh i put 3

#

!e

print(__name__.__len__().__bool__().__int__().__add__(_:=__name__.__len__().__bool__().__int__().__add__(_:=__name__.__len__().__bool__().__int__().__add__(_:=__name__.__len__().__bool__().__int__().__add__(_:=__name__.__len__().__bool__().__int__().__add__(_:=__name__.__len__().__bool__().__int__().__add__(_:=__name__.__len__().__bool__().__int__().__add__(_:=__name__.__len__().__bool__().__int__().__add__(_:=__name__.__len__().__bool__().__int__().__add__(_:=__name__.__len__().__bool__().__int__()))))))))))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

10
sick hound
#

!e

print(bool(__doc__))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

False
sick hound
#

!e
print(__doc__.__bool__().__int__())

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

0
sick hound
#

here's a 0

sudden willow
#

!e

print(__doc__.__bool__().__add__(__name__.__len__().__bool__().__int__()))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

1
sick hound
#

lmfao

sudden willow
#

you know your codes good when theres more underscores then any other character

sick hound
#

!e

print(chr(ord(__name__.__len__().__bool__().__str__()[__doc__.__bool__().__int__()]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))))))))))))).__add__(chr(ord(__name__.__len__().__bool__().__str__()[__name__.__len__().__bool__().__int__()]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__()))))))))))))))).__add__((....__class__().__str__())[__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())]).__add__(....__class__().__str__()[__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())]).__add__(chr(ord(__name__.__len__().__bool__().__str__()[__name__.__len__().__bool__().__int__()]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))))))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

Hello
sick hound
#

faq

#

there's still a 2

#

!e

print(chr(ord(__name__.__len__().__bool__().__str__()[__doc__.__bool__().__int__()]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))))))))))))).__add__(chr(ord(__name__.__len__().__bool__().__str__()[__name__.__len__().__bool__().__int__()]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__()))))))))))))))).__add__((....__class__().__str__())[__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())]).__add__(....__class__().__str__()[__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())]).__add__(chr(ord(__name__.__len__().__bool__().__str__()[__name__.__len__().__bool__().__int__()]).__sub__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))))))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

Hello
sick hound
#

oh yes

sudden willow
#

!e

eval(chr(112).__add__(chr(114).__add__(chr(105).__add__(chr(110).__add__(chr(116).__add__(chr(40).__add__(chr(34).__add__(chr(72).__add__(chr(101).__add__(chr(108).__add__(chr(108).__add__(chr(111).__add__(chr(44).__add__(chr(32).__add__(chr(87).__add__(chr(111).__add__(chr(114).__add__(chr(108).__add__(chr(100).__add__(chr(33).__add__(chr(34).__add__(chr(41).__add__(chr(10).__add__(""))))))))))))))))))))))))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

Hello, World!
sick hound
#

numbers

sudden willow
#

this was my old obfuscation algorithm

#

literally just
letter = ord(letter) letter = f"chr({letter}).__add__(" parentheses_count += 1

sick hound
#

kek

#

what's the new one like

sudden willow
sick hound
#

ah lmfao

sudden willow
#

translated its just print("Hello, World!")

sick hound
#

lmfao

sudden willow
sick hound
#

tbf that obf algo wouldn't be too bad

sudden willow
#

a bunch of random variables so anyone trying to dump it gets them

sick hound
#

to decompile

sudden willow
#

!e
print(__import__("codecs").decode("uggcf://zrqvn.qvfpbeqncc.arg/nggnpuzragf/781621755261353995/802537966877933578/vzntr0.wct", "rot13"))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

https://media.discordapp.net/attachments/781621755261353995/802537966877933578/image0.jpg
sudden willow
#

which translates to trollar

sick hound
#

kek

#

why are there so many random global trolar

sudden willow
#

ah its my global trollar algorithm

sick hound
#

lmfao

sudden willow
#

def trollarglobal(count): global msg msg = "global trollar;" msg = msg*(int(count))

#

then you call it with random.randint

sick hound
#

i see

#

either way you gotta use them improvements smh, no need for random Trues or random numbers!!!

#

!e
2.__mul__(3)

#

huh

#

is there no such thing as mult

sudden willow
#

its __mul__

sick hound
#

ah

night quarryBOT
#

@sick hound :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     2.__mul__(3)
003 |       ^
004 | SyntaxError: invalid syntax
sudden willow
#

!e
print(very_real_constant:=(__import__(\"base64\").b64decode(\"InRyb2xlZCI=\")))

#

oh

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 | SyntaxError: unexpected character after line continuation character
sudden willow
#

huh

#

!e
print((__import__(\"base64\").b64decode(\"InRyb2xlZCI=\")))

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 | SyntaxError: unexpected character after line continuation character
sudden willow
#

waht

sick hound
#

wha

sudden willow
#

ah wait

#

discord made backslashes

sick hound
#

!e
-1.__abs__()

night quarryBOT
#

@sick hound :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     -1.__abs__()
003 |        ^
004 | SyntaxError: invalid syntax
sick hound
#

scam

#

wait

sudden willow
#

!e
print((__import__("base64").b64decode("InRyb2xlZCI=")))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

b'"troled"'
sudden willow
#

troled

sick hound
#

why is it a binary?

sudden willow
#

no clue

#

i didnt make it one

sick hound
#

!e
print(__doc__.__bool__().__int__().__sub__(__name__.__len__().__bool__().__int__()))

#

oop

#

uhhh

#

scammeddd

#

wait no

#

i'm just dumb

#

!e
print(__doc__.__bool__().__int__().__mul__(__name__.__len__().__bool__().__int__()))

#

there

#

!e
print(__doc__.__bool__().__int__().__mul__(__name__.__len__().__bool__().__int__()))

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

0
sudden willow
#

!e
print((__doc__.__bool__().__int__().__sub__(__name__.__len__().__bool__().__int__())).__str__()[3])

#

huh

sick hound
#

!e
print((doc.bool().int().sub(name.len().bool().int())).str()[0])

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

-
sick hound
#

yep

sudden willow
#

ah nice

sick hound
#

but anyways you should implement that into your obfsc algorithm!

#

it'll be funny

sudden willow
#

yea lol

#

wonder how i can convert python functions into a string and get characters inside them

sick hound
#

True -> __name__.__len__().__bool__()

#

0 -> __doc__.__bool__().__int__()

#

1 -> __name__.__len__().__bool__().__int__()

#

2 -> __name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())

#

etc etc

sudden willow
#

!e
print(__main__.__bool__())

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | NameError: name '__main__' is not defined
sudden willow
#

huh

sick hound
#

wait

#

i thought __main__ was supposed to be a str?

#

not a dunder

sudden willow
#

!e
print((__name__)if(__name__)==(__main__)else(print("hi")))

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | NameError: name '__main__' is not defined
sudden willow
#

i guess so

sick hound
#

!e
print((name)if(name)==("main")else(print("hi")))

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

__main__
sick hound
#

also for the long numbers

sudden willow
#

never really understood the concept of if __name__ == __main__

sick hound
#

you could try to use __mul__ and do prime factorization

tribal moon
sick hound
#

there's also __pow__

sudden willow
#

theres probably so many dunder methods i can abuse but dont know how

sick hound
#

there's a bunch

tribal moon
#

there's A LOT

sick hound
#

here's a thing i'm looking at rn

#

but there are def many more

sudden willow
#

!e
print(0.__truediv__(0)) # troll

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     print(0.__truediv__(0)) # troll
003 |             ^
004 | SyntaxError: invalid syntax
sudden willow
#

what

earnest wing
#

0 . or (0).

sudden willow
#

nah i have another way

#

!e
print(False.__int__().__truediv__(False.__int__()))

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | ZeroDivisionError: division by zero
sudden willow
#

troled

tribal moon
#

maybe do __debug__.__not__()

#

nevermind I thought it'd have not

sudden willow
#

how do you see everything that it has

#

!e
print(__debug__)

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

True
sudden willow
#

or is that possible

tribal moon
#

it is

#

!e py print(dir(1))

night quarryBOT
#

@tribal moon :white_check_mark: Your eval job has completed with return code 0.

['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'as_integer_ratio', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes']
tribal moon
#

all of the things of an int

#

cool right?

sudden willow
#

very

#

!e
print(__debug__.__bool__().__int__().__not__())

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | AttributeError: 'int' object has no attribute '__not__'
tribal moon
#

hm

sudden willow
#

what does __not__ apply to

tribal moon
#

maybe do

#

__debug__.__rshift__(__debug__) for false

sudden willow
#

!e
print(__debug__.__rshift__(__debug__))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

0
sudden willow
#

interesting

#

!e

print(dir(bool))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'as_integer_ratio', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes']
sudden willow
#

hmm i wonder

#

!e

print(True.__int__().(dir(bool)[1]))
night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     print(True.__int__().(dir(bool)[1]))
003 |                          ^
004 | SyntaxError: invalid syntax
sudden willow
#

damn

tribal moon
#

use getattr

sick hound
#

?

tribal moon
#

also you don't have to use __int__()

sudden willow
#

yea ik im just used to using it

tribal moon
#

maybe try getattr(True, dir(bool)[1])

sudden willow
#

!e
print(getattr(True, dir(bool)[1]))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

<method-wrapper '__add__' of bool object at 0x7f8c57896180>
sudden willow
#

bool has __gt__??

tribal moon
#

yes

#

bools are integers

#

True + True is 2

sudden willow
#

!e


print((_) if True.__bool__().__gt__(True.__bool__().__int__()))
night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     print((_) if True.__bool__().__gt__(True.__bool__().__int__()))
003 |                                                                   ^
004 | SyntaxError: invalid syntax
sudden willow
#

damn i guess i just forgot how to do that

sick hound
#

wait what are you trying to do

#

lmfao

sudden willow
#

use __gt__ effectively

lavish shore
#

that looks cool
what is the (_) for?

sudden willow
#

oh its undefined

floral meteor
#

I managed to make an object self such that

print((n:=[__import__('random').randint(1,100)for _ in range(100)]),(lambda l:None if len(l)<1 else l[0]if len(l)==1 else self(l[0]>l[1]and[l[0]]+l[2:]or l[1:]))(n),sep='\n')

returns

[30, 47, 66, 49, 82, 36, 85, 69, 36, 84, 92, 5, 19, 2, 91, 25, 57, 68, 93, 60, 86, 65, 10, 18, 22, 52, 8, 50, 30, 7, 75, 69, 91, 27, 11, 5, 92, 81, 50, 89, 80, 22, 15, 36, 42, 62, 37, 6, 93, 94, 35, 33, 39, 58, 59, 15, 90, 79, 45, 56, 22, 20, 57, 37, 82, 32, 47, 95, 53, 46, 96, 96, 13, 43, 10, 86, 43, 44, 49, 94, 12, 86, 60, 19, 18, 95, 4, 41, 76, 14, 52, 72, 46, 85, 27, 78, 75, 14, 5, 69]
96

Your challenge for today is to figure out how I did it ahahahaha

night quarryBOT
#

@floral meteor :white_check_mark: Your eval job has completed with return code 0.

lel
floral meteor
#

!e ```py
print(dir(debug))

night quarryBOT
#

@floral meteor :white_check_mark: Your eval job has completed with return code 0.

['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'as_integer_ratio', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes']
floral meteor
#

!e ```py
print(debug)

night quarryBOT
#

@floral meteor :white_check_mark: Your eval job has completed with return code 0.

True
lavish shore
#

oh ye I should paste some things I worked on before knowing this server exists

#

!e

print((lambda f: lambda x: '' if x == 0 else (lambda f: lambda x: '' if x == 0 else '*' + f(f)(x - 1))(lambda f: lambda x: '' if x == 0 else '*' + f(f)(x - 1))(x) + '\n' + f(f)(x - 1))(lambda f: lambda x: '' if x == 0 else (lambda f: lambda x: '' if x == 0 else '*' + f(f)(x - 1))(lambda f: lambda x: '' if x == 0 else '*' + f(f)(x - 1))(x) + '\n' + f(f)(x - 1))(5), end="")
night quarryBOT
#

@lavish shore :white_check_mark: Your eval job has completed with return code 0.

001 | *****
002 | ****
003 | ***
004 | **
005 | *
lavish shore
#

yay

toxic jewel
#

!e print(dir)

night quarryBOT
#

@toxic jewel :white_check_mark: Your eval job has completed with return code 0.

<built-in function dir>
toxic jewel
#

!e print(dir(complex))

night quarryBOT
#

@toxic jewel :white_check_mark: Your eval job has completed with return code 0.

['__abs__', '__add__', '__bool__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__int__', '__le__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__pos__', '__pow__', '__radd__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rmod__', '__rmul__', '__rpow__', '__rsub__', '__rtruediv__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', 'conjugate', 'imag', 'real']
floral meteor
#

!e ```py
=4
a=lambda:
+=1
a()
print(_)

night quarryBOT
#

@floral meteor :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 2
002 |     a=lambda:_+=1
003 |               ^
004 | SyntaxError: invalid syntax
floral meteor
#

haw

toxic jewel
#

!e ```py
=4
a=lambda :+=1
a(
)
print(_)

night quarryBOT
#

@toxic jewel :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 2
002 |     a=lambda _:_+=1
003 |                 ^
004 | SyntaxError: invalid syntax
toxic jewel
#

huh

lavish shore
#

can u try +1 instead of +=1

floral meteor
#

does int have some sort of increment fcn?

#

that mutates it, not returns a new instance

snow beacon
#

It does not.

#

Integers are interned.

#

Well, small ones.

floral meteor
#

then i'll have to make one

snow beacon
floral meteor
#

!e ```py
class (int):
def INC(s):s+=1;return s
def DEC(s):s-=1;return s
__=
(4)
.INC()
print(
)

night quarryBOT
#

@floral meteor :white_check_mark: Your eval job has completed with return code 0.

4
lavish shore
#

what even

floral meteor
#

me thonk hang on

#

me still thonk

#

alright now I type

#

neh

lavish shore
floral meteor
#

hehehehehehe

#

I did it in four lines

lavish shore
#

is it ||self = (lambda x:max(x)) ||?

#

I might need more example outputs considering how every time the list is random...

rugged sparrow
#

!e ```py
from sys import _getframe
ftyp = type(lambda:0)
def self(*args, **kwargs):
f = _getframe(1)
return ftyp(f.f_code, f.f_globals)(*args, **kwargs)
n = [30, 47, 66, 49, 82, 36, 85, 69, 36, 84, 92, 5, 19, 2, 91, 25, 57, 68, 93, 60, 86, 65, 10, 18, 22, 52, 8, 50, 30, 7, 75, 69, 91, 27, 11, 5, 92, 81, 50, 89, 80, 22, 15, 36, 42, 62, 37, 6, 93, 94, 35, 33, 39, 58, 59, 15, 90, 79, 45, 56, 22, 20, 57, 37, 82, 32, 47, 95, 53, 46, 96, 96, 13, 43, 10, 86, 43, 44, 49, 94, 12, 86, 60, 19, 18, 95, 4, 41, 76, 14, 52, 72, 46, 85, 27, 78, 75, 14, 5, 69]
print((lambda l:None if len(l)<1 else l[0]if len(l)==1 else self(l[0]>l[1]and[l[0]]+l[2:]or l[1:]))(n))

night quarryBOT
#

@rugged sparrow :white_check_mark: Your eval job has completed with return code 0.

96
rugged sparrow
#

@floral meteor ^

lavish shore
#

🤯

rugged sparrow
#

self when called, basically calls its calling function, ie py def f(): f() would be the same as py def f(): self()

floral meteor
#

noice

rugged sparrow
#

@floral meteor now implement _getframe with no imports

floral meteor
#

hehe nope

rugged sparrow
#

Why not?

#

Here's a hint, trace back objects have a reference to the current frame

#

And frame objects can be stepped up

floral meteor
#

huh. k.
here was my sys implementation, but with extra

class _self_reference():
    def __call__(self,*args,**kwargs):f=lambda *a,**k:None;f.__code__=__import__('sys')._getframe(1).f_code;return f(*args,**kwargs)
    __getitem__ =lambda self,n:lambda*args,**k:[((f:=(lambda*a,**w:None)).__setattr__("__code__",__import__('sys')._getframe(n+1).f_code)),f][1](*args,**k)
self=_self_reference()
#

you can input by self[n](*args,**kwargs)

lavish shore
#

I never looked into this side of Python tbh
I guess I should type dir(x) more

floral meteor
#

yes

#

!e ```py
try: 1/0
except ZeroDivisionError as cursed: print(dir(cursed.traceback.tb_frame.f_code))

night quarryBOT
#

@floral meteor :white_check_mark: Your eval job has completed with return code 0.

['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'co_argcount', 'co_cellvars', 'co_code', 'co_consts', 'co_filename', 'co_firstlineno', 'co_flags', 'co_freevars', 'co_kwonlyargcount', 'co_lnotab', 'co_name', 'co_names', 'co_nlocals', 'co_posonlyargcount', 'co_stacksize', 'co_varnames', 'replace']
floral meteor
#

ahhaaaahhahahahahahahahah MUAHAHAHAHAAHAHA

lavish shore
#

writes note to self to recursively call dir on things
tree traversal 😈

rugged sparrow
#

that would be infinite

#

type.__class__ is type

lavish shore
#

ah, BFS then

#

thanks for the warning

floral meteor
#

!e ```py
try: raise Exception
except Exception as e:print(e.traceback.tb_frame.f_back)

night quarryBOT
#

@floral meteor :white_check_mark: Your eval job has completed with return code 0.

['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'f_back', 'f_builtins', 'f_code', 'f_globals', 'f_lasti', 'f_lineno', 'f_locals', 'f_trace', 'f_trace_lines', 'f_trace_opcodes']
rugged sparrow
#

(f_back is None is the frame is the uppermost frame)

fluid tree
#

I updated it, now it delegates to int

plucky wedge
#

!e
print(str((3).__add__(((__import__("random").randint(1,10000000), __import__("random").randint(1,10000000).__floordiv__)))))

night quarryBOT
#

@plucky wedge :white_check_mark: Your eval job has completed with return code 0.

NotImplemented
plucky wedge
#

wat

astral rover
#

your trying to add a tuple of (int, methodtype)

plucky wedge
#

!e
print(str((3).__add__((__import__("random").randint(1,10000000), __import__("random").randint(1,10000000).__floordiv__))))

night quarryBOT
#

@plucky wedge :white_check_mark: Your eval job has completed with return code 0.

NotImplemented
plucky wedge
#

Welp

#

I’ll check when I get home

sudden willow
#

!e
print((__debug__.__bool__().__int__().__add__((__debug__.__bool__().__int__().__add__((__debug__.__bool__().__int__()))))).__str__().__add__(__import__("random").randint(__debug__.__bool__().__int__(), __debug__.__bool__().__int__().__str__().__mul__(10000000.__str__()))))

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     print((__debug__.__bool__().__int__().__add__((__debug__.__bool__().__int__().__add__((__debug__.__bool__().__int__()))))).__str__().__add__(__import__("random").randint(__debug__.__bool__().__int__(), __debug__.__bool__().__int__().__str__().__mul__(10000000.__str__()))))
003 |                                                                                                                                                                                                                                                                         ^
004 | SyntaxError: invalid syntax
sudden willow
#

huh

#

nvm

#

!e

print(dir(bool))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'as_integer_ratio', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes']
sudden willow
#

!e
print(__debug__.__bool__().__doc__)

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

001 | bool(x) -> bool
002 | 
003 | Returns True when the argument x is true, False otherwise.
004 | The builtins True and False are the only two instances of the class bool.
005 | The class bool is a subclass of the class int, and cannot be subclassed.
tribal moon
#

try doing import this

sudden willow
#

!e
import this

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

001 | The Zen of Python, by Tim Peters
002 | 
003 | Beautiful is better than ugly.
004 | Explicit is better than implicit.
005 | Simple is better than complex.
006 | Complex is better than complicated.
007 | Flat is better than nested.
008 | Sparse is better than dense.
009 | Readability counts.
010 | Special cases aren't special enough to break the rules.
011 | Although practicality beats purity.
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/ocazuwoqob.txt

tribal moon
#

lol

#

try doing import __hello__

sudden willow
#

that returns hello world right

tribal moon
#

yes

#

wanna know the secret operator Python has?

#

<>

#

the diamond

sudden willow
#

what does that do

tribal moon
#

it's the same as !=

sudden willow
#

i already like it

tribal moon
#

!e ```py
from future import barry_as_FLUFL

print(1 <> 2)```

night quarryBOT
#

@tribal moon :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 3
002 |     print(1 <> 2)
003 |             ^
004 | SyntaxError: invalid syntax
tribal moon
#

dammit

#

I don't think it runs for this bot

sudden willow
#

whats Barry_as_FLUFL lol

tribal moon
#

here

#

idk some easter egg thing

astral rover
#

what

naive roost
#

It was an Arpil's Fools joke, saying Guido van Rossum retired as BDFl (benevolent dictator for life), and having Barry Warsaw (I think) as FLUFL (friendly language uncle for life)

astral rover
#

i thought the future was pointless

sudden willow
#

!e

print((<> := !=), ! <> 2)
naive roost
#

one of the things was the <> operator

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     print((<> := !=), ! <> 2)
003 |            ^
004 | SyntaxError: invalid syntax
sudden willow
#

sad

tribal moon
naive roost
#

I'm not sure there are

tribal moon
#

what was the last keyword you learnt

sudden willow
tribal moon
#

yeah the bot doesn't work with <>

#

it's because <> messes everything up

#

if you restart your shell, you'll still be required to use <>

naive roost
#

point is: __future__ has all kinds of backports from Python 3 to Python 2, or even between version to increase backwards compatibility

#

oh, I got one

tribal moon
#

I don't think future is useful now?

naive roost
#

!e ```py
from future import braces

tribal moon
#

maybe back in the days of early Python 3

night quarryBOT
#

@naive roost :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 | SyntaxError: not a chance
sudden willow
#

lmao

naive roost
#

one major thing in the transition from Python 2 to Python 3 was from __future__ import print_function (if I remember correctly)

sudden willow
#

!e
import __future__; print(dir(__future__))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

['CO_FUTURE_ABSOLUTE_IMPORT', 'CO_FUTURE_ANNOTATIONS', 'CO_FUTURE_BARRY_AS_BDFL', 'CO_FUTURE_DIVISION', 'CO_FUTURE_GENERATOR_STOP', 'CO_FUTURE_PRINT_FUNCTION', 'CO_FUTURE_UNICODE_LITERALS', 'CO_FUTURE_WITH_STATEMENT', 'CO_GENERATOR_ALLOWED', 'CO_NESTED', '_Feature', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'absolute_import', 'all_feature_names', 'annotations', 'barry_as_FLUFL', 'division', 'generator_stop', 'generators', 'nested_scopes', 'print_function', 'unicode_literals', 'with_statement']
sudden willow
#

wow i didnt expect that to work not gonna lie

naive roost
#

oh, right, the with statement too

sudden willow
#

!e
import __future__ as f; print(dir(f.__doc__))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'removeprefix', 'removesuffix', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
naive roost
#

__future__ is kind of a meta-module that modifies Python's behaviour for compatibility with future code

tribal moon
#

there's also antigravity

naive roost
#

it's cute, but probably won't work well here

tribal moon
#

it can't

sudden willow
#

!e
import __future__ as f; print(dir(f.__doc__.__bool__()))

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | AttributeError: 'str' object has no attribute '__bool__'
sudden willow
#

aw i thought it would return true

#

thought i had even more characters to feed into my equation-inator 😔

#

rn it just generates long equations like these, any tips on making it longer?

#

!e

print(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__().__add__(_:=__debug__.__bool__().__int__()))))))))))))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

12
naive roost
#

oh, wow, I just looked at the changelog for Python 3.9, and the parser had trouble with != in debug mode when barry_as_FLUFL was imported. They corrected it because people they knew would still do stupid things with it 😂

thin trout
#

__future__ imports aren’t actual imports

naive roost
#

they change Python's behaviour too much to be considered simply imports

sudden osprey
# sudden willow aw i thought it would return true

I believe strings dont have a __bool__ because it has a __len__ and that can be used to determine whether a value is truthy or falsey, if __len__ is 0 it's falsey, otherwise it's truthy (if no __bool__ is defined ofc)

thin trout
#

They are detected early in the compilation in order to enable an experimental feature

#

They don’t actually run

sudden willow
#

hmm i wonder then

#

wait i need len

thin trout
#

That’s True

sudden willow
#

!e
import __future__ as f; print(dir(f.__doc__.__str__().__len__()))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'as_integer_ratio', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes']
sudden willow
#

huh

#

isnt len supposed to return the amount of objects

proper vault
#

you call dir on the int

naive roost
#

you're returning dir(int)

sudden willow
#

oh lol

#

!e

print(__import__("__future__").__doc__.__str__().__len__().__int__().__bool__())
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

True
tribal moon
#

obfuscate the string

sudden willow
#

oh yes

tribal moon
#

turn it into dunders

sudden willow
#

i need to feed this into my equation-ator

#

!e

print(__import__("__future__").__doc__.__str__().__len__().__int__().__bool__().__add__(_:=__import__("__future__").__doc__.__str__().__len__().__int__().__bool__().__add__(_:=__import__("__future__").__doc__.__str__().__len__().__int__().__bool__().__add__(_:=__import__("__future__").__doc__.__str__().__len__().__int__().__bool__().__add__(_:=__import__("__future__").__doc__.__str__().__len__().__int__().__bool__().__add__(_:=__import__("__future__").__doc__.__str__().__len__().__int__().__bool__().__add__(_:=__import__("__future__").__doc__.__str__().__len__().__int__().__bool__().__add__(_:=__import__("__future__").__doc__.__str__().__len__().__int__().__bool__().__add__(_:=__import__("__future__").__doc__.__str__().__len__().__int__().__bool__().__add__(_:=__import__("__future__").__doc__.__str__().__len__().__int__().__bool__()))))))))))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

10
sudden willow
#

muahahahahaha

low apex
#

That could make a really nice design, if each function was highlighted in a different color

sudden willow
#

heres the source code btw

import sys

with open("writeoff.txt", "w") as f:
  temp=int(sys.argv[1])-2
  f.write("print(__import__(\"__future__\").__doc__.__str__().__len__().__int__().__bool__().__add__(")

  for i in range(temp):
    f.write("_:=__import__(\"__future__\").__doc__.__str__().__len__().__int__().__bool__().__add__(")
  f.write("_:=__import__(\"__future__\").__doc__.__str__().__len__().__int__().__bool__()" + ")" * int(temp+2))
sick hound
#

why __import__("future")

#

?

sudden willow
#

not sure

#

just to add length really

#

because i can import __doc__ from it

astral rover
#

you can doc a lot of python modules

sudden willow
#

yea i know but __future__ is the longest i've seen

#

and extra underscores

astral rover
#

is phello in stdlib

#

yeah

plain moon
#

Good lord

#

Color me impressed

thin trout
#

Don’t encourage him lemon_pensive

plain moon
#

Well done! Do more! ducky_dave

sudden willow
#

anyone know some really long built in imports i can abuse?

#

!e
import rlcompleter; print(dir(rlcompleter))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

['Completer', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__main__', '__name__', '__package__', '__spec__', '_readline_available', 'atexit', 'builtins', 'get_class_members', 'readline']
sudden willow
#

!e
``import rlcompleter; print(rlcompleter.doc.str().len().int().bool())`

night quarryBOT
#

@sudden willow :warning: Your eval job has completed with return code 0.

[No output]
sudden willow
#

huh

sick hound
#

?

sudden willow
#

why none

sick hound
#

idek lol

sudden willow
#

!e
import rlcompleter; print(rlcompleter.__doc__.__str__().__len__().__int__().__bool__())

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

True
sudden willow
#

oh its because i put `

sick hound
#

lmfao

#

surprised it didn't error

#

wait grave

sudden willow
#

!e
!e import rlcompleter; print(rlcompleter.doc.str().len().int())`

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     !e
003 |     ^
004 | SyntaxError: invalid syntax
sick hound
#

is a thing

sudden willow
#

i guess

#

!e
import rlcompleter; print(rlcompleter.doc.str().len().int())

#

ah i just got rid of all my underscores

#

!e
import rlcompleter; print(rlcompleter.__doc__.__str__().__len__().__int__())

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

1329
sick hound
#

docs change length so you probably shouldn't use them l o l

sudden willow
#

i like future more bcuz more underscores

sick hound
#

kek

#

tfw you optimise for underscores

#

and not readability

#

hehhhehehh

sudden willow
#

im converting the big number from len to a bool which == True

#

could round it off by dividing it by itself implementing even more dunders

sick hound
#

.

#

you should do random dunders

#

so like

#

there's __name__

#

and then __future__.__doc__()

#

etc etc

sudden willow
#

yea that would be interesting

#

huh

#

!e
print(dir(int))

#

oh

sick hound
#

wack

sudden willow
#

!e
import rlcompleter; print((rlcompleter.__doc__.__str__().__len__().__int__().__truediv__(rlcompleter.__doc__.__str__().__len__().__int__()).__bool__().__int__()))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

True
sudden willow
#

now thats what i like to see

sick hound
#

!e print((import("rlcompleter").doc.str().len().int().truediv(import("rlcompleter").doc.str().len().int()).bool()))

#

wait

#

oop

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

True
sick hound
#

more

sudden willow
#

trying to find long imports

sick hound
#

and use chr or whatever it was called

#

for the strings

sudden willow
#

wait __main__ is an import??

sick hound
#

it is?

sudden willow
#

!e
print(dir(__import__("__main__")))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

['__annotations__', '__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__spec__']
sick hound
#

btw could you send me your obfsc algo

sudden willow
#

its on my other pc

sick hound
#

ah rip

sudden willow
#

or my number algorithm?

sick hound
#

numbers are easy enough

sudden willow
#

yea

#

its my algorithm to generate long equations 1 at a time

sick hound
#

!e

def get_whole_num(num):
  if num == 0:
    return "__doc__.__bool__().__int__()"
  return f"__name__.__len__().__bool__().__int__().__add__({get_whole_num(num-1)})"
print(get_whole_num(5))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__doc__.__bool__().__int__())))))
sudden willow
#

ooh

#

thats good

#

think im gonna add random to my code so itll vary between __name__.__len__().__bool__().__int__() and others like that such as __debug__.__int__()

sick hound
#

mhm

#

gimme a sec

#

gonna copy a code rq

sudden willow
#

lmao

sick hound
#

!e

def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return {i:factors.count(i) for i in factors}
print(prime_factors(20))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

[2, 2, 5]
sick hound
#

kk

sudden willow
#

im on a chromebook with no enter key nor left arrow key this is so challenging

sick hound
#

!e

def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return {i:factors.count(i) for i in factors}
print(prime_factors(20))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

{2: 2, 5: 1}
sick hound
#

kk

sudden willow
#

can i fit a += into a lambda or is that not possible

#

was thinking of having like a _subtractasciivalue(value) and an _addasciivalue(value) inside a print

#

!e

print(
    _addasciivalue := lambda value: value += __debug__.__int__(),
    _subtractasciivalue := lambda value: value -= __debug__.__int__()
)
night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 2
002 |     _addasciivalue := lambda value: value += __debug__.__int__(),
003 |                                           ^
004 | SyntaxError: invalid syntax
sudden willow
#

:(

astral rover
#

just use .iadd

sick hound
#

!e

def get_whole_num(num):
  if num == 1:
    return "__name__.__len__().__bool__().__int__()"
  return f"__name__.__len__().__bool__().__int__().__add__({get_whole_num(num-1)})"

def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return {i:factors.count(i) for i in factors}

def foo(prime_factors):
  if len(prime_factors) == 1:
    return f"{get_whole_num(list(prime_factors.keys())[0])}.__pow__({get_whole_num(list(prime_factors.values())[0])})"
  a = list(prime_factors.keys())[0]
  return f"{get_whole_num(a)}.__pow__({get_whole_num(prime_factors.pop(a))}).__mult__({foo(prime_factors)})"

print(foo({2: 2, 3: 2}))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()).__pow__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))
sick hound
#

!e print(name.len().bool().int().add(name.len().bool().int()).pow(name.len().bool().int().add(name.len().bool().int())))

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

4
sick hound
#

kk

tribal moon
#

I wanna make a dunder code obfuscator

#

and add it to my lambda obfuscator I finished a long time ago

sudden willow
#

so like value.__iadd__()?

sick hound
#

!e

def get_whole_num(num):
  if num == 1:
    return "__name__.__len__().__bool__().__int__()"
  return f"__name__.__len__().__bool__().__int__().__add__({get_whole_num(num-1)})"

def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return {i:factors.count(i) for i in factors}

def foo(prime_factors):
  if len(prime_factors) == 1:
    return f"{get_whole_num(list(prime_factors.keys())[0])}.__pow__({get_whole_num(list(prime_factors.values())[0])})"
  a = list(prime_factors.keys())[0]
  return f"{get_whole_num(a)}.__pow__({get_whole_num(prime_factors.pop(a))}).__mult__({foo(prime_factors)})"

print(foo({2: 2, 3: 2}))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()).__pow__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())).__mult__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())).__pow__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())))
sick hound
#

!e print(name.len().bool().int().add(name.len().bool().int()).pow(name.len().bool().int().add(name.len().bool().int())).mult(name.len().bool().int().add(name.len().bool().int().add(name.len().bool().int())).pow(name.len().bool().int().add(name.len().bool().int()))))

night quarryBOT
#

@sick hound :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | AttributeError: 'int' object has no attribute '__mult__'
sick hound
#

!e

def get_whole_num(num):
  if num == 1:
    return "__name__.__len__().__bool__().__int__()"
  return f"__name__.__len__().__bool__().__int__().__add__({get_whole_num(num-1)})"

def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return {i:factors.count(i) for i in factors}

def foo(prime_factors):
  if len(prime_factors) == 1:
    return f"{get_whole_num(list(prime_factors.keys())[0])}.__pow__({get_whole_num(list(prime_factors.values())[0])})"
  a = list(prime_factors.keys())[0]
  return f"{get_whole_num(a)}.__pow__({get_whole_num(prime_factors.pop(a))}).__mul__({foo(prime_factors)})"

print(foo({2: 2, 3: 2}))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()).__pow__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())).__mul__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())).__pow__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())))
sick hound
#

!e name.len().bool().int().add(name.len().bool().int()).pow(name.len().bool().int().add(name.len().bool().int())).mul(name.len().bool().int().add(name.len().bool().int().add(name.len().bool().int())).pow(name.len().bool().int().add(name.len().bool().int())))

night quarryBOT
#

@sick hound :warning: Your eval job has completed with return code 0.

[No output]
sick hound
#

oops

#

!e print(name.len().bool().int().add(name.len().bool().int()).pow(name.len().bool().int().add(name.len().bool().int())).mul(name.len().bool().int().add(name.len().bool().int().add(name.len().bool().int())).pow(name.len().bool().int().add(name.len().bool().int()))))

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

36
sick hound
#

oh nice

sudden willow
#

!e

print(
    _addasciivalue := lambda value: value.__iadd__(__debug__.__int__()),
    _addasciivalue(1)
)
night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 3, in <module>
003 |   File "<string>", line 2, in <lambda>
004 | AttributeError: 'int' object has no attribute '__iadd__'
sudden willow
#

!e print(dir(int))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'as_integer_ratio', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes']
sick hound
#

!e

def get_whole_num(num):
  if num == 1:
    return "__name__.__len__().__bool__().__int__()"
  return f"__name__.__len__().__bool__().__int__().__add__({get_whole_num(num-1)})"

def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return {i:factors.count(i) for i in factors}

def foo(prime_factors):
  if len(prime_factors) == 1:
    return f"{get_whole_num(list(prime_factors.keys())[0])}.__pow__({get_whole_num(list(prime_factors.values())[0])})"
  a = list(prime_factors.keys())[0]
  return f"{get_whole_num(a)}.__pow__({get_whole_num(prime_factors.pop(a))}).__mul__({foo(prime_factors)})"

def get_big_num(num):
  return foo(prime_factors(num))
print(get_big_num(300))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()).__pow__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())).__mul__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())).__pow__(__name__.__len__().__bool__().__int__()).__mul__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__())))).__pow__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))))
sick hound
#

rip python

#

l o l

#

wait no my internet just bad

#

!e print(name.len().bool().int().add(name.len().bool().int()).pow(name.len().bool().int().add(name.len().bool().int())).mul(name.len().bool().int().add(name.len().bool().int().add(name.len().bool().int())).pow(name.len().bool().int()).mul(name.len().bool().int().add(name.len().bool().int().add(name.len().bool().int().add(name.len().bool().int().add(name.len().bool().int())))).pow(name.len().bool().int().add(name.len().bool().int())))))

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

300
sick hound
#

eyo

#

nice

sudden willow
#

very cool

sick hound
#

there's a dunder num gen if you want

#

this is like church encoding but worse

#

lmfao

#

*slightly optimized dunder num gen

sudden willow
#

!e

print(
    _addasciival := lambda value: (
        new_value := value += 1,
        print(new_value)
night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 3
002 |     new_value := value += 1,
003 |                        ^
004 | SyntaxError: invalid syntax
sudden willow
#

whyyyyyyyyyyyyyy

sick hound
#

use a dunder

#

there's one for +=

sudden willow
#

wait i dont even need to use +=

#

ur right

proper vault
#

won't work here

sudden willow
#

!e

print(
    _addasciival := lambda value: (
        new_value := value.__add__(True.__int__()),
        print(new_value)
)
sick hound
#

forgot extra )

#

huh

proper vault
#

yes another ) missing

sick hound
#

oh yea lmfao

sudden willow
#

going to repl 😎

sick hound
#

!e

print(
    _addasciival := lambda value: (
        new_value := value.__add__(True.__int__()),
        print(new_value)
)(1))```
sudden willow
#

oh i need to call it

sick hound
#

oh

#

oop

sudden willow
#

!e

print(
    _addasciival := lambda value: (
        new_value := value.__add__(True.__int__()),
        print(new_value)),
    _addasciival(True.__int__())
)
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

001 | 2
002 | <function <lambda> at 0x7f4e85833040> (2, None)
sudden willow
#

not sure how to make it not print the function address

sick hound
#

wait

#

!e

print(
    (_addasciival := lambda value: (
        new_value := value.__add__(True.__int__()),
        print(new_value)
))(1))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

001 | 2
002 | (2, None)
sudden willow
#

not too worried about it tho

sick hound
#

?

sudden willow
#

the <function <lambda> at 0x7f4e85833040> (2, None)

sick hound
#

!e

        new_value := value.__add__(True.__int__()),
        print(new_value)
))(1)```
#

oops

#

fuck

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

2
sick hound
#

there?

sudden willow
#

wait i dont need to print inside print do i

sick hound
#

you don't

#

lol

sudden willow
#

!e

print(
    (_addasciival := lambda value: (
        new_value := value.__add__(True.__int__())),
    _addasciival(True.__int__())
))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

(<function <lambda> at 0x7f55d8b2c040>, 2)
sudden willow
#

nice

sick hound
#

!e

print(
    (_addasciival := lambda value: (
        new_value := value.__add__(True.__int__())),
    _addasciival(True.__int__())
)[1])```
#

huh

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

2
sudden willow
#

interesting

#

why [1]

sick hound
#

outputs a tuple

#

so you want the first thing

#

that isn't the func

#

aka 1

sudden willow
#

ah i see

#

interesting

#

!e print(dir(tuple))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

['__add__', '__class__', '__class_getitem__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'count', 'index']
sick hound
#

btw can you give me all the ways that you can think of getting 1 with dunders?

#

!e

from random import choice
def get_whole_num(num):
  a = ["__name__.__len__().__bool__().__int__()"]
  if num == 1:
    return choice(a)
  return f"{choice(a)}.__add__({get_whole_num(num-1)})"

def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return {i:factors.count(i) for i in factors}

def foo(prime_factors):
  if len(prime_factors) == 1:
    return f"{get_whole_num(list(prime_factors.keys())[0])}.__pow__({get_whole_num(list(prime_factors.values())[0])})"
  a = list(prime_factors.keys())[0]
  return f"{get_whole_num(a)}.__pow__({get_whole_num(prime_factors.pop(a))}).__mul__({foo(prime_factors)})"

def get_big_num(num):
  return foo(prime_factors(num))
print(get_big_num(300))```
#

!e

from random import choice
def get_whole_num(num):
  a = ["__name__.__len__().__bool__().__int__()"]
  if num == 1:
    return choice(a)
  return f"{choice(a)}.__add__({get_whole_num(num-1)})"

def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return {i:factors.count(i) for i in factors}

def foo(prime_factors):
  if len(prime_factors) == 1:
    return f"{get_whole_num(list(prime_factors.keys())[0])}.__pow__({get_whole_num(list(prime_factors.values())[0])})"
  a = list(prime_factors.keys())[0]
  return f"{get_whole_num(a)}.__pow__({get_whole_num(prime_factors.pop(a))}).__mul__({foo(prime_factors)})"

def get_big_num(num):
  return foo(prime_factors(num))

def convert_word(word):
  if len(word) == 1: return f"chr({get_big_num(ord(word))})"
  return f"chr({get_big_num(ord(word))}).__add__({convert_word(word[1:])})"
print(convert_word("Hello World"))```
#

uh

#

to pycharm we go

sudden willow
#

@sick hound ord() accepts one character

sick hound
#

yea

#

i just realized

#

lol

sudden willow
#

you can just do a for loop to translate

#

append it to a list

#

and then join

sick hound
#

!e


def get_whole_num(num):
  a = ["__name__.__len__().__bool__().__int__()"]
  if num == 1:
    return choice(a)
  return f"{choice(a)}.__add__({get_whole_num(num-1)})"

def prime_factors(n):
    i = 2
    factors = []
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            factors.append(i)
    if n > 1:
        factors.append(n)
    return {i:factors.count(i) for i in factors}

def foo(prime_factors):
  if len(prime_factors) == 1:
    return f"{get_whole_num(list(prime_factors.keys())[0])}.__pow__({get_whole_num(list(prime_factors.values())[0])})"
  a = list(prime_factors.keys())[0]
  return f"{get_whole_num(a)}.__pow__({get_whole_num(prime_factors.pop(a))}).__mul__({foo(prime_factors)})"

def get_big_num(num):
  return foo(prime_factors(num))

def convert_word(word):
  if len(word) == 1: return f"chr({get_big_num(ord(word))})"

  return f"chr({get_big_num(ord(word[0]))}).__add__({convert_word(word[1:])})"
print(convert_word("Hello World"))```
#

wait oh i could

#

but i just did recursion

#

cause it's easier

sudden willow
#

lemme look through my messages for my printer

#

brb

sick hound
#

stack overflow

#

LOL

#

fuck

slim cairn
night quarryBOT
sick hound
#

alrit

#

faq! (that better?)

sudden willow
sick hound
#

whoaa

sudden willow
#

up to 11k pages

sick hound
#

amazing

proper vault
#

the CoC doesn't prohibit swearing

sick hound
#

oh nice

#

but i'm still getting scammed i get a memory error

sudden willow
#

thank fr*ck

sick hound
#

whatdafaq

#

hm

#

time to find an algo

#

that

#

hm

#

convert to binary and try that way?

#

actually ternary

sudden willow
#

!e

print(
    (editascii := lambda x: editedvalue := x.__add__(__debug__.__int__())), editascii(__import__("__future__").__doc__.__str__().__len__().__int__()))
sick hound
#

hm

sudden willow
#

what

#

i hate how inspecific invalid syntax is

sick hound
#

binary would be easy

#

hmm

#

ternary tho

#

hmmmmmmm

#

ill see about binary encoding

sudden willow
#

!e

print(
    ((editascii := lambda x: editedvalue := x.__add__(__debug__.__int__())), editascii(1))[1])
#

wdymmmmmmmmm

sick hound
#

kekw

stark fable
#

well presumably the character that it's pointing at is the invalid one

sudden willow
#

rewriting code for 8th time 😎

#

ik but idk how its invalid

stark fable
#

try adding brackets around the assignment expression

sudden willow
#

oh wait lolll

stark fable
#

:= is literally the lowest-precedence operator in the language, so lambda x: y := z is equivalent to (lambda x: y) := (z)

sick hound
#

!e

from random import choice
from math import log


def basic_num(num):
    a = ["__name__.__len__().__bool__().__int__()"]
    c = ["__doc__.__bool__().__int__()"]
    if num == 0:
        return choice(c)

    b = [choice(a) for _ in range(num)]
    return b.pop(0) + ''.join(map(lambda x: f".__add__({x})", b))


def optimised_num(num):
    a = []

    while num > 5:
        pows = [int(log(num) / log(i)) for i in range(2, 6)]
        nums = [(i + 2) ** j for i, j in enumerate(pows)]
        max_ = max(nums)

        num -= max_

        i = nums.index(max_)
        a.append(f"{optimised_num(i + 2)}.__pow__({optimised_num(pows[i])})")

    a.append(basic_num(num))
    return a.pop(0) + ''.join(map(lambda x: f".__add__({x})", a))


def convert_string(word):
    a = [f"chr({optimised_num(ord(i))})" for i in word]
    return a.pop(0) + ''.join(map(lambda x: f".__add__({x})", a))


print(convert_string("__future__"))
#

nice

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

chr(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()).__add__(__name__.__len__().__bool__().__int__()).__pow__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()).__add__(__name__.__len__().__bool__().__int__()).__add__(__name__.__len__().__bool__().__int__())).__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()).__add__(__name__.__len__().__bool__().__int__()).__pow__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()))).__add__(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()).__add__(__name__.__len__().__bool__().__int__()).__add__(__name__.__len__().__bool__().__int__()).__add__(__name__.__len__().__bool__().__int__()))).__add__(chr(__name__.__len__().__bool__().__int__().__add__(__name__.__len__().__bool__().__int__()).__add__(__name__.__len__().__bool__().__int__()).__pow__(__name__.__le
... (truncated - too long)

Full output: https://paste.pythondiscord.com/utogezunun.txt

sick hound
#

ah rip

#

welp

#

magical dunders l o l

tribal moon
#

now instead of chr, make it dunders

lavish shore
#

Any difference between a magic method and a dunder?

sick hound
#

pretty sure they're the same thing

#

also idk how to replace chr

astral rover
#

they are just different names

sick hound
#

there aren't any dunders for chr

#

i think

lavish shore
#

Manually implement chr for the characters u need
If that's possible I feel it'll be very ugly

sick hound
#

can't

#

cause that'll require strings

#

and chr > strings

#

!e

from random import choice
from math import log


def basic_num(num):
    a = ["__name__.__len__().__bool__().__int__()"]
    c = ["__doc__.__bool__().__int__()"]
    if num == 0:
        return choice(c)

    b = [choice(a) for _ in range(num)]
    return b.pop(0) + ''.join(map(lambda x: f".__add__({x})", b))


def optimised_num(num):
    a = []

    while num > 5:
        pows = [int(log(num) / log(i)) for i in range(2, 6)]
        nums = [(i + 2) ** j for i, j in enumerate(pows)]
        max_ = max(nums)

        num -= max_

        i = nums.index(max_)
        a.append(f"{optimised_num(i + 2)}.__pow__({optimised_num(pows[i])})")

    a.append(basic_num(num))
    return a.pop(0) + ''.join(map(lambda x: f".__add__({x})", a))


def convert_string(word):
    a = [f"chr({optimised_num(ord(i))})" for i in word]
    return a.pop(0) + ''.join(map(lambda x: f".__add__({x})", a))


print(eval(convert_string("__future__")))
#

oop

naive roost
#

a dunder is not always a magic method, but a magic method is always a dunder

#

for instance __class__ is a dunder attribute to an instance

#

!e ```py
print((0).class)

lavish shore
#

Ohh dunder is referring to the use of double underscore eh?
Thanks c:

naive roost
#

simply "double under", yeah

tribal moon
sick hound
#

how?

proper vault
#

you can replace chr with bytes and .decode

#

actually, even better

#

give me a bit

tribal moon
#

here: py __builtins__.__dict__[__builtins__.__dir__()[__debug__.__add__(__debug__).__rmul__(().__class__.__name__.__len__()).__add__((__debug__.__add__(__debug__)).__add__((__debug__.__add__(__debug__))))]]

#

this should work

#

I remember you can encode and decode like that with memoryview and bytearray

#

I don't remember how to do it anymore

sick hound
#

the fuck is this

proper vault
#
def chr(n):
    return __name__.__class__.__call__(b'__magic__'.__class__.__call__((n,)), 'ascii')
``` there is more room left for obfuscation, but this is a nice start (only works fore ascii)
#

picking it by index may be unportable across python versions

naive roost
#

that's the chr function

sick hound
#

there are strings oh no

tribal moon
#

__builtins__.__dict__[__builtins__.__dir__()[__debug__.__add__(__debug__).__rmul__(().__class__.__name__.__len__()).__add__((__debug__.__add__(__debug__)).__add__((__debug__.__add__(__debug__))))]](anything in here)

#

(anything in here) is where it calls it

night quarryBOT
#

@naive roost :white_check_mark: Your eval job has completed with return code 0.

A
sick hound
#

daym

#

gonna yoink that rq

tribal moon
#

why is there a __magic__ there

sick hound
#

__magic__ is a string

#

"__magic__".__class__ will be the str class

tribal moon
#

so it can be anything

#

it doesn't have to be magic

sick hound
#

yes

#

oh wait my bad

#

i didn't see the "b" @tribal moon

#

it's going to be a bytes class

proper vault
#

alright, bytes can take an iterable of ints from which to construct itself

#

so I use b'__magic__'.__class__.__call__ to get the bytes constructor

sick hound
#

!e
print(bool(__builtins__))

#

huh

#

!e print(builtins.len)

#

!e print(builtins.bool())

#

fuck

proper vault
#

then I use __name__.__class__.__call__ to get the string constructor, since it has a 2 arg form str(bytes, encoding)

sick hound
#

why is bool(builtins) true

proper vault
#

builtins has a nonzero len

#

or wait no

sick hound
#

!e print(builtins.len())

proper vault
#

it is True by default

#

all objects are True unless stated otherwise

sick hound
#

!e print(builtins.int())

night quarryBOT
#

@sick hound :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | AttributeError: module 'builtins' has no attribute '__int__'
sick hound
#

huh

proper vault
#

its a module

#

it doesn't define much

sick hound
#

faq

#

!e

from random import choice
from math import log


def basic_num(num):
    a = ["__name__.__len__().__bool__().__int__()", "__debug__.__int__()", "__builtins__.__dict__.__len__().__bool__().__int__()"]
    c = ["__doc__.__bool__().__int__()"]
    if num == 0:
        return choice(c)

    b = [choice(a) for _ in range(num)]
    return b.pop(0) + ''.join(map(lambda x: f".__add__({x})", b))


def optimised_num(num):
    a = []

    while num > 5:
        pows = [int(log(num) / log(i)) for i in range(2, 6)]
        nums = [(i + 2) ** j for i, j in enumerate(pows)]
        max_ = max(nums)
        num -= max_

        i = nums.index(max_)
        a.append(f"{optimised_num(i + 2)}.__pow__({optimised_num(pows[i])})")

    a.append(basic_num(num))
    return a.pop(0) + ''.join(map(lambda x: f".__add__({x})", a))


def convert_string(word):
    a = [f"__builtins__.__dict__[__builtins__.__dir__()[__debug__.__add__(__debug__).__rmul__(().__class__.__name__.__len__()).__add__((__debug__.__add__(__debug__)).__add__((__debug__.__add__(__debug__))))]]({optimised_num(ord(i))})" for i in word]
    return a.pop(0) + ''.join(map(lambda x: f".__add__({x})", a))
print(eval(convert_string("Hello World!")))```
night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

Hello World!
sick hound
#

so all dunders now pog

terse mortar
proper vault
#

rip

night quarryBOT
#

@terse mortar :white_check_mark: Your eval job has completed with return code 0.

146
terse mortar
#

Fixed it

proper vault
#

unrip

sick hound
#

ah noice

#

tyty

terse mortar
#

Mmhm

sick hound
#

__builtins__.__dict__.__len__().__bool__().__int__()

terse mortar
#

That should work

#

Isn't that just going to return 1 tho

sick hound
#

yea

#

!e print(bool(object()))

#

actually i don't need an int

night quarryBOT
#

@sick hound :white_check_mark: Your eval job has completed with return code 0.

True
sick hound
#

ok so theoretically

#

i could

#

obfsc a python program

#

with just dunders

#

yeah

#

i'll use chr tho

#

hey so... i keep on getting name "fetch" is not defined

#

kekw

#

fuck

#

i'm dumb

sudden willow
#

!e print(dir(bool))

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'as_integer_ratio', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes']
sudden willow
#

!e print(True.real)

night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

1
sudden willow
#

huh

sick hound
#

i have a very nice obfsc algo now

#

kekw

#
def basic_num(num):
    a = ["__name__.__len__().__bool__()"]
    c = ["__doc__.__bool__().__int__()"]
    if num == 0:
        return choice(c)

    b = [choice(a) for _ in range(num)]
    return b.pop(0) + ''.join(map(lambda x: f".__add__({x})", b))


def optimised_num(num):
    a = []

    while num > 5:
        pows = [int(log(num) / log(i)) for i in range(2, 6)]
        nums = [(i + 2) ** j for i, j in enumerate(pows)]
        max_ = max(nums)
        num -= max_

        i = nums.index(max_)
        a.append(f"{optimised_num(i + 2)}.__pow__({optimised_num(pows[i])})")

    a.append(basic_num(num))
    return a.pop(0) + ''.join(map(lambda x: f".__add__({x})", a))


def convert_string(word):
    a = [f"chr({optimised_num(ord(i))})" for i in word]
    return a.pop(0) + ''.join(map(lambda x: f".__add__({x})", a))```
sudden willow
#

!e

print(
    _:=lambda _:(_ := _.__add__(__debug__.__int__())),
    __:=lambda _:(_ := _.__sub__(__debug__.__int__())),
    print(__(_ := 1))
[0])
night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | 0
002 | Traceback (most recent call last):
003 |   File "<string>", line 4, in <module>
004 | TypeError: 'NoneType' object is not subscriptable
sudden willow
#

hm

sudden willow
#

!e

print(
    (_:=lambda _:(_ := _.__add__(__name__.__len__().__bool__().__int__())),
    __:=lambda _:(_ := _.__sub__(__name__.__len__().__bool__().__int__())),
    print(__(True)))[__doc__.__bool__().__int__()])
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

001 | 0
002 | <function <lambda> at 0x7feb7e0b4040>
sudden willow
#

why does it still return the function name?

#

!e

print(
    (_:=lambda _:(_ := _.__add__(__name__.__len__().__bool__().__int__())),
    __:=lambda _:(_ := _.__sub__(__name__.__len__().__bool__().__int__())),
    print(__(__name__.__len__().__bool__().__int__())))[__doc__.__bool__().__int__()],
    print(_(__name__.__len__().__bool__().__int__()))
    )
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

001 | 0
002 | 2
003 | <function <lambda> at 0x7f6641851040> None
sick hound
#

"finally no syntax errors" - then gets a type error

sudden willow
#

finally code i can condense into one line!

#

!e

((_:=lambda _:(_ := _.__add__(__name__.__len__().__bool__().__int__())),__:=lambda _:(_ := _.__sub__(__name__.__len__().__bool__().__int__())),print(__(__name__.__len__().__bool__().__int__())))[__doc__.__bool__().__int__()],print(_(__name__.__len__().__bool__().__int__())))
#

i like tuples

#

and walrus

lavish shore
#

Combine it with the fixed point combinator for all dat recursion o:

#

Tho ur avoiding variables so maybe not

low apex
#

How to Hello World:

#

!e ```py
def varGetter(var):
#Returns the variable's name as string
#Has problems with value types
for key, val in list(globals().items()):
if val is var:
return key

for letter in varGetter((Hello_World:=(H:=(e:=(l:=(l:=(o:=(_:=(W:=(o:=(r:=(l:=(d:="Hello World")[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])):

exec(f"print({letter}[-1], end='')")
night quarryBOT
#

@low apex :white_check_mark: Your eval job has completed with return code 0.

Hello World
last locust
#

!e ```py
(
(
lambda _, , ___, : getattr(
builtins,
().class.name[
<< ]
+ ().iter().class.name[(
).rmul(-1)]
+ [].class.name[
% ]
+ chr(
)
+ ().class.name[
>> __],
)
)(
(lambda _: _).code.co_nlocals,
(lambda _, __: _ | __).code.co_nlocals,
(lambda _, __, ___: _ | __ | ___).code.co_nlocals,
(
(lambda _, __, ___: _ & __ & ___).code.co_nlocals.rmul(
(lambda _, __, ___: _ | __ | ___).code.co_nlocals
)
+ (True.rmul((lambda _, __: _ | __).code.co_nlocals))
).rmul(
(
lambda _, __, ___, ____, _____, ______, _______, ________, _____, __________:
_
).code.co_nlocals
),
)
)(
(
lambda , , , , : hex.class.name[
.rmul(
* ) - ______
].upper()
+ hex.class.name[
.rmul(
* ) - _____ - ]
+ hex.class.name[
] * 2
+ hex.class.name[
.rmul(
* )]
+ chr(
.rmul(
) + )
+ Warning.qualname[
- True]
+ hex.class.name[
.rmul(
* )]
+ Warning.qualname[
]
+ ().class.name[
]
+ {}.class.name[
- True]
+ chr(
.rmul(
) + ___)
)(
(
lambda _, __, ___, ____, _____, ______, _______, ________, _________, __________: (
_
)
).code.co_nlocals,
(lambda _, __, ___: _).code.co_nlocals,
(lambda _, __, ___, ____: _).code.co_nlocals,
(lambda _, __: _).code.co_nlocals,
(lambda _: _).code.co_nlocals,
)
)

last locust
low apex
#

oh...

#

Nice!

last locust
#

totally didn't copy paste that from someone else

#

xD

sudden willow
low apex
#

Because I didn't think about it at the time

fluid tree
#

Why does no-one care about my esonum :(

formal sandal
#

@last locust

getattr.__call__(getattr.__call__.__call__(discord, "DiscordException"), "__str__").__call__(eval("error"))
sick hound
#

um

sick hound
#

dafq is that supposed to do

#

aww my hello world is too long

last locust
#

I get an error saying getattr needs two args

sick hound
#

what the fuck

#

"oh no! your message is over 2000 characters" fuck you discrod D:

last locust
sudden willow
#

since i finally made my editascii lambdas i shall now craft my hello world statement

#

muahahahahaha

#

even though its gonna be atleast 10k characters due to me starting at 1

sick hound
#

dunder alog

#

!

sudden willow
#

very cool

sick hound
#

i stole from city the idea

#

kekw

sudden willow
#

perhaps so but yours is executed much better

sick hound
#

how exactly did you do it tho

sudden willow
#

do what

sick hound
#

your algo

sudden willow
#

i converted all of the characters to ascii using ord and then eval'd them

sick hound
#

ah

sudden willow
#

doesn't really work though because causing any error prints the original code through an error

sick hound
#

for me you need an eval kekw

sudden willow
#

thats the thing with python eval/exec

sick hound
#

?

#

what's wrong w/ python's thign

sudden willow
#

make an error with your code inside the eval, it prints the original code

#

huh guess it doesn't do it with this

sick hound
#

!e

from random import choice
from math import log


def basic_num(num):
    a = ["__name__.__len__().__bool__()"]
    c = ["__doc__.__bool__().__int__()"]
    if num == 0:
        return choice(c)

    b = [choice(a) for _ in range(num)]
    return b.pop(0) + ''.join(map(lambda x: f".__add__({x})", b))


def optimised_num(num):
    a = []

    while num > 5:
        pows = [int(log(num) / log(i)) for i in range(2, 6)]
        nums = [(i + 2) ** j for i, j in enumerate(pows)]
        max_ = max(nums)
        num -= max_

        i = nums.index(max_)
        a.append(f"{optimised_num(i + 2)}.__pow__({optimised_num(pows[i])})")

    a.append(basic_num(num))
    return a.pop(0) + ''.join(map(lambda x: f".__add__({x})", a))


def convert_string(word):
    a = [f"chr({optimised_num(ord(i))})" for i in word]
    return a.pop(0) + ''.join(map(lambda x: f".__add__({x})", a))



a = convert_string("print('Hello World!')")
print(eval(a))
print(a)```
#

yea there

#

you can just run it though an eval

#

and get the original code

formal sandal
#

and then run with exec

sick hound
#

wait what

#

that's

#

big brain

#

so big brain

#

still 2k+ chars

#

fuck

#

dunder encoding is hard

#

l o l

sudden willow
#

looks like a bash script alright

sick hound
#

lmfaoo

lavish shore
#

I thought base64 made text longer
Encode text as png /s

sick hound
#

lmfaoo

sudden willow
#

!e print(dir(__import__("builtins")))

#

!e

(
    (addtoascii := lambda _: (__ := _.__add__(__import__("builtins").__name__.__len__().__int__().__bool__().__int__()),
    subfromascii := lambda _: (__ := _.__sub__(__import__("builtins").__name__.__len__().__int__().__bool__().__int__()))),
    (__import__("builtins").print(subfromascii(1))
)))
#

huh

night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 4, in <module>
003 | NameError: name 'subfromascii' is not defined
sudden willow
#

wdym

#

how isnt it defined

snow beacon
#

Scope?

low apex
#

!e

try:
    for letter in [key for key, val in list(globals().items()) if val is (Hello_World:=(H:=(e:=(l:=(l:=(o:=(_:=(W:=(o:=(r:=(l:=(d:="Hello World")[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])][0]:
        exec(f"print({letter}[-1], end='')")
except IndexError:
    for letter in [key for key, val in list(globals().items()) if val is (Hello_World:=(H:=(e:=(l:=(l:=(o:=(_:=(W:=(o:=(r:=(l:=(d:="Hello World")[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])[:-1])][0]:
        exec(f"print({letter}[-1], end='')")
night quarryBOT
#

@low apex :white_check_mark: Your eval job has completed with return code 0.

Hello World
low apex
#

Did how to Hello World 2.0

sudden willow
#

walurs

#

opening badfuscator

low apex
#

Thanks to to your suggestion about list comprehension

#

Turns out doing it twice does the trick

sudden willow
#

!e

eval(chr(112).__add__(chr(114).__add__(chr(105).__add__(chr(110).__add__(chr(116).__add__(chr(40).__add__(chr(34).__add__(chr(72).__add__(chr(101).__add__(chr(108).__add__(chr(108).__add__(chr(111).__add__(chr(44).__add__(chr(32).__add__(chr(87).__add__(chr(111).__add__(chr(114).__add__(chr(108).__add__(chr(100).__add__(chr(33).__add__(chr(34).__add__(chr(41).__add__(chr(10).__add__(""))))))))))))))))))))))))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

Hello, World!
sudden willow
#

but the problem is if you error

#

!e

eval(chr(11).__add__(chr(114).__add__(chr(105).__add__(chr(110).__add__(chr(116).__add__(chr(40).__add__(chr(34).__add__(chr(72).__add__(chr(101).__add__(chr(108).__add__(chr(108).__add__(chr(111).__add__(chr(44).__add__(chr(32).__add__(chr(87).__add__(chr(111).__add__(chr(114).__add__(chr(108).__add__(chr(100).__add__(chr(33).__add__(chr(34).__add__(chr(41).__add__(chr(10).__add__(""))))))))))))))))))))))))
night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 |   File "<string>", line 1
004 |     rint("Hello, World!")
005 |     ^
006 | SyntaxError: invalid syntax
low apex
#

rint

sudden willow
#

oh yes

#

!e

(
    (_:=lambda _:(_ := _.__add__(__name__.__len__().__bool__().__int__())),
    __:=lambda _:(_ := _.__sub__(__name__.__len__().__bool__().__int__())),
    print(
        chr(_:=[_(x) for x in range(ord("H"))][-1])
        )
    )
)
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

H
lavish shore
#

Ooh, writing an entire obfuscator 👀

sudden willow
#

!e

(
    (_:=lambda _:(_ := _.__add__(__name__.__len__().__bool__().__int__())),
    __:=lambda _:(_ := _.__sub__(__name__.__len__().__bool__().__int__())),
    print(
        chr(_:=[_(x) for x in range(ord("H"))][-1]), chr(_:=[_(x) for x in range(ord("e"))][-1]),
        chr(_:=[_(x) for x in range(ord("l"))][-1]), chr(_:=[_(x) for x in range(ord("l"))][-1]),
        chr(_:=[_(x) for x in range(ord("o"))][-1])

        )
    )
)
night quarryBOT
#

@sudden willow :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 5, in <module>
003 |   File "<string>", line 5, in <listcomp>
004 | TypeError: 'int' object is not callable
sudden willow
#

huh

#

oh wait

#

wait am i stupid

#

oh lol my dumbass replaced my lambda

#

!e

((_:=lambda _:(_ := _.__add__(__name__.__len__().__bool__().__int__())),print(chr(__:=[_(x) for x in range(ord(chr(72)).__int__())][-1]).__add__(chr(__:=[_(x) for x in range(ord(chr(101)).__int__())][-1]).__add__(chr(__:=[_(x) for x in range(ord(chr(108)).__int__())][-1]).__add__(chr(__:=[_(x) for x in range(ord(chr(108)).__int__())][-1]).__add__(chr(__:=[_(x) for x in range(ord(chr(111)).__int__())][-1]))))))))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

Hello
sudden willow
#

finally a simple hello statement everyone can understand

lavish shore
#

A nice amount of ) at the end
A tribute to lisp /s

sudden willow
#

wait im so dumb im using normal print!

#

!e

(
  (_:=lambda _:(_ := _.__add__(__name__.__len__().__bool__().__int__())),
  
  (__import__("builtins").print(
    chr(__:=[_(x) for x in range(ord(chr(72)).__int__())][-1]).__add__(
      chr(__:=[_(x) for x in range(ord(chr(101)).__int__())][-1]).__add__(
        chr(__:=[_(x) for x in range(ord(chr(108)).__int__())][-1]).__add__(
          chr(__:=[_(x) for x in range(ord(chr(108)).__int__())][-1]).__add__(
            chr(__:=[_(x) for x in range(ord(chr(111)).__int__())][-1]).__add__(
              chr(__:=[_(x) for x in range(ord(chr(44)).__int__())][-1]).__add__(
                chr(__:=[_(x) for x in range(ord(chr(32)).__int__())][-1]).__add__(
                  chr(__:=[_(x) for x in range(ord(chr(87)).__int__())][-1]).__add__(
                    chr(__:=[_(x) for x in range(ord(chr(111)).__int__())][-1]).__add__(
                      chr(__:=[_(x) for x in range(ord(chr(114)).__int__())][-1]).__add__(
                        chr(__:=[_(x) for x in range(ord(chr(108)).__int__())][-1]).__add__(
                          chr(__:=[_(x) for x in range(ord(chr(100)).__int__())][-1]).__add__(
                            chr(__:=[_(x) for x in range(ord(chr(33)).__int__())][-1])
))))))))))))))))
night quarryBOT
#

@sudden willow :white_check_mark: Your eval job has completed with return code 0.

Hello, World!
lavish shore
#

dat indent tho

sudden willow
#

it can all easily be condensed down into a single line

#

just made it more readable by doing indents

lavish shore
#

!paste

night quarryBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

lavish shore
#

probably best if there were a word wrap feature...

dark loom
#

you wanna talk about esoteric

#

that converter is about as esoteric as it gets

#

it all being on one line helps

lavish shore
#

thank

dark loom
#

if someone were to ask a question regarding this

#

I would look at it

#

and then pretend I didn't see the question

grave rover
#

Working on a code injection thing based on spongepowered's mixin, if anyone's interested in providing ideas or suggestions, let me know

thorn steeple
#

!e
[] = []

night quarryBOT
#

@thorn steeple :warning: Your eval job has completed with return code 0.

[No output]
thorn steeple
#

!e
[] = ["hello"]
print([])

night quarryBOT
#

@thorn steeple :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | ValueError: too many values to unpack (expected 0)
thin trout
#

I didn't know you could unpack with lists

low apex
#

!e ```py
[a, b, c] = [1, 2, 3]
print(f"a = {a}, b = {b}, c = {c}")

night quarryBOT
#

@low apex :white_check_mark: Your eval job has completed with return code 0.

a = 1, b = 2, c = 3
low apex
#

interesting

rugged sparrow
#

!e py [a, b, c] = [1, 2, 3] print(f"{a = }, {b = }, {c = }")

night quarryBOT
#

@rugged sparrow :white_check_mark: Your eval job has completed with return code 0.

a = 1, b = 2, c = 3
naive roost
#

you beat me to it...

bitter iris
thin trout
#

You don't like the gun operator?

#

Haha

naive roost
#

the gun operator?

bitter iris
#

,=

thin trout
#

foo ,= ["bar"]

#

The gun operator

naive roost
#

right, I see 😄

rugged sparrow
#

!e py x ,= [1] print(x)

night quarryBOT
#

@rugged sparrow :white_check_mark: Your eval job has completed with return code 0.

1
bitter iris
#

!e x ,= [1]

night quarryBOT
#

@bitter iris :warning: Your eval job has completed with return code 0.

[No output]
bitter iris
#

!e x ,= [1]; print(x)

night quarryBOT
#

@bitter iris :white_check_mark: Your eval job has completed with return code 0.

1
bitter iris
#

!e print(import('requests'))

night quarryBOT
#

@bitter iris :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | ModuleNotFoundError: No module named 'requests'
sick hound
#

lol snekbox wont let u

bitter iris
#

🤷‍♂️ wanted to try

sick hound
#

also @bitter iris maybe #bot-commands ?

rugged sparrow
#

yea snekbox has no internet connection

bitter iris
sick hound
#

alright

thin trout
#

Read only file system, no networking, no forking

naive roost
#

good to know the limitations

bitter iris
#

that's cool

#

sandboxing python, in the python level, is reaaaly hard

naive roost
#

definitely, if not impossible

sick hound
#

isn't snekbox just a wrapper for https://github.com/google/nsjail

thin trout
#

Yep, it is

bitter iris
#

pypy had some progress over sandboxing

thin trout
#

The limitations are at the kernel level

#

There isn't really anything done at the CPython level

naive roost
#

well, it's not a language-level sanbox

bitter iris
#

in the past, I wrote something like that for a website of mine, though it was just using docker which might be a lot heavier then the nsjail

thin trout
#

In fact, they are pretty similar

rugged sparrow
#

i wonder what syscalls are filtered

thin trout
#

They both use kernel limits in order to simulate an isolated environment

bitter iris
#

this is the pypy sandbox that I mentioned earlier btw ^^

#

The best current way of ~sorta controlling stuff is using audit hooks. They cover almost all of the IO calls, so you might just watch them and kill the process though is is not something that you might want to try out in the production since this is not their usual use case (I guess #esoteric-python is the perfect place to talk about this stuff :D)

rugged sparrow
#

you still cant do a good sandbox with that because python has ways of running arbitrary assembly (you technically dont even need imports to do it)

bitter iris
#

running arbitrary assembly
whoaaa

#

you technically dont even need imports to do it
that sounds intriguing, would you mind explaining it a bit

thin trout
#

I honestly wouldn't use language level isolation if the language wasn't designed with that in mind

naive roost
#

yeah, it makes more sense to isolate the interpreter from the critical system than to isolate the language within the interpreter

plucky wedge
#

!e

print(str((3).__add__(__import__("operator").floordiv(__import__("random").randint(1,10000000), __import__("random").randint(1,10000000)))))
night quarryBOT
#

@plucky wedge :white_check_mark: Your eval job has completed with return code 0.

3
plucky wedge
#

😄

#

my first esoteric code so ima little happy

naive roost
#

you probably don't need the str(), but looks cool nontheless 😄