#ot1-perplexing-regexing
1 messages ยท Page 510 of 1
your enemy is too reliant on his queen
yep
shtoopid mistake haha
yo i need that font
too bad you can't get it
bruh
same no relatable yes
im looking for a drawing app that i can use to draw basic shapes and use with my drawing tablet
for technical drawings etc
kinda like paint but nicer lol
@lunar shore last thing, what was the graph thing which you are showing in the terminal and how can i change the icon theme?
you should take a look at krita
anyone that knows lolcode here just asking
yeah
What's Kirita @buoyant pendant
a drawing program
Krita is a professional FREE and open source painting program. It is made by artists that want to see affordable art tools for everyone.
drawing with a mouse
kirita actually works great with my wacom tablet
I don't draw but even ik using a mouse is horrible
expensive
not really, its one of the cheap ones
wacom tablet is like 50$
yeah, thats pretty cheap
For a tablet yes
in general terms
No
๐คท Depends on the product.
Wacom do some nice begineer stuff iirc
I don't draw myself but I have plenty of friends that do ๐คฃ
i bought a wacom tablet once with with 20$, did you buy one of those super large ones?
Ebay go brrr?
Or graigslist depends where you at
but im not doing real drawings, just an alternative to pen and paper when sketching out ideas
yeah, thats what i bought it for, for real drawings the inbuilt screen ones are better
I draw with mouse lol
yup, totally agree. although i can imagine having one with a screen is pretty cool ๐
ye it looks pretty cool
graph? it's htop you want?
htop doesnt show graphs does it 
wdym by the graph? which one
@edgy crest You mean Xithirus' config most likely
Mine didn't have a graph or such
oh ye his
mhm , then I'm out
that was bashtop

welp
Bottom one is htop
yeah
Top one is something else I'm not familiar with
lol the say command is so funny
this arch linux?
A
oh ok
ok
how's this for a graph?
bpytop
btw what are the benefits of using Arch? (targeted at 'btw I use arch' gang)
epic pckg manager, epic configuration
i use arch btw
It's not possible to be cool with man jar oh
Is it worth the setup process?
(oh wupps forgot to turn ping off)
I don't use arch btw
It's not hard it's just involved
Emacs is cool but doom is meant for evil mode
Which is just vim with sprinkles
It looks cool
I tried centaur emacs and was liking it
But since it had a bunch of stuff I didn't need that's why I made Awoo emacs
Haven't had timr to work on it lately though
thanks for ping >:)
:)) you too
I should use my brain btw
Not emacs only , Emacs + Evil does however
And i know that some people are gonna disagree, but that's my opinion ๐
Evil is evil, vim is confusing - Awoo emacs init.el
Well , Awoo emacs seems cool but anyway I'll install evil on it
What is evil?
evil is vim keybindings for emacs
zucchini 
Thank you
Well , what if you want the Vim keybindings , but also emacs' features ๐ค
Both of them are nice , but combining them is even nicer
Tbh I think people do TOO MUCH with emacs
Like I've seen people basically using it as an OS and like, c'mon guys it's a text editor.
I literally just use it for editing fines in a headless server because it's easier than setting up a remote vs code session
And things like my raspberry pi where it's not remote, I'm physically connected to it with a keyboard but just don't use a WM/DE
I mean , Emacs is powerful , but for a person coming from vim and who has a vim mindset , would like to use Evil , like why not
I might actually learn emacs without doom
It would be a good exp
I wanna know , is it really as good as you say it is
I might even use it instead of Vim , and who knows, I would use Awoo too
You'd have to set up evil yourself in that case obviously
I would just recommend doom if you are using evil mode, it's meant for it
Awoo is made entirely for non-evil
It's very modular though so might not be too difficult
mhm
I have a pretty major change to make
I mean , I'd like to experience with vanilla emacs , then I'd use awoo
Fair
Language servers aren't playing nice with eglot
So I'm ripping it out for llsp mode
Oh
Also
C-h i doesn't work properly?
Hmm?
Should it show that tho?
I want the keybindings
Seems like the tutorial was old
does anyone know android studio, cause i cant get this thing to run
i already have intel x68, but it seems like i have to connect device
Emacs' C-n , C-p , C-f and C-b are so annoying tho ugh
Fix has been working hard on the interpreter
And now the repl is a work in progress
Hahah
A language
@narrow pecan can I ask , what library did you use to make it, or you just made it with vanilla python , no extra libraries?
I think lark
lark? I see
It's a postfix stack-based language yeah
Good job on catching that
5 3 2 * + gave it away
Yeahh
If you're interested in the source code https://github.com/gurkult/py-gurklang
Oh, a gurkult GitHub ID
Oh damn , thanks
Yeahh, it's the gurkult org hahah
Man you guys are really going the full mile on this
But I don't understand it ngl
Yeahh hahah. We're really working hard on this
Hahah yeah
It's transformed quite a bit from the odd thing on pydis though. I'm hoping that we can actually make something real out of this, where people get to learn about software development and working as a team on real world projects
yeah
This is only a small step in their plan for world domination
Hahah
XD
Message was removes, since the version was odd
Here's a slightly more complex program in gurklang
With a visualisation of the stack! https://cdn.discordapp.com/attachments/789249499800535071/791109639528775720/Visualization.mp4
All creds for this one goes to fix error
Nice, but I'm not a language expert so I do not understand
We'll be making a tutorial and documentation for it, so it should be easy to follow
Numpy for gurklang when
They are something to adjust to, but once you get used to them, they're honestly fantastic. They allow for so much stacking like this: ```elixir
thing func
strip
split
0 get
read is not a valid duration string.
#bot-commands I think as well
Oh right sorry
No worries ๐
But if Haskell was a more general language it would be nicer to be written in Haskell
Yeahhh
We're thinking about writing an implementation in a faster language or possibly making it compiled later on. We'll see what the end result is
Please not C tho...
Pleaaase
It's a weird language
I mean , what about Rust?
It is a good choice, isn't it?
Not weird, fast , safe types
Hahah, not C
We've been talking about Haskell and Rust iirc
We said that we most likely couldn't do Haskell , cause hardly anyone knows Haskell
But we'll see. The nice thing about python is that most of us know it and might be able to help out, compared to some other language
Yeah
But like , the amount of people who know Rust are definitely more than the ones who know Haskell
And it's an open-source , community driven project afaik
But as you said , we'll see what happens
I'd be happier if it would be Haskell
But the project itself would not be community driven
Hmm, yeah. We'll see how things go
Yeppp
I'm going to be writing a fork of Awoo emacs that uses vs code bindings from the ground up, if you want to cringe more
But that's after Awoo is stable
Oh nice
Like I need I'll unbind everything, nice emacs specific stuff to it's own area, and copy vsc binds
shhh! don't tell them
OpenSUSE so weird
how so
you can add third party repos as long as they contain files that can be read by rpm and zypper
oh well distrohopping is 10/10
I've been through every flavor of ubuntu, debian, fedora, opensuse, arch, manjaro, and OpenSUSE
I'm just happy to be set on a distro now
Install windows
we are talking about linux so thats different. i still love windows tho
๐คฏ
Linux sucks for gaming and any A/V/P work
what is feautre experience pack
dunno, it was annoying upgrading from home to pro
Ended up just having to do a reinstall becuase my key wouldn't work for the upgrade dialogue since it was an old key
it was originally a windows 7 pro key iirc that was upgraded to 10 pro
and I had a home license normally
oooh
so when I went to transfer it to the new workstation, it wasn't technicallya windows 10 license
it was a windows 7 license, that was valid for 10
oooh i remembered. my cousin has that same feature thingy as well
because he came from windows 7
with a valid license
I actually went to the trouble of installing opensuse leap as my WSL distro
and upgrading it to tumbleweed
so I can have 1:1 parity with my actual install
Hey so I was giving my science exam and it showed this in the middle of exam
Name: _____ Class: ______ Section:___ Roll no: _____
and I thought python, in our test
lmao
loll
how do I launch this from terminal?
you don't
you want to run the minecraft launcher?
yes
you are using?
ubuntu
did you install snap?
having to navigate through my file sys everytime seems like a very unlinux way of doing it
nope the snap didn't work
what did you download
from their website
sudo apt-get update && sudo apt-get install minecraft-installer then launch via minecraft
that is what is says
and you need to install java to run
ignore the opengl part
do you have Java installed
yep
@versed saffron this should work https://linuxconfig.org/how-to-install-minecraft-on-ubuntu-18-04-bionic-beaver-linux
20.04 is also available
although idk if it will make any diff
F
yepp
./minecraft-launcher ?
./ bruh lol
I didn't and idk what th chmod does if I'm being honest
I should probably learn linux if I'm gonna use it
alias ur_alias="command"
but it wont persist after reboot
so you need to make an entry in your bashrc
right ok I've done that before
it changes the permission of the file....more specifically, makes it an executable
so add alias mc="cd ~/opt/minecraft-launcher && ./minecraft-launcher?
/opt/minecraft-launcher
is enough, imo
try running it in the terminal first
alias mc="/opt/minecraft-launcher"
ah ok ya that works
how do I dissociate the launcher from the terminal?
I wanna say drop but that's not right
wdym?
like so I can keep using the terminal
you can open a new terminal
or
you could make the command run in the background
./minecraft-launcher &
or /opt/minecraft-launcher &
now you can Ctlr C it
and the launcher will not get killed
isn't there a command for that?
& wll put it in the bg
ok but without having to ctrl c it
hmm
why don't your try it?
there's perhaps some signal that you can send
Pressing this key causes the system to send an INT signal (SIGINT) to the running process.```
so you can try sending SIGINT
so..... & works but you need to manually send SIGINT?
yep
you could also make a custom shortcut
that runs the command
no terminal needed then
I was thinking of disown but that doesn't work either
I like using terminal tho ๐ข
it makes me feel like i know what I'm doing
I mean really pressing ctrl c isn't that much work so ig I can just do that
Using the terminal just to user it when it makes you take more steps is kinda silly
I admit there's a novelty to using terminal, I do enjoy it myself, but but when it slows my workflow
For example with git, it's 10x faster to use the gui in vs code than to stage and commit through the command line
fair enough but mc -> ctrl c really isn't much of a disadvantage
ya I only use git in terminal for pulling
I only use it for stash because I don't think vs code has stash built in
I was thinking
/opt/minecraft-launcher & > /dev/null 2>&1
hope i got the last part right
I'm pretty sure there's a plugin for that
I'll try it out, this better not brick my laptop ๐
Hm I'll look into it
I'm actually trying to cut my plugins down though
I was inching towards 100
i actually dont think terminal is too much to type
/dev/null is basically "nowhere"
2>&1 means "both normal output and errors"
I'm slowly making my way up there
still can't get the debugger to run py tho ๐
like ctrl f5 doesn't work
That's like the most basic feature with the python plugin
~~print(f"{variable=}") ~~
I've just been manually using python3.9 -m main
I actually end up writing my own debug frameworks
Usually with some runtime features to test stuff directly
I rarely actually drop into an actual debugger unless I'm seeing something really weird
ya I barely use the debugger tbh
If i'm dealing with containers of objects then maybe but normally I'll just (p)print
Anyway
I've never heard of the ctrl f5 not working
Does running from the command palette or menu work?
nope
actually I do have coderunner installed so I could probably use that
idk i haven't looked into it much
I only need to type it once per session it's not that big of a deal
let's me choose my version super easily too
my sublime text discord rich presence isnt working
Any reason I shouldn't use yay to install stuff like jetbrains toolbox
oh ik how to fix that
read the comments on the package's AUR page.
ikr
sudo apt install minecraft maybe
wait @versed saffron you want to play minecraft from ubuntu or run a server?
yay can fetch from official repositories right? Any reason to use pacman then?
If you don't want to update AUR binaries
Which often take time if they're built from source
I'm not sure what you mean
If you have any AUR packages installed that run compilers, doing yay -Syu would take a while compared to sudo pacman -Syu that just downloads pre-built binaries for you
yay is for aur packages made by the community, pacman is the official packages given by the distro
but yay can be also used to install packages from official repos
Haskell usernames now? nice
is my math correct here?
im looking ofr the segment on the circle, l
i have the circumference r and the two points x1, x2
Looks right to me based on the formula
What's the radius?
lol I knew it
I don't know any way you can find arc length without given radius and angle.
If you know the two points and the center you can find it
Lmao nvm.
You need 3 pieces of information to uniquely identify a circle
You already have circumference and 2 points of arc length. So you can subtract it right?
Isn't it 30 - 5?
Ya
Yep. I was so focused finding the formula lol
hm
but this is just the clockwise distance
what if counterclockwise is shorter
It won't be
That doesn't make sense
5 clockwise is 195 anticlockwise
30 is 170
Subtract it and you still get 25
green line vs purple line
left point is at 195, right point is at 2.5 lets say
purple is 195 - 2.5
Use positive and negative numbers then
hm?
Typically anticlockwise is positive and clockwise is negative
You can't just subtract clockwise and anticlockwise distances without taking into account that they're opposite to each other
arc length or segment?
arc length
Are all distances clockwise?
Clockwise or anticlockwise only affects the calculation, not the result
how so?
if i go clockwise the distance between x1 and x3 is very large, counterclockwise its rather small
The minor arc is the minor arc. Whether you specify it's endpoints in clockwise or anticlockwise is irrelevant
yes, but if you calculate minor arcs you need the angle
i was hoping to do it without the angle
You don't
Take this example. 195-2.5 is the major arc, 200-that is the minor arc
[chr(ord('fmcd[luX`lxn'[i])^i) for i in xrange(12)] what does this python code do? anyone?
Seems to translate into some message of some sort
any help in solving because it is a CTF Challenge
Not sure whether I'm in the right place to hand out an answer if that's the case, but since you have the code, you can also just run it directly
i am actually a complete newbie to python
:(( so uhm start with some basics with python.
๐ฅบ
perhaps just run it?
well that was the first thing everone would do
have you run it
@rough sapphire kind of lol
lol did you expect it to go this far? ahaha
hahha I like your nick Vester
I like to think that Vester planned this all along
We need to put a stop to this.
There is no stopping the Gurkans.
Merry Christmas, PyDis
Happy Holidays!
merry christmas guys
You cannot stop the Gurkans. It's too late, our plan to overtake the world is already underway, soon the world shall belong to Gurkult.
There is no stopping us now
Submit, and we shall spare you
once we activate the xith bot and the world is ours
can't wait for the day we use this meme
helps the conversation. a good meme! wow how rare
well what does the gurkan power structure look like
beautiful
Vester is a master of both time and space. This outcome was inevitable for him.
indeed
is the website still making progress
with volunteer work with absolutely no return. progress is always slow
I am working on it right now
i planned on learning web dev this winter break, so i could help, but my computer died.
gonna take this as an opportunity to recruit... https://www.gurkult.com/discord
@eternal wing You really need to merge dev into main, kinda hard to say we are not a cult if the embed says we are a cult
lolol, fiiiine, ill update the build now
yeah, idk why they are fighting it
shhh
No
Merry Christmas๐
Gurklang is realllllly being developed rapidly though
Merry Christmas, all! ๐
mmerry happy
it looks complicated
well it's a meme language
Itโs not?
it's a language attached to a meme then
It should be a bit more clear once we have the tutorial. Thereโs just a shift in how things are written compared to python
Meh, itโs a serious language that weโre doing our very best to develop. Itโs not a quick overnight thing that weโre making
hm well
the whole gurkan thing ruined it for me before it's even a thing
it's like the dogecoin thing, someone tried to make a serious cryptocurrency and actually put effort into it
but it was attached to a meme that was already dead long before they started it
Havenโt heard of dogecoin
iut was a few years ago
gurkcoin
Honestly, life is just like a big array. And when you die, your entity object will just pop out of the array, making space for new elements to join the array. Its sad but the truth that in 100 years no one will care that you existed. Life will just go on and the array will keep on existing.
I mean to me that's the purpose of life
Make people remember you
Do some amazing stuff and you won't be forgotten
Yeah but how? Even people like Homerus that are remembered for more than 2000 years will be wiped out of everyone's memory someday
there was a story that the moment you die. is just a first death the moment your forgotten thatโs when you really die
Yeah but that's kind of true. I mean just after death you will live on in some people's memories.
But those memories will fade away at some point
I'd like to think that the things you've done and made are the things that will last
Like idk about you but we're heading to mars soon, and I don't think Elon Musk and that team will be forgotten anytime soon for the things they've done
Not soon for sure, but at some point I think they will be. Lots of people don't even know the name of first cosmonaut that entered space.
And that was just half an era ago.
People will forget who you are, but not what you've done
most people don't know who made the internet
but they will remember that someone made the internet
It was page right?
I think...
Or oh shit page invented google
oh ye
I think internet was made by nsa
But this is very true, that is why I like to think that all work I do serves a bigger purpose in the future.
ye
well not really
about internet
whatever replaces it will be based off the internet
what replaces it wouldn't exist without the internet
That's sad
this is the type of conversation that will put you in crippling depression
It was very common to make copies of books in that time tho, so I think that most of the books that were stored in the library had copies all over Asia and Europe.
But at the end I think everyone has made a difference right? Bcs take for an example the butterfly effect yeah. I think somewhere in your life at least once you have made a choice which would have enabled a chain of reactions which would have had a lot of influence on the state of society/ the earth in about 1000 years or something
yes
merry christmas!! have a nice day
u too
imagine one certain person can destroy the world by just shouting merry xmas?

i think the butterfly effect happens everywhere and even as i type and send this message
imagine this lemoji
can halt climate change?
๐ฅบ
It can happenโข๏ธ
when u say challenge accepted
Hahah
shout now.
MERRY CHRISTMAS
Merry Christmas
You yell merry chirstmas and the guy who was supposed to solve climate change dies of a heart attack, and viola, you've destroyed the world
guy/gal*
K
I got the noctua d15 for Christmas
Enjoy your jet engine mate
beefy boi
yes
he thicc
merry Christmas
So why does man Netcat doesn't work?
Well, maybe they just don't have a man entry?
haha
Merry Christmas ๐ฒโ๐ฒ
anyways, does anyone know a good free form pdf editor?
PDFelement
If you wants to perform any pdf convertion then try https://pdfcandy.com/
do i have to pay for the editable version?
This seems great, thanks for the recommendation

๐ ๐๐
i wonder whats the story behind this pasta
SANTA AND HIS SNEK CANE

@rough sapphire pls unblock me and can i dm u pleaseeeeeeeeeeeeeeeeeeeeeeeeeee
in dual monitor setups, is there a way to move the cursor instantly to whichever screen I want, without well moving it manually.
like in one monitor I'm currently using PyCharm, and cursor is in other monitor, can I move it to pycharm instantly?
no
You'd have to use a third party program I think
I don't think windows has anything to snap cursor to window
there is a setting in pointer settings
I have seen some tutorials where people do that so it is possible
but that doesn't do that, so idk
@brazen mica https://superuser.com/questions/1374974/shortcut-to-jump-mouse-cursor-from-one-screen-to-another-in-windows-10
This includes a script for autohotkey
This was also linked
oh man, its another language I have to learn to do this thing ๐
Well you don't really have to learn it
Considering basically the already done script is there
And it's a tiny basic scripting language anyway
Just be careful if you okay any games with anti cheat
Sometimes it will count ahk as a cheat program even if it doesn't touch the game
Hi
think its worth using a gui builder?
like its rather fast to generate code but the code generated u kinda dont want to read
Respect!
F

lol
?
@twin charm #ot1-perplexing-regexing
Hey guys so I donโt know where to ask this but I want to add a feature to my website where someone can input their email and message and hit send where it will send the email to me (basically like the customer service section). I was thinking to use the twilio api to send the email but idk how to get started. Anyone knows any good YouTube videos where I can start this?
I don't. FYI you can use mailto attribute for anchor element I think. Users can send email outside of your website.
ELLO
Ok
no
its not an attribute but ok
This channel dead
And what a wonderful contribution you made to it!
Sarcasm
Hii
Finally
finally what ?
y e s
hah
for some reason a lot of pip packages have started to fail to download at the dependency step
Does it have to do with something wrong with my configs?
@latent scaffold no coal generator for you

It generates power from coal 
if that happens you can simply try to install it again, u really dont wanna try the other way of installing
oh I've tried 3-4 times
does it work ? or fail?
fail
which package?
if your pip is updated and you tried all these time you can only do that manually then...
Ig I should try downloading these in a venv with python3.8/3.7
Um tried anaconda?
@haughty fractal
if steps in their main websites doesnt work
u lowkey download their github rep and install it manually i saw the setup.py there
thanks

thank you
what for? ๐
Hey
:incoming_envelope: :ok_hand: applied mute to @nova crow until 2020-12-27 11:55 (9 minutes and 58 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).
:incoming_envelope: :ok_hand: applied mute to @nova crow until 2020-12-27 12:11 (9 minutes and 59 seconds) (reason: duplicates rule: sent 4 duplicated messages in 10s).
Don't spam.
He sent 3 actually
I see 4 in the deletion log
heyy
Hi
hey, so this is dumb and unrelated, but: i have 5 drives rn: 1tb ssd (windows and applications live here), 256gb ssd, 128gb ssd, 1tb hdd, 320gb hdd. only got 4 sata ports on my motherboard. not really sure what i should do with this storage space? maybe a raid array? how would that work across different types of drives?
I'm giving you a nick name : 'mr.data'
I vote making it all one big software RAID and see if you can sufficiently horrify the software RAID controller into sentience.
FYI I would not attempt to set up a RAID, software or otherwise across SSD and HDD types. The best possible thing that can happen there is that the SSD will slow down to the same speed as the HDD.
what if i were to basically run two arrays? one between the ssds and one between the hdds? i removed the smallest ssd so i've got 1tb/256gb ssds and 1tb/320gb hdds. i have my os and applications on the 1tb ssd and media on the 1tb hdd
raid 0 enhances read/write speed but doesn't offer any redundancy, right? that would be a solid choice for the ssds, and raid 1 would be good for the hdds holding media?
what are you doing where you need to increase your ssd write speed?
nothing ๐
i just want to utilize as much storage space in the most sensible way possible rather than chucking perfectly good drives
fair enough - not sure raid0 is it, but i don't have any experience with raid irl
i just have a general understanding of how it works, not how to do it
couple different configurations. raid0 is striping, raid1 is mirroring, raid 10 is both
just to offer a cautionary tale, make sure you know what the hardware drivers for your storage do when you install them
i was updating all my drivers (fresh win10, new pc) and i figured id download all the intel drivers
the storage driver had me click through a bunch of things i didn't quite understand (and switched me away from ahci)
i dual boot off 2 ssds, and it somehow ended up copying my windows boot partition onto the 2nd ssd and overwriting part of my linux installation
no idea why tf it did that, it probably warned me and i didn't realise (although who expects that from installing a driver, even if it changes some settings)
so just read everything, and if you're not sure ask
i just reformatted everything except for the master and the primary slave drive
the other ssd is completely empty and i don't run any os other than windows rn
fingers crossed you're fine then
5 by 5
lol
Anyone else got a random DM asking about code December? Or some shit like that
(Reposted in a free chat)
is automating uploading videos to youtube allowed?
check the tos. im not sure
very much so lol
Yep youtubes api supports that
haha that is how a channel posted a video every sec
Bandwidth goes brrr
hahah
I think by default the api won't let you upload more than 6 per day unless you have special permissions
lel
imagine youtube giving special perms
joe why u picky
joe mama

Hey @drowsy shore!
It looks like you tried to attach file type(s) that we do not allow (.rar). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .webm, .webp, .flac, .afdesign, .m4a, .csv.
Feel free to ask in #community-meta if you think this is a mistake.
w h a t
any good cheap laptops that dont lag and its not for gaming just for coding and other shit
@scarlet wind happy birthday
๐ฅณ
I'm confused what -> is used for in C++.
This whole pointers concept is new to me since I come from python background; so ik & is used to access memory location, * points to another variable/location of a variable... what's - >?
On a related note, I see this used with - > alot... what is it lol
long question that's confusing, pls tell me if it's too complicated lol
I think foo->bar is the same as (*foo).bar... the arrow operator is for pointers
Hopefully that's right... I barely know any C
In C, x->y is the same as (*x).y, C++ supports operator overloading and may have special rules/behavior in special cases, where it doesn't apply. But basically, -> dereferences a pointer and then jumps to the dereferenced addresses' offset, where . jumps directly to an offset.
this is comparable to python's self (except you can't control its name) and exclusive to C++, where it explicitly references a class instance. i don't know if the -> notation is somehow followed as above or if it's filtered out in a certain way. this.x would probably fail, at least
But omitting this in this->x will modify a class attribute anyways if x is a class attribute, if it was defined in a closer scope (e.g. local to the class function), it will reference the local variable
why would u use -> and pointers and stuff instead of just .
ah, ok
mainly as C is entirely pass-by-value, brb plugging my own project
I'll still put something you can return to then I guess. I have this struct here which comes with a function to properly destroy one as well:
typedef struct {
uint16_t event_type;
PyObject *name;
uint16_t entries_capacity;
uint16_t entries_len;
GameEventEntry *entries;
} GameEventDefinition;
``` and its "destructor":
```c
void GameEventDefinition_destroy(GameEventDefinition *self) {
if (self->entries != NULL) {
for (uint16_t i = 0; i < self->entries_len; i++) {
GameEventEntry_destroy(self->entries + i);
}
}
Py_XDECREF(self->name);
free(self);
}
As you can see, I just adopted python's naming in this halfways object oriented approach (there is no true objects in C, closest you can get is structs and functions that operate on struct pointers).
But as C is entirely pass-by-value, passing in the GameEventDefinition by (GameEventDefinition self) would have a very ugly effect: It would copy all of the Entry's fields into the function - so the function receives 22 bytes instead of an 8 byte pointer (I'm assuming 64bit here), and those aren't really the original GameEventDefiniton anymore. This would still work up until the 2nd to last line if you converted all the ->s to .s since the pointers to the fields that need to be freed are copied correctly, but after that it would attempt to free the structure (on 64bit the first 8byte of the structure, so a mix of event_type and the PyObject pointer), which will probably corrupt your heap. Changing it to free(&self); to get a proper pointer again would still be bogus, as the address the struct is copied into has never been seen before by malloc, free and Co.
I gotta go now too though, not too sure if my explanation is correct (especially that last & part), but I hope it helped ๐
:D
Thx
interesting OT name #ot1-วotname-add-วotn-add
!otn a วotname-add-วotn-add
Hi, it really bothers me to bother others but could someone please compile neovim nightly from source for me?
I'm using Termux on Android, so I have to apply patches to make it work but luajit gives me compilation errors even though I have it installed and nothing works for me, I've been trying to compile for hours :slight_frown:
I would only pass a pastebin where the BASH script is with all the patches, you can check if you want that it doesn't contain anything bad. Thanks in advance
Uh
Cross compiling for android?
Cause I don't have terminal access to compile on anything for android
But if it can be cross compiled on x86 I can do it
Though I don't know why you'd want vim in the first place, let alone a specific nightly version
@indigo wave
I don't think cross-compile is needed in this case ๐ค
I use neovim as my editor for some years now, and the nightly version contains built-in LSP support
that's actually neat
but if it's to run on android, I'd expect it to need cross compile
'cause I'm on x86
unless your android is x86 as well, it'll need to be compiled for ARM, no?
^^ @indigo wave
Yes, arm64
Yeah, so I'd need to cross compile.
Oh I thought it wasn't required (I'm very new to compiling lol)
Also I'm going to be flying on DCS now, so my responses will be exponentially slower
Compiling creates binaries
No problem
and binaries are platform specific
Yes, I do know that
so me being on x86_64 I would need to use a compiler and specific options to target Arm64, and whichever specific version of ARM you're using on top of that
it's a very very specific and fragile process
I understand, although I think there was a docker image to compile for Termux ... Let me look and see (I suppose it would be easier that way, if you have docker)
I don't but I can set that up easily
Understood, although first I will see if they answer me in the Termux subreddit to see if I can solve it myself and thus not have to bother you ๐
In case I can't fix it myself, can I ping you?
Yes not a problem
Hello
@rough sapphire It'd be better if you could show index.html
whats the most youve coded
like in one file
how many lines
that isnt copy past3
i am asking anyone
the most lines theyve coded
Hello
i wanted to make a software using opencv and solve some quiz in real-time, questions are simple mathematics how can i do that
1648 lines of code. Its in my github account actually you can check
one thing about my code is that its messy and even my brother says that. so ig this 1648 can be accomplished in 800
After a limit, usually too many lines of code in a single file means you should split it up
I think some of my java stuff was >6k total and >2k in a single file. Generally less though.
wow
There are some small optimisations, but a VM is slow
There's no way around that
Not really
You could maybe try with WSL?
I'm not sure if there's even a way
Maybe you could X-forward into it?
But that's some heavy linux magic
GUIs do work in WSL, or so I have heard
why do you have to use steam link in a linux instance?
hmm
will using virtual desktops work?
and is it not just possible to stream a particular window?
and not the entire desktop?
nah, it won't work then
virtual desktops is like alt tab, but for your desktop
why don't you use netflix or something lol
what do you stream anyway?
oh
hmm, yeah
I have a Russian friend who's a sound technician. And a Czech one too.
I laughed for like 5 minutes at that
i dont get it :'(
Try reading it out aloud.
(Explanation of joke): ||A Czech one too sounds like|| ||a check one two|| ||which is the sort of thing a sound technician might say to test a mic||
I'm Australian. I daren't say what we use as a microphone test.
Say it.
||สunษ||
Seriously @acoustic moss?
I think Akarys is saying "seriously" in a laughing disbelief kind of way rip
Come on, the country of Australia can't sue
Unless
Better to err on the side of caution ยฏ_(ใ)_/ยฏ
Fair, Akarys is a mod
Out of all the words you could have chosen, you used this one
||stares quizzaciously||
|| Yes ||
guys how do I write a regular expression that starts with either + or -
?
it can either start with + or -
-1 + 1
kinda weird
Can you tell me how to write it
-1 += 1 ?
Why would you
bruh
What the fuck are you talking about
I think a variable can start with a minus
come to the help channel
lol i got it
I'm just trying to download drivers which I've never done before
hey which name is more good?
Devs Reborn or Devs Unbound
is Devs short for developers, or are you making a group of people named Dev?
lol
he didnt respond sad
yes
Nice video -----> https://www.youtube.com/watch?v=mTeeJwhaD-0
Hey could someone explain to me what a cache is?
Cause i don't understand "its something that stores data, which is faster when retrieving it"
Alright
A cache is something you put between the data source and the consumer
For example, let's take an image provider services
Each clients would pull images from servers around the world
But the server will have to fetch it on the disk, and the data will travel several country, making it slow
Right?
What if we now put a cache in the middle? Well, the client communicate to the cache, ask for X image, and two things can happen :
- The cache has the image in its super fast memory and will send it. The image will have taken way less time to be sent and will take less distance the travel, which mean it will be send way faster.
what is an example of a cache?
- The cache doesn't have it, so it will ask to the server for the image, deliver it, and store it in its super fast memory and discard one of the images it already had, because its memory is limited
- 404
Well, a CDN cache is exactly what I described and it is often used by big companies such as Discord
BTW, the second behavior is called a "cache miss" and you should try to avoid the less cache misses as possible
i mean like literally what is an example of a cache
What @solid pollen just described
Also your cpu has several levels of cache
Which are closer and closer to the actual processor. The closer levels are also made differently, so they're faster to access apart from also being physically closern
๐
It's the reason why quicksort is faster than merge sort too
quicksort is recursion AFAIK
So?
where does cache come into play?
It's like if I ask you the same question a second time, I'll repeat the same answer I'd given before without thinking about it again
is cache = memory
Merge sort has to access far apart indexes of the array, so it has to load different blocks of memory into the cache repeatedly. That makes it slow (more cache misses)
Quicksort operates on close together blocks of memory, meaning for a (relatively) long sequence of operations the data it needs is already in cache, so it's faster
i don't even know what merge sort is,
Caching is storing stuff you might need in a place that's faster to access than where it originally was
and what's the "place"?
it's more of a subset
A cache should just be faster than the database, otherwise it is mostly useless
Anywhere that's faster to acces
such as
huh
CPU caches are on the cpu, which is closer and faster than ram or the hard drive
cache is a part of memory, yes, cache = memory, no
Suppose you had to calculate the factorial of a bunch of numbers
You could repeatedly loop from n to 2 for each number
But that's slow
If you've already calculated the factorial for 4, you don't need to repeat it for 6. Just do 4!ร5ร6
So you store 4! In a cache
Next time you need it, just use that
That's an example of caching as well
Ok, could u explain to me what cache means here
LRU cache implementation for coroutines. Once the cache exceeds the maximum size, keys are deleted in FIFO order. An offset may be optionally provided to be applied to the coroutine's arguments when creating the cache key.
Not enough context. Also don't know what any of that is
LRU cache implementation for coroutines.
Once the cache exceeds the maximum size, keys are deleted in FIFO order.
Basically means that if the capacity of the cache is exceeded, the keys that weren't used recently will be the first ones to be deleted from the cache to make space for the new data.
FIFO means that the first things to enter cache will also be the first ones deleted
whenever the function gets called
it stores what it returns into the cache
and then next time it gets called with the same arguments, it just returns from the cache, rather than running the function again
oh
Kind of like the factorial example then
so i can understand cache as "part of the memory"?
Maybe I shouldn't have used memory
A cache should just be faster than the original source
a big-ass database for example
hmmm
essentially, a cache is a shortcut. You get the value from some slow source and the cache remembers it, allowing you to get it the second time much faster
can we consider a dict as cache?
in some contexts, yes
consider this really stupid fibbonaci numbers function
def fib(n):
if n < 2:
return n
return fib(n - 1) + fib(n - 2)
```. Now consider what would happen if we implemented a cache for it
```py
cache = {}
def fib(n):
if n in cache:
return cache[n]
if n < 2:
return n
result = fib(n - 1) + fib(n - 2)
cache[n] = result
return result
```which of these functions would you expect to be faster?
(neither of these are good ways to get fibbonaci numbers)
it's + not *
oh mb
the first one
why?
wait no
the second one cause it checks if the number is in cache
before doing anything
oh wait, I screwed up the second one too. Sorry, I am a bit out of practice
ye it's aight, i understand




