#dev-contrib
1 messages · Page 82 of 1
Okay sure! I'll just open an issue real quick
bump on SO command question
Yeah no no one is going to paginate through a single answer lol
so only link and tags look good
But if you can make a short snippet look good, go for it
Either way, the answers aren't mandatory
Since it seems @surreal venture is going to be working on it, I'll leave it up to his discretion how exactly it will look. You are free to work with Jason if you so desire, or implement your solution from the ground up
i can share how i did it to you, if needed
Thanks, but I think I'll be able to implement it myself. It's pretty easy (using SO's API).
cool!
another way is using the stackoverflow api wrapper
using that we can even get the answers
you can look how it is done and implement it your own, or just use that
Also, is there a specific format for naming new (feature) branches that is followed?
not really, but keep it short and simple
If you'd like, you can also follow the feature/<name> standard, some people do
I guess I'll just name it feature/stackoverflow?
sounds good
i follow this:
fix/<fix_name> and feature/<feature_name>
Also, the README.md is an executable for me
$ l
bot/ CONTRIBUTING.md docker-compose.yml Dockerfile LICENSE Pipfile Pipfile.lock README.md* sir-lancebot-logo.png tox.ini
The fix is just a chmod -x README.md right?
Yesh I think
And we create a new branch using git checkout -b <branch name> right?
links and tags I think
yeah
make sure u are on master before creating one
if i delete my feature branches will my commits go?
the merged branches
They will be lost locally
but anything you have on github can be cloned again
And if the commits are on master, they will remain there
and on github profile?
The PR will still appear on the repo, and the commits will appear on your contributions graph
all the changes will be local only
You can also safely delete the branch on your fork
I'm confused about docker. I understand what it is ( somewhat like a light VM ), but what is Kubernetes now? and how do I get started using docker on Ubuntu 20.04?
Kubernetes is a way to use containers (not just docker) with support for scaling and easy mangment
Basically
it's mostly useful as a deployment/production tool
not really for development
To get started with docker, make sure you install it first from the website, it if it doesn't come bundled
What do I need to install? Docker Desktop?
Uh I'm trying to see if the GUI version supports linux
I know they have one for windows and mac
But I'm only familiar with the CLI for ubuntu
Oh well
Type docker and if nothing shows up
You can follow these instructions to install on most ubuntu systems
https://hub.docker.com/editions/community/docker-ce-server-ubuntu I can see this, what's this then?
The best way to run Docker on Ubuntu
ok thanks!
Do you get any git diff when you change the perms? It's already showing up as -rw-r--r-- for me, but also I'm on windows so take it with a grain of salt
https://github.com/python-discord/sir-lancebot/tree/change-permissions
Can you confirm if this works for you
It looks like the repo has reverted the change in their deployment
The have some CI that failed on my changeset, which was related to latencies
https://github.com/chubin/cheat.sh/runs/1801773209 if you're interested
(I am assuming my 1 line change isn't responsible for this, but something in their CI)
Looks like that
@gritty wind here is the pfp, its actually a wallpaper so it is high res, but i dont think that should cause a problem because it works fine on other bots
Thank you
Does the code work locally for you?
like the code of 8bitify
And i will pr the changes to cht.sh once scaleios’s pr gets merged
Hmm it seems to have worked locally with that
It is possible it got compressed along the way
hmmm
I'm going to try a couple more images
alright
Alright, reproduced with a larger image
But that was actually an issue with the CDN nvm
One thing that does seem to happen is the command can run into 404 if you run it right after updating your pfp
And I'm seeing it in the error log
but why is it having 404?
I'm guessing it's something to do with cache
ooh
We don't have member intents on sir-lance
i did recently update my pfp, but it was 5 hours ago or something
I don't think it'll update until a restart
ooh
Let me think of a solution
https://github.com/python-discord/bot/pull/1396 would very much appreciate more reviews!
I’ll have a look soon, unless someone is quicker
@gritty wind re-requested review for sanity reasons
is this dynamic message?
yes
Yeah
Alright
!remind 1h Review
Your reminder will arrive in 1 hour!
Hi
Hello!
My reviews won’t count in the approve count right?
They unfortunately will not
Okh
If you need help with python, please use our help system through #❓|how-to-get-help
since scaleios has one with me and ks123’s approval
That will also need another review to be merged
But still more reviews == more trust in PR
Yep! We still value your reviews
btw I'm taking over bot#1237
Also the prs of 14 days no author reply, i told yesterday
Not that, on sirlance
can you merge master into 1396
oh okay sorry
np
Shouldn't I do that when I'm about to merge?
Yesh
I was going to give it another test though
Should be easy enough to do locally
yeah
We'll have to update the test servers for your PR to work xith
It includes the how-to-get-help channel in the message right now
Are you using the test server?
The default config in the bot or on notion?
Notion
This is the channel ID: 704348336760815697
It doesn't seem to e in the config file
It does go out of date from time to time
I'll just add it to my own config and then to notion
It does?
oh wait
Not on the testing server apparently, but it did for mine
sorry I thought you were talking about something else
Because its in a different category
Hmm, it seems like the cooldown channel in the (notion) config is using the #704348336760815697 id
I thought you were saying the dynamic message for some reason includes the #❓|how-to-get-help channel
oh no
Right
Cooldown is ignored correctly
I wouldn't mind adding the how-to-get-help to the ignore though
That explains why it worked on the test server lol
This looks good, right? If so, I'll add it to the default config on notion
Yeah, go for it
Can you delete the old one
This happens when I try to claim a help channel. I assume it's because the "Available help channel" embed is by another bot
Is that the way we use to try it out?
You're trying to edit a github webhook
Am I?
I believe it's this one #800698904974721032 message
Which is not a webhook (right?)
It shouldn't be editing that one
The only message that the bot attempts to edit is that one
oh wait no sorry, that was the old implementation
the bot tries to search for a previous message, but it doesn't detect the webhook as a message.
Did you take your bot down?
so if a message isn't found to edit, discord.NotFound is raised
and it sends a dynamic message
mine?
nah vest's
I didn't
Is it erroring out when claiming the channel then?
Yes
The traceback makes me think it's the available channel message
but can you log the message id
should just be log.info(self.dynamic_message.id) on line 499 of help_channels/_cog.py
@obsidian patio
Here's your reminder: Review.
[Jump back to when you created the reminder](#dev-contrib message)
Done
Do you have any idea what service it's referring to? I'm getting this exception when trying to ping the bot
This takes some time to build container
well, yeah but we anticipate the big reveal lol
I want that sweet green merge button
What checks aren't passing?
they're running
Oh merge
not not passing
I thought you were merging directly, hadn't realized you added another commit
The site is up and running. I believe it's also required for things like infractions, but these work
Yeah the site has to be fully up in order to start at all, so this is a bit strange
For sure
@gritty wind if this works it may be worthy of #changelog
Yesh, do you have perms to put an entry?
nope
Definitely changelog worthy
I think it's reserved for admin+
Kind of. Kat sent announcements when she was a lead, but yeah, it's generally just admins+
I have change Dockerfile and make this putting SHA at end of Dockerfile, because currently this breaks caching
oh shit
If something is needed for CI, be sure to put it in ops
connected
and we're live people
Moment of truth
ok
oh no
it has no cooldown
oh god oh fuck
it'll send an error for every message in the server haha
This is spamming
I'll mute the error
What do you mean?
and rollback
it runs on message
and tries to update the hook
and generate another error
every time
Oh no
see it worked on the test server because it tried to edit that message
and then failed
I think if we just try/except notfound and forbidden we should be fine
why did it break here, and not back there?
Huh, I didn't get a single error
Yes I do get a git diff. It's -rwxrwxr-x for me, and when I chmod -x README.md it becomes -rw-rw-r--, and git status shows that it's modified
Yes, it works for me
What do you mean?
It automatically sends a new webhook when none exists on the test server
I think it's reading the original message as the hook
That's very strange
So in this case, doing except (discord.NotFound, discord.Forbidden) should fix it
I don't think simply catching error is proper way to fix such thing
we should instead ensure ahead of time that the message is edit-able by the bot
rather than sent an API call that we know will fail
Is @dusky shore Allowed to run in #bot-commands?
Should be yeah
Why though? Shouldn't it be restricted to #sir-lancebot-playground?
It doesn't really matter what goes in #bot-commands
and the sir-lancebot channel may see changes in the future
but for now anything can go in either channel
No, I don't think so.
@subtle kraken works here
¯_(ツ)_/¯
no error message in my console
code says otherwise
I can see that, but do you have any idea why it can't see the webhook message?
last message id can be id of message that has since been deleted
in test server you open up bot
delete message
then try to fetch it
bot throws not found as last message id was deleted thus is not found
meanwhile
on prod last message is webhook id
So bot finds it and tries to edit it and since we dont even check what kind of message it is
It edits message it didn't send thus errors out
I propose checking if the message fetched is of the bot and only then editing it
And if its not simply sending new message
Can we add an author check
That makes sense. And explains why the bug wasn’t present on the test server
heres discord's persistence for you
I'll restore the branch
goood thing being that
At least we didn't edit out the webhook message
so theres that
So good thing @obsidian patio
my ping command is also broken lol
This will make testing much easier though
also worth noting that theres another error that this code can throw
What error are you referring to?
raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In message_id: Value "None" is not snowflake.```
if channel is new and never had any message
That should be a pretty easy fix, I recon
sure
self.dynamic_message = await self.how_to_get_help.fetch_message(self.how_to_get_help.last_message_id)``` that line fwiw
welp
Probably not useful for internal testing or prod, but for users just starting the bot, it could be a real pain in the
yes
the ping command is 100% balanced
@obsidian patio it's a bug with the url being passed to the ping function
I'll look into it
but basically it passes pythondiscord.local:8000 (replace address with whatever) instead of pythondiscord.local
Aah, I see
Awesome, thanks
-400ms haha
The bot is speeding up
I mean isn't it good?
Our bot predicts your movements
It’s fantastic
The thing is, I think Scaleios got that response before even sending the message. It’s incredible
Can not confirm or deny
should i open a pr for the cht.sh headers fix or someone will do it on master directly?
What headers need to be added?
curl
And since it isn't critical, we can probably PR it first to test it
it can be called critical, since the command won’t work until that
I still don't know what that is? Is curl a header? I know its a terminal utility
is that diff on the bot repo?
Yeah on sirlance
Can you link it please
@short snow do we want to add those headers or delete them?
They aren't in master
They were in the PR at some point, and it was surely working when things got merged
Oh, okay
Can I get a tl;dr?
Because I don't quite understand what's meant with "the repo reverted the change in the deployment"
Cheat sheet fetches from a remote website, Chris added a PR to that to return an API response from aiohttp headers
Basically, a deployment of the bot doesn't change the repository in any way
So we didn't need to fake a user header
that was reverted in the cheat sheet website deploy
And when I say deploy, its the active deployed master branch of that site
What I mean is, is the current code in the "master" branch of the repository as it should be?
Right now, we need the headers in lancebot
sir lance, you there?
Alright, that is not related to a deployment
it is broken
But could be related to someone reverting the changes accidentally while resolving merge conflicts
Well, the source website reverted the changes
It was sending a raw html output this morning
I think I'm a bit lost on what the situation exactly is
I thought we were talking about code that was committed to our repository, but has been reverted to some kind of prior state
But an external dependency has reverted what it reponds?
Well, change in one of our dependencies broke the feature, now we need to change our feature to work with the dependency
yeah pretty much
It now returns an HTML response instead of a well formatted text one
Hence, to be on the safe side, i am asking if it is okay to use curl as user agents
If we need to fix it immediately, I'm okay with it, it doesn't matter too much
But if chtsht can fix the PR, I'd much prefer we do it that way
Can u link it, i could have a look at it
Ah ok, i guess cht.sh doesn’t
even know ot
They don't acknowledge accept types, how rude of them 😛
Do you know if they will reimplement your PR @vale ibex
searching sir-lance for things that need to be fixed 
it found 1.7k usages
Welp
This is going to be a painful migration, I wonder if we should just fix things as they break
What did you search for?
Migration of what?
It's a regex of a bunch of member intent keywords
Features that need to be reworked/fixed to handle the lack of member intents
on_member_join|on_member_remove|on_member_update|on_user_update|get_all_members|chunk|fetch_members|get_member|members|roles|nick|premium_since|avatar|discriminator
This is the search lol
It looks like one of their tests failed while deploying
unrelated to my change
So I assume it will hit prod at some point
Alright, thanks for the update. In the mean time, I think it'd be alright for us to use other headers
I need to get an estimation of the work that needs to be done
Certain things do break because we don't have member intents on
Ah. Did we ever have intents on Lancebot?
I meant after that. But yeah, makes sense
I will pr that tomorrow, heading of to bed rn
Make sure to checl inclide only project files
To reduce swarch redults
yeah
i was looking around lancebot and noticed a few of the commands could be change to handle being invoked from a DM better (some error, so behave weirdly). Should I raise an issue per cog I think has an issue, or one issue for the topic in general
Also, I drafted a docker guide for Sir Lancebot. It's a read worded version of the guide in @stable mountain's guide. https://gist.github.com/ChrisLovering/6c6433a6faf3fbad1689d60ac3dff46a
If it the solutions are going to be pretty similar, and will cover mostly the some topic, I would say go for one issue
!remind 12H review 808077631463489546
Your reminder will arrive in 12 hours!
<class 'str'> 🗣️ 2
<class 'str'> 🎧 1
# type, str(emoji), len
found a bug @gritty wind sorry for the ping
(thanks to vester and vivax)
from dpy server:
The problem with unicode is that some emojis are in fact made up of more than 1
the only solutions which remains is to either use:
using emoji library is better
since the regex would pollute the file
and easier to understand too
re-requested review from ou scaleios since i have made changes
After using emojis library
I'm not able to start sir-lancebot...
socket.gaierror: [Errno -2] Name or service not known
using docker?
No just simple pipenv run start
I did do the .env file
BOT_TOKEN=1234
BOT_GUILD=1234
BOT_ADMIN_ROLE_ID=1234
ROLE_HELPERS=1234
CHANNEL_ANNOUNCEMENTS=1234
CHANNEL_DEVLOG=1234
CHANNEL_COMMUNITY_BOT_COMMANDS=1234
BOT_DEBUG=True
And my redis-server is running
you need to set the host and port for redis
and password, if needed
REDIS_HOST, REDIS_PORT, REDIS_PASSWORD
i assume you’re not running in a kubernetes cluster, so you can’t use the defaults haha
haha yeah, makes development a bit easier
and the BOT_TOKEN is supposed to be the bot ID or the client secret?
Because it's saying discord.errors.LoginFailure: Improper token has been passed. even though I pasted the client secret
there should be a bot token in the discord developer portal
did you click on the bot section?
@gritty bolt Have you mentioend the requested changes? I like to see the command as soon as possibl
Hi sorry, got caught up with things in real life, I am going to re plan my deadlines with the cog. I will let you know
sure! No problem.
Hey, I don't really think either of those solutions are ideal
Do you know which emojis are affected?
🗣️ 🧑🦲 are few of them
i haven't tested for others
(currently on the pr i have pushed using the emojis lib version)
I really don't like the idea of adding a 3rd party dependency
for something that isn't critical, for a single feature
we could implement the thrid party library on our own as a util function
hmm true, but we could add this to ttt also.
I don't think that putting the maintenance burden on us is a good way
🤷 , either use the
- longgg regex
emojislib- implement the lib as a util function
- let those errors stay as they are rare cases
- or rmove custom otkens
Eh people typically think of X and O for tictactoe, I don't know it'll see much use there either
But more importantly
Even if we wanted to support emojis for all the games, we don't have to support everything
I'm fine with only supporting enough things for the games to feel customizable to some extent
wait, idk if this works or but we could change it >2 instead of >1, since every non-server emoji is gonna have more than len 2 as :: is of len 2
Don't revert it yet though
ok
will the SHA be of the commit i did (last) or the one i want it to have (2nd last)
The one you want to have
I'll just check back on the vote in a bit
bump.
ok
ok, no votes till now except yours scaleios
Don’t we already use an emoji library
Doesn’t seem like we do
Either way, I think this is a better solution
the problem is i can't cast a vote rn 😦
anyway mine is using emoji library
can we merge sir-lancebot#580
Is there a good description of the problem the vote is for somewhere?
it is just a fix for headers we discussed yesterday
from here, go below
Tl;dr
If you want people to vote, you need to make sure that you've got a small write-up of the problem nearby so people can easily know what it's about
We want to take emojis as command input but
A tl;dr
and sir-lancebot#560
some aren't easily processable except with a very long regex or an outside library
most emojis work already though
That is a short tl;dr
I don’t see any issue with using a library tbh
We would have to maintain the regex ourselves, and I really don’t want to
I'm in favor of ignoring those emojis, because so far there only seem to be a few that don't work
We have a vote command, but that's restricted to mods+ for some reason
can u make a poll here?
also should we do a samething on ttt, on allowing users to choose their tokens
Yours is fine for now, as people have already case their votes
If you'd like to cast yours, I can have the bot react to the message
I'll just do that
bump.
and even the upgrade channel_override one (pending one review)
@short snow if you can add a code comment explaining why we use those headers, I’d happily merge it 😄
in the code or in the pr?
lol, also isn't it self-explanatory?
The code is pretty explicit about what it does, but not why it does it
ok so i just put that
# We need to pass headers as curl otherwise it would default to aiohttp which would return raw gtml
``` ?
Except for the typo, it looks good
yeah
Might be a tad long, but its fine
Oh, we are one review short look at @gritty wind
nah i lost my review keys
done
Which one?
sir-lancebot#578
sir-lancebot#578
right, redeploy
Ah
it is
works
doesn't
hmm yeah
Is it not showing the online thingy
yesh
and what is it?
Haha
broken permissions after the migration
Somebody nuked the permission 4 or 5 days ago, I think
well atleast you have fixed it now 
merge another pr
murder him!
him?
I think only dev-ops has the power for such a hideous crime
we'll just wait for another merge
Hmm
or c4, the only 2 near
I wonder if we can reload the extension
restart the bot?
Too bad we don’t have any int e
Only a devops can do it afaik
It isn't an extension
so it would require a full reload
i mean I can always rerun actions
I think
Ah yes, we can re-run it
but we'd need to get devops here 
And we will have to do this, since apparently one extension cannot properly reload haha
You could always ping devops, if there’s something you’re referring to
just review and merge another pr 😄
So re-requested the workflow
it is down atm
alright that's another bug that kept it from replying
but no error on message send yet
hmmm, any guesses?
i can work on the int e for lance, commenting
We will use @hardy gorge’s version from Black Knight instead
can we mark that issue as stalled
So no worries, it will be coming at some point
Hmm..
Maybe we should just assign sebastiaan
Since it isn’t really stalled
i will delete my comment
ok lol
@gritty wind
Here's your reminder: review 808077631463489546.
[Jump back to when you created the reminder](#dev-contrib message)
@green oriole you may find this relevant too
context: adding docker to sir-lance docs
msg id, but uh one sec
this lol
Haha I see
Alright, dropped a comment on that for later
Updated it with your feedback @gritty wind https://gist.github.com/ChrisLovering/6c6433a6faf3fbad1689d60ac3dff46a
Lgtm
+1
This shouldn't be merged until sir-lancebot#554 is, since the current .env setup is different for docker
Hmm I don't think there was anyone still against this
let me just uhh
Alright I'll merge that
🎉
would you like to go ahead and add it to the site?
Didn't realise I had access, i'll do that now 🙂
Give me a shout if it gives you any trouble
if anyone still wants to vote you can, or should we just stay on emojis? scaleios
No let's go with emojis
alright
there is a review requested from you (as changes were made) and ak as code owner
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
Sweet, thanks!
sir-lancebot# and sir-lancebot#575 are looking for reviewers, would appreciate if they are done within coming 2-3 days 
sir-lancebot#560
what blame on me
check notes
Ah yes, you opened an issue about migrating @stable mountain int e to @dusky shore, but we should use Black Knight eval
does it even exist
last time I heard of it was, it wasn't even pushed anywhere
thus why I didnt mention anything
if its pushed to @stable mountain then my statement stays true as it will be @stable mountain's eval not Black Knights
Sebastiaan almost completed it
Ha, that’s true
@tawdry vapor @glass pecan (pinging you because git blame told me it was you)
currently in the process of setting up the bot using the docker-compose.
why are the web, snekbox and redis containers mapping ports to localhost? shouldn't those be on a network with the bot, instead of going through the hosts localhost?
If you set the bot through docker, it should use the virtual network with the special hostnames
That said, if for any reason you want to run the bot on the host, you can still use Docker for dependencies because we map the ports
Opening them up to localhost does make it much easier to run locally
yeah what he said
Fwiw they will still be on the virtual network, even we map them the ports
mapping ports to localhost on the host without any need for it is really bad practice
Well, there is a need for it, in some cases
Is it really enough a big deal on the development versions
personally i think it is
How do you propose we open it for locally run bots and docker?
since the docker compose that comes with the repo assumes the bot will be run in docker too, theres no need for doing so.
We do accommodate for running on localhost, not everyone wants to run everything docker
I run the bot through my debugger, but at the same time, I don't want to install 4 DBs on my local system
right, so for running the bot on the host i would have to remove the entire bot service from the docker compose, or alternatively only docker-compose up specific services. at that point, wouldn't it be easier to have a seperate docker-compose for the case of people wanting to run locally?
You can only use up on the services you want, it is pretty standard
i literally mentioned that...
where are the tags stored?
Considering its a setup preference, I think it makes more sense to only have one and have people turn on and off what they want
for @stable mountain
bot/resources/tags
I dunno if you will end up at the right place, I typed the url by heart lul
Hey, it worked
Yup
ok
Although you should first comment on your dicussion to avoid working for nothing
what?
I run the bot locally while everything else is behind docker, apart from starting up the redis container individually for the first time, it had no impact on how I interact with docker through docker desktop. Having a second compose just for not exposing it seems like it'd just be a waste and potentially cause confusion for users
How will you use in_channel or in_channel_check? And which one should I use?
lets agree to disagree, now i just have to be careful not to commit my modified compose
what do u need it for?
I honestly still don't see what's wrong about running docker on localhost for dev environments, unless you have some external constraint
this is an interesting one lol
hey @patent pivot will enjoy this one ^
Limiting command to #sir-lancebot-playground
I mean I have done it by using an if, but how would I use the decorator?
it is limited to it by default
That should mostly be done by default
https://github.com/python-discord/bot/pull/1393#pullrequestreview-580592221 this is the PR for that error
you can setup a smudge/clean filter to hide it from git
i mean im just used to having a LOT of containers running, and at some point i had to do a clean cut and be very careful when exposing ports since i was running into port collisions left right and center. i guess that is a external constraint.
@surreal venture
Or rather not ports, but full addresses
not sure what you mean by that, in docker-compose up?
yesh
Yeah thanks
i guess you could make a seperate docker-compose that overrides the port mappings and inherit from the main one
overrides.yml
services:
web:
ports: null
then
docker-compose -f docker-compose.yml -f overrides.yml up -d
assuming that docker-compose respects yaml null, not sure
is this a good idea? https://github.com/python-discord/meta/discussions/86#discussioncomment-349912
@green oriole
Sorry I ran out of battery, I'll have a look
ok
@green oriole sorry for pinging, but how is it?
Well, I think this would be better suited as an article than a tag
(also don’t worry about pings, I don’t mind)
ok
article?
Yes, like a medium article. We plan to write some and host them our website.
see #799040290459615282 😄
could we also make a tag?
That could be a good idea, we try to keep our tags short, and link to further reading if needed. Take for example:
!env
Python Environments
The main purpose of Python virtual environments is to create an isolated environment for Python projects. This means that each project can have its own dependencies, such as third party packages installed using pip, regardless of what dependencies every other project has.
To see the current environment in use by Python, you can run:
>>> import sys
>>> print(sys.executable)
/usr/bin/python3
To see the environment in use by pip, you can do pip debug (pip3 debug for Linux/macOS). The 3rd line of the output will contain the path in use e.g. sys.executable: /usr/bin/python3.
If Python's sys.executable doesn't match pip's, then they are currently using different environments! This may cause Python to raise a ModuleNotFoundError when you try to use a package you just installed with pip, as it was installed to a different environment.
Why use a virtual environment?
• Resolve dependency issues by allowing the use of different versions of a package for different projects. For example, you could use Package A v2.7 for Project X and Package A v1.3 for Project Y.
• Make your project self-contained and reproducible by capturing all package dependencies in a requirements file. Try running pip freeze to see what you currently have installed!
• Keep your global site-packages/ directory tidy by removing the need to install packages system-wide which you might only need for one project.
Further reading:
• Python Virtual Environments: A Primer
• pyenv: Simple Python Version Management
I don’t think it is a good idea, you can’t have a small tag describing the concept
That is not a short tag haha
This is probably longer than what would be acceptable
This tag is way too big
I chose this because I wrote it and don't like how long it is 😂
lol
yea,
It would be hard to explain concurrency, even in a tag as long as that one
I mean try explaining all of this in 5 sentences lol
https://docs.python.org/3/library/concurrency.html
Do stuff at the same time*.
- not always at the same time
i meant just blocking/non-blocking
@trim cradle oh god I thought you wanted a request from Akarys, that would've been some terrible timing
woah we're talking to each other in two channels now (see #organisation)
@green oriole would a tag on blocking/non-blocking be a good idea?
@slow steppe as per my knowledge, all channels names are small case, so non-case sensitive won't matter
since all results are going to be small cased
I mean why don't we just convert all the channel names to lowercase(in the db or whatever) and the search query to lowercase(in the command itself)?
Also yeah ik my explanation of that was shit, but I'm tired and I think you know what I mean
yeah, ig what you mean.
The first part we already do, all otns are stored in lowercase
You don't have to explain it in full detail, but copying that one sentence description to the github issue will make getting it approved easier
this is what i meant.
Alright I'll go do that now.
It might not be a great description atm, as I'm about to pass out, but once I wake up tmrw I'll make it more clear
No rush, and night night
Mmhm you too
Hmm alright I've had a look at the source code
And we don't actually force lower case letters
maybe I'm just misremembering, maybe it's just been the norm
We replace them with unicode
But not lowercase
Ok the conversion will be a bit more complicated then. If we want to, say, convert everything to lower case, we'd have to first convert the results to normal letters, I.E run the reverse translation
Should still be relatively easy
why is dependabot[bot] disabled for bot,site and sir-lance?
We can use aiohttp.ClientSession() in our code right? Or is there a different way we need to make requests?
I think we may store a session in the bot itself
But aiohttp is the way generally yeah
ok thanks!
Are you working on sir-lance or python?
lance
Alright, there isn't a session for that one then
You can start one up
Or nvm
it's python that doesn't have one
I'm confused lol
lance has bot.http_session
but could I also use a separate session?
I guess you can, but that would be up to the discretion of the reviewer
Does the existing session not work for some reason?
Python should have one too
it definitely has one for the api
Hey this channel is meant for python discord projects
Is there something you'd like to discuss about those?
Yah Sure
from vpython import * canvas(background= color.purple) donut = ring(radius=0.5, thickness=0.25, color=vector(400, 100, 1)) chocolate = ring(radius=0.55, thickness=0.25, color=vector(0.4, 0.2, 0)) rad = 0 while True: rate(10) donut.pos = vector(3*cos(rad), sin(rad), 0) chocolate.pos = vector(3*cos(rad), sin(rad), 0) rad = rad + 0.0
This is the code for a donut program
If you need help with programming check out #❓|how-to-get-help
This channel is for python discord projects such as @stable mountain or @dusky shore
when u run the program you see like this
Ah if you want to share your work, there’s #python-discussion and the off topic channels
Ok Ahh I SEE
Who was MarkKoz again? They disapproved my PR, i edited it and requested another review. Haven't gotten any response yet in 4 days
@tawdry vapor but they have a lot of work haha
right makes sense
Which PR is that?
Mark the powerhouse
empty-json tag
just looked back at it. Did make a tiny grammatical change today but yeah
Mark is responsible for 19% of all commits on @stable mountain
idk how many commits are made but that definitely seems like a lot
1112/5654
many core features were added by mark
so mark is very dedicated to making @stable mountain better?
afaik the entire org lol
i did not even realise that. That's amazing lol
@gritty wind I'll be fixing up the dynamic message soon, I just gotta re-think stuff and things
Right, take your time
and also recover the ptsd that was the core dev spam lmfao
this time 2 approvals may not be enough
really need a better way to turn off some of the bots lol
Hmhm what for?
@mossy wolf you've been reviewed.
alright thanks let me check that out
oh just a tiny spelling mistake lol
thanks for pointing it out
We have a P0 PR here, folks: sir-lancebot#582
If you can review it asap, that’d be great, it should be quite easy to test
Is hiding the ip of where the bot runs important?
sup guys
oh jeez that was a fast review
it's not not important
We would rather not have it public
I assume it's just some datacenter, not much you can do with that
You can get the individual node ip using wa atm
it's not critical, but where there is a way to not have that I like that approach
I think I tried that a while ago, but didn't seem that important to report it
Having easy IP leaks like this kinda defeats the point of having Cloudflare
I'm not familiar with the possible vulnerabilities, but as everything uses tokens anyway, wouldn't the only thing that'd permit be some ddos (which most probably won't affect linode much)?
Yeah, DDoS is the primary one
It wouldn't affect Linode but it would affect us
Site isn't that efficient at handling that many requests
We've had a share of DoS attacks before, and they were dealt with fairly well by Cloudflare before they could cause too much havoc
I assumed they have something in place to block malicious traffic like that as it uses their resources
Most providers don't
if i'm correct when you type in a website like https://python.org/ and it's protected by cloudflare, it first redirects to cloudflare before going to the actual site. If you have the direct IP and type that in, it will bypass cloudflare. If i understand correctly (correct me if i'm wrong)
They don't get enough information because they don't provide SSL termination (I don't think many VPS hosts do) so they can't introspect traffic for malicious stuff
There are some throttles in place on like conns/s, I know that much
no, it goes more like you --> cloudflare --> origin site
so the origin site and you only ever speak through cloudflare
the VPS host i personally use has their own built in DDoS protection, and from someone else i have seen it works quite well. Instead of crashing the service it just slows it down slightly
ah right so cloudflare is a relay and the origin site is inaccessible from the outside?
yeah
so even with a direct IP it's still relayed through cloudflare
yeah
alright
our infra is a little bit more technical, but that's a rough overview
in actuality it goes client --> cloudflare --> load balancer --> pool of nodes
and the pool of nodes is made by docker firing up more instances when needed?
no, the pool of nodes is a cluster of kubernetes nodes
we don't auto-scale, but we can scale in <1 minute manually
Joe the autoscaler
joe secretly is a robot that constantly watches the node demands lol
lul
i turned one of my rickrolls into something cool though with https://welcome.pythondiscord.com/
I mean
now that's a legit thing
It is so obvious
lmao there must be some really crazy stuff going on in your staff channels from time to time from what i hear
and akarys it's WEBSCALE it runs on the cloudflare edge network
yeah i keep rickrolling everyone and then people are like "hahahah i'll never click links from joe again!" but the crumbs always do.
i am the cake
I always trust and don't trust joe with links
I do not click any of your links anymore
that's a lie
lmao that video is absolute gold
@green oriole your PR unfortunately didn't work for me ;-;
Oh no
the music is 11/10
A comment has been left
Whole team of mods it's just 3 lemons
Does it show your ip address if you ask for it? @vocal wolf
yes
no
my ip is 1
So, uh, what would happen if I were to send a bunch of requests to the IP cloudflare communicates with 😅
Not sure how Linode handles the load balancers and how you connect to them
Or cloudflare connects to them
By query do you mean me passing through .wa What's my ip?
The web query that the bot runs, when communicating with cloudflare
Not cloudflare, wolfram
oh you didn't read my comment
I was running my own instance of the bot, with my own api key
I completely forgot we were running this through cloudflare
I uh
just in general it should be blocked?
I got my finger crossed
this just sounds like a whole bunch of miscommunications if you ask me lol
It is haha
It very much did show my IP for me
Hmmm..
@green oriole https://github.com/python-discord/sir-lancebot/pull/582#issuecomment-775860581
Here's the comment
It's just over TCP and forwards on packets, Load Balancers are dumb. There are throttles to how many connections can be opened in a time period, though.
And can you add an ugly print in the code to see what url the bot actually request?
I saw the comment :3
ye
@green oriole http://api.wolframalpha.com/v2/simple?i=what%27s+my+ip&appid=MY_TOKEN_HERE
Wait
holding
We are doing requests at two places in the file
are we?
Three, actually
is it for each of the subcommands
oh I see it now
Yep
thought so
@vocal wolf updated
Cool
And that's for "what's the weather"
apparently I'm in australia now
I think this is enough testing, ye?
That was a fast travel
lol
Yeah, that looks good, thanks!
Sweet
I'm very very very very sure that my location isn't anywhere that anyone can see
Is sir lancebot extremely long to deploy?
Cool, sir lancebot is now in vacation at Sydney
Scal using words in PRs that I don't understand
I haven't heard of "granularity"
.wa short definition of granularity
the quality of being composed of relatively large particles
Really?
Yes

multiple definitions
Let me define granularity
It is when you have many way to define a thing, but with fine control between each definition
You are welcome
Thank you
This is a bad definition haha
Good enough
i did hear someone say the bots are run using docker containers, is this correct?
Yep, all our projects are running in containers
Mhm?
f'https://api.wolframalpha.com/v1/result?i={quote_plus(question)}&appid={wa_key}'
it is a bash aliases on my system
Yeah, what about it?
