qqq

@qqq@lemmy.world

This profile is from a federated server and may be incomplete. Browse more on the original instance.

qqq, (edited )

You can use ~/.local/lib and LD_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.

qqq,

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:


<span style="color:#323232;">#include <pthread.h>
</span><span style="color:#323232;">#include <stdio.h>
</span><span style="color:#323232;">
</span><span style="color:#323232;">char* speakers[] = {
</span><span style="color:#323232;">    "Alice",
</span><span style="color:#323232;">    "Bob"
</span><span style="color:#323232;">};
</span><span style="color:#323232;">int speaker = 0;
</span><span style="color:#323232;">
</span><span style="color:#323232;">void* change_speaker(void* arg)
</span><span style="color:#323232;">{
</span><span style="color:#323232;">    (void)arg;
</span><span style="color:#323232;">
</span><span style="color:#323232;">    for (;;) {
</span><span style="color:#323232;">        speaker = speaker == 0 ? 1 : 0;
</span><span style="color:#323232;">    }
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">char* texts[] = {
</span><span style="color:#323232;">    "Hi Bob",
</span><span style="color:#323232;">    "Hi Alice, what's up?",
</span><span style="color:#323232;">    "Not much Bob",
</span><span style="color:#323232;">};
</span><span style="color:#323232;">int text = 0;
</span><span style="color:#323232;">
</span><span style="color:#323232;">void* change_text(void* arg)
</span><span style="color:#323232;">{
</span><span style="color:#323232;">    (void)arg;
</span><span style="color:#323232;">    for (;;) {
</span><span style="color:#323232;">        switch (text) {
</span><span style="color:#323232;">        case 0:
</span><span style="color:#323232;">            text = 1;
</span><span style="color:#323232;">            break;
</span><span style="color:#323232;">        case 1:
</span><span style="color:#323232;">            text = 2;
</span><span style="color:#323232;">            break;
</span><span style="color:#323232;">        case 2:
</span><span style="color:#323232;">            text = 0;
</span><span style="color:#323232;">            break;
</span><span style="color:#323232;">        }
</span><span style="color:#323232;">    }
</span><span style="color:#323232;">}
</span><span style="color:#323232;">
</span><span style="color:#323232;">int main(int argc, char* argv[])
</span><span style="color:#323232;">{
</span><span style="color:#323232;">    pthread_t speaker_swapper, text_swapper;
</span><span style="color:#323232;">
</span><span style="color:#323232;">    pthread_create(&text_swapper, NULL, change_text, NULL);
</span><span style="color:#323232;">    pthread_create(&speaker_swapper, NULL, change_speaker, NULL);
</span><span style="color:#323232;">    for (int i = 0; i < 3; ++i) {
</span><span style="color:#323232;">        printf("%s: %sn", speakers[speaker], texts[text]);
</span><span style="color:#323232;">    }
</span><span style="color:#323232;">}
</span>
qqq, (edited )

Yes for example Python implements them using semaphores.

qqq,

I’m relatively qualified. Studied physics all through college and spent a couple years working in quantum computing. I’ll chime in here because Schrodinger’s cat jokes are a pet peeve.

You are correct that, as far as we understand, it is literally impossible. There has been a competing theory for decades, but I’m not really up on the specifics en.wikipedia.org/wiki/De_Broglie–Bohm_theory. The reason it is generally rejected is that it appears to violate relativity.

Anyway… the cat thought experiment is such a fun thought experiment to me because it specifically makes us think about a very practical issue with respect to quantum computing: decoherence. If you take his thought experiment to an extreme, it actually should be theoretically possible to create a state in which a macroscopic object (the cat) and a quantum object (the radioactive source) are indeed entangled. But that is absurd according to everything we’ve ever seen. So what’s up? The missing concept here is decoherence – while this state may theoretically exist, it’d decohere on timescales so small we can’t even imagine. The fun connection here is that decoherence is the exact thing we’re trying to fight in quantum computing. Essentially we’re trying to make this thought experiment a reality for a much less complex system.

Some more on decoherence: en.wikipedia.org/wiki/Quantum_decoherence

qqq, (edited )

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.

qqq,

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.

qqq, (edited )

Don’t know you exact situation, but you should be able to bring your own modem (or modem/router combo) or put their provided unit into bridge mode

qqq,

Yes, but if you can’t get your own modem it’ll at least stop you from having your traffic slowed down by the router side of their hardware

qqq,

You can use udev to make a symlink with a consistent name

Switched from Manjaro to Fedora after being told Manjaro is "a bad distro" by many. Looking for a telnet terminal such as Syncterm to run on rpm or flatpak. (lemmy.zip)

Welp, I made a similar thread yesterday regarding Manjaro but I decided to swap to Fedora as my daily driver for stability purposes. Unfortunately since fedora is yet another non Debian distro I need help finding a Syncterm replacement....

qqq,

It’s not trivial on Fedora due to SELinux; you’ll need to use github.com/DeterminateSystems/nix-installer

qqq,

Good explanation but a little nit: Colorado is a very purple state. We’re the home of Lauren Boebert and Focus on the Family after all.

I don’t think a Republican has won the presidential vote since GW Bush here though

qqq,

Most responsible climbers bring something with them to pack it out, but there are some irresponsible ones that do what the comment above mentioned. That is the exception, not the rule though.

qqq,

They’re just having fun

qqq, (edited )

I hate getting into these discussions.

This is Arnaud Petit and Stéphanie Bodet, two professional climbers with far more experience than you. They are doing the second ascent of a 900 meter 8a on Angel Falls (Rainbow Jambaia, 31 pitches) which is about the same height as El Capitan in Yosemite National Park. Here is a story about it. You almost never plan to climb routes this long in a single day, especially not on the second ascent. They most definitely planned to sleep on the wall and brought the proper equipment. This is called big wall climbing

Just be happy for people doing what they love and do what you love: your life will be better. We’re all motivated by different things.

qqq,

This has always been a weird take, what do you think attracts people to that kind of SAR work? Generally a love for the outdoors and activities like this. You’ll have a hard time finding someone capable of high angle rescue that doesn’t enjoy or understand climbing as a sport.

qqq,

They were very clear it was for research in my memory. That was the reason I did it.

qqq,

I’ve never had an issue using banking apps from Lineage. I use 3 different pretty mainstream ones

qqq,

A lot of weird hate for 1Password on Lemmy the past couple days. I highly recommend reading their white paper, I think most of the hate comes from ignorance of what they are actually doing.

1passwordstatic.com/…/1password-white-paper.pdf

qqq,

1Password is a solid service if you’re OK with the proprietary aspect. I use it personally and we use it at work (I’m an infosec consultant)

qqq,

This is not necessarily true.

For example, consider the case of a 1Password vault falling into the hands of an attacker. They do not have the option to just crack your password, as the password is mixed with a randomly generated value to ultimately derive the key. They would need to simultaneously brute force your password and that random value. This should almost be impossible. However, given access to a client that already has knowledge of the secret value, it would fall back to brute forcing the password.

qqq,

Not sure if you’ve read this but it might help get started.

1passwordstatic.com/…/1password-white-paper.pdf

qqq, (edited )

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 1passwordstatic.com/…/1password-white-paper.pdf

1Password is quite good.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • cubers
  • DreamBathrooms
  • ngwrru68w68
  • Durango
  • osvaldo12
  • magazineikmin
  • mdbf
  • Youngstown
  • slotface
  • rosin
  • everett
  • kavyap
  • anitta
  • normalnudes
  • thenastyranch
  • khanakhh
  • cisconetworking
  • modclub
  • GTA5RPClips
  • InstantRegret
  • tacticalgear
  • provamag3
  • ethstaker
  • tester
  • Leos
  • megavids
  • lostlight
  • All magazines