calcopiritus

joined 1 year ago
[–] calcopiritus@lemmy.world 5 points 2 days ago

To be fair abortion is not risk-free and side-effectless. It's much preferable to encourage the use of contraceptives in those situations.

[–] calcopiritus@lemmy.world 17 points 3 days ago (1 children)

What's up with all these posts lately talking as if C was the chain breaker that will let you achieve a higher spiritual level for your soul or some shit. This is at least the second I've seen this week.

It's a programming language. If you want to use it, use it. There is no illuminati pulling in the strings to prevent you from learning this holy language.

That being said, like all programming languages, it's a tool, with its upsides and downsides. Depending on the project it might be the best choice or the worst. But with the advancement in language design, there's very little upsides compared to more modern languages, taking into account its big downsides.

[–] calcopiritus@lemmy.world 10 points 4 days ago

Ah, a C programmer.

[–] calcopiritus@lemmy.world 2 points 5 days ago

It's a one line function in an example. It's a getter.

[–] calcopiritus@lemmy.world 8 points 5 days ago* (last edited 5 days ago) (4 children)

Considering how politically active he is, he might become a politician (even running for president?). A lot of people will care about this if suddenly Elon musk appears in American ballots.

EDIT: I just remembered that Elon cannot run for USA president. But idk if other political positions are open.

And seeing how trump can break every law, I don't see what would prevent Elon from running for president.

[–] calcopiritus@lemmy.world 4 points 5 days ago

Lmao, and they say dynamic typing is supposed to speed up the developer.

[–] calcopiritus@lemmy.world 3 points 5 days ago* (last edited 5 days ago) (2 children)

This is literally a getter function. How is a getter awful code? It's the simplest function there is. The only function simpler than that is returning the input itself.

[–] calcopiritus@lemmy.world 1 points 5 days ago (4 children)

Python doesn't check the types of function headers though. They're only hints for the programmer.

[–] calcopiritus@lemmy.world 1 points 1 week ago (1 children)

The lava lamps are not true random though. For something to be truly random, it must be non-deterministic (no seed at all). The only way for a computer to accomplish this is to read from a source of true randomness in nature. The lava lamps are random enough, but not truly random.

At the moment, the only source thought of being non-deterministic is quantum mechanics.

So if you make a computer generate random numbers out of the randomness of quantum mechanics, you would have truly random numbers.

[–] calcopiritus@lemmy.world 2 points 1 week ago

For rust I use iced, as it meets all my needs and is a delight to work in. I don't think it's good for making graphs though. For graphs I heard that people like matplotlib (in python), which you can also use inside PyQt apps. I've tried using matplotlib and did not enjoy the experience at all, but I don't know of any alternatives.

[–] calcopiritus@lemmy.world 4 points 1 week ago (2 children)

Even if you're alone, where are you throwing the butt? The answer is: the ground. The ground is absolutely full of cancer sticks. And I see the city's cleaning machines clean the entire streets at least once a day. It's still full of the things.

[–] calcopiritus@lemmy.world 8 points 1 week ago* (last edited 1 week ago) (1 children)

If they actually disposed correctly of their cancer-sticks I would prefer to be a ban only on urban areas. But seeing how the entire floor is littered by the paper dildos, I think smokers haven't shown they can responsibly smoke in non-urban areas. Fuck them.

 

I want to do basically this:

struct MyStruct < T> {
    data: T
}

impl < T> for MyStruct < T> {
    fn foo() {
        println!("Generic")
    }
}

impl for MyStruct < u32> {
    fn foo() {
        println!("u32")
    }
}

I have tried doing

impl < T: !u32> for MyStruct < T> {
    ...
}

But it doesn't seem to work. I've also tried various things with traits but none of them seem to work. Is this even possible?

EDIT: Fixed formatting

view more: next ›