#ot1-perplexing-regexing
1 messages · Page 471 of 1
lol
so the hash function will give us a value from 0 to 100? never more yeah? cuz of the fixed length?
Yeah, because we made our hash function does that
nice
So now, if we want to map the object o to a key k, we will hash k, see in which bucket it falls in, and place the tuple (k, o) in this bucket
mm I see
(Note that we aren’t necessarely talking about a python tuple, a chain of two pointers is good enough)
yea ok
Now, if we want the map of k
we hash k, see in which bucket it is in, loop through every tuple in it, and if we find a tuple with k in it, then we have our o
that's why u cant have duplicate keys?
Yup, that’s why
damn that's cool
It would map to the exact same bucket
So now you might ask how is that very efficient even for large dict?
Well, it is because this is very scalable
so it isn't fully O(1) cuz it looping thru one bucket to get the value right?
Yup
¯_(ツ)_/¯
so the buckets will always be of fixed length?
like 0-10 will have a size of 10 right?
every other bucket will have size 10 yes?
So if you start to have a lot of objects inside the dictionary, you can just add more buckets and scale it up, while keeping out O(1), because we can always calculate the address of the bucket with a base_ptr + bucket_size * bucket_id
Yes, if you select a size for a bucket, every others has to use the same size, and the sum should fill the entire hash range
I see
Now, let’s come back to our database
Let’s take a very simple database, that just maps an ID to an object
okay
Now we can have a simple dictionary, that’d be inside a file instead of the memory
If we want the object with a certain id, you can hash it and see in which bucket it is in
so the id will be unique?
Every buckets are actually stored as a list inside a section b
like a key in a dict?
so the id will be unique?
@inland wolf yes
I see
And in the section a, we just have the place in the file (in n numbers of characaters before the beginning of the file) of each bucket
Why’s that, you might ask? Because our actual bucket lists have a variable length, but the index in the section a has a fixed length for every bucket
hmm
In other words, if you say that the “address” of a bucket is ten chars long, you can be certain that the 10 characters at section_a_start + 10 * bucket_id you can get the position of this bucket in the file
Now, you can read the bucket (and the bucket only) to search for the actual file
The whole thing is that you don’t need to read the whole file, you can just ask the OS to give you x chars from this position
And if you take a closer look at how we “fetch” an object, we only read 10 chars + the bucket, which shouldn’t be more than 100 chars long
so it is really efficient
exactly
You might have heard of .seek, which allows you to go to a certain position in the file, and then you can use .read to only read a certain amount of characters
Something to note, databases aren’t just a one-to-one mapping
They have a lot of many-to-one mappings
But the thing is that you can represent any of those mapping using one dict
A database is just a lot of dicts, basically
Do you have any question?
Haha yeah
no my mom called me lmao
I'm back now
oooohhhh
so databases are just thic dicts
with more complexities
but still Hecking fast
Basically yeah
Anytime!
thic dicts 😂
thicts
BRUH
databases are THICTS
SavagePastaMan coined it guys
u heard it here first folks
thicts
thicql (SQL)
thicis (redis)
thicqlite (SQLite)
Hi
sup
savagePasta man is the imposter
lol
i saw him go down the vent
lol
Redis is the imposter, it isn't a database
Redis was not the Impostor
1 impostor remains...
Ghost ping was an Imposter
bru
here
no u stay here
://
hi
i use mint
Linux Mint
ik
hm?
where are they??
lol
lol
I've been doing a bunch of discord bot work lately and started cleaning my files up into individual cogs anyone know of a good place to share those for people who may want them
pastebin?
I may be looking at it wrong but that looks more like for hosting the files I was meaning like a thingiverse type thing for sharing
github?
BlackBerry messenger
I may be looking at it wrong but that looks more like for hosting the files I was meaning like a thingiverse type thing for sharing
@whole socket that was meant as a joke. You could create a new github repo specifically for this stuff. You could also use github gists.
yeah that's the best course of action, since you can have a large number of files there. Github gists get unmanageable pretty soon
link your github!
@young shoal i think they linked it in #760857070781071431
o thanks
any don'ts for the github username? replacing old one that had a very... special name
ideally it would be a resume piece of sorts
is there a time when short is not better? my name is available w easy subsitution
whats the difference between an idle and an ide
idle is just the editor that comes bundled with python - it's a specific program
and IDE is an integrated development environment
ohh
the ide has to translate from one language to the other and idle just compilees directly to python?
no
an ide is a text editor which can also compile or run your program
IDLE is the name of an IDE, the one which comes with python
ohhh
@grizzled parcel I used my first initial and last name for mine, is simple and formal and fitting if your using it for resume things
my first initial is i, so that ends up looking really funny
i opted for isaec
ae is same as aa lol
nice
lmfao
lmao
one better if its just a photo of your computer turned off and you just said i have a problem with my code
i made the mistake of helping someone who couldnt figure out how to open a help channel open a help channel
it was that
that's pretty good
it would be possible to help with that
😭
There is more tolerance for that on some platforms than others. I've noticed in Facebook groups people will take pictures of their code and people will help and no one will even mention pastedump.
In some of my open source circles though, like on Matrix and freenode, you would get chewed out for even having a a legible screen shot
No thank you.
wtf
i liked that
it was nice
There are logs, you'll get banned for that.
Right now someone is looking at what you posted and deciding if you should get banned.
Already got warned bois
for trying to make a career
in getting free robux
lmfao
Anyway, off topic isnt obnoxious imagery dumping ground.
I have a friend whose IP got banned from facebook because he wont quit posting weird stuff that he thinks people need to see. Not necessarily porn or gore, but just weird stuff that is gross.
IP bans are dumb
And he literally got banned for it. Now he has to log into fake accounts with a proxy so that he can continue to share weird images on facebook
Whats even more dumb is sharing stuff on a platform that doesnt want you to do it.
yeah
So yeah, him and people like him, they form in these groups where the people who join agree and promise not to report each other.
And they post weird things that if anyone decides to report them they get ip banned.
And I'm just like, "THERE IS OTHER PLACES ON THE INTERNET"
So like now he has to login from m.facebook.com after having multiple accounts shut down, the only way he caan maaintain an account is to only access through that
I dont understand why he puts that much effort into it
wireguard is cheap and easy for ip spoofing
Theres a lot of solutions I dont think we should get into because specifics about how to break a companies TOS arent allowed here
But the point is
Why.
yeah i picked up on the TOS thing
i asked a question that was within tos but set off alarm bells
I think with my friend, he derives some type of pleasaure in grossing people out.
And I ended up telling him that becaause of that, he deserves to get banned.
I even found him places online where he could share this stuff with people who want to see it.
But that wasnt good enough for him
He wants regular people who might not have expected it to see it
weird
any thoughts about moving my code to vultr? pinstaller or download from git
also the dude who sent that gif @ all the mods
he is trying to be banned
yeah that guy ended up getting banned
he said the words
please ban me
not really suprised
Daredevil will beat his ass too
#BanFisk
he's mod tho...
It was a joke lmao
He's an admin
you're gone
@quaint rivet I'm your friendly neighborhood Spider-Man
I can save this city
By sending Fisk to the prison
spydey dont push your luck
youve pushed it a few times. litterally yesterday with joe
if u said this #ot0-psvm’s-eternal-disapproval things would have been different
or two days ago
When
all the days blend into one
youve pushed it a few times. litterally yesterday with joe
@quick bay when
a few days ago
What'd I say then
u spelt it wrong
He spelt it wrong
no u did it
no u
No
my name is a joke off of my last name.
is ur last name hopper?
no
It's Spidey in teenserv tho
my name is a joke off of my last name.
@quick bay Hoe?
Hehe
no
Homelander?
nope
No it's fully
:))
You have one
They just didn't want you
🤣
Uncle Ben is dead
@quaint rivet I have MJ 😎😎
And Gwen Stacy
2 girls 1 male chicken
So what?
you are left alone
unzips
TF
Harry marries MJ
@quaint rivet no
I marry mj
But I kill her
Cause I don't know
My chika-chika is radioactive too
I don't remember the number, but that's what actually happens, written by Stan Lee in a comic
where are they??
Who?
Hi kids
😐
spydey, that's not appropriate
Yea kid
It's a sub
r/sighunzips
smh
that was close
@young shoal does your nick actually work?
what lang do you think it is
Java?
strike 1
Not C# right?
nope
strike 2
it has like, 4 langs in it
eh, at least 3
void is lowercase in C#
not really
Aw fack
async def from python
that exists in other langs too ya know
spaces are pythonc
if statements are pythonic
for each loops are pythonic
colons are pythonic
just sayin ¯_(ツ)_/¯
pythonicness is talking about the idioms
Just the way you considered/used -> from other lang(s)
The probability is between 0 and 1 (exclusive)
$$P(\text{-> is Pythonic}) \in (0, 1)$$
nice
Made it better

void cancer
the void thiingy
What void thingy
public svod{}
that thing
u can to writer thatt thing everytime in java or c# or something
???
You mean the return type vest?
(That’s the fake vest)
Yes, ofcourse @narrow pecan is the only genuine gucci brand vest.
that's like 2 more words than necessary
@versed saffron just do sout + tab
no :(
?
then i won't have anything to bitch about
bruh
like I don't mind it as much but there're still some things that turn me off from it
sout + tab is technically less keypresses than print()
afpsv
but yeah, most ide have stuff to reduce the boilerplate
they can generate getters and setters and stuff for you
__m + tab =
if __name__ == "__main__":
huh, i always used main + tab in pycharm
vscode has so many plugins avaiable that over different boilerplate and stuff aswell
of course
apperantly just _ + enter already inserts
if __name__ == "__main__":
pass``` for me
vscode?
yeah
No init autocomplete outside of classes it seems
makes sense
I don't believe theres dunder init autocomplete even inside the classes
Well, in the case that it is present, I've haven't been using vsc to its full potential 👅
wow
Not untill the i it seems 😦
Wish it added in the self and all that
Pycharm will suggest dunders if you just type the name without the underscores
oh duh, should have realized that
that's neat
No autocomplete for other dunders 👅
pycharm 😍
There are also a bunch of shorthands, like .par to parenthesise expression, main to create the main guard, .not to prepend not...
@rough sapphire what color scheme is that?
mmmmmmm
Thanks. Might be worth checking out
I keep changing the colour themes
Cluttering my extensions has never been this easy
monokai >> literally any other theme
Ahhahah
monokai looks sick I've just been using darcula
darcula is pretty good, but monokai is just better
I just recently switched to pycharm after spyder/anaconda proved it self to be a pain
But honestly it's probably my favorite ide so far
i like it
or just jetbrains stuff in general
like my prof wanted us to use eclipse but it's kinda bad imo
for real
I'm not really sure i'd spend that kind of money for a colour scheme tbh
eclipse is cringe
I didn't even know you could use eclipse for not java.
me neither
it's ok though
but ik there's a c++ eclipse
it has everything you need
i run python in eclipse
notepad++ > all
n0
y3s
nah
best code is write on napkin
code in cmds
yes
why are the mods goldfish
@hallow aurora they're a snack that smiles back

@hallow aurora "The snack that smiles back!" Children
oh no
I like it when my snack screams
@cosmic lotus wow
Mind controlled ms paint 👀
mind control delete
code with binary
I swear, who makes these otn
@manic bloom random peeps but mostly mods and admins
@manic bloom they're mostly inside jokes with the staff. Joe mentioned that he doesn't remember the context for this one.
ok
I'm not able to add new names to the pool but if I could, I would add python-object-oriented-programming
Did someone say code with paint?
This is an example how little it takes to write a real-time animation effect (a textured tunnel in this case). 224 bytes are enough. Therefore, open photoshop, draw some pixels, save the image, rename it to as an executable, and let the x86 CPU execute it as native code. Et vo...
Dear god
God indeed
Elder god maybe
i dont understand. What happened in the video?
He's coding by putting pre-determined colors in the image, which then he converts to .raw then converted to assembly code that runs the program
what was that weird tunnel thing at the end then?
that was the program made from compiling the pixels
Apparently, you can fit snake game into a QR code
ye
its a pretty big qr code tho
it would be a better fit on a base64 string
nah you can do it in any language
Also windows rounds up any decimal above 2.3 in storage one unit above
So
2.4 Kb
Is 3 Kb
Very very tricky to fit on the largest QR code available
the demoscene guys would be good at this
they're fitting full 3d movie demos in 4kb
1st place in pc 4k compo at Breakpoint 2009
Its only 4kbyte in size - really awesome!
elevated by Rgba & TBC
From Readme:
music puryx
visuals iq
optimization mentor
synth mentor
gnu-rocket kusma + skrebbel
crinkler ...
For starting in hacking do you need a good PC?
I say so because I have a laptop with 4 GB ram and a CPU of 2 cores 4 threads at 1.7ghz, and I don't think I could create my own hacking enviroment in virtualmachines, most of the books I have seen use virtual machines but I can't have one.
Don't know if this helps but I have a desktop computer, with almost the same specifications, but with a faster CPU.
THE MODS ARE GOLDFISH
@rough sapphire u need a few more gigs of ram and quite a powerful cpu afaik
idk about a gpu since u can also just run CLI linux distros that u can try cracking or just testing diff stuff
hell if u go with cli distros might not even need more than 2-4 gigs (taking a margin of error into account) per VM
also let s say ur main machine is a linux (so it runs the linux kernel) u can spawn lightweight linux distros through docker containers
I was thinking of making dualboot between my main system an kali linux
I have a desktop pc
Can't attack a virtual machine in it? let's say metasploit in my desktop pc and kali in my laptop?
Or it's dangerous to let metasploit connected to the internet.
wwhy do u wanna learn kali linux in particular? first u should choose an easy distro an get familiar with linux altogether and then move to that
nah not dangerous, i mean just make sure u try to take the most amount of precautions and read documentation before acting
Now I'm using Manjaro (Arch linux distro)
Maybe learn more about the terminal, but I have been studying python for the past week to not become a script kiddie.
hi
Hi @tribal aurora
hey
how you doin
oh
you're using manjaro?
huh
what a coincidence
I was going to ask this question 😄
@rough sapphire Is Manjaro good?
howdy again
how long are you using it?
I use arch btw
600 - 700 mb I think
Nice dog
manjaro is nice tbh
how much ram..?
manjaro is about as light as you get without going for straight up minimalism with arch
idk I dont use manjaro, pretty lightweight doe. any particular reason you are asking?
how much ram on arch?
you know what, since we are on the topic:
Do you guys think I should put manjaro or arch on my laptop? I use arch with plasma
both idling and startup
how much ram on arch?
idk, I have not checked, not a lot
I would say arch
Depends on your free time tbh haha
arch
I have all the free time
the most annoying part is setting up partitions
and ill just @ you, akarys, if I have any issues LOL
Haha
definitely go for Arch
everything else is just copy pasting commnands
I tried to use arch but
yeah, my arch install was annoying because it took me like 4 hours to figure out what was wrong with my network (would not connect to wifi)
It's to complex, I liked manjaro auto-install
oh yeah, that was also a pita
then I installed kde plasma and it somehow fixed the issue... which made me more upset xD
Lemme guess, resolv.conf not set? 
to this day I do not know how that fixed it
I managed to create the partitions, install QTile
honestly no idea 🤷
I used endeavoros last I installed arch
😂
it just works
But I had an error and returned to Manjaro ;D
since I do not really want anything but arch, but am too lazy to type all the commands out
manjaro
rolling
Manjaro
hmm
I mean, cmon xD
I like latest software
You are with 3 people from the manjaro gang
lolol
I use ubuntu for server
Yes
but like, not for desktop
kubuntu is definitely better for servers and beginners though
All people use Ubuntu as a server because it's stable
headless ubuntu lel
Arch for a server would be just paaiiin
rolling releases are inherintly unstable and error prone
😂
I might reset my whole server, but I am scared for my nextcloud stuff haha
maybe if the server only has few packages it is more managable
yea
true, he is exclusively using docker I think
and unraid
wait
can one have unraid and arch? this does not make sense
When typing yay -Syu you’d be like 
why?
because wtf even is unraid
Because it breaks
Unraid OS allows sophisticated media aficionados, gamers, and other intensive data-users to have ultimate control over their data, media, applications, and desktops, using just about any combination of hardware.
Uh
idek
Because Arch is known to randomly break on updates
Would it break with pacman?
he said it was an arch system with unraid and docker, googling it i do not understand
Because Arch is known to randomly break on updates
@solid pollen But you have the option that don't install it
How does he have two OS in one computer 
exactly
who
Or he has an unraid image running?
me thinks he may be fulleth of it
if you do not update arch why use arch
my coworker haha
if you do not update arch why use arch
@graceful basin but you don't have to update it
I want to put arch on my laptop, but have approx 0% motivation
Understanding coworkers is way harder than installing Arch smh
Use manjaro then?
Y’know, graphical installers and such
well, I have the time, just generally no motivation. let alone for manjaro xD
the mistake I made last time was waiting to install the desktop, I shoulda done that immediately
@solid pollen your os?
Manjaro, and very rarely windows
ah
!remind @eternal wing 5d Take care of your poor computer!
Your reminder will arrive in 5 days and will mention 1 other(s)!
good reminder xD
I’ll give you the motivation 
You know I'm very new to linux so I use windows and Manjaro/Kubuntu most on windows
I just need two cups of coffee and a hug and i'll be good to go. LOL
I mostly use windows tbh xD
cant log in to acc for vscode? that is odd
yes
It works fine for me
microsoft acc I guess?
😕
solution: use pycharm xD
Vscode is best
Nah, I don’t haha
also: im jk, vscode is pretty nice
I used it for webdev before pycharm pro
akrays, how did you install vscode?
I tried to install it with (pacman, pamac, yay)
I have the pro edition, because student 
But with them I couldn't even connect to the internet
yay -S code ¯_(ツ)_/¯
I have the pro edition, because student
I have it for like another year xD
but with snap I can connect to the internet but I can't login
well, then I can get open source license ez
I posted a bug on microsoft/vscode
Im technically still a student at my school.
I will not graduate until this december xD
Snaps are really meh
why
even though I finished most of my classes like a year and a half ago LOL
snap == trash
here
Ah, alright
why snap is trash
because I used it once and it did not work very well LOL
Snaps lacks of security, maintainability, ease to use, and take up all your loopback devices
^
also more memory usage than normal apps
then Thunder came...
flash
its that time of the night I see (where I realize I should have been alseep like an hour ago)
huh?
I'm not fan of mint
just Kubuntu and Manjaro
but vscode won't work on Manjaro so Kubuntu > Manjaro
It will
Yes
You just misconfigured it
Have you been using linux before?
If not, kubuntu would be a better choice anyway
like a rolling stone update
I like bob dylan xD
like a rolling
stoneupdate
@eternal wing oh no
Can you try to run it as superuser?
lol, that is the "is it plugged in" of linux
Can you try to run it as superuser?
@solid pollen wait
nope
ops
bad pic
hmm
What's the problem?
code version: 1.49.1
Well, try to remove code and use this one
Visual Studio Code (vscode): Editor for building and debugging modern web and cloud applications (official binary version)
upon google: it is often linked to DNS issue
The MS provided version
there is vscodium which removes telemetry
Well, I’m assuming you can access internet through other apps?
never installed it but that's what they say
It's the aur package name
https://github.com/microsoft/vscode/issues/78783 found this one
yay -S visual-studio-code-bin
Well, I’m assuming you can access internet through other apps?
they installed the package xD
does not hurt to ping google.com
lemme remove it
shhhh, we don't need your logic and thinking things through. lololol
Haha
what to do
Enter
ik
It is asking you if you want to read the PKGBUILD file
but what is none for
Don’t read it
It is asking you if you want to read the PKGBUILD file
@solid pollen what hell is even this
anyway I pressed enter
It is the file that is executed when installing a package
so AUR right?
|| will you able to understand it 👀 ||
Basically, an AUR package is just a git remote, with any number of files (with some specific ones, such LICENSE, but not mandatory), and a PKGBUILD file
When an AUR package is installed, you clone the remote and simply run the PKGBUILD
mhm
I mean, you entered the command first haha
but why mine is broken
you said you installed it with
yay -S code
I did the same thing
but didn't work
why
it worked for me....
I mean, you entered the command first haha
@solid pollen Indeed you told me that command
:|
You asked for it
for removing cache?
nope
For instance, here is the PKGBUILD of vscode https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=visual-studio-code-bin
Well, yes
You asked me to remove everything related to vsc
And there was a cache entry for it
its ok your cache will fill up again haha
That’s not a big deal anyway, and you should delete your cache somewhat often
I do when I feel bored
It won’t take any more time for new packages though
Except if you ran a local aur mirror
your justification sucks btw
That’s not a big deal anyway, and you should delete your cache somewhat often
specially this one
its not...
he's not wrong wym
if you have a 30gb installation size and you have 5gb of useless cache
will you delete it?
I clear out my cache like, every other day
anyways
now say "thank you akarys" haha
vscode is working
awesome
you can code haha
yeah code .
I can code with code

are you a cat lover?
me?
he's a bear lover
yes
I have dog pfp
using AUR?
the one you installed previous was not the official one
this new one is the offical package
search in the aur search box
AUR packages are never officials
where did you get it
yep
how can I search for official packages?
AUR packages are never officials
@solid pollen what is offical
pacman?
not all packages can be installed using pacman
No, core, extra and communities are official

what are you talking about
do a yay -Syuu


