#ot1-perplexing-regexing

1 messages · Page 542 of 1

latent scaffold
#

each one is different

fresh basalt
#

yes, each language is different.

#

and everybody wants to feel special

latent scaffold
#

C isn't getting along with these Cs

fresh basalt
#

That's probably not the only motivation but it is definitely a motivation.

acoustic moss
fresh basalt
#

C is ambivalent about them.

latent scaffold
#

You know this website is kind of helpful

#

probably helps for chat any kind of filter

fresh basalt
#

It's just another day at the factory for C.

gritty zinc
#

wtf does that file begin with

#

!charinfo \ufeff

royal lakeBOT
gritty zinc
#

argh

acoustic moss
#

REVERSE SOLIDUS

rough sapphire
#

heyo

latent scaffold
#

lol

rough sapphire
#

anyone speak spanish here?

royal lakeBOT
#
Missing required argument

characters

gritty zinc
#

!charinfo ||

royal lakeBOT
gritty zinc
#

there we go

rough sapphire
#

!charinfo poop

royal lakeBOT
#

You are not allowed to use that command here. Please use the #bot-commands channel instead.

gritty zinc
#

A file on the Unicode website begins with a weird unicode char 😩

fresh basalt
#

You asked for it.

latent scaffold
#

Speaking of Unicode

#

gritty zinc
#

yeah, but right here?..

latent scaffold
#

How do you um know that

fresh basalt
#

me: "Unicode is like a dark and scary forest"; @gritty zinc : "Let's walk into the forest."

acoustic moss
#

deep

latent scaffold
#

!charinfo ‍

royal lakeBOT
#

You are not allowed to use that command here. Please use the #bot-commands channel instead.

latent scaffold
#

ouchy

inland wolf
#

L

fresh basalt
#

We're not privileged.

inland wolf
#

thats what u get for not being helper

latent scaffold
#

#bot-commands message

fresh basalt
#

Now you see the violence inherent in the system.

latent scaffold
#

\😩

inland wolf
#

is there a way to type characters by their unicode codepoints

latent scaffold
#

Emoji are so weird

#

you can combine emoji using a

inland wolf
#

like the U+ codes

fresh basalt
#

Yes, I don't know if I like emoji.

#

@inland wolf What would that even mean?

acoustic moss
#

smh

latent scaffold
#

♂️‍🏻

#

oh I broke it

inland wolf
#

or seomething similar

latent scaffold
#

👨‍👩‍👦

#

AHA it worked

inland wolf
#

bruh

latent scaffold
#
:man:<ZWJ>:woman:<ZWJ>:boy:
#

<ZWJ> is

fresh basalt
#

@inland wolf In Windows you can do the alt + number

latent scaffold
#

👨‍🧑‍🦰

fresh basalt
#

@inland wolf I don't know if that's just cp437 or if you have to fiddle with it

latent scaffold
#

🦰

inland wolf
#

its not the same number tho

#

like

latent scaffold
#

lol what the heck. why is 🦰 a thing

inland wolf
#

02554 is ú

gritty zinc
#

glorious

inland wolf
#

is that the unicode codepoint for it?

inland wolf
fresh basalt
#

ConfusedReptile is halfway to the zalgo filter

latent scaffold
gritty zinc
#

yeah

#
ᴄ໐𝞹𝔣𝞾𝑠𝑎𝑏𝖑𝕖𝒔﹏│𝘪𝑛𝕖𝘴 ꓿ 𝞼𝟈ҽ𝘯["ᴄ𞸤𝕟ſ𝓊𝘴𝗮𝖇ﺍꬲ𝗌ꓸ𝗍𝑥𝙩"٫𝓮𝞹𝙘ە𝖉ιπ𝔤꓿"𝞄𝛕𝚏‑ଃ"❩܁ꭈ𝗲𝓪𝔡〔❳۰𝘀𝗉𝙡Ꭵ𝚝❲"
"﴿
m𝞪𝐩𝞀𝝸ռ𝗴 ⹀ 𝒸𝜎ا𐌠е𝓬𝒕𝜾൦𝚗sꓸ𝒹℮ꞙ𝙖ꭎ𝕀𝑡ⅾɩⅽ𝑡[𝕴𝖎𝓼𝗍]
ք௦ꭇ
𝟭⍳𝝿𝖾 ɩп 𝖼𑣈𝜋ſ𝓊ƽ𝙖𝕓𝗹𝐞𝕤ߺ|𝐢𝞏℮𝘀׃
    ו𝚒ո𝓮 ゠ 𞺀𝝸𝜛𝕖٠𝖘𝗍𝗋𝓲𝓹❲❩
    𝒊𝗳 𝒍𝗶ռ𝗲꘎𝚜𝘁𝒶𝖗𝑡ꜱwⅈ𝞽h〔"#"﴿ ໐𝓇 𝛡ە𝚝 │ͺᴨꬲ∶
     
 
𝖼𝞂𝓷𝐭⍳𝚗ц𝖾
  
 𝐩𝖺𝐫𝗍𝕤 ꓿ ⅼͺ𝛡𝐞․ѕp𐌠ι𝖙❲";"〕
    𝘪𝘧 𝕀ℯᴨ[𝐩a𝐫𝜏𝕤]‹Ꙅː
        𝝆𝘳𝛊𝜛𝜏〔ẝ"Sϰ𝔦𝚙pӏ𝓃ցઃ𝄔𝚛ℯ𝔭𝙧〔𝗜ι𝝕𝖾]❵"❩
        𝙘໐𝗻𝞽𝐢ϖս𝓮

   τᴦ𑣜ઃ
       
𝙛𝚛ﮩmߺ𝒄һ𝖺𝗿؍ 𝘁o﹎𝗰𝕙𝚊ᴦ ꓿ mɑ𝞺〔Ⲓ𝖆m𝘣𝕕𝜶 ƽ܃ ꙇ𝔫𝓉〔𝘴܂𝓼𝐭𝓻ⅰ𝝔❲﴿؍1𑣕❩٫𝙥ɑ𝑟τ𝔰[⁚𝟐]〕
    𝖾⤫𝑐𝘦ρ𝘵 𝚅⍺│𝒖𝕖ꓰ𝒓ᴦﻪⲅ׃
  
 
 
 𝒑𝔯ɪϖ𝑡❨𝔣"𝗦кі⍴𝙥𝜾𝑛𝘨 𝄔ρaᴦ𝒕𝖘[᛬𝟤]❵ 𝐝𝑢𝖾 𝘵௦ 𝓃օ𝜏 𝒃𝘦іпɡ 𝚊ᏏI𝒆 𝚝𝒐
𝗰०𝜛𝓋𝖾𝑟𝔱 𝘵𞺄
𝔦𝐧𝙩𝕤𐩐"]
   

   c௦𝕟𝗍𝐢𝗇𝒖ꬲ
   
mɑр𝚙ı𝛑𝓰[𝚝ﻬ﹎𝚌հ𝓪ꭇ]܂𝕒𝞎𝗽𝐞𝛡𝖽❲𝑓𝓇𝜊m﹎ϲ𝓱𝚊𝓇〕
latent scaffold
#

btw there was a more updated one

gritty zinc
#

And here's the code I used to do it!

latent scaffold
#

oh my

fresh basalt
gritty zinc
#

it butchers even string literals, though

inland wolf
#

how does it lok for u guys

gritty zinc
#

and keywords

gritty zinc
#

but, hmm

latent scaffold
acoustic moss
gritty zinc
#

lemme do hypothesis real fast and see if it is always reversible

fresh basalt
#

Will Python do work on that?

#

my guess is no

wise schooner
#

i doubt it will 👀

gritty zinc
#

of course not, keywords are broken

latent scaffold
#

you should make it ignore keywords

gritty zinc
#

I certainly should

#

but that's hard

acoustic moss
gritty zinc
#

I wonder if maybe I should be working with the AST and not the source code

inland wolf
#

lol

gritty zinc
acoustic moss
#

lol

latent scaffold
#

I wanna mess with this too D:

#

Time to install PyCharm Professional

#

and build my own dict

acoustic moss
gritty zinc
#

oh dear, the mapping isn't many-to-one, it's many-to-many

latent scaffold
#

This is gonna get messy, isn't it

gritty zinc
#

that means it's not reversible. whoops

fresh basalt
acoustic moss
latent scaffold
#

magic

acoustic moss
#

ok

gritty zinc
#

both are ascii chars

latent scaffold
#

oh wait

#

what the heck

#

0 vs 0

gritty zinc
#

I should probably remove mappings between ascii chars

craggy helm
#

Can I ask an off-topic question?grumpchib

latent scaffold
#

yes this is off-topic

craggy helm
#

I want to set a password on a usb but I have Windows 10 home
Do you know how I could do this?

#

D,:

acoustic moss
gritty zinc
#

aaaaaaaa

#

okay, hypothesis is far too good at breaking my code lol

#
>>> decode("\xa0")
' '
#

why the hell

latent scaffold
#

oh my

gritty zinc
#

wait, that's fine

#

my test is just wrong

#

it should be only ASCII chars in the input

#

yay, making it only choose from string.printable fixes it!

fresh basalt
#

@inland wolf Are you using Windows and if so what codepage are you using?

gritty zinc
#
с𝐨𝜋𝚏𝚞𝓼𝛼𝑏𝖨𝑒𝐬﹏𝗹ꙇℼҽѕ ᐀ ہ𝘱𝙚ᴨ["𝖈ﮦ𝖓𝚏𑣘𑣁𝝰ЬIҽs۰𝘵𝔁𝓽"؍ⅇ𝞹ᴄ٥𝚍⍳𝛑ᶃ゠"𝘂т𝕗‐৪"〕܂𝓻𝑒⍺𝐝❲]ꓸs𝑝𝚕𝙞𝘵["⧵𝝿"❳
m𝔞𝑝𝐩𝐢𝐧𝒈 ゠ 𝔠൦𝖑Ι𝓮ᴄ𝚝ιﮩռƽ܂𝒅℮𝒻𝛂ᴜl𝓽𝖽𝐢с𝐭❨ℑι𐑈𝜏〕
𝓯𝛔𝚛
𝚰i𝗇𝓮
𝒊𝜛 𝒸𞸤𝗇𝒇𝛖𝗌𝙖𝓫וeꜱߺℐ⍳𝘯ⅇ𝘀׃
 
  𝓘𝚒𝐧𝚎 ꓿ 𝚕𝙞𝝿𝖾۰𝒔ᴛꭇ𝒾𝘱〔〕
   
𝐢𝒻 𝗅𝜾𝝕𝓮𝅭𝕤𝐭𝓪𝖗𝖙𝓈w𝓲тհ❨"#"] o𝓻 ᴨ𑣈𝝉 ℐ𝚤𝚗ꬲ։
        𝙘ⲟℼ𝕥і𝝅ᴜ𝑒

   ⍴𝞪𝓇𝞃𐑈 ꓿ 𝔩𝚤𝗻𝚎𝅭𝘀𝗽𝕀ɩ𝒕[";"﴿
  
 𑣃𝕗 𝒍𝖊𝐧[рα𝗿τ𝑠❩‹Ꝛ᠉
      
 𝗉𝓻𝒊𝟉𝘵〔ք"Տϰ𝜾p𝛠iᴨ𝙜ઃ𝄔𝗋𝗲𝝆𝗋﴾𝓘𝗂ℼ𝘦〕❵"〕
     
  𝙘𝝾𝟉𝞃ɩϖυ𝑒
    𝓽𝙧𝗒⁚
   
    𝘧𝑟ంm﹍𝓬Ꮒ𝞪гꓹ τჿ﹍𝗰հ𝗮𝑟 ⹀ m𝑎𝒑〔l𝚊m𝖻ᑯ𝖆 𝗌᠃ Ꭵ𝞹𝚝﴾𝙨܁𝖘𝝉𝔯𝞲ρ❨]ꓹ1𝟼〕¸𝜌𝘢𝓻𝜏𝖘[:𝟐]❩
 

 𝖾𝙭ᴄꬲ𝗽𝑡 𝓥𝖆𝚕𝙪℮𝕰𝐫𝒓ﮨ𝑟᛬
     
  𝒑𝔯ι𝑛𝒕❲ք"𝓢𝓀𝝸𝚙𝓅𝘪𝜋𝗴 ❴𝝔𝓪ⲅ𝗍𝐬[܃Ꝛ]❵ 𝒹𝖚𝑒 𝙩𑣈 𝝅𝝈τ
𝓫𝘦𝜄𝛑𝗀 𝗮𝖇Іℯ 𝓉ﻩ с๐π∨𝘦гᴛ 𝘵𑣗
𝙞𝜋𝝉𝔰۰"❳
 
    
 𝖈o𝐧𝗍Ꭵ𝑛𝒖℮
 
  m𝘢𝒑𝘱𝜾𝚗𝔤[𝖙ﻫߺⅽһ𝘢𝗋]․𝛼𝝆𝓅𝐞𝚗ⅾ﴾𝙛𝑟𝘰mߺ𝙘հ𝛂ᴦ﴿
#

this transformation is fully reversible

#

yay, obfuscation.

acoustic moss
#

thanks for using the py syntax highlighting, really makes it clearer!

fresh basalt
#

ConfusedReptile is a helper after all

acoustic moss
#

indeed

gritty zinc
#

oh god lol, it replaces n with 𝝿

#

\𝝿 for line breaks

#

perfect

acoustic moss
#

yes

fresh basalt
#

for some definition of perfect

twin charm
#

lolll. yeah it was the situation at that particular day tho

latent scaffold
#
def clean(f: TextIO) -> str:
    lines = f.readlines()
    valid = []
    for line in lines:
        line = line.strip()

        if len(line) == 0:
            continue
        elif line[0] == '#':
            continue
        else:
            valid.append(line)

    return "\n".join(valid)

oh yes... progress

fresh basalt
#

There is a format for the offtopic channels?

wise schooner
latent scaffold
#

lol

#

clean() removes lines that I can't use

fresh basalt
#

I write really_long_descriptive_identifier_names

gritty zinc
fresh basalt
#

It doesn't look like Python has code filters like Perl does.

gritty zinc
#

it looks like I can totally obfuscate the code on the AST level

#

though, hmm, can it be converted back afterwards?..

fresh basalt
#

How did you generate that?

gritty zinc
#

!pypi prettiest_ast

royal lakeBOT
gritty zinc
#

(made by salt_die, btw)

fresh basalt
#

Thank you.

gritty zinc
#

it uses the builtin ast package

#

the library is just for printing it very prettily

fresh basalt
#

Code page 437 (CCSID 437) is the character set of the original IBM PC (personal computer). It is also known as CP437, OEM-US, OEM 437, PC-8, or DOS Latin US. The set includes all printable ASCII characters, extended codes for accented letters (diacritics), some Greek letters, icons, and line-drawing symbols. It is sometimes referred to as the "O...

inland wolf
#

idk which one im using

fresh basalt
#

probably 437 then

inland wolf
#

lol

#

perhaps

fresh basalt
#

I don't know how/why you got that value for that character.

inland wolf
#

same

gritty zinc
#

hmm

#

looks like it can be done indeed

#

I'll start by mangling all variable names

wheat lynx
#

ast.unparse in python 3.9!

rough sapphire
#

hey wookie

#

how you been

wheat lynx
#

i've been good thanks

rough sapphire
#

I seem to have lost my admin privileges, hook me up

gritty zinc
wheat lynx
gritty zinc
#
def rec_search(node):
    result = {type(node)}
    if hasattr(node,"body"):
        for child in node.body:
            result.update(rec_search(child))
    return result
>>> rec_search(tree)
{<class '_ast.Module'>, <class '_ast.Expr'>, <class '_ast.Assign'>, <class '_ast.If'>, <class '_ast.Try'>, <class '_ast.Continue'>, <class '_ast.For'>}

so these are all the nodes I need to learn to handle, hmm

rough sapphire
#

yes, lets go with that

latent scaffold
#

Well, I've got a map

#

ASCII characters and their lookalikes

fresh basalt
#

does it lead to treasure?

latent scaffold
#
async def main():
    with open("input.txt", "r") as f:
        t = clean(f)
    entries = isolate(t)
    char_map = generate_map(entries)

    with open("output.json", "w+") as f:
        json.dump(char_map, f, indent=4)
#

remove unneeded lines, create parsable entries, make a map from them

fresh basalt
#

"be come" should be become

#

</pedant>

latent scaffold
#

Oh wow, my script works

#
𝜯𝐡𝕖 𝓆𝞾ι𝑐𝐤 𝔟ᴦ೦ա𝘯 𝒇ഠ𝚡 𝐣𝞾m𝞎𝘀 ‎𞹤‎𝝼ℯꭈ𝑡𝗵℮ ‎ߊ‎𝖺𝒛𑣜𝕕𝖔𝕘‎܁‎
#

it's a little bit um ugly

inland wolf
#

nice

fresh basalt
#

neat, make it accept --pretty and --ugly arguments

latent scaffold
#

lol

fresh basalt
#

good job

modest meteor
#

should u use sudo apt install or apt-get

graceful basin
#

apt install in the shell, and apt-get in a script

modest meteor
graceful basin
#

when typing it into the terminal, you use apt

rough sapphire
#

first you have to find a turtle

graceful basin
#

but when making a file that is run automatically, you should use apt-get

latent scaffold
#

apt is higher-level

modest meteor
#

I've been using apt-get, thought that was the only command out there

modest meteor
graceful basin
#

apt is newer

latent scaffold
#

apt is just a higher level wrapper.. all I've ever been able to notice is color

#

lol

fresh basalt
#

but you should definitely never use apt nor apt-get on any non-Debian-based Linux distribution.

#

:bigbrain:

modest meteor
#

I didn't even know you could

latent scaffold
#

you really can't, I don't think

#

not that it's worth trying

graceful basin
#

you can install apt anywhere afaik, but it is unlikely to work

latent scaffold
#

lol idk how to improve my script

fresh basalt
#

you're right but I was joking

latent scaffold
#

make it work with code?

#

nah sounds like too much work

craggy helm
fresh basalt
#

I think that's what confusedreptile is trying to do

latent scaffold
#

lol I'm kind of proud of the code for this

fresh basalt
#

I had a silly idea that you could make the pretty/ugly versions

#

easy way would be to divide the unicode stuff into pretty and ugly sets

gritty zinc
#

welp, now my AST tree recursive editor crashes Python

latent scaffold
gritty zinc
#

not even an exception

fresh basalt
#

@gritty zinc level up

latent scaffold
#

I had this script only keep characters that map to ascii

fresh basalt
#

oh

twin charm
#

hi

latent scaffold
#

I might have it remove duplicates, so it's possible to convert back to ascii

fresh basalt
#

I had a silly idea to generate a weighted tree of ugliest to prettiest unicode characters and figure out how to pick from that

latent scaffold
#

also some symbols don't have maps

#

like m

gritty zinc
#

oh yiss

fresh basalt
#

duckduckgo tells me that's macy's stock ticker symbol

latent scaffold
#

I need some text to test this on

gritty zinc
#

𝒸o𝘯ſᴜ𝕤𝕒Ƅ𝖑𝒆𝑠ߺℓℹπⅇs = ം𝛒ҽ𝞹('confusables.txt', encoding='utf-8').read().split('\n')
m𝗮𝓅рⅰ𝞹ɡ = 𝐜௦𝟙ℓⅇ𝖈ᴛӏ𞸤𝒏𝓈.defaultdict(𝖑𝗶𝘀𝗍)
for 𞺀ӏ𝙣𝓮 in 𝒸o𝘯ſᴜ𝕤𝕒Ƅ𝖑𝒆𝑠ߺℓℹπⅇs:
    𞺀ӏ𝙣𝓮 = 𞺀ӏ𝙣𝓮.strip()
    if (𞺀ӏ𝙣𝓮.startswith('#') or (not 𞺀ӏ𝙣𝓮)):
        continue
    𝑝𝓪𝗋𝜏𝖘 = 𞺀ӏ𝙣𝓮.split(';')
    if (ا𝑒𝛡(𝑝𝓪𝗋𝜏𝖘) < 2):
        𝓹𝗋𝖎𝓃𝘵(f'Skipping:{гꬲ𝜚𝔯(𞺀ӏ𝙣𝓮)}')
        continue
    try:
        (𝔣𝗋𝓸mߺᴄ𝕙𝑎𝐫, 𝗍𞹤﹏𝒸𝕙𝕒г) = m𝑎𝗉((lambda s: 𝔦𝙣𝕥(ꜱ.strip(), 16)), 𝑝𝓪𝗋𝜏𝖘[:2])
    except 𝗩𝕒𝜤𝑢𝓮𝘌𝐫𝗿ჿ𝑟:
        𝓹𝗋𝖎𝓃𝘵(f'Skipping {𝑝𝓪𝗋𝜏𝖘[:2]} due to not being able to convert to ints.')
        continue
    m𝗮𝓅рⅰ𝞹ɡ[𝗍𞹤﹏𝒸𝕙𝕒г].append(𝔣𝗋𝓸mߺᴄ𝕙𝑎𝐫)

#

muahahaha

latent scaffold
#

:o

gritty zinc
#

that's better

acoustic moss
#

better

gritty zinc
#

only names are mangled, and the mangling is consistent

#

like, it remembers what it changed map to and uses the same name each time

#

sadly, I haven't yet made it to not mangle builtins at all

#

I want it to remain valid code, you see.

fresh basalt
#

literally unusable

#

:P

gritty zinc
#
  File "<ipython-input-31-86a5ce3b1699>", line 1
    𝒸o𝘯ſᴜ𝕤𝕒Ƅ𝖑𝒆𝑠ߺℓℹπⅇs = ം𝛒ҽ𝞹('confusables.txt', encoding='utf-8').read().split('\n')
                           ^
SyntaxError: invalid character in identifier

aww

latent scaffold
#

lol

gritty zinc
#

which one, I wonder

latent scaffold
#

I think the first

gritty zinc
#

!charinfo ം

royal lakeBOT
gritty zinc
#

this thing

latent scaffold
#

yeah

gritty zinc
#

it's one char, and Python doesn't like it

latent scaffold
#
SyntaxError: invalid character 'ം' (U+0D02)
#

lol something is up with that symbol

twin charm
fresh basalt
#

This just in, Python declares war on Malayali language.

gritty zinc
#
tree = ast.parse(code)
rec_tree_change(tree)
trans_code = astunparse.unparse(tree)
exec(trans_code)

now I get automated syntax errors

#
  File "<string>", line 3
    maϱ𝘱˛𝜋𝙜 = 𝐜ﮧᛁ𝟣ꬲ𝑐𝒕𝔦ﻪ𝟉ѕ.defaultdict(𝚰ɪ𝓼ᴛ)
          ^
SyntaxError: invalid character in identifier

a new one each time

#

hmm

gritty zinc
#

!otn a automated syntax errors

fresh basalt
twin charm
#

A person who speaks Malayalam is known as a Malayali.

latent scaffold
#

it's the a

#

I think I know how you can check if a char is invalid

#

I noticed that if you size them, they have a size of 76

twin charm
#

its a palindrome too which is interesting.
!e

print("malayalam"[::-1])
latent scaffold
#
In [12]: 'a'.__sizeof__()
Out[12]: 76
graceful basin
#

you could do

try:
    ast.parse(character)
except SyntaxError:
    pass
``` to check if it is a valid indentifier char
latent scaffold
#
In [6]: 'ം'.__sizeof__()
Out[6]: 76
wise schooner
latent scaffold
#

yes

twin charm
#

yeah

gritty zinc
#

so maybe it'd work

wise schooner
#

doesn't python tell all the syntax errors before you can run the program?

twin charm
gritty zinc
#

lemme throw away 76 and see if that works

fresh basalt
#

Is 'മലയാളം' a palindrome too?

twin charm
graceful basin
latent scaffold
twin charm
#

in english, its a palindrome

twin charm
fresh basalt
#

@twin charm Languages in India are fun.

twin charm
twin charm
#

oh my goodness.

gritty zinc
#

@latent scaffold some 80-sized ones don't work either

twin charm
#

idk

#

I guess more than 10

latent scaffold
graceful basin
#

!e

try:
    eval("\N{CUCUMBER}")
except SyntaxError:
    print('cannot eval cucumber')
royal lakeBOT
#

@graceful basin :white_check_mark: Your eval job has completed with return code 0.

cannot eval cucumber
fresh basalt
#

Wikipedia says there are 22 scheduled languages in India.

wise schooner
#

OH, using eval, exec and such? yeah got it

acoustic moss
#

there's literally hundreds of unofficial ones

twin charm
fresh basalt
#

but the "official" language (in quotes because there's no official language) for legal stuff is Hindi in Devanagari

twin charm
#

Mhm.

wise schooner
#

most of the legal stuff is in English.. i mean... they have hindi translations too but they don't use it much

fresh basalt
#

that's handy

twin charm
#

yep

gritty zinc
#

oh!

#
NameError: name 'סρꬲn' is not defined
#

new error!

twin charm
#

eh

gritty zinc
#

is my code...syntactically correct? OMG

fresh basalt
#

What a great way to waste a day lol.

gritty zinc
#
ⲥ𑣗𝗻ẝ𝘂ꜱ𝖺𝖇Ι𝕖𝓈﹏𝔩𝐢𝑛ꬲ𐑈 = ס𝜚ꬲ𝚗('confusables.txt', encoding='utf-8').read().split('\n')
ma𝝆𝚙𝓲π𝗴 = 𝒸ᴑ𝛪𝗅℮𝑐𝓉𝛊ہℼs.defaultdict(Iɩ𝑠𝜏)
for ǀ𝜄𝐧𝓮 in ⲥ𑣗𝗻ẝ𝘂ꜱ𝖺𝖇Ι𝕖𝓈﹏𝔩𝐢𝑛ꬲ𐑈:
    ǀ𝜄𝐧𝓮 = ǀ𝜄𝐧𝓮.strip()
    if (ǀ𝜄𝐧𝓮.startswith('#') or (not ǀ𝜄𝐧𝓮)):
        continue
    𝛠𝘢𝚛𝓉𝚜 = ǀ𝜄𝐧𝓮.split(';')
    if (ﺍҽ𝜋(𝛠𝘢𝚛𝓉𝚜) < 2):
        𝕡ᴦɩ𝝕τ(f'Skipping:{𝑟е𝗽𝗋(ǀ𝜄𝐧𝓮)}')
        continue
    try:
        (𝗳гﮨm﹎𝖼ℎ𝗮𝚛, 𝜏ⲟ﹎𐐽հ𝕒𝖗) = m𝜶𝗽((lambda s: 𝚒𝜋ᴛ(𑣁.strip(), 16)), 𝛠𝘢𝚛𝓉𝚜[:2])
    except ꓦ𝐚ﺎ𝓾𝑒ℰ𝚛ⲅᴏᴦ:
        𝕡ᴦɩ𝝕τ(f'Skipping {𝛠𝘢𝚛𝓉𝚜[:2]} due to not being able to convert to ints.')
        continue
    ma𝝆𝚙𝓲π𝗴[𝜏ⲟ﹎𐐽հ𝕒𝖗].append(𝗳гﮨm﹎𝖼ℎ𝗮𝚛)

poggers

wheat lynx
acoustic moss
gritty zinc
#

no syntax errors

acoustic moss
#

maybe they did

#

idrk

#

not a history guy

twin charm
graceful basin
twin charm
#

that made way for local languages to die

fresh basalt
#

I mean, not to get into the weeds but if you exterminate a people then you get rid of their language.

acoustic moss
#

fair

fresh basalt
#

Here in the US there were native american boarding schools meant to "civilize" the native population.

wise schooner
#

i still think english is easier than hindi

twin charm
#

I bet that if I wouldn't know English as I know today if it weren't for the British

twin charm
fresh basalt
#

I think if it weren't for the British a lot of countries wouldn't have independence days to celebrate.

graceful basin
#

to be fair, even if the natives didn't get exterminated it is still likely the languages would die. Globalisation is not kind to local languages

wise schooner
gritty zinc
#

oh shit my code actually ran

acoustic moss
#

lol

gritty zinc
#
𝗰օ𝛑ꬵц𝓈𝞪𝐛𝕴𝓮ƽ﹎𝗅ι𝘯℮𝐬 = open('confusables.txt', encoding='utf-8').read().split('\n')
m𝜶𝛒𝛠𝚒𝜛g = collections.defaultdict(list)
for 𞺀ꙇ𝛑𝖊 in 𝗰օ𝛑ꬵц𝓈𝞪𝐛𝕴𝓮ƽ﹎𝗅ι𝘯℮𝐬:
    𞺀ꙇ𝛑𝖊 = 𞺀ꙇ𝛑𝖊.strip()
    if (𞺀ꙇ𝛑𝖊.startswith('#') or (not 𞺀ꙇ𝛑𝖊)):
        continue
    𝛠𝒶ꭈ𝓉ѕ = 𞺀ꙇ𝛑𝖊.split(';')
    if (𝑙𝖊𝕟(𝛠𝒶ꭈ𝓉ѕ) < 2):
        print(f'Skipping:{𝓇𝗲𝗉𝖗(𞺀ꙇ𝛑𝖊)}')
        continue
    try:
        (𝙛𝑟౦m﹏𝚌𝒽𝞪𝕣, 𝞃𝜎﹎ⅽ𝙝𝝰𝓻) = m𝕒𝐩((lambda s: int(𝐬.strip(), 16)), 𝛠𝒶ꭈ𝓉ѕ[:2])
    except 𝓥𝛂Ιᴜ𝖊𝑬𝐫𝘳𝐨𝓻:
        print(f'Skipping {𝛠𝒶ꭈ𝓉ѕ[:2]} due to not being able to convert to ints.')
        continue
    m𝜶𝛒𝛠𝚒𝜛g[𝞃𝜎﹎ⅽ𝙝𝝰𝓻].append(𝙛𝑟౦m﹏𝚌𝒽𝞪𝕣)
#

this basically works, only problem is that 𝓥𝛂Ιᴜ𝖊𝑬𝐫𝘳𝐨𝓻

twin charm
#

😳

gritty zinc
#

lemme add it to the exceptions too..

graceful basin
#

I think it would be funnier if it only used characters that are normalized to the same letters and just rerolled every identifier

#

so you couldn't even tell which identifiers are the same

fresh basalt
graceful basin
#

yeah, most languages will die in a few dozen years

fresh basalt
#

just like the bees

twin charm
#

Mhm.

wise schooner
#

even programming languages? lemon_sentimental

graceful basin
#

funnily enough, probably yes

wise schooner
#

rip python is 12 years...

graceful basin
#

not in 12 years

#

but in 60 ish

fresh basalt
#

Perl has been dying for ages.

twin charm
#

what about cobol

graceful basin
#

yeah, PLs die slowly

fresh basalt
#

COBOL will live out of spite.

acoustic moss
fresh basalt
#

like the emperor in the Dark Crystal

twin charm
acoustic moss
#

yes

wise schooner
#

~~we might get PythonCoolerEdition 🤞 ~~

graceful basin
#

COBOL lives because there is no one who is willing to liable for writing bugs into something that gets rewritten from cobol

twin charm
#

do people even use it

acoustic moss
#

well, prolly not much for new code

#

maintaining old stuff, however...

graceful basin
#

even new code

acoustic moss
#

oof

fresh basalt
twin charm
#

ok bye 👋 time for drinking tea 🥴

fresh basalt
#

bye

wise schooner
carmine niche
graceful basin
#

MS may be willing to sign that they are responsible for software bugs in ATMs, but they aren't willing to sign themselves for losses due to bugs in a rewrite of a COBOL codebase

#

we need Ada 2 tbh

gritty zinc
#

oh

#

I did it

graceful basin
#

a language that is actually safe

fresh basalt
gritty zinc
#
𝔠𝖔𝞏𝕗𝙪𑣁𝕒𝖇𝙸𝒆𝘀_𝗅𝛊𝝕𝑒𝐬 = open('confusables.txt', encoding='utf-8').read().split('\n')
m𝖺𝔭𝞀𝗂𝝕𝓰 = collections.defaultdict(list)
𝜄𝙣𝗏_m𝓪𝝆𝓹𝑖𝞹𝑔 = {}
for 𝚰𝚒𝛡𝐞 in 𝔠𝖔𝞏𝕗𝙪𑣁𝕒𝖇𝙸𝒆𝘀_𝗅𝛊𝝕𝑒𝐬:
    𝚰𝚒𝛡𝐞 = 𝚰𝚒𝛡𝐞.strip()
    if (𝚰𝚒𝛡𝐞.startswith('#') or (not 𝚰𝚒𝛡𝐞)):
        continue
    𝟈𝚊𝐫𝖙𝗌 = 𝚰𝚒𝛡𝐞.split(';')
    if (len(𝟈𝚊𝐫𝖙𝗌) < 2):
        print(f'Skipping:{repr(𝚰𝚒𝛡𝐞)}')
        continue
    try:
        (𝗳𝑟𝝈m_𝙘𝗁𝞪𝗿, 𝛕𐐬_𝖼𝗵𝛂𝓻) = m𝕒𝕡((lambda s: int(𝘀.strip(), 16)), 𝟈𝚊𝐫𝖙𝗌[:2])
    except ValueError:
        print(f'Skipping {𝟈𝚊𝐫𝖙𝗌[:2]} due to not being able to convert to ints.')
        continue
    if (𝑐𝗵𝓇(𝗳𝑟𝝈m_𝙘𝗁𝞪𝗿).__sizeof__() in (76,)):
        print(f'Skipping {𝗳𝑟𝝈m_𝙘𝗁𝞪𝗿} due to being sized {𝑐𝗵𝓇(𝗳𝑟𝝈m_𝙘𝗁𝞪𝗿).__sizeof__()}')
        continue
    if (𝗳𝑟𝝈m_𝙘𝗁𝞪𝗿 in (125127,)):
        continue
    if ((𝑐𝗵𝓇(𝛕𐐬_𝖼𝗵𝛂𝓻) in 𝓈𝔱𝑟𝒾𝓷𝘨.printable) ^ (𝑐𝗵𝓇(𝗳𝑟𝝈m_𝙘𝗁𝞪𝗿) in 𝓈𝔱𝑟𝒾𝓷𝘨.printable)):
        𝜄𝙣𝗏_m𝓪𝝆𝓹𝑖𝞹𝑔[𝗳𝑟𝝈m_𝙘𝗁𝞪𝗿] = 𝛕𐐬_𝖼𝗵𝛂𝓻
        m𝖺𝔭𝞀𝗂𝝕𝓰[𝛕𐐬_𝖼𝗵𝛂𝓻].append(𝗳𝑟𝝈m_𝙘𝗁𝞪𝗿)

this runs

#

if you have the deps, at least

wise schooner
#

𝔠𝖔𝞏𝕗𝙪𑣁𝕒𝖇𝙸𝒆𝘀_𝗅𝛊𝝕𝑒𝐬

gritty zinc
#

oh wait, map is scuffed, so it probably doesn't run the same

#

but it runs

acoustic moss
# gritty zinc I did it

you were so preoccupied with whether or not you could that you didn't stop to think if you should.

fresh basalt
fresh basalt
carmine niche
acoustic moss
#

ikr

graceful basin
wheat lynx
#

!e ```python
print(m𝕒𝕡)

royal lakeBOT
#

@wheat lynx :white_check_mark: Your eval job has completed with return code 0.

<class 'map'>
acoustic moss
#

bruh

inland wolf
graceful basin
#

rust cannot ensure that you stay within bounds of a vector at compile time

#

ada can

carmine niche
#

ada has a cost

wise schooner
#

even if you take input?

fresh basalt
#

I'm glad I don't understand what half the emojis here mean.

carmine niche
graceful basin
#

costs don't matter

#

safety does

#

we are talking about banking software

#

a bug is hundreds of millions, hardware is way less

carmine niche
#

meh

#

abolish money

#

problem solved

fresh basalt
#

I think emojis are interesting because with Discord and Twitch there have sprung up unique emoji dialects.

graceful basin
#

how about hospital software

twin charm
#

hii

graceful basin
#

bugs mean people die

fresh basalt
#

@twin charm what happened to tea?

wise schooner
# graceful basin ada can

how can you determine if it will cause an OOB at compile time? like... if i want to call the index from the user's input?

twin charm
carmine niche
fresh basalt
#

What tea do you drink?

graceful basin
#

hospitals use old, well tested codebases

#

we are talking about how to modernize that

twin charm
fresh basalt
#

I drink basic bitch Lipton black tea. If I am feeling fancy I like green tea with hibiscus.

gritty zinc
#
𝗰օ𝛑ꬵц𝓈𝞪𝐛𝕴𝓮ƽ﹎𝗅ι𝘯℮𝐬 = open('confusables.txt', encoding='utf-8').read().split('\n')
m𝜶𝛒𝛠𝚒𝜛g = collections.defaultdict(list)
for 𞺀ꙇ𝛑𝖊 in 𝗰օ𝛑ꬵц𝓈𝞪𝐛𝕴𝓮ƽ﹎𝗅ι𝘯℮𝐬:
    𞺀ꙇ𝛑𝖊 = 𞺀ꙇ𝛑𝖊.strip()
    if (𞺀ꙇ𝛑𝖊.startswith('#') or (not 𞺀ꙇ𝛑𝖊)):
        continue
    𝛠𝒶ꭈ𝓉ѕ = 𞺀ꙇ𝛑𝖊.split(';')
    if (𝑙𝖊𝕟(𝛠𝒶ꭈ𝓉ѕ) < 2):
        print(f'Skipping:{𝓇𝗲𝗉𝖗(𞺀ꙇ𝛑𝖊)}')
        continue
    try:
        (𝙛𝑟౦m﹏𝚌𝒽𝞪𝕣, 𝞃𝜎﹎ⅽ𝙝𝝰𝓻) = m𝕒𝐩((lambda s: int(𝐬.strip(), 16)), 𝛠𝒶ꭈ𝓉ѕ[:2])
    except 𝓥𝛂Ιᴜ𝖊𝑬𝐫𝘳𝐨𝓻:
        print(f'Skipping {𝛠𝒶ꭈ𝓉ѕ[:2]} due to not being able to convert to ints.')
        continue
    m𝜶𝛒𝛠𝚒𝜛g[𝞃𝜎﹎ⅽ𝙝𝝰𝓻].append(𝙛𝑟౦m﹏𝚌𝒽𝞪𝕣)

so that's it, I guess

graceful basin
wise schooner
#

ah

graceful basin
#

nim is trying to be ada 2, but has nonsense like null

acoustic moss
#

nipples on bone apple tea

twin charm
fresh basalt
#

nice

twin charm
#

apple tea? damn

fresh basalt
#

I really love tea and coffee.

twin charm
#

coffee is better imo

acoustic moss
#

i drink skimmed milk with added cream

fresh basalt
#

It depends on my mood.

twin charm
#

oh.

fresh basalt
#

but generally I like coffee better.

twin charm
#

same.

acoustic moss
#

sometimes i have alkaline water with lemon

twin charm
#

I like tea too but I just drink it twice a day and now its 'meh'.

graceful basin
#

The funniest error I ever got was when 3 separate rust threads panicked at the same time, writing overlapping error messages.

gritty zinc
graceful basin
#

I was very confused

acoustic moss
#

lol

fresh basalt
#

where they are all pointing at each other

wise schooner
#

panik

acoustic moss
#

panik indeed

latent scaffold
#

Is there a way to get a list of... things like str, int, chr

gritty zinc
#

builtins?

twin charm
#

!eval

print(len(​​​​​​​​​​​​​"hello"))
royal lakeBOT
#

You are not allowed to use that command here. Please use the #bot-commands channel instead.

graceful basin
#

!e

import builtins
print(dir(builtins))
inland wolf
#

oof

#

typo moment

fresh basalt
#

lol

wise schooner
royal lakeBOT
#

@graceful basin :white_check_mark: Your eval job has completed with return code 0.

['ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'BlockingIOError', 'BrokenPipeError', 'BufferError', 'BytesWarning', 'ChildProcessError', 'ConnectionAbortedError', 'ConnectionError', 'ConnectionRefusedError', 'ConnectionResetError', 'DeprecationWarning', 'EOFError', 'Ellipsis', 'EnvironmentError', 'Exception', 'False', 'FileExistsError', 'FileNotFoundError', 'FloatingPointError', 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError', 'ImportWarning', 'IndentationError', 'IndexError', 'InterruptedError', 'IsADirectoryError', 'KeyError', 'KeyboardInterrupt', 'LookupError', 'MemoryError', 'ModuleNotFoundError', 'NameError', 'None', 'NotADirectoryError', 'NotImplemented', 'NotImplementedError', 'OSError', 'OverflowError', 'PendingDeprecationWarning', 'PermissionError', 'ProcessLookupError', 'RecursionError', 'ReferenceError', 'ResourceWarning', 'RuntimeError', 'RuntimeWarning', 'StopAsyncIteration', 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError
... (truncated - too long)

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

latent scaffold
#

oh

acoustic moss
#

__builtins__ 🤔

latent scaffold
#

nice

twin charm
gritty zinc
#

or just dir(__builtin__)

inland wolf
#

damn

#

ArithmeticError is up there

gritty zinc
fresh basalt
#

Haha, I'm glad I was on the Python Discord on the day the offtopic channel discovered Unicode.

gritty zinc
#

jupyter even shows them

twin charm
#

zero width characters

#

.to​​​​​​​pic

fresh basalt
#

better than a zero depth character.

twin charm
#

wont work

snow pecan
#

Digital art by me

acoustic moss
#

nice

twin charm
#

nice.

spiral forge
fresh basalt
#

neat

inland wolf
#

naisu.

#

neato

latent scaffold
#

oh lord this is getting messy

twin charm
#

what is?

snow pecan
#

Thanks to all

fresh basalt
#

futzing with Unicode probably.

twin charm
#

lol

graceful basin
#

I wonder if I can encode some haha funni code into unicode characters you can't display

fresh basalt
#

Who can't display?

graceful basin
#

anyone

twin charm
#

we.

#

us.

graceful basin
#

or well, whatever the default font on discord is

twin charm
#

hm.

#

.topic

median domeBOT
#
**What is the oldest computer you've ever used?**

Suggest more topics here!

twin charm
#

my father's from 2001

graceful basin
#

we had an IQ151 at our school

inland wolf
#

i think

graceful basin
#

that looks about right

wise schooner
graceful basin
#

a very old computer

twin charm
#

yeah no results when googling

#

send a link pls

graceful basin
twin charm
#

oh

wise schooner
#

those specs...

twin charm
#

wheeze

32 KB RAM (later on 64 KB), 4 KB ROM

wise schooner
#

RAM is more than ROM lmao

graceful basin
#

still more than an arduino lul

twin charm
#

loll

#

.topic

median domeBOT
#
**What are your hobbies other than programming?**

Suggest more topics here!

graceful basin
#

baking

twin charm
#

I like playing Badminton

#

but its been a while since I played..

#

Fuck you Covid-19

sincerely, Ankith

graceful basin
#

Fuck you Covid-19

sincerely, Everyone
FTFY

twin charm
#

💯

acoustic moss
graceful basin
#

I wonder if ot1 has more activity than ot0 today

twin charm
#

yeah lol

#

not the usual state of ot channels.

#

but hey, when a conversation starts... it keeps on going in the same channel.

gritty zinc
#
def 𝔟𝘶𝐛𝑏𝙄𝑒𝑺𑣈𝗋𝜏(arr):
    𝚗 = len(𝔞𝔯𝗋)
    for 𝚤 in range((𝚗 - 1)):
        for 𝘫 in range(0, ((𝚗 - 𝚤) - 1)):
            if (𝔞𝔯𝗋[𝘫] > 𝔞𝔯𝗋[(𝘫 + 1)]):
                (𝔞𝔯𝗋[𝘫], 𝔞𝔯𝗋[(𝘫 + 1)]) = (𝔞𝔯𝗋[(𝘫 + 1)], 𝔞𝔯𝗋[𝘫])
𝔞𝔯𝗋 = [64, 34, 25, 12, 22, 11, 90]
𝔟𝘶𝐛𝑏𝙄𝑒𝑺𑣈𝗋𝜏(𝔞𝔯𝗋)
print('Sorted array is:')
for 𝚤 in range(len(𝔞𝔯𝗋)):
    (print(('%d' % 𝔞𝔯𝗋[𝚤])),)
#

nice and simple algorithm

#

best practices, you know

acoustic moss
#

of course, of course

latent scaffold
#

oh no

#

I'm so confused as to what I'm doing wrong

solemn leaf
#

making a logic with 3d list be like 🥴

twin charm
#

default theme for python?

#

srslly

solemn leaf
#

👀

gritty zinc
#
def m𝔢𝗿𝐠𝖾(array, left_index, right_index, middle):
    𝗹𝔢𝑓𝞃_𝙘𝓸𝗉𑣜 = 𝘢𝚛𝐫𝞪𝚢[𝛪𝗲𝖋𝓽_𝘪𝐧𝖽𝑒𝔵:(m𑣃𝖽𝒅𝒍𝑒 + 1)]
    𝐫𝗶𝘨𝙝𝞽_𝒄𝞂𝓅𝞬 = 𝘢𝚛𝐫𝞪𝚢[(m𑣃𝖽𝒅𝒍𝑒 + 1):(𝑟𝘪𝑔𝚑𝕥_𝐢𝝿𝒹𝕖𝑥 + 1)]
    𝙡𝘦𝖿𝖙_𝒄𝓸𝝔𝑦_𝑖𝞹𝓭𝓮𝖝 = 0
    𝖗𝗶𝘨𝘩𝑡_𝖼𝐨𝐩𝛾_𝑖𝔫𝖉𝕖𝖝 = 0
    𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑 = 𝛪𝗲𝖋𝓽_𝘪𝐧𝖽𝑒𝔵
    while ((𝙡𝘦𝖿𝖙_𝒄𝓸𝝔𝑦_𝑖𝞹𝓭𝓮𝖝 < len(𝗹𝔢𝑓𝞃_𝙘𝓸𝗉𑣜)) and (𝖗𝗶𝘨𝘩𝑡_𝖼𝐨𝐩𝛾_𝑖𝔫𝖉𝕖𝖝 < len(𝐫𝗶𝘨𝙝𝞽_𝒄𝞂𝓅𝞬))):
        if (𝗹𝔢𝑓𝞃_𝙘𝓸𝗉𑣜[𝙡𝘦𝖿𝖙_𝒄𝓸𝝔𝑦_𝑖𝞹𝓭𝓮𝖝] <= 𝐫𝗶𝘨𝙝𝞽_𝒄𝞂𝓅𝞬[𝖗𝗶𝘨𝘩𝑡_𝖼𝐨𝐩𝛾_𝑖𝔫𝖉𝕖𝖝]):
            𝘢𝚛𝐫𝞪𝚢[𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑] = 𝗹𝔢𝑓𝞃_𝙘𝓸𝗉𑣜[𝙡𝘦𝖿𝖙_𝒄𝓸𝝔𝑦_𝑖𝞹𝓭𝓮𝖝]
            𝙡𝘦𝖿𝖙_𝒄𝓸𝝔𝑦_𝑖𝞹𝓭𝓮𝖝 = (𝙡𝘦𝖿𝖙_𝒄𝓸𝝔𝑦_𝑖𝞹𝓭𝓮𝖝 + 1)
        else:
            𝘢𝚛𝐫𝞪𝚢[𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑] = 𝐫𝗶𝘨𝙝𝞽_𝒄𝞂𝓅𝞬[𝖗𝗶𝘨𝘩𝑡_𝖼𝐨𝐩𝛾_𝑖𝔫𝖉𝕖𝖝]
            𝖗𝗶𝘨𝘩𝑡_𝖼𝐨𝐩𝛾_𝑖𝔫𝖉𝕖𝖝 = (𝖗𝗶𝘨𝘩𝑡_𝖼𝐨𝐩𝛾_𝑖𝔫𝖉𝕖𝖝 + 1)
        𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑 = (𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑 + 1)
    while (𝙡𝘦𝖿𝖙_𝒄𝓸𝝔𝑦_𝑖𝞹𝓭𝓮𝖝 < len(𝗹𝔢𝑓𝞃_𝙘𝓸𝗉𑣜)):
        𝘢𝚛𝐫𝞪𝚢[𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑] = 𝗹𝔢𝑓𝞃_𝙘𝓸𝗉𑣜[𝙡𝘦𝖿𝖙_𝒄𝓸𝝔𝑦_𝑖𝞹𝓭𝓮𝖝]
        𝙡𝘦𝖿𝖙_𝒄𝓸𝝔𝑦_𝑖𝞹𝓭𝓮𝖝 = (𝙡𝘦𝖿𝖙_𝒄𝓸𝝔𝑦_𝑖𝞹𝓭𝓮𝖝 + 1)
        𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑 = (𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑 + 1)
    while (𝖗𝗶𝘨𝘩𝑡_𝖼𝐨𝐩𝛾_𝑖𝔫𝖉𝕖𝖝 < len(𝐫𝗶𝘨𝙝𝞽_𝒄𝞂𝓅𝞬)):
        𝘢𝚛𝐫𝞪𝚢[𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑] = 𝐫𝗶𝘨𝙝𝞽_𝒄𝞂𝓅𝞬[𝖗𝗶𝘨𝘩𝑡_𝖼𝐨𝐩𝛾_𝑖𝔫𝖉𝕖𝖝]
        𝖗𝗶𝘨𝘩𝑡_𝖼𝐨𝐩𝛾_𝑖𝔫𝖉𝕖𝖝 = (𝖗𝗶𝘨𝘩𝑡_𝖼𝐨𝐩𝛾_𝑖𝔫𝖉𝕖𝖝 + 1)
        𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑 = (𝘴𝗼𝗿𝘵𝑒𝗱_𝝸𝚗𝒅𝑒𝗑 + 1)

that's even better

solemn leaf
#

i have all themes on sublime

twin charm
solemn leaf
#

don't use vsc much

#

🥴

twin charm
#

subl for quick edits

latent scaffold
#

lol wtf I'm so confused

twin charm
#

vsc for long coding sessions

solemn leaf
#

yep

latent scaffold
#

this should be working but somehow all of my text is getting replaced

solemn leaf
#

lemme get some thwemes btw

acoustic moss
#

don't even ask

solemn leaf
#

aight

twin charm
solemn leaf
latent scaffold
#

this is sad

solemn leaf
#

god

latent scaffold
#

I'm so confused

#
def => def

This is something I print to tell me what's getting converted to what... def is mapped to def, but for some damn reason... it gets replaced with something else

gritty zinc
#

whoops, forgot highlighting. There:

tranquil orchid
#

Oh thank you it's much more readable now

latent scaffold
#

does de𝙛 look like def to any of y'all >:(

gritty zinc
#

maybe I should just randomize the identifiers too

tranquil orchid
#

is that gamma being used as a y

gritty zinc
tranquil orchid
#

I hate it

latent scaffold
#

MAN. I'm so confused

#

I can literally see all the words that aren't supposed to get replaced but they are

gritty zinc
#

wait, wtf

#

how does the function work if the arguments aren't mangled

tranquil orchid
#

wiat

#

wait

gritty zinc
#

oh, the interpreter unmangles stuff

#

I see

tranquil orchid
#

👀

latent scaffold
#

you know what. I even deleted the words from this map so they can't EVEN BE REPLACED but THEY ARE

gritty zinc
latent scaffold
#

man. I'm so confused

#

only one function can change the words

#

which is modify()

#
        if not keyword.iskeyword(word) and word not in imported and word not in std_builtins and '.' not in word:
            mod_word = modify(word, char_map)
            word_map[word] = mod_word
            print(f"{word} -> {mod_word}")
        else:
            if word in word_map:
                word_map.pop(word)
gritty zinc
#

huh

latent scaffold
#

that's the only use of modify()

#

and I'm so confused

gritty zinc
#

oh god

tranquil orchid
#

oh my

gritty zinc
#

now it's got encoding confusion on top of my, uhh, work

latent scaffold
#

Okay, I think there's an edge case somewhere

#

some symbol must be breaking things

#

like... breaking my dict

graceful basin
#

!e

Dz = 4
print(Dz)
royal lakeBOT
#

@graceful basin :white_check_mark: Your eval job has completed with return code 0.

4
graceful basin
#

didn't know it even normalized doubled up characters

latent scaffold
#

Every time I run this, the word that's broken changes

wise schooner
#

write a code like this and run it :D

latent scaffold
#

my brain hurts

#
Deleted entry for `str`

... yet it still gets replaced

rough sapphire
#

What can cause coca-cola eruption except mentos?

harsh tundra
#

#esoteric-python message this was my try to get characters that get normalised the same (but only Latin alphabet and numbers, but one can prepare the dict however they want), and only characters that can be used in identifiers

latent scaffold
#

I want to cry

harsh tundra
#
h𝕖𝘭l𝙤 = "Hello world!" 
𝕡ʳ𝚒𝚗𝑡(𝗁𝖊l𝖑ₒ) 
latent scaffold
#

why is my code doing stuff by itself

#

I'm literally printing what's changing to what

harsh tundra
#

Make sure you saved it and execute it from a good file

latent scaffold
#

it's not that

#

i'm literally so confused

#
    for k, v in word_map.items():
        print(f"{k} => {v}")
        text = text.replace(k, v)
#

if I comment out the text = line

#

the result is just a copy

harsh tundra
#

Yes

latent scaffold
#

and I print everything that'll be replaced

#

and so things that shouldn't be replaced aren't printed

#

BUT THEY'RE STILL CHANGED

#

I don't understand

#

I even printed word_map and searched it

#

things that aren't supposed to be changed aren't listed in there

harsh tundra
latent scaffold
#

huh?

#

I mean of the original text

#

if I comment out that line

#

the text will just be the same as what I put in

#

nothing is replaced

harsh tundra
#

I think I see what your problem is

latent scaffold
#

please enlighten me

harsh tundra
#

After you replace something, the new text will be searched and replaced again
So if you have
Char1 -> char2
And further down you have char2->char3
Both will get triggered. So it will seem as if you have char1->char3 change

latent scaffold
#

but I'm not replacing chars

#

I'm replacing words

harsh tundra
#

I just wrote it like that, I know the list above had combinations etc

latent scaffold
#

wait a minute

#

ah. it would appear

#

that I was

#

replacing chars

#

welp. that makes sense

harsh tundra
latent scaffold
#

well the problem ended up being that certain characters

#

looked like words in the eyes of program

#

so t all by itself would look like a word

#

I'm getting there

inland wolf
#

can u del str

harsh tundra
#

Yes. str is just a variable. The same way you can write str=123

inland wolf
#

bruh

#

lol

latent scaffold
#
NameError: name 'str' is not defined
edgy crest
#

str is a class no thinkies

gritty zinc
#

if you do str = ..., you can then del str and it'll be back to pointing to a builtin

latent scaffold
#

Now how do I remove the illegal symbols D:

inland wolf
#

damn

latent scaffold
#

I think after I can remove the illegal characters, this will be done

harsh tundra
#
>>> print
<built-in function print>
>>> del print
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'print' is not defined
>>> print = 123
>>> print
123
>>> del print
>>> print
<built-in function print>
>>>

omg, that would save me so much time when helping some beginners on SO. I had a case of someone overwriting their print and of course there's a lot of other stuff (list and dict are most common)

stark prawn
#

I would love if overriding builtins was not an allowed thing

#

Thinking about it, it does make sense to be able to do it though

latent scaffold
#

um. I can't tell if I did it or not

graceful basin
#

I would agree with making it a warning tbh

inland wolf
#

the kind of warning u get when u do an is comparison with strings

#

isnt that called SyntaxWarning

graceful basin
#

yes

inland wolf
#

i see

graceful basin
#
BytesWarning
DeprecationWarning
FutureWarning
ImportWarning
PendingDeprecationWarning
ResourceWarning
RuntimeWarning
SyntaxWarning
UnicodeWarning
UserWarning
Warning
``` challenge: write a program that raises all of these warnings without doing it manually (except Warning and RuntimeWarning, that's the base class)
twin charm
#

damn

narrow sable
#

Does anybody know any modules, repositories or APIs that can generate random Minecraft seeds in Python? I'm trying to find a seed with specific biomes and features close by and hoping to do it using Python

latent scaffold
#

I'm tired of this LOL

last mantle
inland wolf
#

cuz async is cool bro

last mantle
#

nono, there is asyncio.run()

latent scaffold
last mantle
#

why do all that

latent scaffold
#

also asyncio.run() breaks sometimes

last mantle
#

oh

#

hmm

latent scaffold
#

idk why, I just remember switching to that

#

which I'm fine with, it's just another line

inland wolf
#

but there was no async in there

latent scaffold
#

doesn't need to be

#

I just like it \😩

last mantle
#
The loop parameter has been removed from most of asyncio‘s high-level API following deprecation in Python 3.8. The motivation behind this change is multifold:

This simplifies the high-level API.

The functions in the high-level API have been implicitly getting the current thread’s running event loop since Python 3.7. There isn’t a need to pass the event loop to the API in most normal use cases.

Event loop passing is error-prone especially when dealing with loops running in different threads.

Note that the low-level API will still accept loop. See Changes in the Python API for examples of how to replace existing code.``` @latent scaffold
inland wolf
#

brhuhhy

latent scaffold
#

love main() as an entrypoint

latent scaffold
#

I've not used it since

last mantle
#

break as in?

latent scaffold
#

runtime errors

#

just for using it

last mantle
#

hmm

latent scaffold
#

in the same way as I've used it in that script

inland wolf
#

runtime warnings or errors

latent scaffold
#

errors...?

inland wolf
#

ight

latent scaffold
#

idk, it was really weird

#

a long time ago

last mantle
#

ye but ig its being removed in 3.10

harsh tundra
#

.bm 828602650924417064 warnings challenge

last mantle
#

lol

inland wolf
#

same

#

runtime warning is ez

#

i always get it :D

twin charm
inland wolf
#

lol

honest pawn
twin charm
#

Naw.

acoustic moss
#

jetbrains IDEs do be kinda thicc

twin charm
#

omg

#

thats like...

wise schooner
twin charm
#

half of my ram

wise schooner
#

1332 MB... mine goes till 2000MB sometimes

acoustic moss
#

its worth it tbh

#

intellij is pretty pog

low chasm
#

Lol

harsh tundra
#

That's still less than my webbrowser XD

acoustic moss
#

lol

#

who the fuck is antimalware service executable and why does he want 500MB

twin charm
#

lmfao relatable.

low chasm
#

antimalware service executable sucks

inland wolf
#

it only takes 90 mb for me 😎

wise schooner
#

same

last mantle
#

it keeps your pc safe

#

so deal with it 😎

inland wolf
#

lol

sterile sapphire
#

dude I gotta watch this

#

I watched the first season and I liked it

latent scaffold
#

Who knew warnings were so annoying to trigger

sterile sapphire
#

literally one of the only good shows on Prime

twin charm
#

btw I think I should change my file extension.

#

Any good filextensions?

#

.tar.gz for now 🥴

brazen ingot
#

lol

#

I just bought a new keyboard

twin charm
#

cool.

latent scaffold
graceful basin
#

sure

latent scaffold
#

yay

#

Man. is it even possible to trigger a UnicodeWarning outside of Python2

sterile sapphire
#

is it bad that I still don't use try and except

#

I probably should be

latent scaffold
#

no

graceful basin
latent scaffold
#

._.

graceful basin
#

IG you have to subprocess a python 2 interpreter and raise it from that

rough sapphire
#

is there a way to await variable assignments?

#

i want my entire code to be async 😎

rich moon
#

uh if you have something like x = y i dont think thats awaiable

#

unless if ur calling a function and using its return value and that thing is awaitble then yeah

#

now im no expert with python coroutines but i would assume its somewhat similar to js promises or sth

fresh basalt
#

Hello again. My router was behaving inappropriately and knocked me offline.

#

@gritty zinc Did you finish your abomination yet?

quick scroll
#

just a random question does anyone know a language with a lotta => and ==>? i'm confused over this code snippet i've come across

fresh basalt
#

Haskell has a => operator

#

and >>= too

#

can you post a link to the snippet?

gritty zinc
fresh basalt
#

Oh wow.

#

You've certainly accomplished… something. :D

vapid nymph
#

Use the pastebin, no?

remote socket
#

why would it?

trail juniper
#

helper privilege 👀

honest star
#

Staff bypass the filters

remote socket
#

character count?

graceful basin
#

staff can upload files

remote socket
#

oh yeah def character count lmfao

vapid nymph
#

I'm on mobile so I can't view it zoomEyes

frozen coral
#

Filters don't run on embedded files and helpers ignore the file filters 😄

fresh basalt
#

my terminal shows absolutely none of those unicode characters.

frozen coral
#

oh lol, everyone has already answered 👀

remote socket
#

@gritty zinc but why did you do that?

honest star
#

Also that probably didn't need a moderator ping, not exactly an urgent matter >_>

wheat lynx
fresh basalt
#

@remote socket Why do people climb mountains?

#

Because they can.

vapid nymph
twin charm
#

I saw a mod ping get vanished.

honest star
vapid nymph
twin charm
#

loll

vapid nymph
remote socket
#

our helpers are trusted people

vapid nymph
#

Isn't a ping better than no ping, as always is said.

harsh tundra
vapid nymph
bleak lintel
#

woah woah woah

fresh basalt
#

@vapid nymph Everyone here spent literal hours talking about unicode while ConfusedReptile did that.

bleak lintel
#

gettin steamy in here

twin charm
#

so many colourful usernames here

fresh basalt
#

It wasn't a surprise.

remote socket
harsh tundra
#

now every mod is coming here to check what has happened? 😛

bleak lintel
#

lol

#

we got a ping!

vapid nymph
twin charm
#

this channel is getting interesting.

acoustic moss
#

wonder if any staff has ever received a serious infraction

remote socket
#

There is no helper++, please explain this possible joke that I missed.

vapid nymph
#

i even saw scragley show up

bleak lintel
#

hahaha it's 30 people getting a notification

vapid nymph
fresh basalt
#

It's a Python Discord, how serious can serious be?

twin charm
remote socket
#

ah

remote socket
#

no fun allowed

fresh basalt
#

Python is serious business.

remote socket
#

yes of course

sterile sapphire
#

🥴

twin charm
#

what about mods testing mute and ban commands to other mods 😛

sterile sapphire
#

what is going on why are there so many mods here

bleak lintel
#

we got a mod ping

#

lol

fresh basalt
#

Mod party.

harsh tundra
remote socket
#

@bleak lintel I have a game breaking bug

bleak lintel
#

mod pings in off topic generally means we come and stay

bleak lintel
remote socket
#

I can't use steak bot here

bleak lintel
remote socket
#

fuck

drifting sage
#

lmao

honest star
#

hmmmm... I wonder if I can work on the voting slash command bot since the other thing is stalled for a bit

bleak lintel
#

i wonder

#

how many staff-staff infractions there are

fresh basalt
#

So apparently my font doesn't support all the characters ConfusedReptile used in their program. That sucks.

stark prawn
#

Is that a challange?

bleak lintel
#

lol

remote socket
#

class starts in 15 minutes how am I supposed to stay calm without my steak bot???? /s

inland wolf
#

steakbot down?

twin charm
#

what?

inland wolf
#

what

fresh basalt
#

Does anyone here use a neat unicode monospace font in their Linux terminal?

remote socket
#

You can only use it in #bot-commands

inland wolf
#

right

fresh basalt
#

I'm using Deja Vu Sans Mono.

twin charm
#

btw how is everyone?

bleak lintel
#

LOL

pythondiscord=# SELECT COUNT(1) FROM api_infraction LEFT JOIN api_user au ON api_infraction.user_id = au.id WHERE ARRAY[267629731250176001] <@ au.roles;
 count
-------
   535
(1 row)
twin charm
#

lmao joe

inland wolf
#

damn

#

535

remote socket
#

hmmm

bleak lintel
#

2.4% of infractions

#

is that correct

remote socket
#

mod pings?

bleak lintel
#

how can that be

remote socket
#

wait

#

how many times has the filter been triggered

bleak lintel
#

lol @honest star

frozen crane
remote socket
twin charm
#

btw mods have you been informed about how zero width spaces can bypass filters?

bleak lintel
twin charm
#

fixx

remote socket
honest star
#

lololol

#

oh hey, there was my only real infraction from uploading too many images at once in branding

twin charm
sterile sapphire
#

hey guys

remote socket
#

I was wrong

#

there's no PR

twin charm
sterile sapphire
#

if I wanted to email the department chair

#

about a professor

#

would around 1/3 of the class having the same issue

#

be enough to make a change?

remote socket
frozen crane
harsh tundra
remote socket
#

ty

fresh basalt
#

It probably depends. If the professor has tenure, good luck.

latent scaffold
#

Man. What on Earth triggers Warning

sterile sapphire
latent scaffold
#

This one's gonna be the hardest, isn't it

remote socket
#

!warn @remote socket bonk

royal lakeBOT
#

failmail :ok_hand: applied warning to @remote socket.

remote socket
#

that's what triggers it

honest star
#

!warn @bleak lintel damn your database constraint

royal lakeBOT
#

:x: There was an error adding the infraction: status 500.

latent scaffold
#

oh o_o not what I meant

frozen crane
remote socket
#

get f0rked

graceful basin
fresh basalt
#

@frozen crane Did he get murked?

sterile sapphire
#

he's an assistant professor

frozen crane
sterile sapphire
#

so I don't think this will work well for him

remote socket
#

murked.

sterile sapphire
#

he's also not on the full time faculty page

fresh basalt
#

iced

#

ghosted

sterile sapphire
#

which means they either didn't update it

#

or he's actually not part of the full time faculty

gritty zinc
sterile sapphire
#

does tenured mean you're full time?

twin charm
#

@remote socket actually akarys did infact open an issue.

frozen crane
#

they just made it so that professor didn't teach any classes. she could continue to do research and collect a paycheck.

twin charm
remote socket
#

oh I didn't see that

#

ty

twin charm
#

hmm.

fresh basalt
#

@frozen crane Oh, the professor might've liked that. Some professors like researching but they do not like teaching.

twin charm
#

it has a "critical" label. oOoO sounds important xD

fresh basalt
#

Sometimes it's just a bad fit.

#

Not everyone is cut out to teach.

remote socket
#

because it needs to be done this very instant

frozen crane
sterile sapphire
#

the prof is genuinely a nice guy

fresh basalt
#

Aw. :(

sterile sapphire
#

it's just that his grading criteria is awful

frozen crane
#

also they replaced her as instructor for every course that she taught in the middle of a semester

fresh basalt
#

Some academic departments really play politics.

sterile sapphire
#

it's not a trivial issue tho I'm really not wasting their time here

fresh basalt
#

I don't like that about academia.

twin charm
sterile sapphire
#

I find it hard to believe a professor can just give 50s for an open book exam

#

to students who spent days studying

#

and also offer minimal justification

frozen crane
#

not sure. she was teaching the discrete math course and a lot of students were failing out of the program because of that class. But that wasn't the intended weed-out class.

fresh basalt
#

My CS department had a professor who would give negative scores.

sterile sapphire
#

My CS department had a prof who would actively laugh at me

#

and he said I relied too much on office hours

twin charm
#

b r u h

sterile sapphire
#

also I was a beginner

#

so I don't know how you shame people for asking "incorrect questions"

twin charm
#

btw which year of college are you in now? or graduated already? lemon_hyperpleased

sterile sapphire
#

I'm a soph

fresh basalt
#

@frozen crane That's sad.

sterile sapphire
#

it's just kind of ridiculous to criticize a student for not asking correct questions

twin charm
#

Idk whats with the terminologies.. Enlighten me on what a sophomore is.

sterile sapphire
#

when they're still getting into the mindset of how to ask questions about code

frozen crane
fresh basalt
#

There were a few professors emeritus at my department and they were really great.

sterile sapphire
#

you're not only learning how to code

#

you learn an entire mindset for problem solving

#

and it takes time to get used to the mindset

twin charm
#

Mhm

fresh basalt
#

@frozen crane Thanks but maybe another time.

frozen crane
sterile sapphire
fresh basalt
#

What's with the lovefest role?

frozen crane
twin charm
median domeBOT
#
Noooooo!!

Your input was invalid: You cannot send a valentine to danceswithdirt#4282 as they do not have the lovefest role!

Usage:
.bemyvalentine <user> [valentine_type]

twin charm
#

bruh

fresh basalt
#

Oh it was a Valentine's Day thing?

twin charm
#

yeah it was.

fresh basalt
#

Thank you.

twin charm
#

.lovefest sub

#

too late.

last mantle
#

pigs :0

twin charm
#

.topic

median domeBOT
#
**Would you rather fight 100 duck sized horses or one horse sized duck?**

Suggest more topics here!

twin charm
#

bruh

#

.topic (new one pls)

median domeBOT
#
**What is your favorite video game?**

Suggest more topics here!

twin charm
#

ahah

low chasm
#

Hi :D

twin charm
#

AQW ftw

#

Hii :DD

low chasm
#

minecraft

low chasm
bleak lintel
#

tetris

low chasm
#

tetris cool

twin charm
#

E maskk

fresh basalt
#

I played so much Tetris as a kid.

low chasm
#

Lol

fresh basalt
#

Pipe Dream too.

twin charm
#

I like tetris too

low chasm
#

Mhm

fresh basalt
#

Lately I've been playing a lot of Factorio.

twin charm
#

tetris is available along with CodeBlocks

low chasm
#

Cool

harsh tundra
#

Minesweeper!

low chasm
#

Lol

#

Genshin impact? My sisters addicted to it lmao