calcopiritus

joined 2 years ago
[–] calcopiritus@lemmy.world 2 points 15 hours 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 47 points 20 hours ago* (last edited 20 hours ago) (2 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 20 hours ago (3 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 20 hours 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 1 day 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 4 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 4 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 4 days ago (1 children)

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

[–] calcopiritus@lemmy.world 7 points 4 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.

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

Completely disagree. Wine grapes are good too. In small quantities though, eat too many of them and there's a flavour that starts accumulating, which turns you off from eating too many.

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

Can't you just reserve X bits of the primary key to store a shard ID?

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

That explains why everyone in anime seems so fucking dumb.

"In order to kill the guy, we have to shoot him in the head"

"So you are saying that we have to shoot the guy in the head in order to kill him?"

Yes you little shit, that's exactly what he said, with the exact same words. It's so annoying.

view more: next ›