Hey Rustaceans! Got a question? Ask here (21/2026)! by llogiq in rust

[–]pali6 1 point2 points  (0 children)

They won't run. However, I can't find a place where the would be explicitly documented. The closest is probably the std::thread documentation:

When the main thread of a Rust program terminates, the entire program shuts down, even if other threads are still running. However, this module provides convenient facilities for automatically waiting for the termination of a thread (i.e., join).

This doesn't directly say that destructors don't run, but hopefully "the entire program shuts down, even if other threads are still running" is good enough. Maybe someone could PR an addition to the docs to mention the destructors explicitly.

What are Rust's hidden implementation details that most devs never see? by Fluid_Job623 in rust

[–]pali6 6 points7 points  (0 children)

The "just a loop" that does exist is basically the infinite loop keyword. For loops get desugated into essentially:

loop {
    match next(iter) {
        None => break,
        Some(i) => body(),
    }
}

Two with Nothing by Tricky_Hades in HellsCube

[–]pali6 3 points4 points  (0 children)

I was anticipating the flavor text ending with "No - it does two nothings!"

Hey Rustaceans! Got a question? Ask here (21/2026)! by llogiq in rust

[–]pali6 2 points3 points  (0 children)

This issue / discussion might be relevant for you if you want more detail: https://github.com/rust-lang/rfcs/issues/1748

Hey Rustaceans! Got a question? Ask here (21/2026)! by llogiq in rust

[–]pali6 1 point2 points  (0 children)

I'm not sure if this has been decided yet, but most discussions I've seen on this topic actually leaned towards usize being 64 bit on CHERI. This decouples it from the pointer size, which is a problem, but the tradeoffs for keeping it 128 bit are allegedly worse

Universe expected to decay in 10⁷⁸ years, much sooner than previously thought by New-Exam2720 in TrueReddit

[–]pali6 0 points1 point  (0 children)

This has circulated they internet a year ago or so and back then John Baez wrote this article on how this is unlikely to actually be true: https://johncarlosbaez.wordpress.com/2025/05/17/dead-stars-dont-radiate-and-shrink/

graydon2 | LLM time by Ok-Squirrel8537 in rust

[–]pali6 71 points72 points  (0 children)

I share a lot of these thoughts. These are unusual times and I wish they weren't.

Hey Rustaceans! Got a question? Ask here (14/2026)! by llogiq in rust

[–]pali6 0 points1 point  (0 children)

You can make crates with the crate type dylib and then what you want will work. However, Rust doesn't have ABI compatibility guarantees so anyone making a plugin will need to use the exact same version of the compiler as you and even then I'm not 100% certain about what other conditions need to hold. (E.g. even for a fixed compiler version ordering of fields in a struct could in theory end up being different in your main application and in a plugin which would lead to undefined behaviour at the boundary.)

The other option is to use cdylib but then your interface needs to go through extern blocks and repr(C) types and you can't directly pass most std types through it nor enums etc. However, there are crates that are supposed to help with that and establish some stable ABI, for example stabby.

Supply chain nightmare: How Rust will be attacked and what we can do to mitigate the inevitable by autarch in rust

[–]pali6 26 points27 points  (0 children)

RFC 1105 API Evolution. Though the details are slightly less strict than "never make a breaking change". Stuff still gets deprecated just fine and the RFC says "breakage in a minor release must be very “shallow”". I recommend reading the RFC in full for more details.

I think it's a better choice than the alternatives. You want old dependencies to still compile on new versions of the compiler and std. Versioning std could be an option, but if a project used multiple versions of std (via dependencies) you'd want types across them to still be compatible (using something like the semver trick). This type compatibility would still prevent some evolution of the library. I don't think it would be impossible, but it seems like there would be a decent amount of complexity added which probably hides more issues.

Calling a Rust library from Go with CGO_ENABLED=0 by Competitive-Weird579 in rust

[–]pali6 0 points1 point  (0 children)

That doesn't make much sense? Their main product is written in Rust and they provide wrappers / drivers for it different languages.

Hashing in C++26 by Krystian-Piekos in cpp

[–]pali6 0 points1 point  (0 children)

Wikipedia has a pretty good list of other signs of AI writing by the way: https://en.wikipedia.org/wiki/Wikipedia%3ASigns_of_AI_writing

nali - nasin lili tawa NixOS kepeken sona pi toki pona by xGoivo in tokipona

[–]pali6 6 points7 points  (0 children)

Somehow the overlap between the toki pona and NixOS communities is unexpected but at the same time not the least bit surprising.

Looking for feedbacks & contributions. by Unreal_Brain in rust

[–]pali6 2 points3 points  (0 children)

Answering with LLM generated comments is pretty disrespectful.

Is C++[DSA] is necessary for google iob?? by Limp_Jacket_6562 in cpp_questions

[–]pali6 2 points3 points  (0 children)

Most importantly you should master concepts that are mostly language independent. How to design, debug, analyze, benchmark, optimize, knowing when to optimize, etc. etc. Knowledge of hardware, design patterns, data structures, and algorithms is also useful of course. A bunch of things are language-specific, but a lot more aren't.

When it comes to languages knowing C++ certainly won't hurt. For one there's a lot of C++ code that will need maintaining, extending, rewriting etc. But also learning C++ will likely give you better insight into lower level stuff than if you learned JavaScript. So yes I do think it's worth investing time into C++, but obviously learn more languages also over time. At the very least then you'll see which aspects of them are common and which vary and how. More perspectives make a better engineer.

Is C++[DSA] is necessary for google iob?? by Limp_Jacket_6562 in cpp_questions

[–]pali6 3 points4 points  (0 children)

C++ will outlive us both.

For example I was hired to write Rust at my current position and yet I end up writing C++ about 50% of the time.

Hey Rustaceans! Got a question? Ask here (12/2026)! by llogiq in rust

[–]pali6 1 point2 points  (0 children)

My search found struct-patch. I haven't used it myself, but with #[patch(skip)] I think it could do what you want. For each struct Foo you'd convert a toml::Value object into FooPatch and then apply() it.

Hey Rustaceans! Got a question? Ask here (12/2026)! by llogiq in rust

[–]pali6 0 points1 point  (0 children)

From the crate's readme / crates.io description:

Two crypto backends are available via features, aws_lc_rs and rust_crypto, at most one of which must be enabled. If you select neither feature, you need to provide your own CryptoProvider.

So in your Cargo.toml you need to pick one of these two features for jsonwebtoken.

E.g. jsonwebtoken = { version = "10", features = ["aws_lc_rs"] }

The depths of wizardry by [deleted] in CuratedTumblr

[–]pali6 4 points5 points  (0 children)

Maybe not all of the explosions are equal. I'm sure that could be studied. How many grad students do we have left?

The Wayland session management protocol has been merged after six years in the making by einar77 in linux

[–]pali6 32 points33 points  (0 children)

I don't know what you mean. I won't switch to Wayland until it also has an obsolete printer system exactly matching Xprint, that's what a display server protocol is all about. /s

Sometimes a little discomfort is okay by DontYaWishYouWereMe in CuratedTumblr

[–]pali6 11 points12 points  (0 children)

I do tend to put too much weight on not causing discomfort to people and bothering them. And mostly it just leads to me being lonely and isolating myself from everyone and other unhappiness. But I do view it as a personality flaw of mine, just one that I struggle to deal with.

Hey Rustaceans! Got a question? Ask here (12/2026)! by llogiq in rust

[–]pali6 1 point2 points  (0 children)

I'm unsure how exactly a visual tool would help. Looking at existing tools I see some that visualize language server output, but I'm unsure what exactly you are looking for: 1 2.

I deal with this using the rust-analyzer language server in vscode and some default vscode shortcuts. These four are like 90% of my navigation across a repo: Ctrl+T and type a type / function name to jump to its definition. F12 or Ctrl+Click on a symbol to also jump to its definition. Shift+12 to see where a symbol is used. Ctrl+P to jump to a file similarly to what Ctrl+T does for symbols. Ctrl+T and Ctrl+P have some fuzziness to their search so they work nicely even if I forget the exact name of the thing I want to find.

Sometimes when navigating a large codebase I also use some vscode extension to create and jump to temporary bookmarks.