calcopiritus

joined 2 years ago
[–] calcopiritus@lemmy.world 1 points 16 hours ago

Unfortunately, it's the only sane cross-language ABI option there is.

C++ is a close second, which is mostly because C++ uses the C ABI wherever it can.

Even if the language itself is obsolete, it will live on for many more years just because of that.

[–] calcopiritus@lemmy.world 1 points 3 days ago

Go to crates.io, search for whatever you need. Most probably it will be multiplatform.

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

There are plenty of cross-platform libraries in rust. In fact, most of them are. Since Rust is cross-platform at its core.

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

"plugins" is not a feature. What plugin specifically do you need? Most probably you can accomplish whatever you need with a library and iced. Plugin is just a fancy word for library.

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

Yeah. That's a huge issue rust has. However, it can't be solved with Rc.

You either do it in safe rust, by "cheating" the borrow checker and storing a size offset of the buffer instead of a reference. Or just use unsafe rust and store a raw pointer alongside the buffer.

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

This is not about that. This is about a security researcher that wasn't paid by Microsoft's bug bounty program when they found a security bug.

Bug bounty programs exist to prevent this exact scenario. To give people a reward for privately disclosing the vulnerability with the devs instead of publicly/to a bad actor.

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

Do you really need tauri?

Tauri is for web devs that want to make GUIs with web tech in rust. You can do GUIs without web tech.

If you really want to make a GUI with rust, you can use iced.

If you just want a GUI with web tech, do it in JavaScript+html.

If you want a GUI without web tech and don't care the language, use a GUI toolkit for your preferred language.

Learning a GUI toolkit is hard. Learning a language is hard. Learning both at the same time is even harder than the sum.

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

Do you really need that much Rc? That is, do you really need multiple ownership for a piece of data in a single thread? It is rarely the case, many times you can get away by just borrowing that data.

ARc is harder to avoid, since across threads you often really need the multiple ownership.

Next is, do you need RefCell? Or would a simple Cell in some of the struct fields be enough?

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

The standard way to link in rust is statically.

Due to a technicality, statically linking a GPL library means the final program has to be GPL too. So they basically can't make GPL libraries.

Why not use LGPL instead of MIT? Idk.

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

You either make driving fast less safe, or you put a speed camera on every corner with the appropriate punishment. Cameras are expensive, and drivers will complain about them. If you make driving fast less safe, only the ones that remember how the road was before can complain about it.

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

Your comment does nothing more than reinforce my claim.

Paying attention in class is actually hard work. Some people cannot do it even if their life depends on it.

Paying attention in class is just the biggest indicator (IMO), but it is still just an indicator. Of course other aspects have an impact too. Having the time, space, and resources to actually be able to do homework at home is huge too. But homework is still at most 2 hours per day (on a particularly homework-heavy day). Kids spend ~8 hours at school.

That's why I believe that what you do in school has the most impact on your school performance. At the end of the day, the place where kids spend most of their time is at school. If they make the most of that time, they will most probably at least pass the class.

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

The thing is not who does it. The thing is who complains about it.

view more: next ›