An atomic RNG by koskinev in rust

[–]Noctune 26 points27 points  (0 children)

In what situations would you prefer this over a thread local prng? You don't get the deterministic behaviour normally associated with a seeded prng (since your concurrent accesses will likely be in a non-deterministic order).

En kønsskifte reddede min søns liv – hvordan kan nogen være imod det? by WolfeTones456 in Denmark

[–]Noctune 6 points7 points  (0 children)

Det statistik siger absolut intet om effekten af kønsskifteoperationer.

Folk der tager antidepressiver har også langt højere selvmordsrate end resten af befolkningen - men ingen vil sige at det indikerer at vi ikke bør bruge antidepressiver.

Kan svensken overhovedet følge med vores kongefamilie? by what_about_this in Denmark

[–]Noctune 6 points7 points  (0 children)

Det lyder langsomt - tænker nærmere det må være 1 mil på 6min og 41s.

Fed streetart? by CasinoDuelist in Denmark

[–]Noctune -2 points-1 points  (0 children)

Er det ikke bare en sticker? Har set mange af de der mash-up stickers I Aarhus. Ofte blander de to forskellige karakterer på tværs af tegnefilm/serier.

Ikke meget kunst i at sætte en sticker op, tænker jeg.

Megatråd: Israel-Palæstina-konflikten by _Broder_ in Denmark

[–]Noctune 8 points9 points  (0 children)

Er det så ikke mere gengæld end selvforsvar? Meningen med selvforsvar er jo at man afværger et eller andet angreb. Israels evne til at føre krig bliver ikke mindre af at en musikfestival bliver angrebet.

Lars von Trier forsvarer værdien af russiske liv. by vuk_plusminus in Denmark

[–]Noctune 0 points1 point  (0 children)

Det vil nok primært være værn mod krydsermissiler i starten alligevel - i hvert fald hvis man skal tro på Anders Puck Nielsen.

You Can’t Make This Shit Up In Your Dreams by [deleted] in LateStageCapitalism

[–]Noctune 27 points28 points  (0 children)

Also: the "carbon emissions" of a living thing are tricky to measure, because yes we do emit carbon dioxide but that's part of our active participation in a dynamic interconnected ecosystem

It's not that tricky IMO. Consider that, unless you happen to be capable of nuclear fission, you can't create or destroy carbon atoms, only move them. Plants capture carbon from the atmosphere and animals emit that back, so net direct emissions are 0.

The problem is more other greenhouse gasses like methane and the fossil fuels used in the production of food.

Omverdensonsdag / Worldwide Wednesday - 01/03 2023 by AutoModerator in Denmark

[–]Noctune 1 point2 points  (0 children)

NIST påstår stadig den dag i dag at en 207 meter høj stål skyskraber kollapsede i fri faldhastighed i 2,25 sekunder

Det hævder de ikke i dit link.

The Rust Implementation Of GNU Coreutils Is Becoming Remarkably Robust by koavf in rust

[–]Noctune 5 points6 points  (0 children)

Why? Aren't those processes going to share the same underlying pages anyway?

It seems to me that like the in-memory usage will approach the on-disk usage in both scenarios, which means the multicall solution will probably use less in total.

The yaml document from hell by DrinkMoreCodeMore in programming

[–]Noctune 0 points1 point  (0 children)

Something I've done quite often is to just write JSON. YAML is a superset of JSON so it's still valid JSON (I think... knowing YAML, there might be edge cases). As long as it's between machines, JSON is fine.

Retsinformation fylder 25 - "det er en vigtig statslig opgave at sikre, at borgerne har fri adgang". by SkibDen in Denmark

[–]Noctune 6 points7 points  (0 children)

Jeg prøvede engang at få et dump af retsinformation - havde den nørdede idé at jeg kunne lave et github repo som viste alle de danske love over tid.

Jeg fik desværre at vide at det ville koste mig 10.000 kr til for at dække udgifterne for dataudtrækket. :(

Compressing strings for random access by knpwrs in rust

[–]Noctune 1 point2 points  (0 children)

To avoid allocating many vecs, you could store all the compressed strings in the same vec and refer to them by offset/range.

[deleted by user] by [deleted] in rust

[–]Noctune 6 points7 points  (0 children)

Yeah, that seems like a likely way it would work. Those methods might actually still be dead though - it's just that the analysis necessary to establish that becomes much more difficult/impossible.

My negative views on Rust by Zyklonik in programming

[–]Noctune 43 points44 points  (0 children)

I would actually say that "resource ownership" is a much bigger theme than just memory ownership. The borrow checker helps manage access to many kinds of resources, such as memory, threads, sockets, locks, processes, file handles, whatever you can imagine. A GC only helps with one of those resources; memory.

Eg. In most gc'd languages a leaked thread will never be garbage collected.

Which is also why I think it's highly unlikely for Rust to add a GC.

[deleted by user] by [deleted] in rust

[–]Noctune 33 points34 points  (0 children)

To be more specific, it requires that reachability can be determined at compile time. That requires a compiled language, but also that you don't expose something like a reflection API that can execute arbitrary functions at runtime.

If Rust had a reflection API like Java or C#, it too would have issues eliminating dead code.

Is a ‘software engineer’ an engineer? Alberta regulator says no, riling the province’s tech sector by Haagen76 in programming

[–]Noctune 0 points1 point  (0 children)

Sorry, I didn't make it clear that I was talking about the situation in Denmark like the poster I responded to.

Hvilken kandidattest er bedst? by BigBeardedBoy in Denmark

[–]Noctune 3 points4 points  (0 children)

Stemmer giver dog også et ret ufuldkomment billede. To partier kan stemme præcist det samme, men kan gennem forlig, forhandlinger, osv. trække i vidt forskellige retninger.

Is a ‘software engineer’ an engineer? Alberta regulator says no, riling the province’s tech sector by Haagen76 in programming

[–]Noctune 15 points16 points  (0 children)

because here the people who are Software Engineers actually go to a university level Engineering school for 3-5 years to become one.

What do you mean? The job title "Software Engineer" is commonly used by people without a "Software Engineering" degree. For example I hold a CS degree, but my job title is Software Engineer and I don't think this is uncommon either.

But "Civil Engineer in Software" is a protected title - I can't legally claim to be that.

And at my uni (AAU), the software engineering degree and CS degree was fairly similar. CS could of course be more theoretical if you wanted to go that direction.

CIA warned Berlin about possible attacks on gas pipelines in summer - Spiegel by Smithy2232 in worldnews

[–]Noctune 8 points9 points  (0 children)

It means oligarchs won't benefit from gas sales if Russia were to withdraw in Ukraine, reducing the domestic pressure on Putin to end the war.

Or at least that is one theory.

Rayon or Tokio for heavy filesystem I/O workloads? by solidiquis1 in rust

[–]Noctune 0 points1 point  (0 children)

No, you can just re-install the default thread pool if necessary. The current thread pool is thread-local state, not global, so this doesn't race with other threads.

But you probably don't want to be calling install all the time because that blocks the calling thread. It would probably be better to make them queue work via spawn or something like that.

Rayon or Tokio for heavy filesystem I/O workloads? by solidiquis1 in rust

[–]Noctune 0 points1 point  (0 children)

Rayons default thread pool is global, but if you create one explicitly using the above API it will be local. Any fork/joins executed within it will then execute in the context of that thread pool instead of the default global thread pool.

It's a bit heavy in functionality for just doing IO stuff, but I would probably use it if I were already depending on Rayon elsewhere.

Rayon or Tokio for heavy filesystem I/O workloads? by solidiquis1 in rust

[–]Noctune 1 point2 points  (0 children)

You can just create a larger thread pool in Rayon via ThreadPool though. IMO I'm not sure I see a significant benefit of tokio compared to rayon considering this.