[-] [email protected] 5 points 3 hours ago

Well, game freak is still a Japanese developer. Mario Cart is a very computationally light concept, as usually are Mario games, idk about odyssey in particular though, but they tend to be small maps with small amount of entities each. Zelda is fair, I've heard good things about it.

It's easy to make a good performing game if its concept and art design are computationally light. Optimization is about turning a computationally hard problem into a light algorithm that doesn't take much resources.

[-] [email protected] 8 points 3 hours ago

The new Pokemon games grind to a halt if you are in the south of the map and look at the north. Because you are rendering the entire map. How is that optimized to hell and back?

[-] [email protected] 10 points 1 day ago

Ah, a C programmer.

[-] [email protected] 2 points 1 day ago

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

[-] [email protected] 8 points 1 day ago* (last edited 1 day ago)

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.

[-] [email protected] 4 points 2 days ago

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

[-] [email protected] 3 points 2 days ago* (last edited 1 day ago)

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.

[-] [email protected] 1 points 2 days ago

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

[-] [email protected] 1 points 4 days ago

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.

[-] [email protected] 0 points 6 days ago

Dear imgui absolutely exists on rust. Which is the same dear imgui as C/C++. If you want a rust option though, there's egui, which is basically Rusty's version of dear imgui.

[-] [email protected] 2 points 6 days 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.

[-] [email protected] 114 points 10 months ago

Unlock origin is the adblocker that people are installing. There are a lot of people with shitty adblockers out there, I guess they are switching.

8
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]

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 ›

calcopiritus

joined 1 year ago