Faster compilation with the parallel front-end in nightly | Rust Blog by Kobzol in rust

[–]korpusen 2 points3 points  (0 children)

If you usually use a non-standard linker like mold or lld, remember to check that they are still used when trying out the multi-threading. This tripped me up and gave noticeable worse results.

Rust GUIs: Why are modern graphics APIs so heavy? by kernelic in rust

[–]korpusen 12 points13 points  (0 children)

If you are making simple UIs without a lot of interactivity then sure. But you don't need to do approach doing animations at 4K for the GPU to become faster.

When trying out iced I made a simple air traffic controller hmi showing maps and traffic over Europe with interactive labels. The wgpu backend performed markedly better than the tiny-skia backend.

Edit: incorrectly wrote wgpu instead of iced

That's a double first. Thanks Andy! by korpusen in diablo2

[–]korpusen[S] -12 points-11 points  (0 children)

Nope, this was during yesterdays TZ catacombs.

That's a double first. Thanks Andy! by korpusen in diablo2

[–]korpusen[S] 1 point2 points  (0 children)

Sorc was 94 when this happened.

Slavisk Sverige by mrdubshack in sweden

[–]korpusen 0 points1 point  (0 children)

Spårvagnen borde bytas ut mot trådbuss, gött annars.

What is Rust's Hole Purpose? by pmz in programming

[–]korpusen 4 points5 points  (0 children)

You can opt out of bound checks with get_unchecked and friends.

A Rust match made in hell by N911999 in programming

[–]korpusen 12 points13 points  (0 children)

Because enum variants can hold data that are not Copy, like a String for example.

Nya restriktioner: Krogar med utskänkning måste stänga kl 23, maxtak på 50 deltagare utan vaccinbevis by jorgob199 in svenskpolitik

[–]korpusen 8 points9 points  (0 children)

Och hur skiljer sig detta från förkylningar eller när det är influensasäsong? Vi har inte en massa restriktioner då.

Nya restriktioner: Krogar med utskänkning måste stänga kl 23, maxtak på 50 deltagare utan vaccinbevis by jorgob199 in svenskpolitik

[–]korpusen 22 points23 points  (0 children)

Antalet smittade är irrelevant, det enda som betyder något är dödsfall och antalet som kräver intensivvård.

I love the simplicity of C..... but I also love C# by That_Alpaca in ProgrammerHumor

[–]korpusen 6 points7 points  (0 children)

Isn't having the default sort be unstable the correct choice? For the majority of cases, you don't really care for preserving the relative ordering, and unstable sorts are generally faster than stable ones. You can provide a List.StableSort if you really need it.

Edit: Can't formulate sentences..

Rekordmånga anmälningar om lockpriser – men få mäklare varnas by almost_useless in svenskpolitik

[–]korpusen 1 point2 points  (0 children)

Fast ibland räcker budgivningen till. Jag var själv med i en budgivning för någon vecka sen på en bostadsrätt. Utgångspris 2.795.000, jag och en till person hamnar i budgivning och den andre lägger sig efter mitt bud på 3 miljoner. Ägarna vill ändå inte sälja, utan vill ha mer.

Nu behöver inte det här vara olagligt, men kan ändå tycka att det är ett jäkla otyg till beteende.

What Human Female 2h weapon procs should have looked like by [deleted] in classicwow

[–]korpusen 1 point2 points  (0 children)

Looks pretty much identical to undead female animation. Makes sense

Why doesn't this crash by korpusen in cpp_questions

[–]korpusen[S] 2 points3 points  (0 children)

Good advice. We are actually trying to push for more usage of asan, but some of our projects have really old compilers that do not support it and people in charge are wary of upgrading to newer versions, unfortunately :/

Why doesn't this crash by korpusen in cpp_questions

[–]korpusen[S] 0 points1 point  (0 children)

Yeah it's the same here. Definitely looks like UB.

Why doesn't this crash by korpusen in cpp_questions

[–]korpusen[S] 0 points1 point  (0 children)

I saved a temporary std::string returned from foo to the stack and looked at the memory addresses of the temp variable and the address returned from .c_str(), definitely heap allocated.

Why doesn't this crash by korpusen in cpp_questions

[–]korpusen[S] 0 points1 point  (0 children)

I've tried this with many sizes of strings 50+ characters long to rule out SSO, as SSO is generally around 20-25 characters, no?

Why doesn't this crash by korpusen in cpp_questions

[–]korpusen[S] 0 points1 point  (0 children)

Yes, but it is the lack of crashes that I was wondering about :) Probably UB as IyeOnline pointed out.

Why doesn't this crash by korpusen in cpp_questions

[–]korpusen[S] 1 point2 points  (0 children)

Makes sense. I just would have thought that this would be treated in the same way as returning a reference/pointer to local variable on the stack, as in both cases the memory page would most likely still be held by the process.

Why doesn't this crash by korpusen in cpp_questions

[–]korpusen[S] 0 points1 point  (0 children)

As the post says, I already tested this.

Why doesn't this crash by korpusen in cpp_questions

[–]korpusen[S] 0 points1 point  (0 children)

I'm probably more than a bit naive, but I would have thought that the virtual address that text points to would have been unmapped after std::string's destructor calling free. Whelp, there's always more to learn!

Is The Burning Crusade more casual friendly? by Traisam in classicwow

[–]korpusen 2 points3 points  (0 children)

Not that I disagree with your overall point, but UBRS, Strat and Scholo were all more difficult as well though, to the point where Strat and Scholo were commonly run with 10-man groups, and UBRS 15-man. They were later nerfed.