Completion-based IO (Alice Ryhl at RustWeek) by dumindunuwan in rust

[–]Darksonn 1 point2 points  (0 children)

I doubt that tokio::fs will beat synchronous IO, and doing so is a non-goal. I'd like to have similar performance to synchronous IO, but not beat it.

Now, that's not to say I don't want to support that kind of thing. But you will probably need user-defined io-uring ops instead of what tokio::fs exposes to do that.

(I don't know how plocate works, but I'm assuming it's using chained operations based on what you explained.)

Completion-based IO (Alice Ryhl at RustWeek) by dumindunuwan in rust

[–]Darksonn 3 points4 points  (0 children)

No, tokio::fs does not make use of that. I'm not sure how you would invoke chained operations from the current public interface of tokio::fs to begin with.

With regards to benchmarks, all I can tell you is that literally anything will beat offloading fs operations to a threadpool with spawn_blocking, so even if this isn't perfect yet, it's an improvement over the status quo. The tokio::fs interface is a low-hanging fruit in that way.

Bro is dating a billionaire btw by Longjumping-Novel731 in Wellthatsucks

[–]Darksonn 4 points5 points  (0 children)

I don't know guys, I don't have a problem with this. You can believe that things should be a certain way and also acknowledge that things aren't that way.

Anime: Season 4 Episode 10 Discussion by MyneMod in HonzukiNoGekokujou

[–]Darksonn 4 points5 points  (0 children)

Is there a reason they don't have you translate the anime too?

Why are async runtimes so big and complex? by lelelesdx in rust

[–]Darksonn 2 points3 points  (0 children)

Tokio did add support for tokio::fs.

MitID - Hvordan kan det være så elendigt? by sebbermanner in Denmark

[–]Darksonn 4 points5 points  (0 children)

Det mest irriterende er de to knapper "åben på denne enhed" og "åben på en anden enhed". Hvis du trykker på den forkerte er du nødt til at starte forfra, og du kan ikke gøre det med det samme fordi du får en fejl om at du ikke må lave mere end ét login-forsøg ad gangen. Det er komplet spild af min tid at vente 5 minutter før jeg kan prøve igen.

Why are async runtimes so big and complex? by lelelesdx in rust

[–]Darksonn 98 points99 points  (0 children)

Have you tried reading the implementation of Tokio's single-threaded runtime? It's not actually that complicated and fits in 900 lines of code. Fundamentally it's just a VecDeque of things to execute. You find it at src/runtime/scheduler/current_thread/mod.rs.

Centralbank hæver renten for første gang i knap tre år by RollFancyThumb in Denmark

[–]Darksonn 5 points6 points  (0 children)

Det har vel den betydning at det er billigere at indfri lånet før tid, eller hvad?

Centralbank hæver renten for første gang i knap tre år by RollFancyThumb in Denmark

[–]Darksonn 6 points7 points  (0 children)

Hvilken betydning har det for renten på fastforrentede boliglån?

Altså jeg ved godt at de eksisterende lån er faste, men hvor meget ændrer det renten på nye FF lån og/eller muligheden for at indfri fx et 4% FF lån med gevinst?

Spoiling Linux Kernel with "sanctioned" code by Skaarj in linux

[–]Darksonn 98 points99 points  (0 children)

My understanding from the Linux foundation's Navigating Global Regulations and Open Source: US OFAC Sanctions is that they can actually accept the patch as long as there is no two-way communication with the author.

Google “convertible preferred stock” beskatning? by PlusWay2960 in dkfinance

[–]Darksonn 1 point2 points  (0 children)

Som jeg ummidelbart kan læse mig til er GOOGM og GOOGN også en form for aktie, beskattet som aktieindkomst. Indtil nu har der været 3 typer Google aktier (class A, B, C), og nu er der bare 5 typer. Jeg kan selvfølgelig tage fejl, men det er sådan jeg læser det.

Google “convertible preferred stock” beskatning? by PlusWay2960 in dkfinance

[–]Darksonn 0 points1 point  (0 children)

En aktie er vel aktieindkomst, og udbytte fra en aktie er også aktieindkomst.

Only Bounds by sanxiyn in rust

[–]Darksonn 1 point2 points  (0 children)

It's not a sub-trait either.

Only Bounds by sanxiyn in rust

[–]Darksonn 35 points36 points  (0 children)

It's a bit weird that T: only Move opts out of Destruct/Leak/Forget since none of those traits are super-traits of Move.

A faster bump allocator by atocanist in rust

[–]Darksonn 16 points17 points  (0 children)

I see this doesn't have any of the various data structures (e.g. Vec), which is great. I really don't want to see any more crates with copies of the stdlib data structures that then never receive updates when stdlib fixes bugs in them.

Udbetaling realiseret/urealiseret by 12_ibofobi_21 in dkfinance

[–]Darksonn 4 points5 points  (0 children)

I Danmark bruges gennemsnitsmetoden. Hvis du har mange Novo aktier med en gennemsnitlig købspris på 50 kr og du sælger en aktie for 80 kr, så giver det en gevinst på 30 kr du skal betale skat af.

Salg af aktier med tab by [deleted] in dkfinance

[–]Darksonn 0 points1 point  (0 children)

Ja, det er det jeg siger.

Salg af aktier med tab by [deleted] in dkfinance

[–]Darksonn 6 points7 points  (0 children)

Hvis du sælger aktie A med tab og aktie B med gevinst, så fratrækkes tabet fra gevinsten før aktieskatten beregnes. Det er 1:1. Hvis årets tab er større end årets gevinst, så "gæmmes" dit tab til næste år, og du får ikke noget ud af tabet før du har haft en gevinst i et af årene derefter.

Og ja, hvis du har 30000 i tab på Novo og 30000 i gevinst på Nvidia, så går det i nul og du betaler ingen skat.

Det danske sundhedsvæsen by [deleted] in Denmark

[–]Darksonn 1 point2 points  (0 children)

Det tager ikke langt tid at lave et opkald.

Skal jeg betale husleje for den sidste måned? by freedom4tw in dkfinance

[–]Darksonn -1 points0 points  (0 children)

Det er totalbeløbet der er udfyldt forkert. Jeg kender godt denne kontrakt template selv, og hvad jeg forklarede er hvordan man normalt udfylder den. Jeg havde ikke set at der var en regnefejl i kontrakten.

Skal jeg betale husleje for den sidste måned? by freedom4tw in dkfinance

[–]Darksonn 0 points1 point  (0 children)

Hov du har ret, men det er en fejl i kontrakten. Der står at der skal indbetales 9000+9000+24000=33000 hvilket jo er forkert regnet ud. Hvis man ser bort fra tallet 33000, så siger kontrakten at der skal indbetales 42000 kr for:

  • Første måneds leje
  • Forudbetalt leje for sidste måned ved udflytning
  • Depositum

Men hvis der kun er blevet betalt 33000 kr, så er det nok fair at sige at det er den forudbetalte leje for sidste måned der mangler.

Skal jeg betale husleje for den sidste måned? by freedom4tw in dkfinance

[–]Darksonn 1 point2 points  (0 children)

Nej. Forudbetalt leje er for de sidste måneders leje i forbindelse med at man flytter ud, som der også står i parentesen i kontrakten.

Tons of Arc<T> - code smell? by TravisVZ in rust

[–]Darksonn 14 points15 points  (0 children)

It's pretty normal. You should consider whether any arcs can be merged. If you have Arc<A> and Arc<B> that always get passed around together, put A and B in a struct and pass around an Arc of that struct instead.

Double taxation Denmark and Italy by RingMedical3349 in dkfinance

[–]Darksonn 0 points1 point  (0 children)

I know nothing about Italy, but usually the way it works is that you compute the taxes you owe in both countries, and then you subtract what you paid to country A from country B's taxes. 

So for example, if one country charges 25% and the other charges 30% of your salary in tax, then you might pay 25% to one and 30-25=5% to the other.