#esoteric-python

1 messages · Page 7 of 1

fleet bridge
#

if you have some immutable attributes of your instance, you can inline them into bytecode, so LOAD_NAME self; LOAD_ATTR x; becomes LOAD_CONST 'value';

ashen quarry
#
class Solution:
    def fib(self, n: int) -> int:
        # if (n == 0) or (n == 1):
        #     return n
        # else:
        #     c = [0, 1]
        #     for x in range(1, n):
        #         c.append(c[x-1] + c[x])
        #     return c[n]
        
        ##
        
        a = []
        for x in range(20):
            for y in range(20): 
                a.append(int(str(n)))
        b = True
        for x in range(20):
            b = False
            for y in range(20):
                if n in a:
                    b = False
                    if n in a:
                        b = True
                        if n in a:
                            b = False
                            if n in a:
                                b = True
                                if n in a:
                                    b = False
                                    if n in a:
                                        b = True
                                        if n in a:
                                            b = False
                                            if n in a:
                                                b = True
        b = False
        if b == False and b != True and (int(str(int(str(n)))) not in [3,4,5]):
            if b != True:
                if b == False:
                    if int(str(int(str(n)))) in [0,1]:
                            return int(str(int(str(n))))
        else:
            if b != False and b == True and (int(str(n)) not in [0,1]):
                for x in range(2):
                    c.append(x)
                for x in range(1,int(str(int(str(int(str(n))))))):
                    c.append(c[x-1+1-1+1*1-1]+c[x-1+1*1])
                return c[n]```
fleet bridge
#

It is possible to implement efficient currying by hardcoding first argument into bytecode.
So we can get rid of this ugly partial by hardcoding self into method

fleet bridge
versed eagle
#

idk if it works on windows, but on Linux you can set a $PYTHONSTARTUP env variable, and it will run that python script before it does whatever else you tell it to do

#

so that might be helpful to whatever you're trying to do

mint mural
#

hey, how do i make a while true loop in 1 line, im golfing

versed eagle
#
{do_stuff() for i in iter(int,1)}
#

if you want a while true that runs forever

#

if you want to be able to break,

mint mural
#

yea, i've figured it out thank you

#
import time;solution = type("solution", (object, ), {"__init__": lambda self: setattr(self, "i", 0), "run": lambda self: setattr(self, "i", self.i + 1) or time.sleep(1) or print(self.i)})();{solution.run() for _ in iter(int,1)}
#

xD

versed eagle
#

you can of course use conditionals to set break

#

and you can also have a variable for continuing

#

to get proper while loop behavior

mint mural
#

yea i get it, thank you

versed eagle
#

np, happy to help

mint mural
#

i was going to use something like this

#
for()in iter(list, 1): solution.run()
versed eagle
fleet bridge
mint mural
fleet bridge
#

Ah, right

#

Hmm, im not sure

#

!e

for () in iter(list, 1): print(42)
night quarryBOT
#

@fleet bridge :x: Your 3.11 eval job has completed with return code 143 (SIGTERM).

001 | 42
002 | 42
003 | 42
004 | 42
005 | 42
006 | 42
007 | 42
008 | 42
009 | 42
010 | 42
011 | 42
... (truncated - too many lines)

Full output: too long to upload

mint mural
#

told u

versed eagle
# fleet bridge Doesnt work

its a tuple of the looping vars that has 0 elements, so theres no looping variable
its the same concept as

for key, val in somedict.items():
    do_stuff()
#

where its a tuple of vars you're using to loop

versed eagle
#

heres a random thingy i found
https://github.com/dutc/rwatch
basically, whenever a variable is accessed, it calls a function of your choosing with that variable as an argument, and the value the user gets returned to them is whatever that function returns

GitHub

Read Watches in Python. Contribute to dutc/rwatch development by creating an account on GitHub.

#

so thats fun

old socket
versed eagle
#

exactly

#

you could probably also alias python to something like python -c "import sys; exec(sys.argv[1].replace("import", some_long_lamdba_that_acts_as_an_import_hook))"

versed eagle
old socket
#

Had some fun with import hooks

#

It allowed me to run my languages source code into python while being a different language

versed eagle
#

ooh
do tell

#

what language was it

old socket
#

I made an interop language that transpiles to python bytecode

#

so it runs on the python vm

#

I just made the import hook read the file and then compile it into bytecode which then gets executed as a module

#

So that makes me able to run python code inside my language and also I can run my language inside of python

versed eagle
old socket
#

Not public but looks something like this

versed eagle
#

ooh

#

fun

old socket
#

Yea super easy to make as well, all it does is transpile

versed eagle
#

cool

#

one day (when i find the time) im going to write a transpiler of c++ -> python
so that c++ can be interpreted
the problem is finding the time lol

old socket
#

Oh yea It took me some trial and error

#

That was because I didn't plan it out very well, so this time I added models for all python ast nodes then slowly implemented them all one by one

#

It actually took me less time to do that, than It did for me to figure out how to syntax highlight

versed eagle
#

lol

#

syntax highlight hard

old socket
#

Esp with nvim which was what I was doing it for

#

I had many problems with overlapping, etc

#

Shot myself in the foot with regions which was basically only did decorator highlighting

fleet bridge
#
>>> a = ast.parse('x = 1 + ...'); c = compile(a, '', 'exec', optimize=0); dis(c)
  1           0 LOAD_CONST               0 (1)
              2 LOAD_CONST               1 (Ellipsis)
              4 BINARY_ADD
              6 STORE_NAME               0 (x)
              8 LOAD_CONST               2 (None)
             10 RETURN_VALUE
>>> c = c.replace(co_consts=([1], [2], None))
>>> exec(c); x
[1, 2]

replacing .co_consts with arbitrary values works, it is very good

#

obviously, compile(string) cant put non-literals into .co_consts
compile(modded ast) raises TypeError: got an invalid type in Constant: list

split violet
#
import sys

class System:
    class terminal:
        class stdin:
            data = []
            
            def input():
                if len(System.terminal.stdin.data) == 0:
                    System.terminal.stdin.data += sys.stdin.readline().rstrip('\n').strip(" ").split()
                return System.terminal.stdin.data.pop(0)
                
            def inputln():
                if len(System.terminal.stdin.data) == 0:
                    ret_val = sys.stdin.readline().rstrip('\n')
                else:
                    ret_val = " ".join(System.terminal.stdin.data)
                System.terminal.stdin.data = []
                return ret_val
                
        class stdout:
            @staticmethod
            def print(data):
                sys.stdout.write(str(data))
            @staticmethod
            def println(data):
                sys.stdout.write(f'{str(data)}\n')

System.terminal.stdout.println(System.terminal.stdin.inputln())```
#

I need more

old socket
#

mfw when not esoteric

mint mural
burnt pasture
#

is there such a thing as accidentally esoteric? In IRC, we once had someone show us a long file with this structure (many lines not shown here):

        while True:
            class MyClass:
                def Method(self):
                    for g in data:
                        if __name__ == '__main__':
                            do_something()
earnest wing
#

just needs a with and try to top it off!

burnt pasture
versed eagle
quartz wave
versed eagle
#

in an eval in a print

#

in every builtin function

pearl berry
#

Sounds useful, it should be buildin xD

lavish dirge
#

the output for just 1 line of code

lime seal
sick hound
fleet bridge
#
__inline_1__: Any
__inline_2__: Any
__inline_3__: Any

def _test1() -> None:
    def f(a: int, b: int) -> int:
        return a + b + 1
    g = inline_const(f, 1, 3)
    assert f(0, 0) == 1, f(0, 0)
    assert g(0, 0) == 3, g(0, 0)

def _test2() -> None:
    def f(a: int) -> int:
        return a + __inline_1__
    g1 = inline_var(f, '__inline_1__', 1)
    g2 = inline_var(f, '__inline_1__', 2)
    assert g1(1) == 2, g1(1)
    assert g2(1) == 3, g2(1)

def _test3() -> None:
    def f(a: int) -> int:
        return a + __inline_1__ + __inline_1__
    g1 = inline_var(f, '__inline_1__', 1)
    g2 = inline_var(f, '__inline_1__', 2)
    assert g1(1) == 3, g1(1)
    assert g2(1) == 5, g2(1)

def _test4() -> None:
    def f(a: int) -> int:
        return a + __inline_1__ + __inline_2__

    g1 = inline_var(inline_var(f, '__inline_1__', 1), '__inline_2__', 2)
    g2 = inline_var(inline_var(f, '__inline_1__', 3), '__inline_2__', 4)

    assert g1(1) == 4, g1(1)
    assert g2(1) == 8, g2(1)

i implemented some easy inline cases
inline_const just replaces one const with another
inline_var replases LOAD_GLOBAL var with LOAD_CONST const
it was easy...

mint mural
#

oh my god

fleet bridge
#

@quartz wave I think you will be interested ☝️

lavish dirge
#

@mint mural what

mint mural
#

cursed

lavish dirge
#

???

quartz wave
lavish dirge
#

@mint mural is there something you didn't like

mint mural
#

i like it, the syntax is cool

lavish dirge
#

Oh! I thought you didn't like something about it.

fleet bridge
lavish dirge
#

@mint mural can you understand the logic

mint mural
#

yes

lavish dirge
#

That's the output for just a command for just 10 words

mint mural
#

dang haha

#

keep up the work, seems interesting and i like it

sick hound
#

ZZpwX1obfKJZQotcZ3FSDZZDWo5XZX09

#

bet u guys cant decrypt this

earnest wing
#

is this ROT

sick hound
mint mural
#
calculator = type("calculator", (object, ), {"__init__": lambda self: setattr(self, "operations", {"add": lambda x, y: x + y, "subtract": lambda x, y: x - y, "multiply": lambda x, y: x * y, "divide": lambda x, y: x / y}), "run": lambda self: print(self.operations[input("What do you want to do? ")](int(input("First number: ")), int(input("Second number: "))))})();calculator.run()
#

any opinions?

mint mural
arctic skiff
#

i cant do this simple calculation

#

i just told it to calculate the mass of sun

mint mural
#

seems like a you problem

royal whale
last locust
glass drumBOT
last locust
#

Ez

arctic skiff
#
exec("import sys;s=''\ndef o():\n\too=input('enter oprator [+ - / * ^] (leave blank for answer): ')\n\treturn oo\nwhile True:\n\ti=input('input number: ')\n\ttry:\n\t\tfloat(i)\n\t\ts+=i\n\texcept:\n\t\tprint('please enter a number')\n\twhile True:\n\t\tt=o()\n\t\tif t=='' or t.isspace():\n\t\t\tprint(eval(s))\n\t\t\tsys.exit()\n\t\telif t in ('+', '-', '*', '/', '^'):\n\t\t\tif t=='+':\n\t\t\t\ts+='+';break\n\t\t\telif t=='-':s+='-';break\n\t\t\telif t=='*':s+='*';break\n\t\t\telif t=='/':s+='/';break\n\t\t\telif t=='^':s+='**';break")
```here is one line better calc:)
#

@mint mural

#

@pallid flare

arctic skiff
pallid flare
#

...

mint mural
#

any idiot can do this

#

it's not better,

arctic skiff
#

Tho i will actually make it in 1 line

pallid flare
#

hmm

mint mural
mint mural
vital dirge
#

hey how much functionality of a program do you suppose we could stuff into just the decorator portion of the main class/function's declaration?

versed eagle
#

you can do @(lambda...)

quartz wave
versed eagle
#

has to be a callable

#

doesnt it?

#

otherwise it will give a 'classname' object is not callable

#

ValueError iirc

quartz wave
versed eagle
#

right, but it will only actually work if its callable

quartz wave
#

yes

versed eagle
#

and we're talking about it actually working

quartz wave
#

no

versed eagle
#

it would have to function

#

if it threw an error, it wouldnt function

quartz wave
#

i'm basically saying "all of it" but literally

#

you can put a tuple subscript as a decorator

#

or an and/or

versed eagle
#

yeah, it just has to be a callable

#

*the result of the expression

#

has to be a callable

#

that takes at least 1 argument

#

**unless you use some sort of fancy ctypes and/or ast stuff that changes how thingies work

earnest wing
#

not even that!

#

your whole program just needs to be finished and exit before the decorator gets called

#

if you don't like the exception that is

versed eagle
quartz wave
# arctic skiff ```py exec("import sys;s=''\ndef o():\n\too=input('enter oprator [+ - / * ^] (le...
print(globals().update(r={0:1,'a':1})or eval(''.join([i+([r.update(a=0)or g if g else''for _ in iter(lambda:r['a']and r[0],0)for t in[input('enter operator [+ - / * ^] (leave blank for answer): ')]for g in[r.__setitem__(0,0)and''if''==t or t.isspace()else t if t in'+-*/'else'**'if'^'==t else'']][-1],r.update(a=1))[0]for _ in iter(lambda:r[0],0)for i in[input('input number: ')]if r.pop('r',type('',(__import__('contextlib').ContextDecorator,),{'__enter__':int,'__exit__':lambda s,*a:isinstance(a[1],ValueError)and[r.update(r=print('please enter a number'))]})()(float)(i))])))
finite blaze
#

sexy

night quarryBOT
sick hound
#

and mypy only reports one error, which is the side effect of having subclasses of object not having the same constructor signature as the base class

sick hound
#

there is not even an embed or something

humble rune
sick hound
sick hound
next flame
#

code highlighting seems to be working fine

sick hound
#

on my computer it doesn’t

next flame
#

do you have js disabled

sick hound
#

why would I

#

by broken i didn’t mean that there was no syntax highlighting

#

I just meant that it doesn’t highlight properly

#

or for the least it is very basic highlighting

#

even discord does better

next flame
#

aside from builtins not being highlighted, I don't see a difference

sick hound
#

well that’s a major difference imo

#

anyway that doesn’t matter

arctic skiff
#

you forgot semi colon:)

#

!e```py
import builtins
class foo:
def lshift(self, bar):
print(bar, end=''); return self
setattr(builtins, 'cout', foo())

####################
cout << "hello world";

night quarryBOT
#

@arctic skiff :white_check_mark: Your 3.11 eval job has completed with return code 0.

hello world
fleet bridge
#

Can you implement cin?

maiden blaze
old socket
#

!e ```py
@type.call
class cin:
def rshift(self, inp):
print(inp)

cin >> "Hello World"

night quarryBOT
#

@old socket :white_check_mark: Your 3.11 eval job has completed with return code 0.

Hello World
versed eagle
#

:(

earnest wing
#

me when I input into a string literal

versed eagle
#

i have done that quite a lot before lmao

old socket
#

I have not done as much c++ as I have C

versed eagle
#

lol

#

its ok

arctic skiff
#
@type.__call__
class cin:
    def __rshift__(self, inp):
        return input(inp)

import builtins
class foo:
    def __lshift__(self, bar):
        print(bar, end=''); return self
setattr(builtins, 'cout', foo())

a=cin >> "input: " ;
cout << a;```
#

@fleet bridge @versed eagle

fleet bridge
arctic skiff
#

You came to wrong person

arctic skiff
#

But i cant make int a and string b

versed eagle
#

cin returns itself

#

and it splits on spaces

#

so if you do this

std::string str1;
std::string str2;
std::cin >> str1;
std::cin >> str2;

and on the first input the user types
two words
then str1 will be two and str2 will be words, because cin only reads until (and including) the next space

#

so what you have to do is create a buffer stored by cin, read into that, and then return from that until its empty
then read input again

versed eagle
#

im tired af

#

give me a break

versed eagle
arctic skiff
fleet bridge
#

How to get annotations of local vars?
Is it possible without parsing source code?

#

!e

def f()->None:
    x: int

print(f.__annotations__)
night quarryBOT
#

@fleet bridge :white_check_mark: Your 3.11 eval job has completed with return code 0.

{'return': None}
restive void
#

To be more precise: they're not evaluated at all

#

only at class/module level:

Annotating a local variable will cause the interpreter to treat it as a local, even if it was never assigned to. Annotations for local variables will not be evaluated.

sacred umbra
#

!e ```py
print("This is how you get the funny number in Python")
print((a:=((b:=([]==[]))+([]==[]))*(c:=(([]==[])+([]==[]))))aa+c+c+b)

night quarryBOT
#

@sacred umbra :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | This is how you get the funny number in Python
002 | 69
sacred umbra
#

@full talon Thanks for the idea

sacred umbra
#

!e ```py
print((c:=(b:=(a:=((({},)is({},))==({'':''}is{'':''})))), [(b:=(a:=((({},)is({},))==({'':''}is{'':''}))+a))for _ in range(68)])[c][b-c-c])

night quarryBOT
#

@sacred umbra :white_check_mark: Your 3.11 eval job has completed with return code 0.

69
sacred umbra
#

!e ```py
print((c:=(b:=(a:=((({},)is({},))==({'':''}is{'':''})))), [(b:=(a:=((({},)is({},))==({'':''}is{'':''}))+a))for _ in range(c+c*(c+c)(c+c)(c+c)(c+c)(c+c)*(c+c)+c+c+c)])[c][b-c-c])

night quarryBOT
#

@sacred umbra :white_check_mark: Your 3.11 eval job has completed with return code 0.

69
full talon
#

now extend it

#

and make a very HOOGE one

fleet bridge
# restive void To be more precise: they're not evaluated at all

Yes, i know that they are not evaluated, it is sad.
Isnt it better to put them in some place? (Before first func call, so they must be strings (or some other lazy evaluating object))
Like f.__local_annotations__ or f.__annotations__ = {'__locals__': {local vars annotations}, **{signature annotations}}

arctic skiff
#
from varname import argname
@type.__call__
class cout:
    def __lshift__(self,inp):
        print(inp, end='')
@type.__call__
class cin:
    def __rshift__(self,inp):
        i=argname('inp');globals()[i]=input()

##################################################


a=''
cin >> a;
cout << a;```
#

@versed eagle

#

@fleet bridge

#

heres cin

fleet bridge
#

Also:
cin >> cin;
cin >> x; # boom

#

Can i do a<<cin or a>>cout?

earnest wing
#

cin >> ㅤ.x (hangul filler character)

sacred umbra
#

brain damage

#

Still no Pyfuck though

full talon
sacred umbra
#

Well good luck to get it to work with any arbitrary code

#

Instead of just numbers

sacred umbra
night quarryBOT
#

@sacred umbra :x: Your 3.11 eval job has completed with return code 1.

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

wait I think I did something wrong

#

!e ```py
(u:=chr),
print(f'{u((a:=((()==())+(()==())))aaaa+(aa*a))}{u(aaaaa*a-(aaa)-(aaa+a//a)-a)}{u(b:=(aaaaaa-(aaa)-(aa//a+a)))}{u(b)}{u(c:=(b+a+(a//a)))}{u(aaa*a)}{u(b-(aaaa)+aa+(aaa-(a//a)))}{u(c)}{u(b+(a**aa-a))}{u(b)}{u(b-(a**a*a))}')

night quarryBOT
#

@sacred umbra :white_check_mark: Your 3.11 eval job has completed with return code 0.

Hello World
quartz wave
#

is not the underscore challenge but impressive anyway so approved

sacred umbra
full talon
#

ok

sacred umbra
sacred umbra
#

Well there's your JSFuck

#

Where your only primitives are +, -, *, **, //, (, ), :=, chr and eval

#

It has to be floor division since chr can't accept floats

full talon
#

so +-*/:= + chreval

sacred umbra
#

It's not as minimalistic as JSFuck

#

But it's close enough I guess

full talon
#

altho

versed eagle
#

a while ago i wrote a proper std::cout with a buffer and whatnot

full talon
#

we could make u chr

versed eagle
#

heres an example of it

sacred umbra
versed eagle
#

rules, part 1

#

rules part 2

sacred umbra
#

Python to Python's own JSFuck

#

And what if I forced you to take witness in the transpiled code

#
u=chr
eval("spaghetti output here")
solar dune
#

if it produces a single newline it is wrong

sacred umbra
#

So eval can't have newlines 👍

old socket
#

lisp it

sick hound
#

that would be crazy

astral rover
#

yes

#

classes are harder but functions arent too bad

fleet bridge
#

!e

x = __name__.__class__.__class__(__name__, __name__.__class__.__bases__.__class__(), __annotations__.__class__())
print(x)
night quarryBOT
#

@fleet bridge :white_check_mark: Your 3.11 eval job has completed with return code 0.

<class '__main__.__main__'>
astral rover
#

i was more thinking use build_class but that works too ig

fleet bridge
#
__loader__.__dict__['exec_module'].__func__.__class__(__loader__.__dict__['exec_module'].__func__.__code__.__class__(a lot of args), __annotations__.__class__())
#

how to get type(lambda:...) without lambdas, defs and getting pre-existing functions?

#

also i dont like object.__subclasses__()[...]

earnest wing
#

You won't likely find a non-C function inside C builtins (outside of something like globals snooping)

sacred umbra
night quarryBOT
#

@mellow salmon :white_check_mark: Your 3.11 eval job has completed with return code 0.

<class '__main__.__main__'>
sacred umbra
#

Oh, Pastebin removed it

#

@full talon

#

Okay if the REPL can't handle it you may need to paste into a script file instead

#

And yes, I've obfuscated/transpiled the source code into Pyfuck as a demo within itself

#

I still have the original saved though

#

Honestly this is really more of an obfuscator still than a true Pyfuck

#

Since it still depends on exec and chr

full talon
#

@sacred umbra what does the code do

#

it does nothing atm

#

also did you make pyfuck

sacred umbra
full talon
#

it has an error halfway through the file

sacred umbra
#

VS Code can't parse it right

#

Too much for it I guess

sacred umbra
full talon
#

@sacred umbra have you made an automated script for this

sacred umbra
#

That is the automated script

full talon
sacred umbra
#

I ran the source code of the automated script into itself

full talon
sacred umbra
full talon
#

and it just printed more gibberish

sacred umbra
full talon
#

whats the _() part

sacred umbra
#

Hold on I'm just gonna copy and paste it over from Google Notes to my phone then paste the unobfuscated source code here

#

The unobfuscated source code of this glorified shitpost

def _(source):
    left,right="{","}"
    ucp_store=[]
    for char in source:
        ucp_store.append(ord(char))
    def _():
        str_store=[]
        for ucp in ucp_store:
            store=[]
            for _ in range(ucp):
                store.append("(()==())")
            resulting_string=f"{left}u({'+'.join(store)}){right}"
            str_store.append(resulting_string)
        return "".join(str_store)
    print(f"""
u=chr
exec(f\"{_()}\")
""".strip())
sacred umbra
full talon
#

@sacred umbra I have made it a compiler

#

like an actual one

full talon
sacred umbra
#

No since this is just a quick and simple shitpost

#

Where I just make it look like JSFuck or Brainfuck

full talon
#

as it ran out of memory

#

@sacred umbra my python is using 1GB for a simple hello world

#

holy frk

night quarryBOT
full talon
#

@sacred umbra it uses VERY big amounts of memory XD

#

and I need to multiply

#

for good perf

sacred umbra
#

I have 16 GB to spare so yeah

full talon
sacred umbra
#

To make things worse

burnt pasture
#

suddenly everyone is using #esoteric-nicks making this channel even harder to read.

vague cairn
#

Maybe we've already done this one before, but:

Ok, so the lambda syntax evaluates to a function that can then be returned or assigned or whatever else I might wish to do with an expression with a function in it... For simplicity I will exemplify with:
x=lambda:...
which does the same thing as:
def x():...
which takes 1 fewer characters. it is also a syntax for creating a function, and for binding it to a name.

However this is esoteric-python, it seems to me that outside of line golf or character golf it should be vaguely as frequent for us to be abusing the second case for assignments as much as we abuse the first case for function definitions.

What is the shortest / most complex / most obscure way to use the def syntax for arbitrary assignments instead of function definition?

my starting entry is: ```py
def _(f): return f.code.co_consts[1]

@_
def greet(): return 'Hello World!'

print(greet)

restive void
full talon
#

@restive void

@lambda f:f()
def test():
    def test2():
        return "Hello World!"
    return test2
#

now test is test2

vague cairn
restive void
vague cairn
#

lol!

#

evil— I mean eval

old socket
#

!e ```py
@lambda f:f.defaults[0]
def foo(_=23): ...

print(foo)

night quarryBOT
#

@old socket :white_check_mark: Your 3.11 eval job has completed with return code 0.

23
fleet bridge
#

i hate changing bytecode directly

#

here you can see minimap of several functions: inline_const, inline_var, inline_method and inline_attr
i didnt even start inlining bytecode, im just replacing some LOAD_ATTR, LOAD_GLOBAL, LOAD_METHOD... with faster LOAD_CONST

#

using these optimizations i got 50% speedboost of my code, which has a lot of small functions

#

if you change the order of decorator - it breaks

#
@inline_attr('_s', 'size', Struct('?').size)
@inline_attr('_s', 'unpack', Struct('?').unpack)
@inline_method('self', 'read', read)
def read_bool(self, /) -> bool:
    return _s.unpack(self.read(_s.size))[0]



Original code:
376           0 LOAD_GLOBAL              0 (_s)
              2 LOAD_METHOD              1 (unpack)
              4 LOAD_FAST                0 (self)
              6 LOAD_METHOD              2 (read)
              8 LOAD_GLOBAL              0 (_s)
             10 LOAD_ATTR                3 (size)
             12 CALL_METHOD              1
             14 CALL_METHOD              1
             16 LOAD_CONST               1 (0)
             18 BINARY_SUBSCR
             20 RETURN_VALUE

Optimized code:
376           0 NOP
              2 LOAD_CONST               3 (<built-in method unpack of _struct.Struct object at 0x00000161ACDBD260>)
              4 LOAD_CONST               2 (<function read at 0x00000161AD1FA290>)
              6 LOAD_FAST                0 (self)
              8 NOP
             10 LOAD_CONST               4 (1)
             12 CALL_FUNCTION            2
             14 CALL_FUNCTION            1
             16 LOAD_CONST               1 (0)
             18 BINARY_SUBSCR
             20 RETURN_VALUE

it gives you exactly 0% speedup (20%-50% actually, if you apply a lot of changes to different functions)

serene stratus
#

would be nice if you remove the NOPs

fleet bridge
#

it is harder than just replacing two opcodes with NOP+opcode

#

i should fix all jumps, maybe fix EXTENDED_ARG related to jumps
i think, in 3.11 i should also fix exception table

serene stratus
serene stratus
quartz wave
quartz wave
fleet bridge
#

i created it for 3.10, it will break in 3.11 because of a lot bytecode incompatible changes in 3.11

night quarryBOT
fleet bridge
#

https://pastebin.com/HRcdpnCz
https://pastebin.com/vnk4XqRe
@quartz wave there is my code (it is VERY (very very) buggy, i would recommend not use it but rewrite it entirely)

quartz wave
# fleet bridge ```py @inline_attr('_s', 'size', Struct('?').size) @inline_attr('_s', 'unpack', ...

ok so i rewrote the code for 3.11
still haven't implemented inline_attr or inline_method but here are some results ```py

from dis import dis
s = 5
@inline_globals(check_store=2)
... @inline_var('a', 5, inline_args=False)
... def g(a, b):
... global s
... print(s)
... s += 7
... print(s)
... return a + b
...
dis(g)
1 0 RESUME 0

5 2 LOAD_GLOBAL 1 (NULL + print)
14 LOAD_CONST 2 (5)
16 PRECALL 1
20 CALL 1
30 POP_TOP
32 LOAD_GLOBAL 1 (NULL + print)
44 LOAD_CONST 3 (12)
46 PRECALL 1
50 CALL 1
60 POP_TOP

7 62 LOAD_FAST 0 (a)
64 LOAD_FAST 1 (b)
66 BINARY_OP 0 (+)
70 RETURN_VALUE

#

s += 7 is completely factored out this shouldn't be happening so s can actually be assigned to
but the 12 in the second print() call is expected behaviour

#

also a isn't replaced because inline_args=False as you can see

fleet bridge
#

What is check_store for?

quartz wave
#

if it's 2 then it means to consider constant assignments before stopping inlining

#

so basically it turns ```py
s = 5

@inline_globals(check_store=2)
@inline_var('c', 5, check_store=2, inline_args=False)
def g(a, b):
global s
print(s)
s += 7
print(s)
c += 2
res = a + b + c
c += a
res2 = a + b + c
return res, res2
intopy
def g(a, b):
global s
print(5)
s = 12
print(12)
res = a + b + 7
c += a # c = a + 7
res2 = a + b + c
return res, res2

fleet bridge
#

Also, it is good if your decorated functions still works if you remove @inline_* decorators.
Because these decorators are very unstable. They will be broken in every new python version

#

What library are you using to manipulate bytecode? dis? bytecode? Something else?

fleet bridge
quartz wave
quartz wave
fleet bridge
#
@inline_var('c', 5, check_store=2, inline_args=False)
def g(a, b):

i think here inline_args=False is useless because c is not a parameter

quartz wave
#

i forgot to edit that out from the time i used 'a'

fleet bridge
#

_replace_code(code, 0, 0)
💥 on 59 line

quartz wave
fleet bridge
#

fastest bugfix ever

quartz wave
#

5s bugfix

fleet bridge
#

you removed most useful decorator for debugging(

quartz wave
fleet bridge
#

fastest feature implementation ever

#

def cmp(f: F) -> F:
    print(f'Comparing {f.__qualname__}...')
    dis.dis(f)
    print()
    print()
    while hasattr(f,'__orig_func__'):
        f = f.__orig_func__  # type: ignore[attr-defined]
        dis.dis(f)
        print()
        print()

    return f

builtins.cmp = cmp  # type: ignore[attr-defined]

@cmp
@inline_var('x', 5)
@inline_const(None, 123)
def f() -> None:
    print(x)
445           0 LOAD_GLOBAL              0 (print)
              2 LOAD_CONST               1 (5)
              4 CALL_FUNCTION            1
              6 POP_TOP
              8 LOAD_CONST               0 (123)
             10 RETURN_VALUE


445           0 LOAD_GLOBAL              0 (print)
              2 LOAD_GLOBAL              1 (x)
              4 CALL_FUNCTION            1
              6 POP_TOP
              8 LOAD_CONST               0 (123)
             10 RETURN_VALUE


445           0 LOAD_GLOBAL              0 (print)
              2 LOAD_GLOBAL              1 (x)
              4 CALL_FUNCTION            1
              6 POP_TOP
              8 LOAD_CONST               0 (None)
             10 RETURN_VALUE
#

this is breaking functions qualnames
add result.__qualname__ = f.__qualname__ to fix

fleet bridge
#

is inline_args=True removing arg from signature?

sullen kayak
#

hii esoteric gangsters

#
import random;import os;print(''.join([['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0'][random.randint(0,len(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0'])-1)]for i in range(len(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0']))]));os.system("pause")
#

any way to make this harder to read?

royal whale
#
rdmoan=__import__("".join([(a:=["r", "d", "m", "o", "a", "n",][:])[0], a[-1-1], a[-3+2], a[1], a[-(6//2)], a[2]]); exec("sys tropmi; subprocess sa ssecorpbus tropmi"[::-1]); sys.stdout.write(''.join([['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0'][rdmoan.randint(0,len(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0'])-1)]for i in range(len(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0']))]));ssecorpbus.call("pause",shell=-(-(-(False))))

for example

#

That's a comparatively small change
You could do much more

#

@sullen kayak

sullen kayak
#

what the haill

#

couldn't you use the ascii library

#

to get rid of the alphabet and whatever

#

what the fuck are oyu just setting the

#

oh my god

royal whale
#

...you asked...

#

so I answered

sullen kayak
#

SO confused

#

LMAO

#

is there any way to obfuscate the letters + numbers

#

or do they help with the obfuscation

floral meteor
# royal whale ```py rdmoan=__import__("".join([(a:=["r", "d", "m", "o", "a", "n",][:])[0], a[-...

small change: ```py
rdmoan=import("".join([(a:=["r", "d", "m", "o", "a", "n",][:])[0], a[-1-1], a[-3+2], a[1], a[-(6//2)], a[2]]); exec("sus sa sys tropmi; subprocess sa ssecorpbus tropmi"[::-1]); sus.stdout.write(''.join([['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0'][rdmoan.randint(0,len(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0'])-1)]for i in range(len(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0']))]));ssecorpbus.call("pause",shell=-(-(-(False))))

sullen kayak
#

what projects are you workin on

#

esoteric python florida man

floral meteor
#

I made 4 dimensional snek

#

with a classic 20th century gui for the start menu

#

hard mode is actually hard, easy mode is so easy you can actually play it without instinctual 4 dimensional comprehension

#

I think I might make a pause menu

#

instead of esc to quit

floral meteor
#

I almost confused myself then I saw the lambda wxyz=[8,8,8,8];k=lambda:4-[*wxyz].count(1);

#

n=S.N;(w,x,y,z),s,d=S.h,n.n,n.h;t=w+(d==2)-(d==3),x+(d==1)-(d==0),y+(d==6)-(d==7),z+(d==5)-(d==4) this is how you do unreadability

quartz wave
#

it's just allowing the inlining of the variable when it's an argument

#

i think it's actually better if i'd named it inline_arg

fleet bridge
#

What happens if you try @inline_var('arg', 0, inline_args=False)
?

quartz wave
sullen kayak
#

does anybody have any idea how i resolve that?

#

this is my whole program

import random; import sys; import webbrowser; for i in range(10): webbrowser.open(f"https://www.google.com/search?q={''.join([[i for i in sys.argv[1]][random.randint(0,len([i for i in sys.argv[1]])-1)] for i in range(len([i for i in sys.argv[1]]))])}&tbm=isch",new=2)
#

i would like to keep it all on one and the same line

restive void
#
import webbrowser; [webbrowser.open(f"https://{i}.example.com") for i in range(10)]
sullen kayak
#

oh

#

thank you

onyx jacinth
#

this regex checks for prime number 😮
/^1?$|^(11+?)\1+$/

#

i was like what ? how?

#

but it does work

earnest wing
#

the magic is in the backreferences

onyx jacinth
#

pumping lemma is too OP

#

haha

earnest wing
#

😄

serene stratus
#

might be something you guys like

buoyant tulip
#

is there something i can hook into to do some action when a class object is initialized? i.e. i want to be able to write class Foo(MyMetaHook): ..., and MyMetaHook gives me a way to take some action that acts on the Foo class (not an instance of it)

#

context: i want to add little unit tests to jupyter notebook cells; i'd like to be able to write class TestFooCell(CellTestFixture): ... and have it automatically do the equivalent of unittest.main()

#

aha, looks like __init_subclass__ does the trick

lavish dirge
#

My progress so far on developing the language

fleet bridge
craggy hamlet
#

Here's my first attempt at making some esoteric code and being brave enough to post it (python beginner 😅)

Queue = type("Queue", (object,), {'__init__' : lambda _: _.__setattr__("arr", []),'isEmpty' : lambda _ : (not True) == len(_.__getattribute__("arr")),'enqueue' : lambda _, __ : _.__getattribute__("arr").__getattribute__("insert")((not True), __),'dequeue' : lambda _ : _.__getattribute__("arr").__getattribute__("pop")(),'size' : lambda _ : len(_.__getattribute__("arr"))
})
q = Queue()

q.enqueue(4)
print(q.dequeue())
royal whale
# craggy hamlet Here's my first attempt at making some esoteric code and being brave enough to p...

!e

Queue = type("Queue", (object,), {'__init__' : lambda _: _.__setattr__("arr", []),'isEmpty' : lambda _ : (not True) == len(_.__getattribute__("arr")),'enqueue' : lambda _, __ : _.__getattribute__("arr").__getattribute__("insert")((not True), __),'dequeue' : lambda _ : _.__getattribute__("arr").__getattribute__("pop")(),'size' : lambda _ : len(_.__getattribute__("arr"))
})
q = Queue()

q.enqueue(4)
print(q.dequeue())
night quarryBOT
#

@royal whale :white_check_mark: Your 3.11 eval job has completed with return code 0.

4
royal whale
craggy hamlet
#

❤️ thanks for all the kind responses!

finite blaze
#
with open("przyklad.txt", "r") as f:
  for x in f:
    if int(x[::-1]) % 17 == 0: print(x)
#

any shorter way to write it?

#

i guess i could open it inside for but then it wouldn't close?

versed eagle
#
[print(x)for x in open("whatever.txt")if int(x[::-1])%17==0]```
#

r is the default open mode, no need to call open with it

#

if you really want the try except in the with, you can do this

with open("whatever.txt")as _:[print(x)for x in _ if int(x[::-1])%17==0]
quartz wave
versed eagle
#

I always forget about comparison chaining lmao

#

nice

quartz wave
night quarryBOT
#

Hey @lavish dirge!

You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

lavish dirge
#

ACCURACY = THE POINT AND RANGE OF A MEASURED AMOUNT OF CAPABILITY A POSSIBILITY CAN HAPPEN AND DETERMINE COME INTO EFFECT
RADIUS = SET RANGE OF A CENTERED POINT TO THE END DESTINATION
DIAMETER = SET RANGE POINT FROM START TO MIDDLE TO THE END WHILE PASSING THE RADIUS
CONVERT = CHANGE FORM AND OR CHARACTER AND OR FUNCTION
PATTERN = REPEATING METHOD
WRITE = ENSCRIBE FROM LOOKING AT WORDS
READ = DESCRIBE FROM LOOKING AT A PATH OF WORDS
SPAN = MEASURED LIMITED RANGE
VIBRATION = PARTS THAT MOVE BACK AND FORTH AT A GIVEN SPEED
TRANSFORM = MAKE A CHANGE IN FORM
SYNCHRONIZE = LINK AND SEND THE SAME RESULT TO ALL SOURCES
SCAN = ANALYZE A SPECIFIC WORD OR FIELD AND OR GIVE DATA ON THE ASKED INFORMATION TO SEARCH FOR
ANALYZE = READ AND LOOK OVER
CALCULATE = GIVE A DESIGNATED OF A CALCULATES DESCRIPTION FOR A NUMBER AND GIVE ANSWER FOR ALL OF VALUE
LIMIT = SET DEFINED AMOUNT FOR KNOWLEDGE WITH A GIVEN POWER LEVEL
RECALL = GAIN THE ABILITY TO VIEW PAST MEMORY INSIDE BRAIN
REACH = GRAB TO PULL INWARDS
PREDICT = GIVE PERFECT VALUE
REPEAT = CYCLE SAME EFFECT AGAIN INTO SAME FREQUENCY
RECOGNIZE = RECALL FROM AN EARLIER POINT WITHIN TIME
ENCODE = COMPRESS CODE
DECODE = DECOMPRESS CODE
RECODE = COMPRESS CODE ONCE MORE

#

LOOP = BIND IN A CYCLE
MEASURE = TAKE IN THE AMOUNT AND DISTANCE OF
ANSWER = SOLUTION TO A PROBLEM
SOLUTION = FINAL OUTCOME TO AN FORMULA
PROBLEM = UNFINISHED SOLUTION
SEARCH = FIND AND LOCATE SOMETHING
ASK = STATE A QUESTION
TIME = MEASUREMENT IN WHICH CURRENT REALITIES MUST PASS
SPACE = CONTAINER IN WHICH TIME MUST PASS THROUGH
UPLOAD = TRANSFER3 INTO DESCRIBED LOCATION
DOWNLOAD = TRANSFER3 TO CURRENT DEVICE
SIDELOAD = TRANSFER3 TO ALL DEVICES WITH STATUS OF STATED SET LOCATION
CLONE2 = MAKE AN IDENTICAL COPY OF
SYNCHRONIZE = LINK AND SEND THE SAME RESULT TO ALL SOURCES
ENCODE = COMPRESS CODE
DECODE = DECOMPRESS CODE
RECODE = COMPRESS CODE ONCE MORE
SETTING = A MEASUREMENT COMMAND THAT CAN BE ADJUSTED AND BY AN OPERATOR
ADJUST = EDIT AND MODIFY
EDIT = CHANGE AND OR MODIFY TO ADJUST TO A SPECIFIED PURPOSE
WORK = PRODUCING EFFORT TO FINISH A TASK
WORKLOAD = THE AMOUNT OF WORK
COMMAND = ORDER TO BE GIVEN
LINK = BRING TOGETHER AND ATTACH TO
BIND = EDIT AND MODIFY
LEVEL = NUMBER AMOUNT OF OR SIZE
UNIT = STORAGE CONTAINER
DIMENSION = NUMBER OF GIVEN AXIS POINTS
NUMBER = ARITHMETICAL VALUE THAT IS EXPRESSED BY A WORD AND OR SYMBOLE AND OR FIGURE REPRESENTING A PARTICULAR QUANTITY AND USED IN COUNTING AND MAKING CALCULATIONS AND OR FOR SHOWING ORDER IN A SERIES OR FOR IDENTIFICATION
FREQUENCY = REPEATED PATTERN AND OR SETTING

#

POWER = AMOUNT
STRENGTH = LEVEL INTENSITY
CALIBRATE = SCALE WITH A STANDARD SET OF READINGS THAT CORRELATES THE READINGS WITH THOSE OF A STANDARD IN ORDER TO CHECK THE INSTRUMENT AND ITS ACCURACY
PUBLIC = ACCESS TO ALL OF CREATORS INTERIOR DOMINION
PRIVATE = HIDDEN TO EVERYONE BUT CURRENT2 USER2
PERSONAL = EXCLUSIVE TO THE CREATOR
ESCAPE = RETURN TO SOURCE PLACE2
RETURN = GO BACK
CONSTANT = ALWAYS IN EFFECT
CYCLE = PROCESS OF REPEATING AN EVENT CONTINUOUSLY IN THE SAME ORDER
MEASUREMENT = AN ACT TO CALCULATE AND GIVE A SPECIFIC LENGTH ON SOMETHING
CALCULATOR = A DEVICE USED TO CALCULATE INFORMATION AND ANALYZE SET TASKS AS A ROOT VALUE OF LOGIC
WAVELENGTH = A SET OF WAVE PATTERNS GIVEN FREQUENCY FORMAT IN A LENGTH OF A WAVE VALUE DETERMINED BY A PREVIOUS VALUE EFFECT
LENGTH = HOW LONG A MEASURED DIMENSIONAL OBJECT IS EXTENDED
LATTICE = INTERLACED STRUCTURE AND OR PATTERN
LOCATION = SPECIFIED AREA
LINE2 = CHOSEN DIRECTION THAT IS SET IN A SINGLE PATH
WAVE2 = CONTINUAL FLUCTUATION OF FREQUENCY AND OR PATTERN
WIDTH = MEASUREMENT OF SOMETHING FROM SIDE TO SIDE
HEIGHT = THE LENGTH OF RAISING OR LOWERING IN A VERTICAL PATH
HERTZ = DEFINED SOUND WAVE FREQUENCY
MEASURE = TAKE IN THE AMOUNT AND DISTANCE OF

#

Those are the mathematical variables the language has
just some and not a complete list yet

burnt pasture
#

@lavish dirge the pastebin was plenty, thanks. what does this have to do with esoteric python? Are you looking for help/feedback of some kind?

lavish dirge
#

Input and feedback. What others think of it. And how others see it could be used if I made it as a smaller library/module for it to connect to the full language with

#

What others see within its potential as well

burnt pasture
#

you should find another channel to discuss it. When you get there, be ready to explain how these definition (in all caps, why?) will be used as a "language"?

next flame
#

why spam

earnest wing
#

Oh you've made some progress in the language

#

Ididn't realize how many keywords there were

lavish dirge
#

@earnest wing you like it

lavish dirge
#

@fleet bridge that is python believe it or not

worldly trail
maiden river
#

!e

a,b,c = 4,3,6

g = (a if a>c else c)if a>b else(b if b>c else c)

print(g)
night quarryBOT
#

@maiden river :white_check_mark: Your 3.11 eval job has completed with return code 0.

6
maiden river
#

single liner for greatest of three variables

#

Can we make one for 4 variables ?

#

!e

a,b,c,d = 4,3,6,8

z=(
((a if a>d else d)
if a>c else c)
if a>b else
((b if b>d else d)
if b>c else c)
)

print( z)
night quarryBOT
#

@maiden river :white_check_mark: Your 3.11 eval job has completed with return code 0.

6
maiden river
#

!e Working now : )

a,b,c,d=3,2,5,8

z=(

((a if a>d else d)
if a>c else (c if c>d else d))

if a>b else

((b if b>d else d)
if b>c else (c if c>d else d))
)

print(z)
night quarryBOT
#

@maiden river :white_check_mark: Your 3.11 eval job has completed with return code 0.

8
restive void
craggy hamlet
#

!e

def _(w, x, y, z):
    a = [0] * 2
    a[0] = w
    a[1] = x 
      

    b = bool(a[0] - a[1] + abs(a[0] - a[1]))
    if b: 
        b = 1
    else: 
        b = 0
  

    a[0], a[1 - b] = a[1 - b], a[0]
      
 
    a[1] = y 
    b = bool(a[0] - a[1] + abs(a[0] - a[1])) 
    if b: 
        b = 1
    else: 
        b = 0
    a[0], a[1 - b] = a[1 - b], a[0]
    a[1] = z 
    b = bool(a[0] - a[1] + abs(a[0] - a[1]))
    if b: 
        b = 1
    else: 
        b = 0
    a[0], a[1 - b] = a[1 - b], a[0]
      
    return a[0]  
print(_(3,2,5,8))
night quarryBOT
#

@craggy hamlet :white_check_mark: Your 3.11 eval job has completed with return code 0.

8
craggy hamlet
#

how about without using < > or max?

restive void
craggy hamlet
#

I'll generalize to not cheating :_)

restive void
#

But alright, I think this wouldn't count as cheating:

def max(numbers):
    orig = numbers.copy()
    while True:
        indices = set()
        for i in range(len(numbers)):
            if numbers[i]:
                numbers[i] -= 1
                indices.add(i)
        if len(indices) == 1:
            return orig[indices.pop()]
craggy hamlet
maiden river
#

yes ik, but the algo lemon_hyperpleased

quartz wave
last locust
#

It breaks syntax highlighting but will still work

quartz wave
#

probably an error in 3.12

last locust
#

!e ```py
def foo(y):
return 1if y==5else 0

print(foo(5))
print(foo(3))```

night quarryBOT
#

@last locust :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | <string>:2: SyntaxWarning: invalid decimal literal
002 | <string>:2: SyntaxWarning: invalid decimal literal
003 | 1
004 | 0
last locust
#

Huh, so it does

#

They're trying to stop us smh

quartz wave
last locust
#

I like this feature though smh

#

It's a cool niche

finite blaze
#

==print()?

quartz wave
next flame
finite blaze
quartz wave
#
x<y==z
``` is equivalent to ```py
x<y and y==z
finite blaze
#

So if z is a print it is executed

#

I didn't know that python works like this

#

Cool thing, thanks!

#

Nvm I'm stupid lol. This is such an obvious thing

#

Other languages do the same thing lol

quartz wave
#

they do (x < y) == z

finite blaze
#

I mean executing z

#

If it is a function

#

For a second i thought that it is some black magic

#

Btw, anyone tried golfing sieve of erathosthenes?

serene stratus
outer ledge
#

i need bleach

#

this channel is a war crime

#

forbidden knowledge

finite blaze
#
def SieveOfEratosthenes(n):
 r,m=range,n+1
 x,p=[1]*m,2
 while p*p<=n:
  if x[p]==1:
   for i in r(p*p,m,p):x[i]=0;p+=1
  [x[p]==1==print(p)for p in r(2,m)] 
SieveOfEratosthenes(20)
#

my attempt at golfing Sieve of Eratosthenes

craggy hamlet
#

!e

import re
z = 40
n=1
t=1
while n<z:
    t+=1
    if not re.match(r'^1?$|^(11+?)\1+$',"1"*t):
        print(t)
        n+=1
night quarryBOT
craggy hamlet
#

what about we implement this algorithm for primes

versed eagle
#

i dont understand math please explain

#

math is scary

#

well actually
i sort of understand what its doing
just not how its doing it

#

Pn is the nth prime, then it does some fancy equation to get that prime

craggy hamlet
#

Let me find the video on it that I watched

#

It does some weird thing where it doesn't actually make primes so to speak, it eliminates things that AREN'T primes.

fleet bridge
fleet bridge
#

!e lazy approach

import math as m

p=lambda n:1+sum(int((n/sum(map(int,map(2.0.__rpow__,map(m.cos,map(m.pi.__mul__,[(m.factorial(j)+1.0)/j for j in range(1,i+1)]))))))**(1/n))for i in range(1,2**n+1))

for i in range(1, 20):
    print(f'p_{i:<2} = {p(i)}')
night quarryBOT
#

@fleet bridge :x: Your 3.11 eval job has completed with return code 1.

001 | p_1  = 3
002 | p_2  = 5
003 | p_3  = 9
004 | p_4  = 17
005 | p_5  = 33
006 | p_6  = 65
007 | p_7  = 129
008 | Traceback (most recent call last):
009 |   File "<string>", line 6, in <module>
010 |   File "<string>", line 3, in <lambda>
011 |   File "<string>", line 3, in <genexpr>
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/yabuyezeqo.txt?noredirect

fleet bridge
#

!e optimized code. There is no floating point operations, so it is accurate. It takes several seconds to get 1000th prime


import math as m
import functools as ft

primes: dict[int, int] = {1:2,2:3,3:5,4:7,5:11}

@ft.cache
def _bottom_sum(j: int, /) -> int:
    if j == -1: return 0
    return _bottom_sum(j - 1) + (m.factorial(j) % (j + 1) == j)

def _p(n: int, /) -> int:
    x=primes[n]=assert_prime(1+sum(map(n.__ge__,map(_bottom_sum,range(round(10+n*m.log(n)*m.log(m.log(n+1))))))))
    return x

def assert_prime(p: int, /) -> int:
    # Uncomment this to perform actual checks:
    # for prime in primes.values():
    #     assert p % prime, (p, prime)
    return p

def p(n: int, /) -> int:
    return primes.get(n, None) or _p(n)


for i in range(1, 2000):
    x = p(i)
    print(f'p_{i:<2} = {x}')
night quarryBOT
#

@fleet bridge :x: Your 3.11 eval job timed out or ran out of memory.

001 | p_1  = 2
002 | p_2  = 3
003 | p_3  = 5
004 | p_4  = 7
005 | p_5  = 11
006 | p_6  = 13
007 | p_7  = 17
008 | p_8  = 19
009 | p_9  = 23
010 | p_10 = 29
011 | p_11 = 31
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/xuhubocune.txt?noredirect

fleet bridge
#

ran out of memory? what???

vague cairn
#

When you run on your own computer, does it need swap space?

fleet bridge
#

it is about 15mb for thousands of primes

#

slowly increasing

vague cairn
#

I made a Sieve Of Eratosthenes algo that would multiply in size every time it tried to read off the end, it can go up to the maximum available memory in less than 2 minutes, then chokes when it needs to multiply all available memory by whatever prime comes after 2x3x5x7x11... for 32gb

night quarryBOT
#

Attempt to circumvent filter detected. Moderator team has been alerted.

vague cairn
#

?

fleet bridge
#

i tried execute this code using snek:

vague cairn
#

ah, intriguing.\

fleet bridge
vague cairn
#

basically I start with a preloaded data set of (if I remember correctly)

primes=[2,3]
check_next=5
prime_index_to_multiply_sieve_by_next=2```

and then when they asked for a prime, or ask if a number is prime, it checks against `primes`, then iterates from `check_next`, appending the primes it finds to the list, when it indexes off the end of sieve it does: 
```sieve *= primes[prime_index_to_multiply_sieve_by_next]
prime_index_to_multiply_sieve_by_next += 1```
#

I don't know what a factorial is called when it's only the primes...

fleet bridge
#

Primorial?

floral meteor
fleet bridge
#

magic is math

#

everything is math

floral meteor
#

if I have enough red bull i hallucinate math equations.

#

last week I did actual civil engineering work in my head because I had too much energy drink

fleet bridge
#

math can be very simple and it can be very complicated, if you want it to be so

floral meteor
#

I feel like math is only hard because the education system is broken.

fleet bridge
#

Depends on country

floral meteor
#

if the education system was designed by someone with an above average IQ, maybe people would actually get good at math

#

I'm still getting used to this mechanical keyboard, and with my 100s of words per minute touch typing style it sounds rather loud and intimidating. I accidentally ordered a tactile and clicky keyboard.

#

It's rivalling the actual thunderstorm outside

floral meteor
#

maybe the ratio is higher

#

if you smart and you teacher is dumb, you will be dumb.

fleet bridge
#

yes, the global education system has a bit of an effect on that. but I believe that the teachers who teach mathematics have the greatest influence. if you had a good teacher, then you will love mathematics and will study it further as you wish. and if you had a bad teacher, then you will not like mathematics. in the modern world it is very important to study for yourself, and people do it if they are interested in mathematics. the education system cannot force you to study on your own after graduation (that's not what it's for)

floral meteor
#

vice versa might even work, too

finite blaze
#

Hey, how can I write this in one line?

while x<y:
    if z>a:
        for i in range(j)
           q+=1
next flame
#

that's an infinite loop.

#

so while 1:0

finite blaze
#

Nah it doesn't matter

#

I just made up these variables

#

I just want the core structure of this while to be in one line

finite blaze
#

So basically

while condition:
    if condition:
        for i in range(j):
            doSomething
earnest wing
#
[[do_something for i in range(j)] for _ in iter(lambda: while_condition, True) if if_condition] 
#

where do_something has to also be transformed into one line

versed eagle
earnest wing
#

so can the whole thing

#

I figured the point would be to convert everything into one line

versed eagle
#

what I meant is a lambda that is called immediately after it is created
for some reason my brain translated that into "function call"

#

sorry lmao

earnest wing
#

Right haha

#

Though if you can put it in a lambda it's already onelineable goosepeek

versed eagle
#

true, but for people not as good at 1 lining, lambdas make it easier

quartz wave
#

aren't lambdas just the same thing but with extra characters

fleet bridge
#

I benchmarked try-except in 3.10 and 3.11 in these cases:

# ok
try: ...
except: ...

# err
try: 1/0
except: ...

Results:

+------+--------+--------+
|      |   ok   |  err   |
+------+--------+--------+
| 3.10 |  7 ns  | 900 ns |
+------+--------+--------+
| 3.11 |   0    | 16 μs  |
+------+--------+--------+

So try-except are now zero-cost, but if there is a raised exception, it takes 18 times longer to process it

sudden osprey
#

How are you benchmarking it?

#
~ took 3s
❯ py -3.11 -m timeit 'try: 1/0
∙ except: ...'
1000000 loops, best of 5: 259 nsec per loop

~ took 3s
❯ py -3.10 -m timeit 'try: 1/0
∙ except: ...'
2000000 loops, best of 5: 159 nsec per loop

~ took 2s
❯ py -3.9 -m timeit 'try: 1/0
∙ except: ...'
2000000 loops, best of 5: 137 nsec per loop

Results I'm getting don't seem as extreme as 18 times

fleet bridge
#

hmm

fleet bridge
#

but my smarter code gives me different result:
i have no idea why i am getting wrong results

3.10
try-except: ok                                     2.8 ns ± 317 ps [869 ms /  64535712]
try-except: err                                    209 ns ± 516 ns [969 ms /   4410213]

3.11
try-except: ok                                    -1.9 ns ± 1.8 ns [941 ms /  80431565] # negative is ok
try-except: err                                    1.1 μs ±  76 ns [941 ms /    833107]
maiden river
#

!e

a = [[]]*10
print(a)
a[0].append(1)
print(a)
night quarryBOT
#

@maiden river :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | [[], [], [], [], [], [], [], [], [], []]
002 | [[1], [1], [1], [1], [1], [1], [1], [1], [1], [1]]
maiden river
#

why does a[0].append adds the number to every sub-list

restive void
serene stratus
#

!e

a = [[], [], [], [], [], [], [], [], [], []]
print(a)
a[0].append(1)
print(a)```
night quarryBOT
#

@serene stratus :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | [[], [], [], [], [], [], [], [], [], []]
002 | [[1], [], [], [], [], [], [], [], [], []]
serene stratus
#

very interesting

versed eagle
quartz wave
versed eagle
#

to people who arent used to esoteric stuff, things like this can be a little frightening
so they use lambdas to visibly break it up into smaller sections that they can understand

#

so that they can know whats happening

quartz wave
versed eagle
#

i was using it as an example of esotericness

#

not literal

#

sorry if i phrased what i said in such a way that it was unclear

maiden river
#

!e

b='啕⪪䗑⯪坵⺺嵝㨮'
b+=b[-2::-1]

for z in b:
    print(
bin( ord(z) )[2:]
.zfill(15)
.translate({49:11036,48:11035}))
night quarryBOT
#

@maiden river :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | ⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜
002 | ⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛
003 | ⬜⬛⬛⬛⬜⬛⬜⬜⬜⬛⬜⬛⬛⬛⬜
004 | ⬛⬜⬛⬜⬛⬜⬜⬜⬜⬜⬛⬜⬛⬜⬛
005 | ⬜⬛⬜⬛⬜⬜⬜⬛⬜⬜⬜⬛⬜⬛⬜
006 | ⬛⬜⬛⬜⬜⬜⬛⬜⬛⬜⬜⬜⬛⬜⬛
007 | ⬜⬛⬜⬜⬜⬛⬜⬛⬜⬛⬜⬜⬜⬛⬜
008 | ⬛⬜⬜⬜⬛⬜⬛⬛⬛⬜⬛⬜⬜⬜⬛
009 | ⬜⬛⬜⬜⬜⬛⬜⬛⬜⬛⬜⬜⬜⬛⬜
010 | ⬛⬜⬛⬜⬜⬜⬛⬜⬛⬜⬜⬜⬛⬜⬛
011 | ⬜⬛⬜⬛⬜⬜⬜⬛⬜⬜⬜⬛⬜⬛⬜
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/umimateqiv.txt?noredirect

maiden river
#

someone shared this here

#

the more i look at it, the more fascinating it becomes

#

what i still can't get is how is zfill(15) affecting it

restive void
maiden river
maiden river
last locust
#

And every second line since it's every second line that ends with black

maiden river
#

we could omit the use of zfill if we chose other chars right ?

maiden river
last locust
#

zfill adds zeros to the beginning of the string to make the string the specified length (in this case 15)

#

!d str.zfill

night quarryBOT
#

str.zfill(width)```
Return a copy of the string left filled with ASCII `'0'` digits to make a string of length *width*. A leading sign prefix (`'+'`/`'-'`) is handled by inserting the padding *after* the sign character rather than before. The original string is returned if *width* is less than or equal to `len(s)`.

For example:

```py
>>> "42".zfill(5)
'00042'
>>> "-42".zfill(5)
'-0042'
maiden river
#

oh ok, gotcha : )

fair shell
#

Are keyword arguments just syntactical sugar for method overloading in python?

burnt pasture
fair shell
#

neat

dry mirage
#

!e

import numpy as np
from numpy.lib.stride_tricks import as_strided

def set_attr_force(obj, index, val):
    while True:
        xs = np.array([], dtype=np.uint64)
        if (loc := xs.__array_interface__['data'][0]) < id(obj):
            break
    xs = as_strided(xs, strides=(1,), shape=((off := id(obj) - loc) + 1,))
    ys = as_strided(xs[off:], strides=(8,), shape=(4,))
    zs = as_strided(ys[3:], strides=(8,), shape=(index + 1,))
    ys[2] += max(0, index - (end := len(obj)) + 1)
    zs[min(index, end):] = id(val)
    
tup = (1, 2, 3)
print(tup)

set_attr_force(tup, 1, 'hm')
print(tup)
night quarryBOT
#

@dry mirage :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | (1, 2, 3)
002 | (1, 'hm', 3)
dry mirage
#

wonder if strings can be mutated pithink

#

!e

import numpy as np
from numpy.lib.stride_tricks import as_strided

def set_attr_force(obj, index, val):
    while True:
        xs = np.array([], dtype=np.uint64)
        if (loc := xs.__array_interface__['data'][0]) < id(obj):
            break
    xs = as_strided(xs, strides=(1,), shape=((off := id(obj) - loc) + 1,))
    ys = as_strided(xs[off:], strides=(8,), shape=(4,))
    zs = as_strided(ys[3:], strides=(8,), shape=(index + 1,))
    ys[2] += max(0, index - (end := len(obj)) + 1)
    zs[min(index, end):] = id(val)
    

s = "abc"
print(s)

set_attr_force(s, 1, 'w')
print(s)
night quarryBOT
#

@dry mirage :x: Your 3.11 eval job has completed with return code 139 (SIGSEGV).

abc
rugged sparrow
#

does as_strided let you do memory corruption like that on purpose?

dry mirage
#

essentially yeah

#

since it needs to provide writable views into memory

#
This function has to be used with extreme care, see notes.
rugged sparrow
#

ah, handy

lavish dirge
#

Hi guys

#

and gals

#

Anyone got a moment to look at something for me

#

This is the language compiling as constant data where it compiles the definition of each word within the command
print(A,WORD,IS,MADE,FOR,MORE,THAN,ONE,LETTER)
print(A,BOOK,CONSISTS,FOR,MORE,THAN,ONE,WORD)
print(A,SCRIPT,CONSISTS,FOR,MORE,THAN,ONE,WORD)
print(A,LIBRARY,CAN,HOLD,MANY,FORMS,FOR,SPECIFIC,KNOWLEDGE)
ACKNOWLEDGE SOMETHING WRITTEN AND OR SPOKEN ORDER OR COMMAND STATED AS DEVELOPED A NEW DEVELOPMENT STATING A STRUCTURE TO AN ENTITY LARGER AMOUNT BETWEEN CHOSEN VALUES 1 VARIABLE CONSTRAINED WITH FIELDS OF DATA INFORMATION THAT ACTS OUT AS A COMMANDED TASK
ACKNOWLEDGE SOMETHING A SPECIFIED STORAGE CONTAINER IN PAGES OF SCRIPTS FOR ONE DESIGNATED PLACE OF KNOWLEDGE CONTAINS STATING A STRUCTURE TO AN ENTITY LARGER AMOUNT BETWEEN CHOSEN VALUES 1 WRITTEN AND OR SPOKEN ORDER OR COMMAND
ACKNOWLEDGE SOMETHING A SINGLE STORAGE PAGE OF CODE CONTAINS STATING A STRUCTURE TO AN ENTITY LARGER AMOUNT BETWEEN CHOSEN VALUES 1 WRITTEN AND OR SPOKEN ORDER OR COMMAND
ACKNOWLEDGE SOMETHING STORAGE FOR LANGUAGES AND OR BOOKS ALLOW POSSIBILITY OUTCOME TAKE INTO COMMUNICATION OF SYNCHRONIZE LINK BETWEEN TWO VALUES WITH MAIN VALUE TO KEEP WITHIN BIND WITH DIFFICULT TO RESIST FROM BINDED VALUE MULTI MULTIS OF MORE THAN ONE MULTIPLES THAT MULTIPLICATE INTO GIVEN AMOUNT MORE THAN ONE FORM STATING A STRUCTURE TO AN ENTITY DETAILED FIELD CONTAINED WISDOM AND INTELLIGENCE AS ONE MEMORY STORAGE BANK

#

This is the data after a duplicate of the fully defined data is made in tuple form underneath the constant
('TAKE', (('THE STORAGE AREA', 'ENTER INPUT', 'CHOICE OF TWO OR MORE OUTCOMES WITHIN POSSIBILITY TO CREATE NEW VALUE INSIDE AND OUTSIDE EXISTENCE', ('AN ACT TO CALCULATE AND GIVE A SPECIFIC LENGTH ON SOMETHING', 'ENTER INPUT', 'CHOICE OF TWO OR MORE OUTCOMES WITHIN POSSIBILITY TO CREATE NEW VALUE INSIDE AND OUTSIDE EXISTENCE', ('CURRENT TIME', 'PUT IN A POSITION', 'ENTER INPUT', 'MEASUREMENT IN WHICH CURRENT REALITIES MUST PASS'), 'MORE THAN ONE REALITY', 'REQUIRED', 'ENTER AND TRANSFER'), 'REQUIRED', 'ENTER AND TRANSFER', 'GO INSIDE AND EXIT THE OPPOSITE DIMENSION FROM ENTRANCE'), 'STATEMENT TO DESCRIBE A FUTURE STATEMENT', 'STATED AS OBTAIN INSIDE CURRENT EXISTENCE', ('CURRENTLY LIVING DATA PARTICLES AS ONE OBJECT THAT EXISTS IN EXISTENCE', 'THE ACTION OF USING MULTIPLE MULTIVERSECODE WITHIN EVERY UNITED VALUE OF EXISTENCE WHILE UNIVERSAL OUTCOME', 'MORE THAN ONE MACRO', 'BETWEEN', 'DATA2 TO BE HELD INSIDE A DEVICE TO STORE A SKILL OR SKILLS', 'ADDED WITH', 'LIVE INSIDE EXISTENCE', 'ENTER INPUT', 'STATEMENT', 'PLACE OF ORIGIN', 'BETWEEN', ('AN ACT TO CALCULATE AND GIVE A SPECIFIC LENGTH ON SOMETHING', 'ENTER INPUT', 'CHOICE OF TWO OR MORE OUTCOMES WITHIN POSSIBILITY TO CREATE NEW VALUE INSIDE AND OUTSIDE EXISTENCE', ('CURRENT TIME', 'PUT IN A POSITION', 'ENTER INPUT', 'MEASUREMENT IN WHICH CURRENT REALITIES MUST PASS'), 'MORE THAN ONE REALITY', 'REQUIRED', 'ENTER AND TRANSFER'), 'CONNECT WORDS WHILE ALSO ADD', ('THE STORAGE AREA', 'ENTER INPUT', 'CHOICE OF TWO OR MORE OUTCOMES WITHIN POSSIBILITY TO CREATE NEW VALUE INSIDE AND OUTSIDE EXISTENCE', ('AN ACT TO CALCULATE AND GIVE A SPECIFIC LENGTH ON SOMETHING', 'ENTER INPUT', 'CHOICE OF TWO OR MORE OUTCOMES WITHIN POSSIBILITY TO CREATE NEW VALUE INSIDE AND OUTSIDE EXISTENCE',...

#

That is the language

#

That language is complete in all forms. Every definition defined and every word within the definition defined
I'm trying to get a good perspective of how it's actually handling the output

#

The way I made the language is every symbole and every letter can be part of a formula or equation to be made. Depending on the path chosen to make the command determines the route the system as I will call it will take. for each word you change in 1 single command the path can be entirely different. The words represent a piece of code which is in turn data which can be used to make an equation.
Numbers Symboles and Letters are the more advanced part of it that makes it so unique. Right now I am trying to see how the path formed from a set of constant data to an exact duplicate of the constant data in tuple form instead
I'm wondering if its grouping words based on reference or is it grouping them by connection

#

those are obviously two different outputs

maiden river
#

!e

_ = lambda c,m :[print(bin(ord(j))[2:].zfill(max([len(bin(ord(k))[1:]) for k in c])).translate({49:11036,48:11035}))for j in (c+ c[-2::-1] if m==1 else c)]

_('<"">',1)
night quarryBOT
#

@maiden river :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | ⬛⬜⬜⬜⬜⬛⬛
002 | ⬛⬜⬛⬛⬛⬜⬛
003 | ⬛⬜⬛⬛⬛⬜⬛
004 | ⬛⬜⬜⬜⬜⬜⬛
005 | ⬛⬜⬛⬛⬛⬜⬛
006 | ⬛⬜⬛⬛⬛⬜⬛
007 | ⬛⬜⬜⬜⬜⬛⬛
magic wraith
#

!e ```py
globals()[z] = type(z := (lambda _: str().join((s := map)(chr, s(round, (lambda a,b,c,d,e,f:(f/d(dcce-e)/(ddce-c-d),97*(d-e+d)ce/c/c+(A:=d*(f+e)-e)cce,(fb-accc)/(f+e)-e,(B:=(f-d+e)cdcde+(d+A)*cce), B+d+d+d+e))(12.3456, 99.8877, 2, 3, -1, 11)))))(), (type(z, (type,), {'repr': lambda a: a.name, 'lt': (_1 := lambda a, b: isinstance(b, int) and b >= 4), 'gt': (_2 := lambda a, b: isinstance(b, int) and b <= 3), 'le': _1, 'ge': _2, 'slots': (), 'dir': lambda _: ['bleem']})('foo', (type,), {}),), {'new': lambda a: bleem})

print(3 < bleem < 4)```

night quarryBOT
#

@magic wraith :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
sudden osprey
#

let me try

#

!e

_ = lambda c,m :[print(bin(ord(j))[2:].zfill(max([len(bin(ord(k))[1:]) for k in c])).translate({49:11036,48:11035}))for j in (c+ c[-2::-1] if m==1 else c)]

_('<~àþþ~ff', 2)
night quarryBOT
#

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

001 | ⬛⬛⬛⬜⬜⬜⬜⬛⬛
002 | ⬛⬛⬜⬜⬜⬜⬜⬜⬛
003 | ⬛⬜⬜⬜⬛⬛⬛⬛⬛
004 | ⬛⬜⬜⬜⬜⬜⬜⬜⬛
005 | ⬛⬜⬜⬜⬜⬜⬜⬜⬛
006 | ⬛⬛⬜⬜⬜⬜⬜⬜⬛
007 | ⬛⬛⬜⬜⬛⬛⬜⬜⬛
008 | ⬛⬛⬜⬜⬛⬛⬜⬜⬛
sudden osprey
#

WAIT A MINUTE

ornate finch
#

!e ```py
_ = lambda c,m :[print(bin(ord(j))[2:].zfill(max([len(bin(ord(k))[1:]) for k in c])).translate({49:11036,48:11035}))for j in (c+ c[-2::-1] if m==1 else c)]

_('"'',1)

ornate finch
#

!e```
_ = lambda c,m :[print(bin(ord(j))[2:].zfill(max([len(bin(ord(k))[1:]) for k in c])).translate({49:11036,48:11035}))for j in (c+ c[-2::-1] if m==1 else c)]

_('"'',1)

night quarryBOT
#

@ornate finch :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | ⬛⬜⬛⬛⬛⬜⬛
002 | ⬛⬜⬛⬛⬜⬜⬜
003 | ⬛⬜⬛⬛⬛⬜⬛
ornate finch
#

!e ```
_ = lambda c,m :[print(bin(ord(j))[2:].zfill(max([len(bin(ord(k))[1:]) for k in c])).translate({49:11036,48:11035}))for j in (c+ c[-2::-1] if m==1 else c)]

_('"'',2)

night quarryBOT
#

@ornate finch :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | ⬛⬜⬛⬛⬛⬜⬛
002 | ⬛⬜⬛⬛⬜⬜⬜
pastel ibex
ornate finch
#

!e ```
def function(c):
translates = {49:11036,48:11035}
for i in c:
fill = []
for j in c:
fill.append(len(bin(ord(j))[1:]))
fill = max(fill)
i = bin(ord(i))[2:]
i = i.zfill(fill)
i = i.translate(translates)
print(i)

_('<~àþþ~ff', 2)

function('<~àþþ~ff')

night quarryBOT
#

@ornate finch :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | ⬛⬛⬛⬜⬜⬜⬜⬛⬛
002 | ⬛⬛⬜⬜⬜⬜⬜⬜⬛
003 | ⬛⬜⬜⬜⬛⬛⬛⬛⬛
004 | ⬛⬜⬜⬜⬜⬜⬜⬜⬛
005 | ⬛⬜⬜⬜⬜⬜⬜⬜⬛
006 | ⬛⬛⬜⬜⬜⬜⬜⬜⬛
007 | ⬛⬛⬜⬜⬛⬛⬜⬜⬛
008 | ⬛⬛⬜⬜⬛⬛⬜⬜⬛
ornate finch
#

oh so it gets the ascii code of each character and translates it to erm a square?

pastel ibex
#

Suppose so not done looking it over tho yet

#

in the original code you can also make it reflect by putting a 1 instead of a 2

ornate finch
#

my question is

#

is how in the world did that guy know the characters

#

to create it

pastel ibex
#

probably understood it alot better than I did lol

proper vault
#

you can compute them from the desired image by simply writing the program in reverse

ornate finch
#

tbh

sick hound
#

!e

night quarryBOT
#
Missing required argument

code

sick hound
#

!e

def function(c):
    translates = {49:11036,48:11035}
    for i in c:
        fill = []
        for j in c:
            fill.append(len(bin(ord(j))[1:]))
        fill = max(fill)
        i = bin(ord(i))[2:]
        i = i.zfill(fill)
        i = i.translate(translates)
        print(i)


# _('<~àþþ~ff', 2)
function('<~àþþ~ff')
night quarryBOT
#

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

001 | ⬛⬛⬛⬜⬜⬜⬜⬛⬛
002 | ⬛⬛⬜⬜⬜⬜⬜⬜⬛
003 | ⬛⬜⬜⬜⬛⬛⬛⬛⬛
004 | ⬛⬜⬜⬜⬜⬜⬜⬜⬛
005 | ⬛⬜⬜⬜⬜⬜⬜⬜⬛
006 | ⬛⬛⬜⬜⬜⬜⬜⬜⬛
007 | ⬛⬛⬜⬜⬛⬛⬜⬜⬛
008 | ⬛⬛⬜⬜⬛⬛⬜⬜⬛
finite blaze
solar tulip
#

Hi.

#

!e

a = 1: if a == 1: print(a)```
night quarryBOT
#

@solar tulip :x: Your 3.11 eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     a = 1: if a == 1: print(a)
003 |          ^
004 | SyntaxError: invalid syntax
solar tulip
#

How to make this work on one line?

floral meteor
night quarryBOT
#

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

1
floral meteor
#

or even better (a:=1)==1==print(a)

solar tulip
#

Wait where is "if" gone?

cloud fossil
#

a==1==print(a) is the same as writing a == 1 and print(a)

#

Essentially

#

And Python doesn't evaluate the rightmost side (print(a)) until a == 1 is True, so this condition acts as the if for the printing

maiden river
#

!e

j =[
"000111000",
"001000100",
"011000110",
"011111110",
"110000011",
"110000011"
]  


#pattern to chars        
def ptc(gr):
    s=''
    for b in gr:
       s+=chr(int(b,2))
    return s
    

#chars to pattern    
def ctp (b,sz,m=0): 
#sz=width,m=mirror on x axis, 1=true
    if m==1:b+=b[-2::-1]
    for z in b:
        print(bin(ord(z))[2:].zfill(sz).translate({49:11036,48:11035}))

chars = ptc(j) #8DÆþƃƃ
ctp(chars,9) 
print(ptc(j))
night quarryBOT
#

@maiden river :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | ⬛⬛⬛⬜⬜⬜⬛⬛⬛
002 | ⬛⬛⬜⬛⬛⬛⬜⬛⬛
003 | ⬛⬜⬜⬛⬛⬛⬜⬜⬛
004 | ⬛⬜⬜⬜⬜⬜⬜⬜⬛
005 | ⬜⬜⬛⬛⬛⬛⬛⬜⬜
006 | ⬜⬜⬛⬛⬛⬛⬛⬜⬜
007 | 8DÆþƃƃ
maiden river
#

!e Hence,

pattern= lambda c,m=0,l=-1 :[print(bin(ord(j))[2:].zfill(max([len(bin(ord(k))[2:]) for k in c])if l==-1 else l).translate({49:11036,48:11035}))for j in (c+ c[-2::-1] if m==1 else c)]

pattern("啕⪪䗑⯪坵⺺嵝㨮",1)

Where

c = chars, m: bool = mirror or nah, 
l = length (default auto calculate)
night quarryBOT
#

@maiden river :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | ⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜
002 | ⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛⬜⬛
003 | ⬜⬛⬛⬛⬜⬛⬜⬜⬜⬛⬜⬛⬛⬛⬜
004 | ⬛⬜⬛⬜⬛⬜⬜⬜⬜⬜⬛⬜⬛⬜⬛
005 | ⬜⬛⬜⬛⬜⬜⬜⬛⬜⬜⬜⬛⬜⬛⬜
006 | ⬛⬜⬛⬜⬜⬜⬛⬜⬛⬜⬜⬜⬛⬜⬛
007 | ⬜⬛⬜⬜⬜⬛⬜⬛⬜⬛⬜⬜⬜⬛⬜
008 | ⬛⬜⬜⬜⬛⬜⬛⬛⬛⬜⬛⬜⬜⬜⬛
009 | ⬜⬛⬜⬜⬜⬛⬜⬛⬜⬛⬜⬜⬜⬛⬜
010 | ⬛⬜⬛⬜⬜⬜⬛⬜⬛⬜⬜⬜⬛⬜⬛
011 | ⬜⬛⬜⬛⬜⬜⬜⬛⬜⬜⬜⬛⬜⬛⬜
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/oyipurokiq.txt?noredirect

dense nova
#

!e a scoop of ice cream

print(_:=+type((q:='_'),(),{q*(bool()**bool()+bool()**bool()):bool()**bool(),(q*7).replace(q*5,q*2+'a scoop of ice cream'[6:bool():-2]):lambda _:-_.__})())
night quarryBOT
#

@dense nova :white_check_mark: Your 3.11 eval job has completed with return code 0.

-1
arctic skiff
night quarryBOT
#

@arctic skiff :white_check_mark: Your 3.11 eval job has completed with return code 0.

-1
dense nova
#

i die

finite blaze
#

!e

def SieveOfEratosthenes(n):
 r,m=range,n+1
 x,p=[1]*m,2
 while p*p<=n:
  if x[p]==1:
   for i in r(p*p,m,p):x[i]=0;p+=1
  [x[p]==1==print(p)for p in r(2,m)] 
SieveOfEratosthenes(20)
night quarryBOT
#

@finite blaze :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | 2
002 | 3
003 | 5
004 | 7
005 | 9
006 | 11
007 | 13
008 | 15
009 | 17
010 | 19
finite blaze
#

I was trying to oneline this while loop

#
[[do_something for i in range(j)] for _ in iter(lambda: while_condition, True) if if_condition] 

Into something like this but i can't get it to work

last locust
twilit adder
#

sorry

fleet bridge
#

It it possible to catch segfault (and other signals) in python?
I want something like this:

with ignore_segfault():
    ctypes.do_bad_stuff_in_C_code()
#

Is it possible on windows?

I am allowed to write some functions in C and then export them to some module

quartz wave
proper vault
rugged sparrow
# fleet bridge It it possible to catch segfault (and other signals) in python? I want something...

!e technically you can use signal handlers. as an alternative there is a way using the write syscall that you can detect if an address is useable in some way.

def valid(start):
    from ctypes import c_char
    import os
    memory = (c_char*1).from_address(start)
    r, w = os.pipe()
    try:
        if os.write(w, memory) == 1:
            return True
    except OSError:pass
    finally:
        os.close(r)
        os.close(w)
    return False

print(valid(0))
print(valid(0xfffffffff))
print(valid(id(1)))
night quarryBOT
#

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

001 | False
002 | False
003 | True
solar tulip
#

Can I get these lines in one line?

...
x1 = []
for x in range(y): n+=b; b*=f
return x2```
#

Something like this:

x1 = []; for x in range(y): n+=b; b*=f; return x2```
Is this even possible?
earnest wing
#

A block statement like for can only be the start of a line

#

So no semicolon

full talon
#
class gqKURcZbE_MnpEYOVYRTAWlSOna_suqs(object):

    def Z_Ydgje_iGdodMdFDS_FScMuAQPgaI_j(wJTLzPVvwWhYTNcAA_dAmbfgtcmTFM_N):
        wJTLzPVvwWhYTNcAA_dAmbfgtcmTFM_N.name = ''.join([chr(115), chr(115), chr(97), chr(108), chr(67), chr(109), chr(111), chr(100), chr(110), chr(97), chr(82)][::-1])
        wJTLzPVvwWhYTNcAA_dAmbfgtcmTFM_N.description = ''.join([chr(102), chr(102), chr(117), chr(116), chr(115), chr(32), chr(101), chr(109), chr(111), chr(115), chr(32), chr(115), chr(101), chr(111), chr(100), chr(32), chr(115), chr(115), chr(97), chr(108), chr(99), chr(32), chr(115), chr(105), chr(104), chr(84)][::-1])
        wJTLzPVvwWhYTNcAA_dAmbfgtcmTFM_N.version = ''.join([chr(48), chr(46), chr(49)][::-1])
        wJTLzPVvwWhYTNcAA_dAmbfgtcmTFM_N.author = ''.join([chr(121), chr(117), chr(71), chr(32), chr(101), chr(109), chr(111), chr(83)][::-1])

    def qwxyaDbvJfXJQBYMOsQmkOmwySiFLnsi(wJTLzPVvwWhYTNcAA_dAmbfgtcmTFM_N):
        print(''.join([chr(8212), chr(353), chr(376), chr(240), chr(8212), chr(353), chr(376), chr(240), chr(8212), chr(353), chr(376), chr(240), chr(8212), chr(353), chr(376), chr(240), chr(8212), chr(353), chr(376), chr(240), chr(32), chr(107), chr(114), chr(111), chr(119), chr(32), chr(111), chr(116), chr(32), chr(103), chr(110), chr(105), chr(111), chr(71)][::-1]))

    def PozSOIoeRoSZQmLdjzecmeIMldJacjfb(wJTLzPVvwWhYTNcAA_dAmbfgtcmTFM_N):
        print(''.join([chr(8226), chr(732), chr(226), chr(8226), chr(732), chr(226), chr(8226), chr(732), chr(226), chr(8226), chr(732), chr(226), chr(8226), chr(732), chr(226), chr(32), chr(101), chr(101), chr(102), chr(102), chr(111), chr(99), chr(32), chr(103), chr(110), chr(105), chr(107), chr(97), chr(77)][::-1]))

    def XexzOkriEgJODGdvyCdOlgm_XMKGdQIU(wJTLzPVvwWhYTNcAA_dAmbfgtcmTFM_N):
        print(''.join([chr(180), chr(732), chr(376), chr(240), chr(180), chr(732), chr(376), chr(240), chr(180), chr(732), chr(376), chr(240), chr(180), chr(732), chr(376), chr(240), chr(180), chr(732), chr(376), chr(240), chr(32), chr(103), chr(110), chr(105), chr(112), chr(101), chr(101), chr(108), chr(83)][::-1]))
royal whale
full talon
solar tulip
#

I will try.

royal whale
royal whale
full talon
#
/-------------\
| Obfuscation |
\-------------/
full talon
full talon
royal whale
full talon
#

obfuscated using this beauty

#

yes I have a legacy one

#

it makes ur code hella big

#

and take long to execute

royal whale
#

Interesting

full talon
#

made my PC try to run it

royal whale
#

Hm

full talon
#

python going AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA FUUUUUUUUUUUUUUUUK

#

And run out of memory

royal whale
full talon
#

it makes strings look frkn insane

#

also I need to add a length limit else it will crash

#

ast can't handle this string (yes I obfuscated the obfuscator using the obfuscator)

#

it will crash

royal whale
full talon
#

weight distribution

full talon
fleet bridge
#

i hate emojis

royal whale
royal whale
#

It automatically adds help messages and stuff

full talon
#

like I don't need the BLOAT

royal whale
#

And way more functionality

royal whale
full talon
#

I already bundle to a very big exe

#

don't wanna add to that

#
def compile_bracketonly(source: str) -> str:
    left,right="{","}"
    ucp_store=[]
    for char in source:
        ucp_store.append(ord(char))
    def _():
        str_store=[]
        for ucp in ucp_store:
            store=[]
            #print (ucp)
            for _ in range(ucp):
                store.append("(()==())")
            resulting_string=f"{left}u({'+'.join(store)}){right}"
            str_store.append(resulting_string)
        return "".join(str_store)
    return (f"""
u=chr
exec(f\"{_()}\")
""".strip())

if __name__ == "__main__":
    import sys
    import os
    if os.path.exists(sys.argv[1]):
        with open(sys.argv[1],"r") as f:
            if len(sys.argv) > 2:
                with open(sys.argv[2],"w") as f2:
                    f2.write(compile_bracketonly(f.read()))
            else:
                print("No output file specified")
                #print(compile_bracketonly(f.read()))
    else:
        print ("File does not exist")
```try this beaut
#

it does

#

shit

#

it makes ur code

#

shit

#

and I love it

solar tulip
#

@royal whale

def calc(p: list, b: int):
    f = p[0]; [(f += b, n += p[x+1]) for x in range(len(p)-1)]; return n```
solar tulip
#

does not work...

royal whale
full talon
#

Maybe ill randomly make it sprinkle in detection

royal whale
#

I can look into it

full talon
#

basically it will read itself, then go hey, do I have exec on the 2nd line, and do I not contain ;s on the first line

#

else it outputs heavily corrupted code

royal whale
#

Did you try out the version I sent you above?

night quarryBOT
#
Missing required argument

code

solar tulip
#

Any other way to make it in one line?

full talon
#

!e ```py
def calc(p: list, b: int):
f = p[0]; [(f += b, n += p[x+1]) for x in range(len(p)-1)]; return n

night quarryBOT
#

@full talon :x: Your 3.11 eval job has completed with return code 1.

001 |   File "<string>", line 2
002 |     f = p[0]; [(f += b, n += p[x+1]) for x in range(len(p)-1)]; return n
003 |                   ^^
004 | SyntaxError: invalid syntax
royal whale
solar tulip
#

I saw only this method.

#
def calc(p: list, b: int):
    n = p[0]; [(n += b, n -= p[x+1]) for x in range(len(p)-1)]; return n```
full talon
#

!e ```py
def calc(p: list, b: int):
n = p[0]; [(n += b, n -= p[x+1]) for x in range(len(p)-1)]; return n

night quarryBOT
#

@full talon :x: Your 3.11 eval job has completed with return code 1.

001 |   File "<string>", line 2
002 |     n = p[0]; [(n += b, n -= p[x+1]) for x in range(len(p)-1)]; return n
003 |                   ^^
004 | SyntaxError: invalid syntax
royal whale
full talon
#

couldn't u use lambdas?

#

!e ```py
calc=lambda p,b:(f:=p[0],[(f:=f+b,n:=n+p[x+1])for x in range(len(p)-1)], n)[-1]
print(calc([10], 20))

night quarryBOT
#

@full talon :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 2, in <module>
003 |   File "<string>", line 1, in <lambda>
004 | UnboundLocalError: cannot access local variable 'n' where it is not associated with a value
rustic spruce
#

print x

full talon
#

question: can you put function content and definition on one line

#

and then another function def after it

royal whale
full talon
royal whale
#

Not if you mean

def x(): something; def y(): something
royal whale
#

Nope

#

Won't work

fleet bridge
full talon
royal whale
#

Not sure though

full talon
fleet bridge
#

use pypy or numba if you are doing a lot of math

full talon
#

also does it precompile

solar tulip
#
# p is a list [0,1,2]
# b is an int 5
calc = lambda p, b:
    n = p[0] 
    for x in range(len(p)-1):    
        n += b 
        n -= p[x+1] 
    calc = n```
#

Can someone do all this in one line?

#

Lol...

fleet bridge
night quarryBOT
#

@fleet bridge :warning: Your 3.11 eval job has completed with return code 0.

[No output]
fleet bridge
#

al least it has no syntax errors

solar tulip
#

Why [-1] at the end?

#

Cuz you pull the last value out of the list?

#

It works.

#

I just don't get this:
, n)[-1]

#

I think I get it now. Thanks-

fleet bridge
# solar tulip Why [-1] at the end?
simplified:
calc = lambda p, b: (n := start_value, [here change n], n)[-1]
(..., ..., ...) is a tuple, so [-1] is the last element, which is n
#

it is very common practice when you need write some code in one line and you need to drop some values
here we must execute n := start_value, [here change n], but we dont care about result, we only need n

solar tulip
#

Thanks. 🙂

#

Can you also do this in one line?

def getlen(n: int, b: int, x=0):
    while n > (b**(x)//(b): x += 1
    return x```
#

I will try also.

fleet bridge
#

it is harder, ill try

#

!e

getlen = lambda n, b, x=0: ({(x := x + 1, 0)[-1] for _ in iter((lambda: n > b**x//b), False)}, x)[-1]
night quarryBOT
#

@fleet bridge :warning: Your 3.11 eval job has completed with return code 0.

[No output]
solar tulip
#

What does iter do?

fleet bridge
#

dark magic

solar tulip
#

Lmao.

fleet bridge
#

!d iter

night quarryBOT
#

iter(object[, sentinel])```
Return an [iterator](https://docs.python.org/3/glossary.html#term-iterator) object. The first argument is interpreted very differently depending on the presence of the second argument. Without a second argument, *object* must be a collection object which supports the [iterable](https://docs.python.org/3/glossary.html#term-iterable) protocol (the `__iter__()` method), or it must support the sequence protocol (the `__getitem__()` method with integer arguments starting at `0`). If it does not support either of those protocols, [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "TypeError") is raised. If the second argument, *sentinel*, is given, then *object* must be a callable object. The iterator created in this case will call *object* with no arguments for each call to its [`__next__()`](https://docs.python.org/3/library/stdtypes.html#iterator.__next__ "iterator.__next__") method; if the value returned is equal to *sentinel*, [`StopIteration`](https://docs.python.org/3/library/exceptions.html#StopIteration "StopIteration") will be raised, otherwise the value will be returned.
fleet bridge
solar tulip
#

Can you explain what the steps are?

fleet bridge
# solar tulip Can you explain what the steps are?
({(x := x + 1, 0)[-1] for _ in iter((lambda: n > b**x//b), False)}, x)[-1]

(x := x + 1, 0)[-1] - it is incrementing x and dropping its value, returning 0
{<x+=1> for _ in <some_iter>} - it is our while loop
({...}, x)[-1] - drop all, return x

iter((lambda: n > b**x//b), False) - it will give you items while n > b**x//b is true
#

.

solar tulip
#

NO IT IS WRONG?

fleet bridge
#

fixed

solar tulip
#
getlen = lambda n, b, x=0: ({(x := x + 1, 0)[-1] for _ in iter((lambda: n > b**x//b), False)}, x)[-1]```
#

So this is correct?

fleet bridge
#

i think so

solar tulip
#

I will check.

fleet bridge
#

both getlen and calc can be implemented without using loops (even those weird loops)

solar tulip
#

Yes the results are as expected.

#

How?

#

How without loops??

fleet bridge
#
ln = natural log
getlen = lambda n, b, x=0: return max(x, ln(n * b) / ln(b)) # most likely there are off-by-one errors
calc = lambda p, b: b * (len(p) - 1) + 2 * p[0] - sum(p) # most likely there are wrong coefficients
solar tulip
#

Oh, well the thing is these were only simple examples so I can implement it in my larger code.

#

So not litteral issues.

#

Just learning concepts here.

sick hound
#

poopfart

#

Any good way to exec code in other Py version without manually installing interrupters

AKA if i wanted to marshal something in 3.7 and im running 3.10.

vestal solstice
#

marshal?

#

what's that

sick hound
#

Thats uh

#

kinda uh

#

yuh uhmm

vestal solstice
sick hound
#

But what if i wanted to automate this

burnt pasture
maiden river
#

wow, thankyou : )

dense nova
#

They should pin this

fleet bridge
#

then I should probably explain all this better and add examples

sick hound
#

Anyone need a obfuscator

serene stratus
#

Yes you can, but that isn't the Python version

#

!d marshal.version

night quarryBOT
#

marshal.version```
Indicates the format that the module uses. Version 0 is the historical format, version 1 shares interned strings and version 2 uses a binary format for floating point numbers. Version 3 adds support for object instancing and recursion. The current version is 4.
full talon
#

is py 'abc'.replace('ab', 'de') equivalant to```py
str.replace('abc', 'ab', 'de')

#

as if so, I can make my code look insane

#

by replacing str with an alias

#

which is different every time

#

so ```py
str2.replace(str1.replace(str0.replace('\x40'# And so on

astral rover
#

yeah

full talon
# astral rover yeah
VAsyYauYodScalVlyxPRfFux_vxuiT_o = lambda n: type('')(n)

TigxgqGV_YGtdCIpTs_FKvQTtVNpUEbI = type(VAsyYauYodScalVlyxPRfFux_vxuiT_o(21))
r_lIhZjNxkbPgyzSEvwcwb_kDaGYClVj = TigxgqGV_YGtdCIpTs_FKvQTtVNpUEbI.split

print(r_lIhZjNxkbPgyzSEvwcwb_kDaGYClVj('hello world!', ' '))
#

run that

#

it does INSANE SHIT

#

may make all variable assignments a large function

#

which includes lambdas

#

like constant "321"? LJSVEjM_mxdOBpQSHYIDcSqbXVjDvKxS(0x141)

full talon
#

Should I add an -shuffle to my obfuscator

#

it shuffles names by indexing all the names

#

then replaces them with eachother

#

so u get stuff like ```py
class MakesCoffee(object):
def Make(self):
print("Making something")

class Makes(MakesCoffee):
def Make(self):
print("Making Cofee")

sick hound
#

how do i change this

#

marshal.version

#

just like?
marshal.version = 3.10?

full talon
#

want it

#

?

sick hound
#

Sure!

#

looks very cool.

full talon
sick hound
#

DAMN

night quarryBOT
sick hound
#

how good is this?

full talon
#

just run python obfuscator.py <infile> -o <outfile> -n -i -f -c

full talon
#

anyways that copy is broken

#

it lacks the -c flag

sick hound
#

oh

full talon
#

only -C

#

@sick hound

#

try it

#

-n tells obfuscate variables

#

-i means obfuscate imports

#

-f means obfuscate functions

#

-c means obfuscate classes

sick hound
#

M

floral meteor
#

I'm training myself to fix messy code by writing code so bad not even I can read it.

sick hound
#

It seems more like a re-namer

full talon
#

it does rename

#

more advanced obfuscation will come

sick hound
#

Ooh

#

Nice

fleet bridge
full talon
#

anyways redid how its being input

#
  • now it generates obfmaps
#

I just realized

quartz wave
#

like
a burst of motivation

full talon
#

fixing a bug causing the obfmap to not include schmit from inside functions

#

classes are broken as shi

quartz wave
# quartz wave like a burst of motivation

this is one hell of a thing just to get Z ```py

gdci('Z')
('builtins.getattribute(name.len().class.doc.getitem(157).add(name.len().class.doc.getitem(157)).add(name.len().class.doc.getitem(0)).add(name.len().class.doc.getitem(60)).add(name.len().class.doc.getitem(182)).add(name.len().class.doc.getitem(49)).add(name.len().class.doc.getitem(18)).add(name.len().class.doc.getitem(2)).add(name.len().class.doc.getitem(157)).add(name.len().class.doc.getitem(157)))(name.len().class.doc.getitem(18).add(name.len().class.doc.getitem(15))).doc', 2656)

full talon
#

!e ```py
print(builtins.getattribute(name.len().class.doc.getitem(157).add(name.len().class.doc.getitem(157)).add(name.len().class.doc.getitem(0)).add(name.len().class.doc.getitem(60)).add(name.len().class.doc.getitem(182)).add(name.len().class.doc.getitem(49)).add(name.len().class.doc.getitem(18)).add(name.len().class.doc.getitem(2)).add(name.len().class.doc.getitem(157)).add(name.len().class.doc.getitem(157)))(name.len().class.doc.getitem(18).add(name.len().class.doc.getitem(15))).doc[2656])

quartz wave
#

yes

#

!e ```py
print(builtins.getattribute(name.len().class.doc.getitem(157).add(name.len().class.doc.getitem(157)).add(name.len().class.doc.getitem(0)).add(name.len().class.doc.getitem(60)).add(name.len().class.doc.getitem(182)).add(name.len().class.doc.getitem(49)).add(name.len().class.doc.getitem(18)).add(name.len().class.doc.getitem(2)).add(name.len().class.doc.getitem(157)).add(name.len().class.doc.getitem(157)))(name.len().class.doc.getitem(18).add(name.len().class.doc.getitem(15))).doc[2656])

night quarryBOT
#

@quartz wave :white_check_mark: Your 3.11 eval job has completed with return code 0.

Z
#

@full talon :white_check_mark: Your 3.11 eval job has completed with return code 0.

Z
quartz wave
#

see

#

one hell of a thing just to get Z

full talon
#

fuk

#

@quartz wave so I am looking at working with an obfuscationmap

#

which I guess I won't do

#

as thats waaaaay too much work

#

@quartz wave

quartz wave
#

what do you even wanna do

full talon
quartz wave
full talon
#

so intellisense and shit

#

won't work

#

and you don't know what it is

#

@quartz wave should I

quartz wave
#

btw here's code to get exec in python 3.11 ```py
builtins.dict.getitem(name.len().class.doc.getitem(15).add(name.len().class.doc.getitem(5)).add(name.len().class.doc.getitem(15)).add(name.len().class.doc.getitem(206)))

quartz wave
#

wait

full talon
#

I WANT IT GOD DAMN IT

#

So I can make all my internal functions shit

quartz wave
quartz wave
#

wait

full talon
#

imma call it pydocg

#

so I can do pydocg <string>

#

@quartz wave

quartz wave
#

the gdci and gs methods

full talon
#

@quartz wave I don't understand it

quartz wave
#

oh my gosh

full talon
#

@quartz wave its broken