#ot1-perplexing-regexing
1 messages · Page 71 of 1
im not really the one for feedback but it looks cool
like a sandbox
A sandbox? Now this is something I never thought about.
Hehe
Look how the game should look. Now go back to YouTube and watch it less HD.
This recordings are nowhere close to reality.
its looks more clearly on youtube
This is what happens when your sprites, in your "pixel art" game are 128 pixels size
then here
yes
also for small pixel art stuff, you need to make bigger using nearest neighbour algorithm
true
like my pfp, its 32x32 pixels ingame
but i made it 1024x2014 pixels with nearest neighbour
not sure how to with videos though
I usually just take the sprite and stretch it double size every time until I get the size I want
For smaller ones
But working with large ones is a nightmare
I mean, my game is forced build on 1920x1080 resolution, laptop resolution 1544 or whatever, doesnt' work for my game
i always make sure my guis work at 720p
That I should also do
My game works only for 1080
I'm glad you at least understand the problem
gui dev is hell
thats why i didnt want to do game dev
just stick with backendy stuff

This video thing is so weird, why can't we just capture reality like it looks for our eyes?
What do you think, should I take money from Chevrolet or Humble Bundle to finish my game, after I finish and show them the demo?

no dont take money
you dont need to in order to make a good game, you just need time and dedication
especially a 2d game like that
its 2023
It's a huge responsibility to finish a complex game like Zelda in a year or two.
Yes.
and them giving you the money will make then except you to do so
youd have pressure on you
Since Steam doesn't bring sells on its own, why even use it?
I need marketing and a community and much more anyway. So why give 30% to Steam?
exactly
you can use itch.io at first
just from that image it looks like that jetpack runner game
this is very very cool, man. i like this screen shot and the video
😆
yeah but it looks like the jetpack runner game
I'm extremely glad you generally like it. This means a lot for me, gives me power to finish it.
It does? Hmm, that's good then if my graphics gives you impressions of Subway Surfers
That level design is inspired by a pixel art game made by other studio, btw
It gives you vibes like Jetpack Joyride? Wow...
at least in this screenshot, yes
this is different from that SS though.
oracle C#
Hey! I need a PC that can run premiere pro (https://helpx.adobe.com/uk/premiere-pro/system-requirements.html) under £500. any recommendations?
the minimum requirements are easy to meet with a used computer, which is probably what you should aim for with that budget. at this price range though, you won't find anything that runs premiere pro well
video editing benefits from lots of ram and a gpu
guys, should a password manager encrypt the email ids as well?
cuz i think encrypting email ids that are mostly available in public doesn't make much sense to me
a password manager should encrypt everything, i'd say
even just knowing that someone has an account for a site is private information
and what about the name of the sites in the manager?
should i encrypt them too?
,g define everything
of course, that's what I just said
how would u encrypt the db then?
im curious
do u do something like, convert it into some string format and encrypt it and store it in a binary format?
i have no idea what's a good way of doing that. maybe just full-db encryption would do, with a key derived via argon2 from the master password.
(you could always look at how keepass does it and steal their solution)
but i also wanted to decrypt the password when i needed
and argon2 doesn't seem like to decrypt stuff
nah, you only use a good hash function like argon2 to transform the master password
the one that you use to unlock the password manager.
the password inside indeed have to be encrypted rather than hashed, since you need to get them out.
New use for old cd / DVD drive bed frame support since I broke mine
i thought of just using some aes with some key
idk how its gonna make it more secure tho
Huh, this is actually a fairly interesting problem. Do you decrypt all the websites and usernames at once, thus allowing searching for them, but allowing a malicious process to extract the list from RAM.
so, its like a "choose your poison" situation
ic
what would u do here then?
decrypt all websites and usernames, a password manager which can't search among those is useless. But the passwords should of course be decrypted on demand
yeah, keepass does this I think
though protecting data in memory is also a thing, even if it only makes it harder
put everything into closure-backed tries, that will surely solve all problems
realistically speaking, all the time your password manager is using your password, it's vulnerable to memory reading. you can make it less trivial but can't prevent it.
what does that mean?
I was mostly joking
so, i should store username and websites in plain text?
no, they should be encrypted, but then decrypted once you start the manager
personally, i just make my passwords follow a fixed format
that way it's easy to remember, and less vulnerable to cross-password attacks

yup, just use the site name and your username separated by _. that way they never repeat and are easy to remember! truly genius
yes
W
i mean, you can't possibly write a script to find these passwords and all their formats right?
unless you're targeting one user specifically
def get_super_duper_secret_password(site, username):
return f'{site}_{username}'
following a fixed format reduces the randomness 
2/10. expected present working directory
not getting the pwd from a function named get_pwd is a bit strange
well it's better than using the same password for all sites
i was storing passwords under the name pwd
maybe that adds a little bit of madness to safeguard my passwords? maybe?
…
lol
what i meant is, under the key pwd
another problem that im facing is, i need this to work in mobile too
im using termux to run my app
but im still not sure that it can run a mongodb instance
what does that have to do with my question?
does it require giant graphics card or anything bigger to run mongodb?
but still, its powerful to a decent level
it can run a mongodb instance
the question is can your phone handle a mongodb instance
maybe? idk
i still can't find a proper installation guide for android
do u wanna use Docker or
bc if no docker, this article tells you:
pkg i tur-repo -y
pkg i mongodb -y
mongod
whats with the docker?
what pros does it have?
runs your mongo on a container. basically sandboxed, ig
thats it?
i'll just do this and report back
ok, it installed, and i do have exactly what they've shown in that tutorial
currently having a cli as interface
@rancid haven Not sure if you wanted me to put the answer in here or if you were saying the answer can be found here. I don't know the answer as to why there are so many threads being created in first place.
You're debugging your own C++ program?
?
another gravity simulation, this time, systems start spinning because bodies can collide and merge
but there are few stray bodies here and there that zoom out mplt
i could resize it
colorama library can help you
!pip rich
import rich
rich.print("[green]hello world[/green]")
I just realized
If i can bench 150 lbs for 2 reps
I can do 300 for 1 rep
I dont think i need a spotter for this
Clips seem good too
benching 300 without a spotter seems like a terrible idea
Is what they all say

yeah you can cook something on twice the heat for half the time
Exactly
Yeah i shoulda gotten a spotter
💀
Safety bars substitute tho
BRUH
Why don't people just cook something 10500F for 1 minute instead of 350F for 30 minutes? Are they stupid?
the real big brain take
advocating for the "hotter than the surface of the sun" temperature option
i mean one minute near the surface of the sun would probably cook your mom's thanksgiving turkey pretty well
true
Actually it probably doesn't even have to be too close to the sun
what if we make one giant stove around the sun
Are we re discovering solar thermal energy
the surface of the sun is only a measly 5778 K
Step 1: Cover the sun in solar panels
Step 2: ???
Step 3: Profit
that'll take too long to cook
surely 3 minutes is better than 30 right
just have your mom sit on it
rich.print(f"[green]{my_variable}[/green]")
@dry raft
@placid reef
@warped sentinel
@timid latch
@median trench
@tranquil harbor
@hidden chasm
@flint furnace
@warm rover
!mute 1084390848587907165 1H
:incoming_envelope: :ok_hand: applied timeout to @peak jungle until <t:1697950852:f> (1 hour).
!ban 1084390848587907165 self-bot
:incoming_envelope: :ok_hand: applied ban to @peak jungle permanently.
cleanup on aisle 1 😬
What about the message with the URL?
It might be malicious
Deleted. I'll leave the pings so that people aren't left wondering who pinged them.
guys, it seems like sqlite doesn't supports creation of users and authentication to prevent public users to access the daatabase
is there any good database manager that i can use for a password manager, or does sqlite does allow me to add password for the whole db?
Bro called the opps on himself
https://www.zetetic.net/sqlcipher/ seems like it would work for sqlite specifically
SQLCipher is an Open Source SQLite extension that provides transparent 256-bit AES full database encryption.
isnt that for c?
https://pypi.org/project/pysqlcipher3/ quick google search showed this
there's also https://github.com/coleifer/sqlcipher3
@lament cairn so, in this case, do i still need to encrypt each and every value in every field (i.e, passwords) in an encrypted db?
I'm not sure
I think it works like a normal sqlite file
but it's stored as encrypted
@foggy jungle
@gritty zinc (sry for the ping tho) ?
they are afaik making a password manager, so no hashing passwords
all passwords must be hashed and encrypted
Ah.
so, should i have to do an another encryption to the passwords?
but still, i think only the paid tier allows users to customize the key for encryption in sqlcipher
maybe i should move on to smth like mysql or smth
Different implementations exist for different threat models; but 'double encryption' is almost always not a good idea.
mysql is one heavy fella
i was using sqlite, but it doesn't have a authentication, users and stuff
I think the implementation you'd be pursuing largely depends on the semantics of what you're building.
i tried mongodb, but data searching is difficult in that case
but the storage was be little bit smaller, as i stored everything as json
there are extensions, like that sqlcipher thing
what does semantics mean herre?
@brittle void check out how they implement the password storage and getsome inspiration
KeePass is a free open source password manager. Passwords can be stored in an encrypted database, which can be unlocked with one master key.
Consider the following: A local password storage manager that does not connect to the internet.
By virtue of that, at some point, the key must exist on your computer in order to decrypt that information; and thereby, degrades the security of the application itself.
Typically we step around this with things like TPM and base windows API's whereby we can, with some confidence, defer the semantics of that to the root of trust established within Windows (and potentially your TPM itself).
nicely summed up ^
There's a lot of stuff that goes into whether or not "just encrypting it" is a sufficient protective measure.
tpm? u mean like yubikey?
cant i just have a master password as private key, so that the actual key is the encrypted/hashed version of my master password?
TPM is a Trusted Platform Module; it's basically a small processor/module/etc., designed explicitly to handle things in a crytographically secure manner.
My brain hurts thinking about the nuance of trying to handle cryptographic data without utilizing the API's meant to do such things.
so, there's an easy way for me to do this?
Probably not in pure Python.
usually, we don't ever rely on python to hide anything. we hide secret stuff either in environ variables or a database
and anything python should remain as stateless as possible
i'll have a db separately to store the hashed master password for the password manager and the random bytes (salt)
(because it is not meant to be such)
yep, just searched about that
so still looking for alternatives
im thinking of using mysql
sqlite is just a replacement for those .json files you would have created
to store data
i feel like you didn't really internalized what sentient said, yet
i still don't get all the buzz words he used
lmao, they're not buzz words. they're important concepts to discover and learn whenever it comes to security
especially in this context
setting your program free in the wild, without any control on the machine where the secret stuff well be kept and protected
that's what they meant with: A local password storage manager that does not connect to the internet.
By virtue of that, at some point, the key must exist on your computer in order to decrypt that information; and thereby, degrades the security of the application itself.
ehh, it's a nontrivial question. I'd say yes because you might want to not rely on the full-database encryption being implemented well or have desirable properties. E.g. you might want to only decrypt those parts of the database you need at this very moment.
and then, they explained the industry standard workaround to that
the TPM and the system APIs
i only understood upto this
and i don't get about the tpm
what should/can i do with tha module tho?
well, tbh, i never had to deal with anything beyond the browser in the context of relying on my own server
a nice thing to research: How programs protect private and sensitive data when they're run offline on the end user's machine
what about linux tho 
Same shit, different names.
knowing Microsoft, on Windows it must be tons and tons of hoops you need to go through that can easily be defeated by some gramps downloading an attachment thinking it came from their grandchildren
meanwhile I looked at keepass source code and
what is this for
hello
world
``` lookin' code.
that's KeePass/KeePassLib/Cryptography/PopularPasswords.cs, so not critical or anything
they like their spaces
wait how many spaces is that fort tabuation
9?
can you walk me through the code? i don't understand what it's doing
i think that's a single Tab and github just inflates it hard
I'm honestly not sure how I'd implement this. FDE's basis of encryption used to be derived from the password you set. That was considered secure. (Though it... wasn't.)
We've moved that into the TPM as well in recent years.
oh, I was just making fun of the indentation.
i still have no idea what to follow, and what not to
oh lol, yeah the indentation is too much, for sure
here's a fun one. they have values that are protected in memory: https://github.com/ralish/KeePass/blob/mirror/KeePassLib/Security/ProtectedBinary.cs#L50-L54
start there, man
KeePassLib/Security/ProtectedBinary.cs lines 50 to 54
/// <summary>
/// A protected binary, i.e. a byte array that is encrypted in memory.
/// A <c>ProtectedBinary</c> object is immutable and thread-safe.
/// </summary>
public sealed class ProtectedBinary : IEquatable<ProtectedBinary>```
i don't understand, lol, where else would it be encrypted? or do they mean that it's kept encrypted in memory? in which case, why, lol?
do they not trust OS?
i kind of expected them to have their own implementation of it but apparently they just call windows apis.
yeah, i can't read that
thats too much to learn for a simple, small password manager
in which case, why, lol?
If a malicious process reads your process's memory (or the OS dumps the process's memory to disk for some reason, e.g. as a memory dump on a crash or due to hybernation, and an attacker reads it) - they still have to decrypt the values, rather than instantly getting access to all your passwords.
idk about that, it's a valuable acquired knowledge imo, but you decide at the end
i'll learn them later
but i dont want to get overwhelmed all of a sudden to use all those apis
hmm, true, i understand. i tend to take what the browser does behind the scenes for granted.
you being the sole responsible for all of your processes is a whole other game
that i can understand. well bookmark them either somewhere in your mind or somewhere in the toolbar
i still see so many paswword manager tutorials use pbkdf/aes from pycryptodome to encrypt passwords, then use add user authentiction to keep the db secure
nobody encrypt the whole db
they don't even encrypt anything other than passwords
honestly, i don't bother with tutorials anymore
they either implement a project half assedly, or stick to showing irrelevant examples
tru tru
i can't tell you the frustration i felt with goddamn asyncio.sleep "tutorials"
Rem with the rare win.
lol
slow clap
guess i have to just add a user authentication to the db, and encrypt everything in the db?
i'll just stick to that
I mean all of this conversation is to kind of say "It depends on your threat model."
imho, see this project for what it is. your means to acquire skills and knowledge
cuz once this project is done, im never gonna touch this
this ain't your 1 million dollar idea, it's more important than that
Basically, you can go as far in depth as you want. 
it's a step towards that 1 million dollar idea
i don't have any threat basically
just a fun little project
but just learning to do in the professional way
what do you see yourself coding in a couple of years, in the grand scheme of things?
idk, games maybe?
well, you'll surely rely on some windows api or another
so you can see this as an entrypoint to that world
i think that by now, you got the idea of importing a module, using its objects, then moving on
Threat model is how we refer to... the measures we take to protect something, not necessarily your individual threat.
A base threat model would be... "I don't want people to be able to ctrl+f password on my computer and obtain my credentials" and that would be remedied by... not using the word password and just writing them all in a notepad file called 'secrets.txt' or something.
That's obviously a really dumbed down example, but that's kinda' how threat modeling works.
moreover* {hashing and salting and peppering and pampering and whatever} is a straightforward process
so maybe this is your calling to venture a bit outside of your comfort zone into the realm of OS api fuckery
in my experience, i learn more with unit tests than with "implementing" a thing. because sooner or later, while implementing*, i will end up reading and understanding some code example on SO or in the documentation -> this is a way to learn, for sure
but coming up with your own stuff during unit testing is something that will also teach you stuff, that you never thought you'd need. e.g the standard library of python
itertools, os, pathlib, etc
what if my threat model is "mossad"
creating the mother of all generators and bombarding your database the fuck up with read/write queries
while timing some other thing
that's what i enjoy doing the most, tbh
in the document I linked before, they cover secure password storage from APT's
🥹
Grammar enthusiasts reaction to that
well, there seems to be a glimmer of hope in that emoji's eyes, so i wouldn't worry about them
in any case, i fixed it

hashing, salting, peppering, pampering and whatever 
yup whatever steps there are in the set that is: securing a password
i can add hinting, if you want
Despite being 25 years old, this computer still can run a current OS and perform some network server functionality. Practical? No. Possible? Yes!
eMachines etower 266
Cyrix MII 266 (PR) 66MHz FSB x 3
384 (364?) MB RAM
64GB SATA SSD
why
and also i think thats what cave johnson said as well 
...science should be about why not to and not why
smth like that
better than having it become e-waste
i think it's impressive that it works, though all that hardware can probably be replaced with a raspberry pi zero w and use far less space and power...
soft creatures
The shadowy elite people dont want me to bleach or iron this delicate piece of fabric
Ill show those bastards
Guys how to add color back to a shirt???
Fastest way????
Ctrl + Z
buy a paint of can, paint it.
a paint of can? 🤔
yes.
anything that will stain
bats :D
cat
car
dog
It's definitely a car
does this hurt the car?
That car thinks it can defeat humans
@dreamy silo
just adding areas (probabilities) gives the wrong answer if there is any overlap
as an extreme case, flip a coin, what's the probability that the result is heads or that the result is heads?
the probability for either is 1/2, but you can't just add them
the outcomes completely overlap
Let me give an example too
So basically, let's say you've got two events, A and B, which may or may not happen at the same time
That means we've got 4 different potential outcomes, either just A happens, just B happens, both A and B happen, or neither of them happen
When we wanna figure out the odds of A or B happening, that's basically the odds of those 3 outcomes that aren't neither of them happening -
P(A or B) = P(just A) + P(just B) + P(A and B)
P(A) is the probability of A happening, including both when B happens, and when B doesn't happens - or in other words, P(A) = P(just A) + P(A and B) (and vice versa for P(B)
So in turn, if we do P(A) + P(B), we end up with P(just A) + P(A and B) + P(just B) + P(A and B)... notice how we've now counted P(A and B) twice? If we wanna turn this into the equation that I set that P(A or B) is meant to be... we have to subtract P(A and B)
i.e. this case
@dreamy silo
#let "a" and "b" be a lists
a=[1,2,3]
b=[2,3,4]
print(a+b)
# you can see 2,3 repeated in output
!e
#let "a" and "b" be a lists
a=[1,2,3]
b=[2,3,4]
print(a+b)
# you can see 2,3 repeated in output
@ruby fox :white_check_mark: Your 3.12 eval job has completed with return code 0.
[1, 2, 3, 2, 3, 4]
2 and 3 are common to both lists, so it's repeated two times
This can be extended to probabilities too
missed opportunity for Counter
I wanted use the most basic one as possible
I mean more that Counter addition is this naive addition that overcounts
🤔 I don't know about it, whats that?
Or you wanted to show the count of elements in the resultant list?
or if you want something written down in a little more of a mathematical way:
There are 4 different possible outcomes, 3 of which count as A or B happening:P(A | B) = P(A & ¬B) + P(¬A & B) + P(A & B)P(A) and P(B) both can be separated out into a sum of two different outcomes:P(A) = P(A & B) + P(A & ¬B) P(B) + P(A & B) + P(¬A & B)So if we add these together:P(A) + P(B) = P(A & B) + P(A & ¬B) + P(A & B) + P(¬A & B)This is nearly the equation we want, we just need to subtract one of those P(A & B)s:```
P(A) + P(B) - P(A & B) = P(A & B) + P(A & ¬B) + P(¬A & B) = P(A | B)
!e
from collections import Counter
a = Counter([1,2,3,4])
b = Counter([3,4,5])
print(f'{a|b = }')
print(f'{a+b = }')
print(f'{(a + b) - (a & b) = }')
print(a | b == (a + b) - (a & b))
@solemn tulip :white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | a|b = Counter({1: 1, 2: 1, 3: 1, 4: 1, 5: 1})
002 | a+b = Counter({3: 2, 4: 2, 1: 1, 2: 1, 5: 1})
003 | (a + b) - (a & b) = Counter({1: 1, 2: 1, 3: 1, 4: 1, 5: 1})
004 | True
And how is this wrong?
consider my coin example
Sorry for the difficulties, I haven't slept very well in two days and I might need some pills.
flip a coin, what's the chance of you getting a heads or a heads?
you have this case where things perfectly overlap
so the proper computation is 1/2 + 1/2 - 1/2
where the last part is the intersection of the two
Uhh, don't you think probability theory is a bit hard for him to understand 😅
this is what's being asked about, no?
I can't talk about it while not talking about it 
Yes.
I'm too dumb to be offended, you're lucky.
if the events are completely independent you can just add them
Cause it's hard for me 😞
That's why I'm not explaining like them 😔
(because the probability of both of them happening at once is 0)
but as soon as you have events with some overlap you need to compensate
Wait, so mutually exclusive means you have to compensate them?
So that would mean that all those sources were lying?
Since I read that you had to compensate when they were mutually INclusive.
mutually-exclusive events mean you don't have to compensate, because the probability of both events happening at the same time is 0
other way around
Oh, I must be getting the semantics wrong.
By "independent" you must mean "can't occur at once".
Mhm.
well i mean, the formula still technically applies to mutually exclusive events, its just that P(A & B) is 0, so you're just subtracting zero
"independent" means that one event happening doesn't influence the odds of the other event happening
yeah, this case
that's mutual exclusivity, not independent
I'm sure I'll have to get educated on it more thoroughly, I do data science at university and I'm doing a foundation course on maths.
Maybe I'll leave that for now?
Thank you for your help, I'll look over it later.
ah, I didn't read the message I replied to closely enough
how is it, mutually exclusive implies independent?
it's been a good while
independent does not imply mutual exclusion, but the opposite is true I think
if you flip a coin, the odds of getting heads or getting tails are mutually exclusive, yet dependent, no?
Yeah heads and tails are mutually exclusive, but piloting a plane and driving a car are independent events
unless that doesn't count because it's technically the same event or something
ah right, the dependence is of the outcomes
not A implies B if mutex
err
huh
yeah so I guess they're mutually exclusive
no I mean, independence and mutual exclusion are mutually exclusive
independently
A and A` are mutually exclusive right?
they're not independent though, because knowing independence means not mutual exclusion
too meta
assuming that's complement, yes
if you pick a random user from this server, the chances of them being non-staff and the chance of them being an admin are mutually exclusive, yet knowing one of those outcomes influences the odds of the other being true
According to independent event formula:
P(A&B) = P(A)*P(B)
This is only possible when the A and B are independent events
"Head and tail" event has 0.25 according to this formula, but we know it's impossible
But getting a "tail and picking blue ball" is possible, and we get a finite value
Reminds of me of these kinds of quesions:
What's more likely?
a user is an admin in pydis
a user that is a python gury is an admin in pydis
(let's assume I phrased that correctly)
Ofc first one lol
Or if every admin is a python guru 😮
Apparently this is the kind of thing people get wrong
🤔
reads like a bayes theorem problem
maybe when disguised a bit better as something more wordy
What you meant in the question is probability of finding a python guru, who is also an admin right?
bayesian stats is all about dependent events, since of course knowing python has an influence over whether you're gonna become a pydis admin
🤔 @solemn tulip
and yes
i think they meant "What are the odds that someone is an admin in pydis, given that they're also a python guru?"
no
or not 😅
It's an "admin and python guru" question i suppose?
so it's:
- odds of someone being a pydis admin
- odds of someone being good at python and a being a pydis admin
(if you want something a little less debatable (
), you could replace being good with python with being able to speak english, or having good people skills)
That's what I understood from that question 🤔
something like that
Then I'm sure that probability of finding an admin is high than, admin and guru
it is
I think you worded it wrong 
So you are telling me I'm right or wrong lol?
or forgot a key point
I'm thinking of this https://en.wikipedia.org/wiki/Conjunction_fallacy
The conjunction fallacy (also known as the Linda problem) is an inference that a conjoint set of two or more specific conclusions is likelier than any single member of that same set, in violation of the laws of probability. It is a type of formal fallacy.
and yes seems I did phrase it wrong
yeah
all the parts are kinda there, just jumbled about 😛
I loved the "assume it's phrased correctly"
if I somehow become a prof I'll put that in every question
force students to write down what the assumed the question asks 😩
Then he will grade based on assumed performance 😊
One day you will be yeeted away, but that doesn't mean you are now gonna be yeeted
grade based on the assumptions
Then we get a degree which is assumed by everyone lol
Degree is used to assume that you have the needed skills
huh?
Don't we assume that all degree holders have the needed skills for a job?
That's the theory, but for practicality things are different hmm
I'm just talking about each individual problem
not the theory, really
Sounds like Jordan Peterson theory
I'm confused lol
jorpsy ❤️
US Folks!!! Check your voter registration today~
There are some states where today's the last day to register to vote/update your registration status (looking at you Pennsylvania
)
registered and confirmed
there were a bunch of tables across campus offering various bribes for registering to vote
well did you register to vote 👀
go check your status >_> It takes 2 minutes
american culture is so cool like every leap year you get to do x factor but with demented old men
Contestant skill issue
Don't think imma vote. Don't care.
More like everyone gets wrapped up in it for a whole year leading into the vote
they all lie to get into the White house and are serial liars
What's his face makes up lies on the spot all the time like a school kid
If I was gonna bet money I'd say Democrat will win , they are loving oppressing the US for a good decade straight
... right anyway. Please register to vote! Local politics are very important
What if im underage
What
that's illegal....
💀
!pypi pillow

does fine
guys, where should i store the hash of the password manager's master password? can i just store it in a separate table within the same database that has all the passwords? or is there any better way to do this?
Why not? Is Fastify stupid?
to get into a password manager, i should have a master password right? so, to verify it, i need to store its hash somewhere with the password manager
now the question is, where do i store them?
i saw someone store its hash in an another separate table, within the same database
can i just do that?
or how should i store it?
depends on your requirements
what other columns does the password table have?
personally, I'd store it in its own table in case there was a change of requirements and other stuff ended up being store along with the master password
thats what i said, so, storing the hash in a separate table, within the same database is ok?
or is there a better way to do this?
and also, i've just noticed, in pycryptodome, if i encrypt something with some random initialization vector (IV) in AES like this IV + ciphertext , it gives me a cipher text
and then i just store it in the db
but to decrypt that, i can just read the first n bytes of the ciphertext as IV, and then i can read the remaining as the actual encrypted ciphertext
which means, if u still can't understand
encryption is done like this
ciphertext = Encryption(IV + data)
but decryption is done like this
IV, actual_ciphertext = ciphertext[:length_of_IV], ciphertext[length_of_IV:] # length of IV is pre-determined
data = Decryption(actual_ciphertext)
I can read and take the IV out separately, even if the actual data is encrypted along with it, which is weird to see, and i don't think this is still storing data safely
actual code
from Crypto import Random
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
key = Random.get_random_bytes(32)
data = b'hii'
def encrypt():
IV = Random.new().read(AES.block_size)
cipher = AES.new(key, AES.MODE_CBC, IV)
ciphertext = cipher.encrypt(pad(IV + data, AES.block_size))
with open('secrets.txt', 'wb') as f:
f.write(ciphertext)
print(f'encrypt {ciphertext = }\n{IV = }')
def decrypt():
with open('secrets.txt', 'rb') as f:
IV, ciphertext = f.read(AES.block_size), f.read().rstrip() # i can separate IV and ciphertext right away while reading the file, even before decryption
print(f'decrypt {ciphertext = }\n{IV = }')
cipher = AES.new(key, AES.MODE_CBC, IV)
plaintext = unpad(cipher.decrypt(ciphertext), AES.block_size)
print(f'\n{plaintext = }')
encrypt()
decrypt()
@viral parrot sry for the ping, but u said aes is good right?
does it actually behave like this, or am i doing anything wrong?
(edit: i changed the mode to GCM, and its not like that, seems like it depends on the mode we choose it seems 
What is goig on in the gc?
their bad cuh
Okay folks, I'll have a free Saturday in LA in the next upcoming weeks. What are good things to do?
Go to a better place
Fly to Japan or korea
why the fuck is it sending a status code via a response body?
all the food places. i remember having sinful kbbq there. the rest of that night was hazy

also good soju but i dont remember the place.
you got high off thr kbbq?
perhaps something that follows JSend
this is so fucking dumb
- for status look at status code, in the HTTP response, seriously
- that removes a need for
data
Somebody explain how every project im assigned to ends up using 7+ year old tech
All useful tech is 7+ years old
so true
2023 - 7 is 2016
lots of stuff
just out of the crop is Rust and C11
and that's just langs
zig is that old?
i hate it i hate it i hate it
banning Zig for being on discord as 8 yo
i hate shitty class components and wrappers upon wrappers and jest 16.0.0 for some reason
/ban @zig 6y come back when you will be a 14yo
if my math correctly mathing
8 + 6 should be 14
15 indeed
i misstyped on a keyboard 😭
what if
i make a language
which lives with objects
there wont be even a "class"
you can only initiate an object
more meta than python
or will it actually be?
what is an object
like
yk in python there is still a tiny difference between classes and functions?
like where __call__ on clases does (c := Class.__new__(Class)).__init__()?
well
__call__ defined in a class is for making an instance of it callable, yeah
in my language you couldnt really create a new instance of something
because everything is an instance already
i mean by that logic
however
python's classes are already instances of type
HMM
ok is there any way to go beyond python
in practice that would prob actually just mean everything is static
and wouldnt be JS?
because like in JS everything is an instance-- ah wait no..?..
nvm failed idea
…good talk
thats a good question
because in python everything is already an instance of object
...HOWEVER object itself is an instance of type
i believe there is some under-the-hood difference between the two
instance of object and instandce of type
ie an instance of an instance of type
like it changes from class to object
>>> type
<class 'type'>
>>> (Yeah := type('Yeah', (), {}))
<class '__main__.Yeah'>
>>> Yeah()
<__main__.Yeah object at 0x7fee184adcd0>
>>>
what..?
got it
def print(*parts: str, sep: str = ' ', end: str = '\n') -> None:
...
is this too cursed?
obj keyword creates a new object
hmm
i think i would need to get drunk to create something truly cursed
because rn that was just... "weird"
or rather "what python would look like without class keyword"
however i like the idea of doing those "aliases"
sep: stringable means that sep will contain .repr.str.value%() method
so smth like impl Into<&str> in rust
fnc 🥴
i didnt want to copy rust
i will.
I didn't turn on my PC in a couple months, and now it kernel panics on boot.
All I did was update it.
I guess now is a good time to install endeavour instead of manjaro
recently added a split pane markdown editor to biscuit, the project has become huge lol
it looks strikingly similar to vscode
but yes, it isn't, thing is fully written in python using tkinter only
the installer kept erroring when running pacman. So I just installed plain old archlinux
who needs graphical installers?
though the liveiso could have a motd set mentioning archinstall
Unfortunately i have no idea how to cook
Looks like burnt scrambled eggs
what is this supposed to be
😳
Tuna and eggs
I burnt the eggs a bit
Just a tad
Yes
Atta boy
you are not allowed in my kitchen
I had a dream there was a swimming party at a mansion and I was just eating snacks the whole time
and that there was an old lady who kept trying to talk to us so it was hard to leave
She kept giving me more snacks lmao
like "oh before you go" and opened a box of turnovers or something and ate one in one bite
Y
Guido van Rossum (Python Programming Language Creator) is Engineer of the Day at the Instagram of Interesting Engineering: https://www.instagram.com/p/Cy0bA5Gtu9w/?igshid=MTc4MmM1YmI2Ng==
Guido van Rossum, born in 1956 in the Netherlands, is the visionary behind Python, a programming language that has left an indelible mark on the software development landscape. With a remarkable aptitude for mathematics, Guido's journey began with a bronze medal at the 1974 International Mathematical Olympiad. He further honed his skills, gradua...
539
i want to ask if there's a place to get math questions for practicing maths?
like some sort repository of math questions
Maybe check here 
in what field?
textbooks usually have nice questions
machine learning one
i read that only high school math required
Not really
Most of it is taught in hs
ok nvm then
The thing that isnt taught.in hs is linear algebra
like eigenvalues
also Bayes theorem isn't taught in school
but those aren't difficult for the average high schooler
you'd want calculus tho
and if you want to get into nns
you better get good at it
is vector calculus required for ml?
yes
you can learn some of it on the fly
what about machine learning are you interested in?
neural networks?
more of general ones
like linear regression ?
I'd suggest you brush up on calculus and linear algebra, and then some statistics
there is a lot of overlap between ml and statistics
everyone be askin how hard is calculus but never how's calculus doing 😔
alright i think i got it
it has to do with topics such as
iirc exporer.exe may crash with ERROR: Critical error message sometimes
limits derivates and integrals
oh ye got it figured dw
the archive had a password
and the built in zip thingy couldn't handle it
easy concept but it has so many complex applications that it ends up being hard
microsoft 
the core idea is simple: derivatives rate of the amount of change in something and integrals measure the amount of change
sorta
i started doing integrals yesterday
or maybe it was 2 days ago
they do be pretty cool
@ancient mortar last thing: watch statquest and 3blue1brown on YouTube, those are goated for math and ml
it's fine at the CS level
CS doesn't do as much calc as math majors
Cs at my uni didn't even have calc 3 or differential equations, which cse majors did have
cse?
computer sciencee
i took cybersecurity though
but no math taught there
well then idk. it can't have more math requirements than cs
computer systems engineering
huh
a Cs degree is like 1/4 math but half of that is abstract math
at least for me its 3/4 math courses
courses here (UK) don't have much, its just a module or two
Guys why is my dad always talking in the NATO phonetic alphabet
He's a glowie
Overheard him "that is Romeo, Echo, Julliet Oscar" "when is the flight"
I also overheard something about 1945 or something
Hes supposed to be going on a trip
Idk
soviet spy
My dad is too young for that
that's what you think
like i said, that's what you think
bruh
Someone activated his sleeper cell
Rejo is his designated codename
He's flying to the carry out his mission
Hes just visiting my grandma
Hope she's doing well
Why
Rawr
YC?
Ye
Waiting still if we get in
Meanwhile ever heard of a whale jet
Transcription fail lmao
Images by stable diffusion
I'm interested in difference between "going to" and "about to".
If I understand correctly, "about to" refers to nearest future plans, while "going to" can refer to both short-term and long-term plans.
For example:
- We are about to start (we are starting in nearest future)
- We are going to start something (in several minutes, or in several years)
Did I get it correctly? Did I miss something?
looks good to me
🤔 "about to" is used normally when the all the planning has been done or near to be done, and the real process is gonna start very soon.
"going to" is usually used when you are beginning something, like an entire process.

Its called "the great outdoors"
That's a big lake
Lake erie
topical for the season 😛
No
Lake Hughmungus
spooky skeleton pumpkin season
Aye, plenty of boats have gone missing on them there lakes, they're haunted
Spooky skeleton pumpkin bat ghost skull night demon candy treat season
.source candy
.candy
🥇 @jovial oriole: 12
🥈 @hidden pebble: 8
🥉 @kindred orbit: 6
🏅 @inland cape: 5
🏅 @ornate obsidian: 4
@proven ermine: 0
Candies will randomly appear on messages sent.
Hit the candy when it appears as fast as possible to get the candy!
But beware the ghosts...
Wild
Guys i know i was on a cut, but you gotta understand
tfw spontaneous cheat day
ayo
a dramatic example:
i'm about to whoop your ass
i'm going to whoop your ass
we all know which are going to arrive first
why are they out
i mean
that's i believe how most are done, if you need it to be in a folder anyway.
because I expect you would need external deps, git, etc
especially git. but if you don't need it then eh who cares
Pyhsics stewdents cant eggsplain THIS😎😎
chomp
How we can make an array in C++ with different data types?
you can't
There's vector however
vector<variant<type1, type2, ..., typen>>
Polymorphism
Store the base class for your derived classes in the array
Pointers to them, of course, since an object cannot fit inside a block
Liskov Substitution says that an object should be substitutable for its base class in your language
lol, many answers for different contexts
- type punning (a la variant/any)
- inheritance
- if situation allows it, maybe use a tuple
i feel bad for graphics programmers
they have to deal with all these complex Vulkan, DX stuff
whats pycon apac guys 💀
- featherless ✅
- biped ✅
THIS IS A MAN
dog
APAC means Asia-Pacific region
Just like EMEA means Europe-Middle East-Africa
They talk about python
cat
elementary symmetric polynomials are great, but i wish someone would figure out a better notation for them
Some brand on IG looking for "ambassadors", look what url they posted as contest rules 🤦
There's over 60 comments under the post (some commented "sent" + even though the application is supposed to be mailed, some post it in the comments), so it gives at least that many people who didn't every try to read the rules
Lol
@gritty zinc I was recently looking at #internals-and-peps and it turns out this magic #1157424835782246411 message does exist in pycharm as well #internals-and-peps message
That's ipython on the screenshot, isn't it?
Nope, it is in fact a pycharm :)
You do need iphython, but pycharm supports it https://www.jetbrains.com/help/pycharm/ipython.html
Looks like it's because- yeah, was about to link that.
It's very interesting that it just changes it, since the envirmoent I'm using isn't even a conda one, just normal 3.11
Nintendo DS graphics
it's hard to look good after a day's worth of hard work you know
leave pikachu alone
Too much ambient light and some weird other shading config stuff. See the shadows on the cup - look kinda OK, but that's gray, the pikachu is flat-looking - seems the yellow is too light in the first place and there's too much light even in the shadows
The hand holding the cup is basically not visible with how the shading works...
counterpoint pikachu always looks great
the cup looks like it was just pasted in
It's 80F and almost November 💀
it was so cold earlier this week too 😩
literally like 3 days earlier it was like 40s and now it's 70s 😩
Also LA has criminally consistent and nice weather. Unfortunate they ruined it with ... well all the cars and highways and LA in general
yeah the fact that it's still hot outside and november is just ridiculous
Did anyone say global warming
kat did you listen to the taylor swift thing
Parts of it during my flight, not bad. Also dragging harry styles
Really adore Slut! though, wish that came out at the time
I'm learning js and c# for college and am looking for more ways to apply them. Which frameworks are the most modern/popular for making cross-platform gui apps, in either of those? Or is another language used more?
oh shit did that release
1989 has to be her best album
nah
I disagree
you don't even get to vote
do you measure an album by the best song? or all the songs in it
most of the songs are pretty great
there's a couple of relatively mid ones, but I like the majority of songs in the album.
huh, what's the difference between the normal and the deluxe version
an extra song
😩
the last song is so brutal
in the non-deluxe?
ah, yeah. I discount the bad blood 1989 with kendrick as being the actual last track. In my head it replaces the regular bad blood version
icic
it's not in russian for me. self-doxx :p
Not exactly a self dox considering I live snack dab in the middle of the US
Granted my secondary language is set to Russian but the primary is set to English so the site is at the very least broken
The kid posted it in the ot0 too
They stop talking march of last year and all of a sudden they post a photo blocked to only inside a random app ?
and ot2
appears that it is not, just a low quality app. From what I can tell, it allows you to share a link to others to get some of its in-app currency
You can earn diamonds every day on Hoop. Use them to send friend requests, see the previous profile again or customize your own profile.
lol
Woaw diamonds
srry guys
I hate when mods use obuse Angle in a triangle 😔
is this real? (the twitter accounts)
No
no official python twitter account?
why was this on r/programminghumor?
think about it
Wish 1: i wish i could think
I feel the regex parser for compilers prowess from it
Me running 1 division operation and 2 square roots in the inner part of my O(n^4) code
just hearing Ñ⁴ made me tremble in my boots
https://github.com/vaibhavpandeyvpz/apkstudio Whoever manages to change the language of this program is a Genius, it has a folder with 21 translations, but I can't find a way to change the language. you dont need to install it
Crossposting mfs
and reposting as well
what is the difference between me/my/mine?
in some cases "mine" works like "me", in some - like "my"
this is why i am confused
examples:
friend of me / friend of mine / my friend / mine friend
Im mining friends
https://english.stackexchange.com/questions/96597/my-of-me-of-mine-when-to-use-these-possessive-constructions discusses this, though doesn't provide an answer that I consider good
probably the "double genitive" thing is where to dig for a more comprehensive answer.
i also have a question about phrase "a lot of", like in "There is a lot of things"
it violates the "subject verb object" order, is this like it is supposed to be?
should i use "is" or "are" in this example? there is an "a" article, but also there is "thingS"?
You can also do "a ton of", like "I ate a ton of lemons"
also "I ate tons of lemons" 🤔
"I ate loads of lemons" "I ate a load of lemons"
fells like "a ton of" is usually used for physical things, while "a lot of" is usually used for more abstract things
is this somehow related to "lots/a lot of" ? words are kinda similar
I've heard "a lot" is like a physical parking lot, imagine an entire parking lot of stuff, thats a lot. A load I dont think is related, and "loads" even sounds more british to me
Yeah I googled to confirm, its mostly british
question still stands:
why do we say "There is a lot of lemons" and not "A lot of lemons is there" or "There a lot of lemons is"
Now if you said "I ate a boatload of lemons" thats american
i need to write down all these phrases 😄
No idea, just how it is. The first one is the only one that makes sense
who ghost pinged me 
can't judge people who've never had friends
obviously satire
chat is this real
yes
hanging out?? like hanging processes?? in Linux??
i was driving kind of fast downtown and a cop saw and tried to pull me over or something but he was on a bicycle so i just drove away
very
i offer free shin slapping for extra confirmation that this is real
twitter tech bros are that dumb, doubt it is satire lol
@shell jolt #python-discussion message
I gave it a 10/10 but that's because I like kubo
it's a pretty generic romance show
Hmm I might watch it when I get some freetime. Added to my 50 long anime planning
i doubt "friend of me" and "mine friend" are correct 
Mein Friend
freund
implementing protocols are not fun
What about writing one
cthuwu
Ghjbdjut
what
did you code a backend in branfudge
proofs?
Probably used chatgpt
I really doubt that chatgpt can code a http server in bfck
ofc brainfuck cant make a tcp server on its own
so I just piped input and output to the incoming clients
And another class bites the dust. ♪ᕕ(ᐛ)ᕗ
I'm in my anti-class where-ever possible phase apparently.
Daily GitHub Summary:
| Contribution | Count | Metric | Total |
------------------------------------------------------
| Reviews | 0 | Files Changed | 15 |
| Issue | 0 | Additions | 306 |
| Commits | 19 | Deletions | 222 |
| Pull Requests | 2 | | |
could add a # or ! that does a syscall
that exists?
could add
I'm literally using classes as namespaces for one of my projects: https://github.com/ichard26/toomanycards/blob/e387284d29753cf9d40cc4a5976848631abb1ae8/api/app/models.py#L40-L43 
api/app/models.py lines 40 to 43
class modelfields:
Username = MutableField(min_length=1, max_length=20, regex=r"^[a-z0-9\.-]+$")
Password = MutableField(min_length=1, max_length=100)
DisplayName = MutableField(max_length=50)```
Probably a bit of class abuse but /shrug
what other way of namespacing is there, other than modules?
classes
folders too
what on earth
doesn't look bad to me
elon needs you fr
i love your username.
Thanksss
Running 2 square roots and 1 pow operation in the 3rd loop of o(n^3) code
now the code js n^4 :D
well at least you improved it i guess
No not really
well the outer section is down to n^3 from n^4
meow meow
nice, looks pretty
also note the splat operator can be used on any iterable not just iterators
.... NaNoWriMo 2023 starts, for me, in about 3 hours. And here I am starting a short story completely unrelated to the novel I intend to write.
"Just a warm up" - me to my partner as they gave me that slow blink of disbelief.

