#ot2-the-original-pubsta
652 messages · Page 57 of 1
ah, I see
the thing is, despite Hsv being Hsv<T=Srgb,...> by default, that's not the Srgb I'm using
it's a different struct also named Srgb
bruh
Hsv<_,f32> it is then
okay, no problems on this line anymore, now to solve this
how the hell do I turn it into rgb
ah, there we go, fixed the second line by making the first one stop working
IT COMPILES YES
@odd sphinxdefinitely not right with the colors
not sure how I messed up tho
what the hell..
lol
shouldnt hue just be iter/max_iter
oooh, I get the problem now I think
what is it
hue doesn't go from 0 to 1 here, I think
because HSV is like that, and that's how they decided to implement it
what I'm doing here is actually very inefficient, but
it shouldn't matter compared to the calculation of the fractal itself
like, that part is hundreds of complex128 multiplications per pixel.
dang
dang
building...
mmm
please give me a rainbow fractal
lol
poggers!
nice
that's with 32 shades
not at all, it only matters here
let color: f32 = (iter as u8 % shades_max) as f32 / shades_max as f32 * 360f32; // hue in degrees
the thing is, for the grayscale one, using too many shades simply made it way too dark
but here, I might want to remove that functionality entirely
101 shades (as many as there are possible iterations)
I'm not too sure how I want to color it
maybe iter/max_iters*180, so that it the longest to diverge are rotated 180 degrees to the shortest?...
now thats entirely ur wish
playing with the hue span now
don't think I like this hot pink as the background lol
(that's hue of zero at saturation of 0.5, apparently)
bruh how about this
two sliders that adjust the saturation and lightness
at the top right or wherever
then u dont have to keep building
for different colours
I plan to, yes
epic
pub fn calculate_mandelbrot_colored(
x_min: F,
x_max: F,
y_min: F,
y_max: F,
width: u32,
height: u32,
max_iters: u32,
horison: F,
from_angle: f32,
to_angle: f32,
saturation: f32,
) -> Array3<u8> {
is the current signature
hot damn its getting complex
here's saturation of 1, angles from 0 to 300
interesting
u can put the image in ur repo
and then link to it with markdown image syntax
this colour scheme looks familiar
some video thumbnail? idk
Yup; the syntax is , like:

can't remember aaaa
lol
lmao
I can probably even tell the horizon by that image if I try
guess mandelbrot visualizers are all the same
lol
i meant this one
pro
The birdie wants too much attention
On the other hand, kitties are sleepy and -more importantly- silent
awww
:o

not cute
Awwwww
awww
wont the cat attack it?
Well, catto didn't attack the birdie then
But when I got birdie back on my and it was moving, catto's instincts kicked in and started observing
cool
I should copy it somewhere XD I explained it over and over again XD
Soo cute 🥰
Does anyone here have a security key?
Been looking at getting the 5C NFC from yubico
But it doesn't have a way to lock itself with biometrics or pin code
i predict a nodejs question
The node question was in #ot0-fear-of-python
wow
its ok you are cool and epic
np bro
jk
bruh
I predict that my question got ignored 🧯
what q?
to what?
yes
wow
Right here, right before z.... Sent a msg about node js
It's only the third server I've asked that question in w/out resp smh
Does anyone here have a security key?
Been looking at getting the 5C NFC from yubico
But it doesn't have a way to lock itself with biometrics or pin code
nice
5C NFC is good
do that with your phone or laptop
the security key is an additional security factor
I combine a security key + biometric + password
for getting into my device
Ah
SSHing into my servers is the same, except no password, a biometric, security key and 2FA generated from mobile
PyDis stuff is similar
How tf do you set that up
How do you set a security key over ssh
lol
Like so it's used over ssh
joe.
I dont remember
ikr
what the fuck did you do with zeeshanok
zeeshan is a gamer now
security keys are cool we should do more of them 🙂
An experiment that uses hardware security keys (like a YubiKey) to replace CAPTCHAs completely. The idea is rather simple: if a real human is sitting at their keyboard or uses their phone, they can touch their security key’s button or bring it near their phone to demonstrate that they are human.
oh yeah, I saw that
yea ive heard abt this
on reddit
how do they plan on replacing it
This is what invoked me to get one
I haven't gotten it yet still looking
Humanity wastes about 500 years per day on CAPTCHAs.
I mean
that's not really a good metric is it
ah security keys
considering that there are like 7 billion humans
each of them living 24 hours
that's 168 billion years everyday
whoah
168 billion years happen in a day
it's marketing lol
¯_(ツ)_/¯
instead of using captcha solves your security key runs a cryptographic challenge
I want to live 168 billion years in a day
So u have that one lol
right?
Also I herd getting 2 security keys is recommended and setting up both with everything
that's good for backing up
I'll be honest I don't know which one I have lol
Work gave me a few
Damn
They say that and then they make you do a captcha to log in
do you have two?
not for me
They do for me
hey guys could someone help me out with a code?
bro this is cool as hell 
ngl the first time i viewed that i thought it was a joke
i thought the point of captcha (or part of it) was to prove that the user is a human?
how does a security key do this?
lol i did the maths an it equates to about 466 years per day (given their data)
a pretty generous round up there
Well
If people do encounter a captcha every 10 days... and instead of doing the captcha worked for 30 seconds
that's $200 per year minimum wage
and with a key costing only $45
... profit, yeah? lol
well, xeon is a workstation kind of cpu, so it really depends on what you're doing
like, are you looking for gaming, rendering, streaming?
well for gaming, you really don't need that many cores
and rendering is a GPU task more often than not
so, I say that it might not be for you, since you won't take full advantage of all 72 cores that well
hell yeah
apollo flew on mega hertz lvl cpus
just cpus that tick much slower than what normal cpus tick today
you mean the apollo missions mate?
yeah
1960s cpu build lmfao
the people generally lean to amd because of ryzen and how that shit decimated for like six years now
but intel is not bad
apple silicon gonna be new meta
like, pick whatever reaches your standards and is cheaper
just waiting it out to see the actual stats
though, i'll never really buy an apple product
unless it's just there and convinent
i think its actually going to be a true risc chip
well, hackintoshes were a thing for a while, though iirc i don't think the new interals is gonna work like that lol
¯_(ツ)_/¯
thought it was about hardware specs rather than os
specs wise, I dunno
i don't keep up with apple releases
all I know was that intel 11th gen was ass
i mean intel has been in the chip business for a while and apple just kinda started
Apple :/
maybe not, because you forget apple is integrated - so pretty much any benchmark you use is kinda unfair and biased towards apple
they do ofc, but it's simply that Apple benchmarks would always outperform windows benchmarks on the same hardware due to the integrated nature
exactly
so in all scenarios, apple's stuff would constantly be more power efficient, and give less performance AND produce less heat. it's as unbeatable as gravity
they are not specifically designed; windows is able to run at every Intel, AMD architecture. but the price comes in efficience,heat, performance etc. Apple on the other hand optimize software for each of their chips hence performing better
Does mac have an alternative to FeralInteractive's Gamemode
hi, i am using digital ocean to host a discord.py bot
so i used tmux to run it after connecting to the droplit
it was working fine i assume
then i wanted to upload new changes to the files
so i deleted the session from tmux and made a new one
but now it only runs some files from the cogs
and completely ignore the others
no lol
unemployment gang lets goo
Lol
bureaucracy go brrrrr
Joe loves golang huh
joelang 👀
👀
Little did you know, that golang is just a fork of joelang
lol
👀
Lmao
I have no idea
Just use Rust
I'm pretty sure golang is used in webdev and and async shit
Is this modmail?
I think reverse the colors, it may look a bit better
probably will later
if only Rust was good at that... oh wait
i had to learn gimp to do that lmao
Haha
GIMP is wack lol
and fwiw this is actually a custom image here
this is not what the repo normally shows
as you can see
Same here
lmao
for (int i = 1; i <= n; i++) {
result += jump(n - i);
}```
does this give jump(-1) + jump(0) + jump(1) + jump(2) + ... jump(n-1)
because the loops stops at i = n+1?
since jump(x<0) returns 0
would it be equivalent if i do
for (int i = 0; i < n-1; i++){
result += jump(i);
}```
the last iteration will be with i = n and then it'll stop
no
<= n and < n - 1 are not same
< n and <= n - 1 are same
(for ints)
Ok
but when i tried to print for (int i = 0; i < 4; i++), it prints 4 times
yes
which is four numbers
oh yea
true
so if i dont like indexing to start from zero, i want to loop x times i do
for (int i = 1; i <= x; i = i+1)
even tho it's not the norm
cuz its cringe?
if you're looping through an array use a for each loop
yeah
oh ight
for (int x: arr) {
System.out.println(x);
}
🤔
why didnt they just use i
n is probaly the length of the array
n is the no. of times to loop
wait i dont get what yall mean exactly
like here we just want jump(n-1) + jump(n-2) + ... jump(0)
where did u define n
yes
that's what will happen
oh i get it
nice
ye
On Linux, on the file system, you can’t have any of a file name’s bytes be equal to 0 (\0 character) or 47 (/ character). Does Windows have something similar? Does it not allow any of its byte pairs to be equal to 92 (\ character) ?
not really what you were asking but I remember you can't name a file/folder CON
there's also
fuck lol
i just made a pr that's impossible to commit unless
i trigger the workflow with a useless commit
or a force push
smh
The limitation is based on file system, not operating system
"In Win32 namespace: any UTF-16 code unit (case-insensitive) except /\:*"?<>| as well as NUL[7]
In POSIX namespace: any UTF-16 code unit (case-sensitive) except / as well as NUL"
As for ext4:
"All bytes except NUL ('\0') and '/' and the special file names "." and ".." which are not forbidden but are always used for a respective special purpose."
and btrfs:
"All except '/' and NUL ('\0')"
Ok, so it can’t?
It can’t have a 4 byte character where one of the pairs of bytes is equal to one of those illegal values?
Windows filenames are utf16
(as can be seen here)
So you can have the byte as long as it isn't the character
So even if a pair of bytes is part of a 4 byte character, if it’s one of those values, it’s not allowed?
if the 16-byte sequence decodes to any of the above forbidden symbols, then it is not allowed
Ok, but it’s not like ext4 where it’s not allowed even if it’s part of a wider character?
ext4 doesn't do that \🤔
wait... maybe it does
what's the character
I have a hard time understanding how the file name encoding works. On unix.SE
I find contradicting explanations.
File names are stored as characters
To quote another answer:
Several questions about
This says it does
It seems like it’s saying Linux does it, not the file system
So Windows doesn’t have that happen regardless of what file system you’re using?
It's definitely the file system
ext4 says "any byte but / and \0" basically
so any sequence just cannot contain those specific bytes
Alright
Also, in utf-16, does it say the next character is going to be 4 bytes large by setting the first bit of a pair of bytes to 1? Or does it not work like that?
it will have one of the surrogate codepoints, of which there are 2048
So if the first 10 bits of either pair of bytes are within those ranges, it’s a 32 bit character?
of the first pair of bytes afaik
you mean because that’s the first pair that gets read?
hey
guys
i am unable to use DTS X Ultra in my laptop
it's got preinstalled
ith my laptop
Does that mean if you’re looking through the byte pairs of UTF-16 text for a specific 2 byte character, there’s no reason you have to check anything except each individual byte pair?
Because it will only be part of a 4 byte character if it has one of those reserved values as its first 10 bits?
@sturdy relic
@hollow marsh
right.. so lets get one thing out in the open
what does legal mean?
ok\
do you know?
right, so what does illegal mean?
Which means?
its not legal to do it
recursion!
hehehe
it means there is a law in your country that governs if the goverment can punish you
but it cant be about place can it? its youtube tos right?
the government uses prison as a punishment for breaking the law
lets not go there just yet
ok
so when you break a law in the US ( lets be US centric since youtube is located in the US)
mhm
the police can arrest you and the goverment can punish you
this is all normal and easy
so lets involve a private company into the mix
a privat company can not punish you, only the government can
but they can ip ban
but a private company can limit your rights while you are on their service/place/location
so you cant watch youtube :((
yes
so what you do before you access youtube is to make a civil (not government) contract with youtube
this contract tells you what you must do to use their platform
hmm i dont remember
its a private contract you signed and agreed to follow when you started using youtube
if you go to youtube from a random comp (without logging in) it goes straight to youtube?
no
it doesnt?
this is just standard
you sign a contract before use
so here is the kicker
this contract may limit what you can do as a private company they can
never seen this site in my life https://www.youtube.com/static?template=terms
you have, if you have used youtube you have already agreed to it
this is what it looks like if you open youtube in an incognito window
ok.. so a private company can an will make their own rules on what is allowed to do
hmm ok
this does not mean breaking this contract is illegal
but, youtube can sue you and take you to court
a civil court, not a criminal court
now the question of legality
~~We'll get the the criminal side later
~~
breaking a contract might be, depending on where you live or in the us, what state you live in
be illegal
even if its a private contract
then secondly, streaming music
if you stream music without permission, that means you dont have a broadcasting permission, that might be illegal
mgiht be?
if you break copyright for the music you steal from youtube, by downloading it explicitly, that is illegal
yes, because it depends on your local law
so you can be in a case where you have
i dont know, im not a lawyer, this is not legal advice
you buy youtube premium for this
hmm im still not close to an answer
poor:(
im getting there
you might be in a possision erher you break the following
thats beside the point
ok continue
contract breaking
copyright infringement
broadcasting without permission
this are the things the government can punish you for
let me guess all of them are 1000 lines?
i dont remember the exact number, but around 10-15 years in prison i think is the total range
Generally alot more but thats up to you to be aware of
then youtube can civil sue you, and the price for this is rediculus, we are talking 10-50 million dollars easily
ik its not broadcasting without permission or copyright infringement so tell me the first one
Well it is technically
if you copy music from youtube your breaking copyright
yes, your not the owner of it
If you share that audio with anyone other than yourself you're technically broadcasting / redistributing without permission
thats breaking copyright
it does not matter what your intent is
its for myself
so why is it maybe illegal instead of illegal
your intent not to "harm anyone" is not the point here.
breaking copyright is illegal
so basically its illegal?
yes, breaking copyright is always illegal, but there are ways to use copyright material without breaking copyright
thats its own chapter, and not what your asking about
but you said you dont care how i use it
if i watch it offline
/listen
if you want to watch something from youtube offline, you have to by premium
if you copy the content from their site, your breaking the copyright, and that is illeagal
and if you dont buy its always illegal?
and / or you have to directly buy off the rightholder
if you made a video on content that is copyrighted, commenting on it, criticising it, that is fair use and legal
for youtube, yes
fair use is not easy to grasp, people use it wrong all the time
and just watching is illegal..
Fair use is much much more complicated than people think
yes
yes
lets not mix in fair use here
aight
fair use is a way to use copyrighted material without asking for permission, its way beyond the scope of this conversation
is listening to it offline in fair use?
no, fair use is something else, not relevant to this discussion
ok
your focusing on the wrong thing @near falcon
whats that
its not about listing to music offline or online, its about if you own the right to do so or not
so yes or no
and you do not have the right to do so without paying for this right on youtbe
so no
correct, it breaks the contract you have with youtube and as we have discussed, might break the law as well
without paying its illegal? period?
ok so things like pytube and discord bot Rythm
and does the same go for adblocker?
you are asking a loaded question now
so it can exist
let me make a analogy
Pytube is TOS breaking and generally depending on the video / audio can be illegal.
Discord Bots break ToS, and are pretty much always Illegal in terms of copyright
lets say i own a house
why dont YouTube sue them
they do , and have
ok
and they have lost.. more on that later
??
ok.. back to my house
ok
yes
i loced the door and i lost my key
so i go and buy a tool to open the door.
a lockpicking tool
i open the door an everything is well
but its your house you can destroy it all you want?
now, is the lockpicking tool illegal?
but its your house?
its illegal if u use it for other houses?
the tool itself is not, but yes, if i use it to open another house then that is a crime
but since its your house
youtube-dl is a tool
you dont own anything on youtube, so you are not allowed to use it to get something on youtube
what do u use it for then
why do bulgurars break into house using a lockpick?
because they do not care about rules and the law
same with people that does this to youtube
well lockpicks can be used to unlock your house so thats legal thats what lockpicks r for
but what is pytube for?
downloading your own videos?
why cant you just download it on youtube
dont tell me youtube disallows downloading your own video
it does
wait
From their platform yes they dont allow that
theres a button for downloading ur own videos i think
bruh
because you're scraping their services
but then pytube is still ilegal?
you are only allowed to download them using their tools
not the tool
the tool itself is not ilegal
youtubes contract say you cannot use any tools outside what youtube gives you
pretty sure youtube already lets u download ur own videos
it might be illegal yes.
so using pytube is ilegal
mkbhd showed us that u can download ur own videos in a lower resolution
no, why would it be illegal?
the tool is not illegal
what you do with it can be illegal
so watching it is illegal jsut bec its not on the platform?
yes, if you break copyright, then you have done something illegal, but what tool you use does not matter
is that it?
correct
If you shoot someone with a gun do you blame the gun or the person operating the gun
but youtube allows downloading with premium in which case you can watch on computer
which is not their plaform
yes
it is
but how is that legal
your mixing things now
you pay youtube for the rights to download the content temporarily
sorry lol'
so.. lets do only this thing
ok and? you need to delete it after you watch it?
when you pay for youtube preminum, you have access to download video and music to your device using the youtube app (an no other)
and it will be deleted after 30 days
its not mp4?
how does it get deleted
youtube deletes it
App controls it
it is encrypted and you cannot access it without the youtube app
oh so you cant download on device
you download it to your device
sure they can, only the youtube app have access to it
you cant access the music or video that you download
only trough the app
ah
https://www.copyright.gov/title17/title17.pdf Covers every situation really and regards to how it works if you want a more indepth reasoning :P
does the app work offline
yes, offline you get only access to stuff you have downloaded
yes because the app is downloaded on your computer
cant you break it then? lmao
you can, but thats considerably harder than people think
people have tried, but you only have 30 days to break it, so its probably to hard to care
"only 30days"
so what you need a year
you can connect to the internet and download it again
The encryption changes every 30 days lol
wow
so if u change the system time to like 10 days back how does it know
does not work like that
that you still have only 30
because it doesn't use your system time
It uses the time wrapped in the cipher
you need to be online when you download it
yes but for 30 days its offline how does it know its 30 days without using the system time?
if you fully turn off the computer
does it freeze?
i dont understand
well if you fully turn off your computer
the time must be saved somewhere then
you cant use it
its very hard to easily explain time ciphers
its saved in the file
your motherboard has a battery to maintain the time
and the file? its encrypted?
yes...
yes
you cant decrypt it?
nope
sure you can
??
well
yeah.. 30 days.. but y ou need like 100 years of computer time
so its 30 days to essentially disassemble the app and work out how it works before it changes again :P
so if u decrypt once and make it change the time then you have it forever offline?
no
how then
didnt ppl try with multiple devices?
so its 30 days to essentially disassemble the app and work out how it works before it changes again :P
Once you know how the encryption works you have to decrypt it and create a copy without copying the metadata that can let the app track for copies
so if you buy 300_000 RTX 3090, you can brute force it. but then you have spend a gazzilion dollars for breaking one 3 minute long song you can buy online for 3 USD
im a bit facetious with my numbers here..
hm
If the system was simple, people would already be doing it 
but then if you break it does that mean you can use it offline for more than 30 days?
y/n
yes if you handle it well enough
sure, but then you have broken the encryption, that is not legal
but I dont think anyone really has the skill to do that in 30 days
beside the point
wait but after 30 days pass and your still ofline
well.. yes, but the point is mute
your asking about encryption breaking, thats far beyond the orignal question about contract breaking and legal issues
and
you can brute force break any encryption given enough time
youtube and google tends to use cyphers that has a time-frame of something like a billion years
anyways im too poor for premium anyways
tell me if pytube is ilegal or not
and about adblockers
what if u use like 100 computers
i have answered this many times already
so its ilegal?
lol
its illegal to break copyright, and just by using it you are also breaking youtubes ToS
why was it made if its illegal just to use it
tho breaking tos is not illegal
"i made it so noone can use it"
you just revoke your right to use the service
thats why i have split it into two sub sentences
ask the creator
yeah 👍
people do bad things every day
uh ok
but here on python discord we do not
so is adblocker the same?

a site's ToS could forbid adblockers
i dont know the youtubes ToS well enought to answer. if they say your not allowed to block adds then using it would break the ToS
you prob cant bec premium does it
but then again theres an ad blocker literally for youtube that millions r using
yes, SO is more liberal then us
same with Reddit
then again "adblocker" is a rather broad definition
so theyre all ilegal?
yes, million of users break contracts every day
i bet more...
your again mixing what legal and illegal means
ok sorry
yeah, breaking ToS is a pretty common thing to do, even by accident sometimes. We just don't allow such discussion, it doesn't mean you somehow are obligated to uphold ToS out of some moral obligation.
breaking a contract is not illegal
so its not illegal but they can ban u from site?
legal or not has to do if the government can put you in jail
ignoring the consequences of said broken contract is in some territories
yes, they can suspend your account
so basically downloading videos is completly legal
it depends
it depends
look at the second sentence i said
explain
ahh.. yes..
no one has been sued for using ytdl yet, so we don't know if its legal pretty much
i have been.. for the last hour
if you download something you dont own the rights to, your breaking copyright
so your saying if the government in your country
that's for the courts to decide
yes
im still confused lol
but thats not the case in the countries i know
what are you confused about?
if u download music will u be ip banned?
probably not
youtube doesn't really enforce its tos
but its at a scale where youtube doesnt care
unless in really extreme cases
ban you
however if you make a service and make money from it they're probably gonna sue you
whats that
should the police arrest everyone that breaks a minor thing? that would not work
its the same online
no but ban from site
if I ran a bot that would try to download all youtube videos, I would get banned
but you as the user should take care to follow the rules
you wouldnt do it... theres too many
some unlisted
if someone tried to download a single video, nothing would happen
if your downloading idk 3 vids a day
will they ban you
sure
@sturdy relic 2 qs
1 if your a content creator who doesnt have premium, and you lost the footage of your old videos, you cant download your old videos from youtube without breaking tos?
2 if for example someone posted music in youtube, and they have a link in the description where you can download it (for free or for money) is that legal?
- If they have the rights to sell/give away that music, then yes I guess
not sure what one needs to realistically do to actually get banned from youtube for things like that
I suspect that the reason their TOS prohibits downloading videos is so they can't be held accountable for redistributing, say, copyrighted content
Welp... I think I might have to learn HTML/CSS/JS
Why am I really not looking forward to this
😳
Oh God
Lmao
That's all pretty simple
:faint:
Why do you need to learn css js and html?
idk where to learn any of this
What are you making?
cause I want to make a website lol
idk. I wanted a project
and I want to put some rocket.rs to use
so... website
Ah
It's pretty simple, trust me
:T
Okay... so where do I learn any of this
Like TypeScript > Flow
And Yarn > npm
And you can use whatever framework you want if you even want one
Framework I want to use https://rocket.rs/, assuming that's what you mean
I'm referring to frontend framework
Right... no clue
But if you want to go all vanilla, you can
yeah thats basically them
Angular is known to have a steep learning curve
I assume I should learn the basics first, though... right?
Both React and Vue have huge communities, and both are good
Ye
If this is your first app, you should go vanilla imo
I want to learn React/Vue before I move on to Yew
I've gotta be a Rust purist eventually
What's Yew?
Oh nice
lol
oh wow wasam
So if you're doing React/Vue, the Vue docs are great, and there are a lot of good React tutorials
You can choose whichever you want
So... what should I learn first
It's up to you really
I assume HTML/CSS then JS/TS?
Yeah, probably
tbh ive never properly learned html/css
You could make a simple frontend with HTML/CSS
ive just googled the stuff that i didnt know as i went
HTML and CSS I imagine take like... hours to "learn" but a while to actually get looking good
You don't need to actually learn them very well
Google is how to learn those
hmm
Just use the MDN docs as a reference
CSS feels like you need to use it in proper projects for you to get good at it
Then you could go make a frontend right now
not that I want to
like...
I've done some stuff before
it's ugly haha
oh and working out different resolutions and stuff... I forgot the name for it
Responsive?
lol it is
It's still a thing
I think I have something related to Bootstrap from GitHub Education
do you guys trust in iq tests
they measure a thing, how useful that thing is is debatable
I don't think they're very accurate but I do think iq correlates with intelligence levels
they measure a specific kind of intelligence
generally pattern recongnition
and while it is noticable when someone is good at pattern recognition, it isn't exactly a useful skill
for some things like chess it is quite useful
yeah, IG it would help with chess
It could also increase you ability of learning and mastering new skills
though my friend scored really high on IQ tests and isn't all that great at chess
though that is mostly lack of practice
I don't think it has much to do with learning
it makes it easier to learn things by relating them to existing knowledge, but that is sometimes not a good learning strategy
yeah, but it is more of a neat quirk than something that heavily impact your life
.topic
Selling poeple
is there an easier way to write this? 😦
if c1 < 1 or c2 < 1 or c3 < 1 or c4 < 1 or c5 < 1 or c6 < 1 or c7 < 1 or c8 < 1 or c9 < 1 or c10 < 1 or c11 < 1 or c12 < 1 or c13 < 1 or c14 < 1 or c15 < 1 or c16 < 1 or c17 < 1 or c18 < 1 or c19 < 1 or c20 < 1 or c21 < 1 or c22 < 1 or c23 < 1 or c24 < 1 or c25 < 1 or c26 < 1 or c27 < 1 or c28 < 1 or c29 < 1 or c30 < 1 or c31 < 1 or c32 < 1 or c33 < 1 or c34 < 1 or c35 < 1 or c36 < 1 or c37 < 1 or c38 < 1 or c39 < 1 or c40 < 1 or c41 < 1 or c42 < 1 or c43 < 1 or c44 < 1 or c45 < 1 or c46 < 1
i would generalize the solution
ie have them in a list and do a loop compare
or if u like functional u can do a fold
man python sucks you can't code dynamic variable names
where you store the name of the variable in another variable
you can actually
globals() and locals() amirite
Easy with eval or exec, but in case that feels like cheating, globals, locals, or even __dict__
Though IIRC you can't modify locals, since it freezes the state into a dict
You can modify that dict, but the locals themselves would stay unaffected
you more or less can't create new locals after a function is defined
Yeah, you could in 2 apparently, but when exec became a regular function, this stopped being a thing
there is a capi function to refresh locals
but it can't create new ones with it afaik
s e c u r i t y
Only just
Bit late but
if any(c < 1 for c in [c1, c2, c3, ...]):
Lol
Hello joe
Github workflows and actions are fun
Although how does #dev-log turn this into one message
So that only runs once for all successful checks?
@wide totem what database does your modmail clone use
What modmail clone? 😳
It's not a clone of any bot
It's inspired by kyb3r's modmail bot, but not a clone at all
lul
Was going to use mongodb
But haven't made any commits on that yet
Probably going to use mongodb tbh
'MongoDB is web scale'. A humorous conversation between a NoSQL fanboy and a more cautious, conventional database developer.
Why, what are your thoughts
postgres always wins
The largest appeal for me is mongodb atlas lmao
data? postgres. cronjobs? postgres can do it. locks? postgres can do it. timeseries? (with help) postgres can do it
if I could find free postgre hosting I would do it lmao
welp cockroachdb which is a sql db has a free tier like mongo atlas
heroku
Looked at both of those
i used it in a hackathon once and i think its basically using postgress drivers
aws prob has a psql intance low priced/free, can't remember
if u use orm i doubt u can tell a big difference
heroku postgre
cockroachdb
One of them limits you to 10k rows and the other to 20mb
whispers: scylla
Mongodb atlas limits to 500mb with no collection or document limit
And of the mongodb code I wrote already
scylla is good for when you need scylla lol
I am abstracting the db away from the bot so every db interaction will be through db client methods
like mongodb has a document limit size of 16mb. u usually dont hit that limit unless ur storing an image
Ye
which is everytime 
My point is heroku postgre limits to 20mb total for the entire cluster
And cockroachdb limits to 10k rows total
Whereas mongodb atlas limits to 500mb as the only limitation
If someone can find free hosting that's as easy as mongodb atlas I might switch lmao
i doubt ur gonna hit 10k rows with a toy application. but if ur wanting to be serious u might as well invest in a paid service
like a small application that ur not gonna have much users
@grim seal out of curiosity can you check how large the database is for just this modmail
and u just made just for learning purposes or just for fun
:(
keys in other room
Ah
lol
i think it's a few thousand conversastions or smth
yubikeys?
Because depending on the mb size

they be nice af
like i would just stick with a free tier and once u hit that need for scalability start looking into options
just selfhost
like i think at the moment ur application doesnt have too much issues with a free tier
557MB
but like once u start getting significant amount of entries than maybe looking for alternate options would be a good idea
@lime drum @viral hare so basically modmail isn't made to be hosted by one person. The actual thing of modmail is for other people to host it for their own server. To make it easily adoptable, the set up process has to be easy. That means trying to make sure the bot can be run completely free.
that's 557MB live on disk, backup significantly smaller
Every person has to run modmail for themselves.
so ur saying every person tht uses modmail is gonna share the same database
that doesnt seem too right
no no
then id say pack sqlite by default and allow ppl to config other databases
The kyb3r modmail which inspired my project has a setup guide that can run on heroku.
the ponit is that anyone can set it up cost free
That exists
^ and cloudbased


