Yes for example Python implements them using semaphores.
Yes for example Python implements them using semaphores.
It doesn’t violate any rules… Imagine both the “speaker” and the “text” are being updated by separate threads. A program that would eventually display the behavior in this meme is simple, and I’m a bit embarrassed to have written it because of this comment:
#include <pthread.h>
#include <stdio.h>
char* speakers[] = {
"Alice",
"Bob"
};
int speaker = 0;
void* change_speaker(void* arg)
{
(void)arg;
for (;;) {
speaker = speaker == 0 ? 1 : 0;
}
}
char* texts[] = {
"Hi Bob",
"Hi Alice, what's up?",
"Not much Bob",
};
int text = 0;
void* change_text(void* arg)
{
(void)arg;
for (;;) {
switch (text) {
case 0:
text = 1;
break;
case 1:
text = 2;
break;
case 2:
text = 0;
break;
}
}
}
int main(int argc, char* argv[])
{
pthread_t speaker_swapper, text_swapper;
pthread_create(&text_swapper, NULL, change_text, NULL);
pthread_create(&speaker_swapper, NULL, change_speaker, NULL);
for (int i = 0; i < 3; ++i) {
printf("%s: %s\n", speakers[speaker], texts[text]);
}
}
Yes I’m mostly familiar with this in Kotlin. Sometimes this is kinda a footgun because you’re writing multi threaded code without explicitly doing so.
Async features in almost all popular languages are a single thread running an event loop (Go being an exception there I believe). Multi threading is still quite difficult to get right if the task isn’t trivially parallelizable.
You can use udev to make a symlink with a consistent name
It’s not trivial on Fedora due to SELinux; you’ll need to use https://github.com/DeterminateSystems/nix-installer
They were very clear it was for research in my memory. That was the reason I did it.
I’ve never had an issue using banking apps from Lineage. I use 3 different pretty mainstream ones
deleted by creator
They don’t have your password in any form. The random key is generated with a CSPRNG, we don’t know how to crack those. They aren’t hiding behind secrets: it’s all documented right here https://1passwordstatic.com/files/security/1password-white-paper.pdf
1Password is quite good.
Not sure if you’ve read this but it might help get started.
https://1passwordstatic.com/files/security/1password-white-paper.pdf
You can use
~/.local/lib
andLD_LIBRARY_PATH
for shared libs.Or better yet just give in and use the
nix
package manager, it is basically a virtual environment for your C programs.