#dev-contrib

1 messages · Page 100 of 1

patent pivot
#

no idea what that is lol

gritty wind
#

Got an issue open for that

patent pivot
#

hmmm, that is interesting

gritty wind
#

just sync your system clock

#

what OS are you on

sleek steppe
stable mountainBOT
patent pivot
#

hmmmmmm

gritty wind
#

no experience with osx, but on windows you can just have it check and auto sync

patent pivot
#

bringing on a dep for utils like that feels a bit off

gritty wind
#

your internal timing is out of sync with discord's, which leads to oddoties with datetime

#

usually not noticeable with most datetime ops

#

but when you work in ms, it matters

#

oh, comments say it doesn't

#

it links to
sudo sntp -sS pool.ntp.org

#

do at your own risk and all the shebang, but this should be fairly innocuous

fallen patrol
#

have you?

patent pivot
#

no

#

giving it more resources is somewhat last resort

#

we should figure out what is going on first and see if we can mitigate another way

thorny obsidian
#

Nah, hoping to finish it up today if I can get a clarification on a comment from Akarys

gritty wind
#

No worries, situation has been resolved. Take your time

sleek steppe
#

sir-lancebot#673 I know this won't work

dusky shoreBOT
sleek steppe
stable mountainBOT
#

@patent pivot

It has arrived!

Here's your reminder: changelog.
[Jump back to when you created the reminder](#dev-contrib message)

patent pivot
#

!remind 24h changelog doc changes if no one else has

stable mountainBOT
#
Yeah okay.

Your reminder will arrive in 1 day!

sleek steppe
#

nice Oh

fervent sage
#

Ok, so, currently when there's an error in a command you try to time this happens:

#

however

patent pivot
fervent sage
#

i can fix it using

#

would that make me a bad person?

sleek steppe
#

ctx = getattr(ctx, "subcontext", ctx) VeryCool

thorny obsidian
fallen patrol
#

yes, ik

#

it was your pr so i thought you would know

#

anyways, found it and submitted my review

sleek steppe
fallen patrol
#

i learned a bit more on how to use github*

#

suggested changes > reviewed

#

because i did suggest changes in the first one

#

just not well.…

thorny obsidian
#

Oh, I already made the fix locally. I don't think the duplicate suggestion was necessary

stable mountainBOT
#

@vale ibex

It has arrived!

Here's your reminder: try again <[#dev-contrib message](/guild/267624335836053506/channel/635950537262759947/)>.
[Jump back to when you created the reminder](#dev-contrib message)

vale ibex
#

So pillow-simd doesn't seem like an option as far as I can see rn

#

had to install gcc and build tools on the docker container, since there doesn't seem to be a wheel around

sleek steppe
#

I have sir-lancebot running but can't stop it 😩

vale ibex
#

a wheel is a pre-built python dependancy

sleek steppe
patent pivot
#

ahh that sounds about right

#

yeah

#

hm

#

wait

#

why no wheels

#

oh

#

because they just don't have wheels lol

vale ibex
#

yea lol

#

Anyways, I'm going to leave that for another day, so that this pfp PR actually gets merged this year

#

I think after this PR, we should refactor it to be a generic folder for image processing cogs

#

Don't underestimate procrastination lol

sleek steppe
#

there are some very old PR's that haven't been merged yet lol

fallen patrol
#

sir-lancebot#677 will someone approve?

dusky shoreBOT
fallen patrol
#

uh

sleek steppe
#

Someone needs to make a PR for that lol (I meant the repo#num thingy)

patent pivot
fallen patrol
#

cool

#

could you also assign me? pleadingpoint

patent pivot
#

done

fallen patrol
#

yay

#

i probably won't look at it anymore until at least start on it next week, this week is a once in a lifetime special to me

#

🙂 i've had my bone marrow transplant for one year now
and been cancer free for also about that long

#

.ping @patent pivot
would an issue to port over most of the @stable mountain or create a new ping command for @dusky shore likely be okayed as well?

#

just realized its non-existent

patent pivot
#

hmmmmm

#

don't think we need it

#

ping has a genuine use on python for checking the status of services, not just as a generic ping pong

fallen patrol
#

but we could use it anyways, ya?

thorny obsidian
#

!otn a generic-ping-pong

stable mountainBOT
#

:ok_hand: Added generic-ping-pong to the names list.

fallen patrol
#
Command processing time
69.230 ms
Discord API latency
111.634 ms
#

it would be nice to see those on lancebot as well

patent pivot
#

it's not necessary, I don't think we should be duplicating that

fallen patrol
#

after all, that's what's on python and that isn't any more than a typical bot

patent pivot
#

maybe a very generic .ping to "Pong! 🏓" message, but I'd be fairly against anything else

fallen patrol
#

ah, could you explain more in detail why?

fallen patrol
patent pivot
#

it's not that it isn't useful for Lancebot, it's just that it's a duplicated feature

fallen patrol
#

why is that?

patent pivot
#

we use ping to determine if the site is up, API is responsive, among other things, lancebot doesn't need that functionality because if python reports an error then lancebot is likely susceptible (and lancebot is much less dependent)

fallen patrol
#

oh

#

that makes sense

patent pivot
#

@fallen patrol I've specified the issue

fallen patrol
#

which one

patent pivot
#

colours

fallen patrol
#

ah

#

colo[u]rs

#

yeah

#

(what I'll probably do is code everything as color and then replace it all with colour)

patent pivot
#

lol

#

colour beats color right now in the repo so we'll probably stick with that

fallen patrol
#

welp

patent pivot
#

I've split up the features into implementable segments if you want to go through multiple PRs

fallen patrol
#

that will be my last commit

patent pivot
#

4 PRs sounds like a decent spread of the work, in order I suggested colour information, random colours, conversions and naming

fallen patrol
#

this is

#

evergreen?

patent pivot
#

yep

fallen patrol
#

add label 🥺

patent pivot
#

I have

#

never knew github embeds that, that's super neat

fallen patrol
#

-1 second ago

sleek steppe
#

joe's just fast ¯_(ツ)_/¯

fallen patrol
#

faster than my internet

#

brb adding it to the discussion

#

Some of the features would be:

embedding an image of the color using pillow to create it
converting the color to other formats using colorsys
giving the closest matching name from one of these two lists (xkcd and this one suggested by joe), merged and stored locally.
patent pivot
#

i specified that

#

one sec

fallen patrol
#

Embed should include:

The colour itself as both the embed colour and as the thumbnail.
Colour conversions (see below).
Colour name (see below).
patent pivot
fallen patrol
#

*color

vocal prairie
#

This kind of colour image?

fallen patrol
#

joe is too

#

yep

vocal prairie
#

Except with other info, of course.

patent pivot
#

pretty much that! I'd say thumbnail instead though

fallen patrol
#

!d PIL

stable mountainBOT
#
PIL
patent pivot
#

one second

vocal prairie
patent pivot
#

i'll generate a mock embed

vocal prairie
#

And the embed color should definitely be the color.

patent pivot
#

yep

fallen patrol
patent pivot
#

that was on a timer lol

fallen patrol
#

concidence? I think not.

#

well, lol

sleek steppe
#

Who knows

fallen patrol
#

HEY

#

PILLOW USES COLOR

#

therefore color is correct.

gritty wind
#

topic use color

patent pivot
#

okay good

fallen patrol
vocal prairie
#

The colour one.

fallen patrol
vocal prairie
#

And yes, I'm calling it that just to annoy you.

fallen patrol
#

I'll provide an actual response on the issue but

vocal prairie
#

Okie

woven solsticeBOT
#
Fuchsia Crayola (approx.)
RGB

rgb(199, 99, 189)

CMYK

cmyk(0, 50, 5, 22)

HSL

hsl(306, 47, 58)

HSV

hsv(306, 50, 78)

patent pivot
#

voila

#

we could drop the function notation

woven solsticeBOT
#
Fuchsia Crayola (approx.)
RGB

199, 99, 189

CMYK

0, 50, 5, 22

HSL

306, 47, 58

HSV

306, 50, 78

patent pivot
#

could also consider uhhh

woven solsticeBOT
#
Fuchsia Crayola (approx.)
RGB

rgb(199, 99, 189)

CMYK

cmyk(0, 50, 5, 22)

HSL

hsl(306, 47, 58)

HSV

hsv(306, 50, 78)

fallen patrol
patent pivot
#

uhhh

fallen patrol
#

nah its the fields aren't in line anymore which is imo better

patent pivot
#

I think that's the one to work towards

fallen patrol
#

i really really wish there was a way to have two fields in line

fallen patrol
#

late game

patent pivot
#

late game?

fallen patrol
#

formatting is much easier than the logic

#

yes

vocal prairie
patent pivot
#

right, yeah, but it's good to specify anyway

vocal prairie
#

The other one is too wide imo

fallen patrol
#

first i have to process the color and everything and then make the embed which is like

#

really easy to change

patent pivot
#

added to issue

#

the reason I used function notation is because it's fairly standard syntax for CSS

vocal prairie
#

I think 2x2 is better, as long as you can limit width to 2 units instead of 3

#

Then full function notation would be fine

sleek steppe
vocal prairie
#

Why

sleek steppe
#

On pc yes, but on mobile there's a big gap

vocal prairie
sleek steppe
#

Yeah because there isn't any inline on mobile

vocal prairie
patent pivot
#

#3 is the one I put ont he issue

#

but we can bikeshed this

vocal prairie
#

^ Same

#

I've always heard you guys say it, but never understood it.

sleek steppe
#

Bikeshedding occurs when a development team spends a disproportionate amount of time and effort on a trivial or unimportant detail of a system, such as the color of a bikeshed

vocal prairie
#

Eh, this is fun

#

But this is still fun

#

@patent pivot Do you have an example of 2x2, just to see?

patent pivot
#

how do I do 2x2

patent pivot
#

yeah

fallen patrol
#

sadly

#

i wish it was possible to like, do it

vocal prairie
#

Wait really? I swear I've seen it before.

fallen patrol
#

its a fake

#

\u200b

#

as both name and value

vocal prairie
#

Wait, you can add fake fields.

fallen patrol
stable mountainBOT
#

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

fallen patrol
#

zero width space

vocal prairie
#

Imma generate some examples when I have time for no resaon

#

Bye

sleek steppe
#

Mobile has no inline...so it'll just be a blank field. So it's gonna look bad

fallen patrol
#

oh shit i just realized

#

@patent pivot …did you mention anything about redis catching because its color generation

#

caching should probably be in the spec

patent pivot
fallen patrol
#

ah

patent pivot
#

redis will not cache image data though, so we'll have to do a volatile FS cache in that case

fallen patrol
#

well

fallen patrol
patent pivot
#

yeah, it should be fine

fallen patrol
#

i mean

#

fwiw i learned that 40 minutes ago but was afk

fallen patrol
#

hm

#

the basis of the color command might be easier than i thought

#

#

no one saw that did they?

vocal prairie
vocal prairie
#

Conversion might be fun.

#

But not too bad.

fallen patrol
#

well

#

conversion is a library

patent pivot
#

is the algorithm that complex to implement outselves?

vocal prairie
#

Can I write formulas?

#

I love math.

fallen patrol
#

I looked in the source of the library

#

It's like

#

3 lines

#

But I also thought it was part of the stdlib

#

!d colorsys

stable mountainBOT
#

Source code: Lib/colorsys.py

The colorsys module defines bidirectional conversions of color values between colors expressed in the RGB (Red Green Blue) color space used in computer monitors and three other coordinate systems: YIQ, HLS (Hue Lightness Saturation) and HSV (Hue Saturation Value). Coordinates in all of these color spaces are floating point values. In the YIQ space, the Y coordinate is between 0 and 1, but the I and Q coordinates can be positive or negative. In all other spaces, the coordinates are all between 0 and 1.

fallen patrol
#

Yeah

#

It's part of the stdlib

#

@patent pivot it's up to you if you want me to copy the relevant methods out of the stdlib

patent pivot
#

Part of it is, yes

#

So for that we use stdlib

#

but I thought you were referencing a package for CMYK

fallen patrol
#

My goal is not to add any dependencies, so whatever is already there is what I'll use

#

Ah, no

patent pivot
fallen patrol
vocal prairie
#

YAY

patent pivot
#

it should only be necessary for CMYK

vocal prairie
#

Oh wait, that's in colorsys.

patent pivot
#

CMYK is not, no

vocal prairie
#

So only one formula?

patent pivot
#

I guess it's two if you count to and from

vocal prairie
#

to and from?

#

Oh wait.

#

I get it.

patent pivot
#

RGB --> CMYK --> RGB

vocal prairie
#

It's late. That's my excust

fallen patrol
#

I haven't looked too much into it but I was going to use either hex or rgb to represent every number

#

Probably rgb

vocal prairie
#

Why rgb instead of rgba?

patent pivot
#

We don't need to support transparency

fallen patrol
#

Right I was gonna actually use rgba hehe

patent pivot
#

We can't

vocal prairie
#

Why?

patent pivot
#

Our color models, HSV, HSL, RGB and CMYK do not support transparency

fallen patrol
#

Ah

patent pivot
#

RGBA is not relevant in this conntext

fallen patrol
#

True

vocal prairie
#

Oh I see.

#

So just rgb

fallen patrol
#

Right

vocal prairie
#

Got it

fallen patrol
#

If theres an transparency it would be on the color added only

#

I mean

#

The image

patent pivot
#

Pillow can just support RGB

fallen patrol
#

I mean, it supports RGBA

patent pivot
#

It does, but we don't need to use that.

#

For the initial iteration, we probably need to support only RGB/Hex input, since they are identical and can go straight into Pillow

#

I would strongly advise breaking it up into separate PRs to avoid huge PRs and long review processes.

vocal prairie
#

Google is giving me conflicting answers on what K is in CMYK.

#

And how to calculate it.

#

Is it just 1?

vocal prairie
#

So do I just put 1?

fallen patrol
#

No idea

#

But it is black

vocal prairie
#

Yeah, but what do I use in calculations?

patent pivot
#

You have to calculate that

#

so uhhh

vocal prairie
#

I just can't find the formula.

#

Google says 5 different things.

patent pivot
#

I linked the SO answer from above which seemed to have a good impl

#

let me test it

#

alright so

#

#C763BD is 199, 99, 189 in RGB and 0, 50, 5, 22 in CMYK

vocal prairie
#

Wait, if that answer exists, there's really no reason for me to write a formula, is there?

patent pivot
#
In [1]: RGB_SCALE = 255
   ...: CMYK_SCALE = 100
   ...:
   ...:
   ...: def rgb_to_cmyk(r, g, b):
   ...:     if (r, g, b) == (0, 0, 0):
   ...:         # black
   ...:         return 0, 0, 0, CMYK_SCALE
   ...:
   ...:     # rgb [0,255] -> cmy [0,1]
   ...:     c = 1 - r / RGB_SCALE
   ...:     m = 1 - g / RGB_SCALE
   ...:     y = 1 - b / RGB_SCALE
   ...:
   ...:     # extract out k [0, 1]
   ...:     min_cmy = min(c, m, y)
   ...:     c = (c - min_cmy) / (1 - min_cmy)
   ...:     m = (m - min_cmy) / (1 - min_cmy)
   ...:     y = (y - min_cmy) / (1 - min_cmy)
   ...:     k = min_cmy
   ...:
   ...:     # rescale to the range [0,CMYK_SCALE]
   ...:     return c * CMYK_SCALE, m * CMYK_SCALE, y * CMYK_SCALE, k * CMYK_SCALE
   ...:

In [2]: rgb_to_cmyk(199, 99, 189)
Out[2]: (0.0, 50.251256281407045, 5.0251256281406995, 21.96078431372549)
#

other than the rounding required, it got it there

vocal prairie
#

What's all the ...:?

patent pivot
#

ipython

vocal prairie
#

So I don't really need to write a formula.

#

If a formula already exists.

#

It just needs to round.

patent pivot
#

yep

vocal prairie
#

To an int.

#

So just```py
return round(c * CMYK_SCALE), round(m * CMYK_SCALE), round(y * CMYK_SCALE), round(k * CMYK_SCALE)

#

With that line, it returns:(0, 50, 5, 22)

short snow
#

Even review my PRs lemon_pensive

sleek steppe
#

Which ones

short snow
#

here they are

#
sleek steppe
short snow
#

ah, missed that commit

#

just saw it

sleek steppe
#

Ah ok

short snow
#

pillow simd didn't complain for me, hmmm

#

lemme try that in docker

vocal prairie
#

I'd be willing to.

placid ermine
#

how badly have i fucked up

#

sigh

sleek steppe
vocal prairie
placid ermine
#

apparently @dusky shore keeps dying because of the latex

sleek steppe
#

lol

fallen patrol
#

I think @patent pivot mitigated it somehow

short snow
vocal prairie
#

Uh, wdym "seasons"?

#

Do you just mean folders?

sleek steppe
vocal prairie
#

Crap, I'm looking at the wrong thing.

#

I don't really care which ones.

short snow
#

lets choose three each, keeping everygreen out for now

#

lol

vocal prairie
#

Okie

sleek steppe
#

Can I do evergreen then lol

vocal prairie
#

Why not

short snow
#

push changes thro PRs to my fork, do you want to fork my fork, or would like to have push access?

placid ermine
#

i think i have a fix to the latex consuming too much memory

#

i can't reproduce the problem on my test bot though

sleek steppe
short snow
#

so even you want to help?

sleek steppe
#

Yeah

sullen phoenix
#

we coulddd just raise our set resource limits on sir lancebot

#

although, do you know how much memory the latex command can take?

short snow
#

could you comment on it then toxic

#

and lemme make a branch for python3.9

sleek steppe
short snow
#

lol, tell me one option.
cc: @vocal prairie

placid ermine
#

it looks like the memory usage just spikes as soon as there is bad input

#

it jumped from 63MB to 112MB and then to 159MB

#

and it doesn't drop down either

#

for proper input there is hardly any change

#

hmm

sullen phoenix
#

hmm alrighty, that would probably be something you’d want to look into then

placid ermine
#

I think I should handle this error in the cog itself instead of raising BadArgument

short snow
#

are you storing the image as a image or in bytes?

placid ermine
#

in bytes for sending, also saving it as a png in cache

short snow
#

if we store it as bytes in cache, would it reduce the space, and is that possible

placid ermine
#

I don't think that would reduce RAM usage

#

If I had to guess, the problem is that the figure isn't removed from memory when there is an error

short snow
#

try raising multiple errors, and does it increase with every error?

placid ermine
#

yes

vocal prairie
sharp timber
#

oh

short snow
#

fork the fork, or get push access to fork

sharp timber
#

I've seen something about this issue before

vocal prairie
sharp timber
#

We're not closing the figure after generating it

short snow
#

perfect

sharp timber
#
    @staticmethod
    def _render(text: str, filepath: pathlib.Path) -> BytesIO:
        """
        Return the rendered image if latex compiles without errors, otherwise raise a BadArgument Exception.
        Saves rendered image to cache.
        """
        fig = plt.figure()
        rendered_image = BytesIO()
        fig.text(0, 1, text, horizontalalignment="left", verticalalignment="top")

        try:
            plt.savefig(rendered_image, bbox_inches="tight", dpi=600)
        except ValueError as e:
            raise commands.BadArgument(str(e))
        finally:
            plt.close(fig)

        rendered_image.seek(0)

        with open(filepath, "wb") as f:
            f.write(rendered_image.getbuffer())

        return rendered_image
placid ermine
#

i tried plt.close(fig)

sharp timber
#

Did you use finally: to ensure it fires regardless of exception status?

placid ermine
#

code jinx or something idk

sharp timber
#

Try firing a gc.collect() after plt.close

#

You will probably have to import gc in there to do so

#

For temporary debugging only, this is not a serviceable default fix

placid ermine
#

nope, still doesn't drop

sharp timber
#

I would try rewriting it to use the base class method, rather than pyplot, next then

#

It should be fairly straightforwards since I don't see complicated stuff here

fallen patrol
sullen phoenix
#

yeah, that's what i'm thinking as well

sharp timber
#

I would fire up a fork myself but I am about to be passing out

#

hopefully that link is helpful

#

!remindme 12H ^ check on

stable mountainBOT
#
Sure.

Your reminder will arrive in 12 hours!

fallen patrol
sharp timber
#

I have earplugs

fallen patrol
#

lol

vocal prairie
#

A fork? I would personally use a knife.

fallen patrol
#

fire up a fork == flaming pitchforks

vocal prairie
#

What, knives are sharper.

fallen patrol
#

fire up a knife == ???

vocal prairie
#

A knife lit on fire.

short snow
#

@sleek steppe lets just use forks then

#

@short snow - christmas, easter, pride
toxic - evergreen
@vocal prairie - utils, halloween, valentine

sounds good?

vocal prairie
#

That works.

placid ermine
#

YES

#

latex fixed

#

it never crosses 110MB anymore

#

not matter how many times you give bad input

vocal prairie
#

Yay!

placid ermine
#

for some reason using matplotlib.figure.Figure instead of matplotlib.pyplot.figure fixed it

vocal prairie
#

Weird. But that's good.

fallen patrol
short snow
#

ahhhh, it has been locking past 10 minutes

#

updated all dependencies to supported latest, for supporting 3.9

#

on lance

cold moon
#

@short snow @vocal prairie @sleek steppe So all of you will work on sir-lancebot#549 together?

short snow
#

yeah, since it is kinda big issue, and needs lot of testing

cold moon
#

Okay, I can assign you already, others need to comment in issue first before I can assign.

short snow
#

wait why didn't lance put the issue embed?

#

Toxic and dawn i think it might be easier to do the changes according to the libraries rather than cog wise

patent pivot
#

this is actual OOM

surreal venture
#

I need to add some emojis to my server for the stackoverflow command, but if I store them on my server and use my server's emoji_id, then it won't work on this server right?

tough imp
#

You can use the local config to override the IDs for local development, and keep the production config as is

#

If you're adding new emoji you can ask a staff member to add them to the production emoji guild and give you the IDs so that you can configure the prod env

surreal venture
#

okie thanks!

gritty wind
#

Hey, this channel is for pythondiscord projects, not for advertising your own. If you'd like to discuss your own, try the off-topic channels, or the relevant topical channel

surreal venture
#

sir-lancebot#583

gritty wind
#

I deleted a message

surreal venture
#

oh my bad

#

sorry

gritty wind
#

no worries

short snow
surreal venture
gritty wind
#

Did anyone fix the issues cog since yesterday

#

It had been broken

short snow
#

after merging akarys's pr, it failed

gritty wind
#

Yup, in that sense

short snow
#

only on on_message right?

gritty wind
#

I do not know

placid ermine
#

so uh the way i fixed the memory issue is pretty weird
i have to clear the figure, del the figure and run gc.collect()

#

removing any of those makes it stop working

gritty wind
#

Are you working on the latex thing?

placid ermine
#

yes

gritty wind
#

I already have a fix that just limits memory

#

But if you also have a memory cleaner, that would be a nice addition

placid ermine
#

hmm
turned out there's a memory usage spike whenever there is improper input

placid ermine
gritty wind
#

Even if you managed to clean up input perfectly, you shouldn't give people a function that runs code internally without any memory protections

#

I'm not sure what Bast's reason is, but that's the reason for my fix

placid ermine
#

yeah i'm not trying to clean the input, i'm just trying to make sure the memory is cleared even for bad input

gritty wind
#

The problem isn't clearing it i don't think

#

the problem is it tries to allocate more than is available

#

no amount of cleaning will matter if you never get past the allocation

placid ermine
#

well the memory usage does seem to stay within a certain limit now

#

hasn't crossed 110mb

#

although tbh i don't really know whether the way i'm measuring it is right

#

i'm just looking at the memory usage for the python process in task manager

short snow
gritty wind
#

Sir-lancebot basically logs nothing

#

There is no error except for the ones introduced in the PR

#

with parsing or whatever

#

I literally have no idea, I haven't been keeping up

short snow
#

ok no worries, i will look into it

short snow
#

hmm, on updating it to python3.9 and discord.py1.7.1

#

i get this error

#

can't seem to understand it

vale ibex
#

bot/utils/pagination/LinePaginator subclasses paginator

#

looks like in the new version of d.py there's a new attribute, that .close_page() is looking for, and it doens't exist

short snow
#

it needs a super.__init__(), since we calling close_page(), which we have not written i.e. doesn't exist, and there is no linesep in our init, so it is looking for one

#

so should i add linesep or do super.__init__()

vale ibex
#

depends if you want to overwrite it, or use the default

short snow
#

linesep is added in 1.7, ahh that's why

vale ibex
#

yea, there's going to be a bunch of new things added in the new version of d.py

#

so I imagine there's going to be more things like this

short snow
#

yeah

#

we will be used the default one

vale ibex
#

👍

balmy sparrow
#

was there a reason for not subclassing HelpCommand in lancebot?

#

that'd be the standard way of making a help command for a bot, so the current way feels a bit more complicated than it needs to be

vale ibex
#

Not entirely sure on the reasons for the decision, I wasn't around back then

cold moon
#

I think there is issue for migrating

balmy sparrow
#

ah right

short snow
vale ibex
#

Cool, I'll update the issue title

gritty wind
#

due to python's dependency hell, we'll be upgrading to... nothing 👀

green oriole
#

lol

#

Upgrading to 0.9 when

green oriole
vale ibex
#

hah the description is so accurate

green oriole
#

Haha yeah

vocal prairie
short snow
vocal prairie
#

What version of Python and d.py is Lancebot on right now?

whole forge
sleek steppe
vocal prairie
#

Oh, so we're not upgrading that much.

#

Now I have to go read the changelogs.

#

I have no idea what came when.

sleek steppe
#

@short snow If I'm forking your fork that means I have to delete my fork right?

vocal prairie
cold moon
#

Hmm, other way is that Jason give you write access to his fork, so changes can be pushed directly to there

short snow
#

yeah i asked them which one they would like, they went with forks, so i was fine

short snow
#

see my fork's update/python3.9 branch

green oriole
fallen patrol
stable mountainBOT
fallen patrol
#

that source is really helpful btw

#

i have used that code to learn how to rjust strings rather than find the docs hehe

whole forge
#

leftpad was a npm thing, almost every npm package used it and t hen the author deleted it

#

what followed was a glorious clusterfuck of breaking builds

#

because of a 12-line npm package

fallen patrol
#

yeah

#

and he deleted it because npm was being a d**k

whole forge
#

yea

vocal prairie
#

Yarn is better.

short snow
#

dawn you want push access or still want to work with fork?
advantage with push is, you won't need to pull and rebase everytime

#

and you won't need to delete the pydis fork

deft patrol
#

👀

whole forge
#

why would you need to delete any forks? just add the other fork as a seperate remote, manually merge over the changes, make your changes and ask the other person to merge back, or PR into the other persons fork

fallen patrol
#

does sir lancebot run on arm?

#

i heard that there were some limitations

short snow
#

there you go @vocal prairie @sleek steppe

and you could work on branches like: update/python3.9/dawn

fallen patrol
whole forge
#

also why not PR into the fork from a different fork?

short snow
#

investigating update to python 3.9.4

vocal prairie
#

We're updating lancebot to python 3.9.4 and d.py 1.7.1.

short snow
fallen patrol
#

is that really necessary?

#

!src

stable mountainBOT
vocal prairie
#

Yes, because fancy new features.

fallen patrol
#

@stable mountain uses 3.8

vocal prairie
#

Sebastiaan explained it in the issue.

whole forge
vocal prairie
#

sir-lancebot#549

dusky shoreBOT
fallen patrol
#

ohhh there's an issue for it

fervent sage
fallen patrol
short snow
vocal prairie
thorny obsidian
#

Typing generics is worth the cutover. Lancebot doesn't need to match Python exactly

vocal prairie
#

That's the wrong issue.

#

That's #5

short snow
#

ah ok

vocal prairie
short snow
#

so i need to look into the regex it seems

whole forge
#

regex fix still hasnt been merged ig

#

we discussed it extensively yesterday but i had to go

short snow
#

!remind 10H fix the issue with automatic issue mapper

stable mountainBOT
#
I'll allow it.

Your reminder will arrive in 10 hours!

thorny obsidian
#

Who was going to PR the regex fix? I don't remember

whole forge
#

no clue, i had to go

short snow
#

i will delete the reminder if thats the case

fervent sage
#

laundmo probably should since iirc he did most of the work in beefing up and making the regex better

fallen patrol
whole forge
#

if it was just the regex, i would, but people kept wanting to add additional checks and i just dont wanna bother with that

fervent sage
#

i think the regex is most important right now to make it work

fallen patrol
#

i'd say fix the regex and any additional features can be added later

fervent sage
#

^

fallen patrol
#

because as of right now its not usable

#

but

#

bot#2

dusky shoreBOT
fervent sage
#

people can add all the checks they want after the fact, but currently a very useful feature is totally broken

fallen patrol
#

it would be nice for it to repeat the repo and issue/pr number in a later pr

whole forge
#

fair, just gonna PR from the web editor then lol

fallen patrol
#

so that's a later fix

vocal prairie
fallen patrol
#

^

whole forge
#

PRing this while at work lol

#

at least im alone

placid ermine
#

lul

whole forge
#

hah, my PR passed flake8 even though i literally have no linter in the web version

vocal prairie
#

Noice

whole forge
#

now just need a review

fallen patrol
whole forge
fallen patrol
#

shiiiiiiiiiiip it

#

sir-lancebot#680

dusky shoreBOT
fallen patrol
#

i don't know what i was expecting

whole forge
#

not yet lol

fervent sage
#

i didnt realise how important that feature was to us until it broke

#

? (context: someone added 10 'youtried' emojis)

vocal prairie
#

That's a lot of stars.

fallen patrol
#

pls shipit

fervent sage
#

we have reached peak rotat banan

fallen patrol
#

someone approve it even if the regex doesn't always work

whole forge
#

but it works in more cases than it should

vocal prairie
#

I don't have a lancebot clone set up.

#

So I can't.

whole forge
#

it allows a--b/a--b#123

vocal prairie
#

Actually, I can just test the regEx.

#

Right?

fallen patrol
vocal prairie
#

Is it supposed to allow *s?

fervent sage
whole forge
vocal prairie
#

asterisks

whole forge
#

where does it do thaT?

vocal prairie
#

python/cp*ython#4865 returns ython#4865 for me.

fallen patrol
#

its supposed to work for now

vocal prairie
#

oh wait, that'll return invalid.

fallen patrol
#

^

vocal prairie
#

So it doesn't matter.

whole forge
vocal prairie
#

Okie, then it's fine.

fallen patrol
#

the problem is if it matches above a /

#

basically it should error somehow

#

but

#

this is to make it usable

#

.issue 555

#

i

#

that command should really be allowed here

#

would be a bit of a solution to the auto linker

vocal prairie
#

Why does the pr say that linting wasn't done?

#

Is there just no point?

#

Since it's the same?

whole forge
#

because i literally cant lint, i did this all in the web

fervent sage
#

because linting wasnt done

whole forge
#

yes

vocal prairie
#

Oh I see.

#

That makes sense.

fervent sage
#

if you dont do something dont say you did /shrug

vocal prairie
#

But eh, ig it doesn't really matter.

whole forge
#

and i mean the actions auto-lint so

#

i did commit a second time to make sure linting has a better chance of passing

#

kinda wanna see if i can get the review done instantly if i ping akarys, because akarys is the one that bonked it
🎶 git blame tightens

fervent sage
#

well

#

akarys isnt online and chris is mmLol

whole forge
#

because sir-lancebot#680

sleek steppe
#

@short snow you made commits to evergreen 😦

fallen patrol
#

why did it not respond

fervent sage
#

could be restarting

whole forge
#

.ping

#

is that not a thing

fallen patrol
#

there's no ping command

placid ermine
#

nop

fallen patrol
#

nope take it up with joe

whole forge
#

@patent pivoteeeeeeeeeeeeeeeeeeeeeeeeeeee (lancebot ping command when)

fervent sage
#

atjoe ping command ples

fallen patrol
#

would be redundant to python is what he said

#

if something is affecting python it would be affecting sir lance as well

vocal prairie
#

Reasoning: to see if lancebot goes brrrrr

whole forge
#

nice to check whether its bonked

fallen patrol
#

^

#

that's my opinion but joe was against it

deft patrol
#

off messages n messages 🥴

fallen patrol
#

we use ping to determine if the site is up, API is responsive, among other things, lancebot doesn't need that functionality because if python reports an error then lancebot is likely susceptible (and lancebot is much less dependent)

vocal prairie
fervent sage
#

i like to always have ping commands and always have them public because even if you dont care about ping it can show you if the bot is dead

patent pivot
#

I didn't say no ping

whole forge
#

literally just respond with pong

patent pivot
#

I said no latency checking to our services

#

yeah, I said respond with a ping embed

fervent sage
#

ok ping command pr in 10 :)

whole forge
patent pivot
#

or something short

placid ermine
#

oh you meant for the bot

#

ok then

fallen patrol
vocal prairie
#

Can I pr the ping, or does someone else want to?

fervent sage
vocal prairie
#

Go ahead

patent pivot
#

@whole forge done

vocal prairie
#

sir-lancebot#680

dusky shoreBOT
patent pivot
#

won't have deployed yet

vocal prairie
#

Didn't deploy yet ig.

patent pivot
#

takes a few minutes at least

#

but yeah I agree a ping command would be nice to have, it's just that when I was approached about it the proposal was to rip the one out of @stable mountain

#

which is total overkill

whole forge
#

agree

fervent sage
#

i'm just gonna create an embed that says pong + ws latency

patent pivot
#

sounds good

fervent sage
#

since thats all thats really needed

patent pivot
#

mayyyybe uptime?

fervent sage
#

sure

fallen patrol
#

.uptime

patent pivot
#

just thinking to know when this actually did deploy

fallen patrol
#

sir-lancebot#680

dusky shoreBOT
patent pivot
#

kinda a useful thing sometimes

fallen patrol
#

👏

#

.uptime

patent pivot
#

nice one

#

.uptime

dusky shoreBOT
#

I started up 22 seconds ago.

patent pivot
#

lol wtf

#

TIL

placid ermine
#

lol

patent pivot
#

nevermind then, just pong + ws latency

fallen patrol
#

!uptime

vocal prairie
fallen patrol
#

python needs the uptime command

#

🥺

vocal prairie
fallen patrol
#

why not, when sir-lancebot has it

patent pivot
#

it would be nice to include uptime and hit SHA

#

Maybe we add an !about command

#

!about

#

include some details on the bot project

fallen patrol
#

.about

vocal prairie
#

That would be nice.

#

Could I do that?

whole forge
#

test with a full repo name julvo/reloading#11

whole forge
#

nice

placid ermine
#

interesting

patent pivot
#

details on the bot, link to repo, git SHA, uptime

#

yeah go for it @vocal prairie

vocal prairie
#

Should I open an issue for reference?

patent pivot
#

nah it's fine to just PR

vocal prairie
#

Time to set up a test server.

placid ermine
#

While y'all here
how do you feel about a fix to the latex which doesn't make 100% sense but works?

whole forge
#

!otn a joe's-issueless-PR's

fervent sage
#

short and simple

patent pivot
#

A link to this conversation and a summary of what we decided and why wouldn't go amiss in the PR

#

@fervent sage maybe use lancebot green colour

fervent sage
#

Sadge ok

patent pivot
#

your colour SUCKS worst blue ever

fallen patrol
#

Nah it doesn't suck

fervent sage
#

doesnt suck as much as you mmLol

fallen patrol
#

@fervent sage gimme hex

fervent sage
#

87ceeb

whole forge
#

do you know that

#

off the top of your head?

patent pivot
#

say it again and I'll find you

fervent sage
#

lol yes

#

it's my colour for all my stuff

vale ibex
fallen patrol
fervent sage
#

has been my main pfp colour on most of my pfps so its useful to know

patent pivot
fervent sage
#

if you grep -r "87CEEB" . basically any of my bot repos you'll probably find it somewhere kek

whole forge
#

dont cut it off, let it grow into a mane

vocal prairie
#

@short snow @sleek steppe Want to set up a test server for the upgrade?

patent pivot
#

lmfao

vale ibex
fervent sage
#

hang on what is the colour for lancebot green

#

you have 5 seconds or i use vco blue kek

fallen patrol
#

!ot

stable mountainBOT
vale ibex
fervent sage
#

kk

vale ibex
#

I think

fallen patrol
whole forge
vocal prairie
#

The light green or the dark green?

vale ibex
#

it might be like soft_green or something

#

it has green in it 😄

#

ah yea, light_green or dark_green

whole forge
#
class Colours:
    blue = 0x0279fd
    bright_green = 0x01d277
    dark_green = 0x1f8b4c
    orange = 0xe67e22
    pink = 0xcf84e0
    purple = 0xb734eb
    soft_green = 0x68c290
    soft_orange = 0xf9cb54
    soft_red = 0xcd6d6d
    yellow = 0xf9f586
    python_blue = 0x4B8BBE
    python_yellow = 0xFFD43B
    grass_green = 0x66ff00
vale ibex
#

take your pick

fervent sage
#

ew, but yeah this is it

#

vomit green mmLol

#

.randomcase you will never unsee it

dusky shoreBOT
#

YOU wIll NeveR UNseE iT

patent pivot
#

lol looks good

fervent sage
#

i was so close to committing this

placid ermine
#

lol

fervent sage
#

100% didnt copy the file :)

fallen patrol
#

Lmfao

fervent sage
#

but its my code anyway so its fine kek

whole forge
#

actually i dont see a single embed using that green

#

its a darker one for the ones that are gree

vocal prairie
#

Me neither

whole forge
vocal prairie
#

They all use default or dark green

fervent sage
#

bot#1

dusky shoreBOT
vocal prairie
#

Nvm

vale ibex
#

I imagine there may be a few constants that just aren't used anymore

fallen patrol
#

Search for ittttt

vocal prairie
#

Inspect element hates embeds.

#

You can't get the color.

fallen patrol
#

Use a color picker and mouse over it

fervent sage
vocal prairie
#

At least for me.

fallen patrol
stable mountainBOT
#

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

whole forge
fallen patrol
vocal prairie
#

Color: 0x1d277

whole forge
stable mountainBOT
#
== Raw embeds (1/1) ==

     author: 
             name: GitHub
              url: https://github.com/python-discord
      color: 0x1d277
description: ![PRMerged](https://cdn.discordapp.com/emojis/629695470570176522.webp?size=128 "PRMerged") [Add "Now playing" status](https://github.com/python-
             discord/bot/pull/1)
       type: rich
fallen patrol
#

There's the color

fervent sage
#

bright_green

#

i grepped the file

#

grep 🥰

fallen patrol
#

I rep the file too

#

If you want to grep it again, please talk to a union representative

fervent sage
#

actually bright green is even less common than soft_green - it's used solely in the issues cog once

whole forge
#

then do soft

fervent sage
#

bright looks nicer tbh

vocal prairie
#

Yeah.

#

It's less vomity.

whole forge
#

okay colour bikeshedding session

#

letsgo

vale ibex
#

I'm against having colours named as their colour IE soft_green

fervent sage
vale ibex
#

We should have success/failure etc

fervent sage
#

then i must first point out that its colour

vocal prairie
#

Success, failure, info, warning

#

Things like that?

whole forge
#

colour is less typing and less typo prone

vale ibex
#

yea, having the colours named after their function

fervent sage
#

Colours.ping

vale ibex
#

hah

vocal prairie
whole forge
vale ibex
#

lol

fervent sage
#

why update files when you can monkey patch classes mmLol

whole forge
#

yes

#

PR: 1 file changed
the file: overwrites the entire functionality

fervent sage
#

one 16k line file that monkeypatches every other file

fallen patrol
vocal prairie
#

No thanks.

#

Just use the same green everywhere.

#

A nice one.

fervent sage
#

i know a nice colour :)

#

it's 87ceeb

fallen patrol
#

dir(Colors)
color

sleek steppe
vocal prairie
#

I usually use a saturated version of 00ffdb

#

I forget the hex code.

whole forge
sleek steppe
#

Also how do you update python for pipenv thonk

vocal prairie
#

#9cfff1 is the color I use for embeds on my bots.

sleek steppe
#

Colour

fervent sage
#

colour

fallen patrol
#

Color

whole forge
#

its colour in the repo currently

vocal prairie
#

color, but colour is used more

fervent sage
#
embed = Embed(
  colour=randrange(0, 0xFFFFFF),
  ...,
)
fallen patrol
vale ibex
fallen patrol
fervent sage
fallen patrol
sleek steppe
#
> py -3.8 -m pip uninstall pipenv
> pip install pipenv

I'm guessing

vale ibex
#

Let's chill out with the color vs colour argument.

fallen patrol
vale ibex
#

But pipenv creates a virtual env within the dir when you init it

sleek steppe
#

I don't even have pipenv on 3.8 thonk

vale ibex
#

so you'll need to delete the virtual env for that folder and make a new one with the new python version

sleek steppe
#

oh

#

where is that folder

vale ibex
#

if you activate your pipenv shell

#

you can do pipenv --rm

#

then you can do pipenv --python 3.9 or whatever

sleek steppe
#

Should the ping command have a 🏓 ?

vocal prairie
#

That would be nice.

whole forge
#

wait how many people are working on the ping command right now?

sleek steppe
#

just vco

fervent sage
#

okie ping command is sir-lancebot#681

dusky shoreBOT
fervent sage
sleek steppe
#

LGTM

fervent sage
#

we need that cloudflare worker that filters github events to do something else too

#

it needs to translate :shipit: into shipit for the webhook

#

@patent pivot with the gateway thing every other time i've made ping commands people complain to me that they dont know what the gateway is, this is one of the only times i havent used it, i guess there's no winning either way kek

patent pivot
#

hmmm, I prefer gateway to just WS, alternatively "Discord WebSocket" or "Discord Gateway" might be good

fervent sage
#

oh yeah, i definitely prefer more discord-y terms

#

but apparently not everyone enjoys reading the developer docs for entertainment mmLol

#

(they should)

vocal prairie
#

Agreed

#

I still have a pr open to them

#

They're quite interesting.

#

Anyway, "Discord Gateway" sounds clear to me.

fervent sage
#

i'm just gonna leave it at 'Gateway' - again that's secondary to the main purpose which is just seeing that the bot isnt dead

fallen patrol
patent pivot
#

No, it doesn't

fallen patrol
#

Then

patent pivot
#

I love it

fervent sage
#

i got about as far as actually opening the worker's index.ts before i realised i had no idea what i was doing and went back lol

fallen patrol
#

Lmfao

patent pivot
fallen patrol
#

Does it reformat them for discord?

patent pivot
#

no it's purely a filter

fallen patrol
#

Like?

patent pivot
#

uhhh

fervent sage
#

for example coveralls stuff

#

that never gets to discord

fallen patrol
#

Ah

#

I thought you could filter that with githubs options

#

So how exactly is the chain configured?

patent pivot
#

Coveralls, stuff from bots (cloudflare pages), all dependabot stuff, bot PR approvals, empty review comments

#

you can't filter with that granularity at GitHub

#

You can only say "I want all push events"

#

not "I want push events but not from X users"

fallen patrol
#

Ah

patent pivot
#

So now we go from GitHub into a Cloudflare Worker Workers which forwards on to Discord

vocal prairie
#

dependabot?

gritty wind
#

Updates dependency versions on some projects

placid ermine
#

fml

#

i fixed linting but forgot to push it

sleek steppe
#

Oh for the colour command, in 1.7 they support rgb(x, x, x)

short snow
sleek steppe
#

ah

#

well I fixed merge conflicts

fallen patrol
#

holy shit you can now mention voice channels and join them by clicking

sleek steppe
#
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

Ooof how to fix it

fallen patrol
short snow
sleek steppe
#

Or do I just delete this file -> .git/index.lock

fallen patrol
#

¯_(ツ)_/¯

short snow
sleek steppe
fallen patrol
#

hey!

#

does this bot have any additional plugins in use for @slow bone?

stable mountainBOT
#

@sharp timber

It has arrived!

Here's your reminder: ^ check on.
[Jump back to when you created the reminder](#dev-contrib message)

short snow
#

Is there a way to open issues on forks?

#

I wanted to track the dependency updates

fallen patrol
#

authenticate(): return True

short snow
#

Or should I comment it on the original issue on the sir Lance repo

sleek steppe
#

I guess that would work

#

I changed asyncio.ensure_future -> asyncio.create_task and loop.run_in_executor -> asyncio.to_thread

short snow
#

Right could you do that?

#

Or maybe I will just do it

sleek steppe
#

Hmm should I PR now

short snow
#

Dunno, if you have tested it right and it works perfectly, a push should be good

sleek steppe
#

I changed typing.Iterable to collections.abc.Iterable since it's deprecated in 3.9

short snow
#

👍

sleek steppe
#

I know I can get assigned if I comment but what do I even comment lol

short snow
#

lol

#

also

#

it has even been done for,

from collections.abc import Mapping, Sequence, Callable
#

you could update those too

vale ibex
#

@short snow You're likely going to need to upgrade dev dependencies as part of the python upgrade too

short snow
#

i just gave a bump to dev dependencies, other dependencies are to be updated as they introduce support for python3.9

vale ibex
#

Alright cool, just checking as I saw they were missing from your table on the issue

#

If they're dealt with, then no worries

sleek steppe
#

AttributeError: 'LinePaginator' object has no attribute 'max_lines' that's an interesting error

short snow
#

hmm, it worked for me lemme see the code one minute

vocal prairie
#

I don't know if I should click the link…

sleek steppe
#

ahhhh I see

#

I think it's because we upgraded to 1.7.1

#

wait I don't think so

short snow
#

no, i by mistake removed self.max_lines = max_lines

#

does it work after adding self.max_lines = max_lines, toxic?

sleek steppe
#

yep

short snow
#

cool, you can just add it with your commit

sleek steppe
#

alright

#

Also I get a value error on .aoc join

short snow
#

i didn't test that, what is the error?

#

probably no cookies given or id?

sleek steppe
#
 best_board, _count = min(current_board_counts.items(), key=operator.itemgetter(1))

current_board_count is an empty iterable

#

I can just except the ValueError

short snow
#

yeah, since there no boards given to it