calcopiritus

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

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

[–] calcopiritus@lemmy.world 1 points 23 hours 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 23 hours 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 1 day 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 52 points 1 day ago* (last edited 1 day ago) (6 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 1 day 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 1 day 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 2 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 5 days 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 5 days 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 5 days ago (1 children)

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

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

I used to believe this is true. That is because I used to get very good grades without barely trying.

However, it was later in life that I learned I was trying very hard in comparison to other students.

Other students studied for at least 1 week before the exam, a couple hours per day. Or so they said (I also realized later most were probably not being honest). Meanwhile I just quickly checked the textbook the day before.

However. What happened in class? I was paying 90+% attention to the teacher. Engaging in class and answering the teacher's questions when he asked them. Meanwhile, the ones that claimed to study so hard would be doodling, or looking at the clock, or talking to whoever was closer to them. Only paying some attention when someone asked "is this going into the exam?" And the teacher answered "yes".

Of course, there may be people that even paying full attention in class, and doing all the homework, and studying many days in advance would perform poorly. But in my experience, the best indicator for success is attention paid in class, which is NOT low effort. You have to try very hard to not be distracted by classmates who are probably having more fun than you.

view more: next ›