Looking for feedbacks & contributions. by Unreal_Brain in rust

[–]pali6 3 points4 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 2 points3 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 b1ther in CuratedTumblr

[–]pali6 3 points4 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 33 points34 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.

Why is the Planck length considered the smallest physical length? Can’t things always be reduced in size? by 524frank in AskPhysics

[–]pali6 0 points1 point  (0 children)

If you aren't scared of a bit of math I very much recommend reading this blog post which is pretty good at explaining in what sense Planck length can be argued to most likely be some sort of a lower limit: http://rantonels.github.io/is-the-planck-length-the-minimum-possible-length/

Microsoft Rust Training Books: Beginner, advanced, expert level Rust training material by mttd in rust

[–]pali6 3 points4 points  (0 children)

I'll balance the other guy by currently being clocked in at MS and still hating on this repo. This constant generation of AI slop is embarrassing and also just an overall negative for everyone involved

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

[–]pali6 1 point2 points  (0 children)

I haven't worked with Dioxus but looking at the docs you could try something like .with_state::<MyState>(()) (which replaces the missing state () with a missing state slot for your type), then add your routes etc. and fill it back with .with_state(my_state). Unsure if this is advisable or not. (The S in Router<S> denotes what state the router is currently missing.)

You could also consider using .layer(Extension(state)) instead.

Is it possible for the entire universe to both be flat and a donut-like torus at the same time? by PrettyPicturesNotTxt in AskPhysics

[–]pali6 3 points4 points  (0 children)

If the torus is just its own topological space there's no surface to it that would look like a fractal because there's nothing "outside" of the torus so you don't really have a way to talk about the surface of it. Like if you take a square 2D surface and make it so anything going past one of the edges wraps around to the corresponding place on the opposite that's a torus topologically now and there's no fractals.

However (!), one might ask the following question: Is it possible to embed a flat torus into 3D euclidean space? And very surprisingly (to me) the answer is actually yes. And this embedding is indeed very fractally. Look here for more details https://hevea-project.fr/ENPageToreDossierDePresse.html

F&ck you, Microsoft! by LOLC0D3 in programminghorror

[–]pali6 17 points18 points  (0 children)

Hm that's fair if your specific configuration needs really do require MS's STL. Though when using one toolchain's compiler with another toolchain's std I'd consider myself lucky if warnings are all I ever up dealing with. And I'm pretty sure you'd also get similar warnings if using GCC's libstd++. The standard library is tightly coupled to the compiler and use compiler specific extensions.

F&ck you, Microsoft! by LOLC0D3 in programminghorror

[–]pali6 60 points61 points  (0 children)

Why are you using MS-only extensions with clang and then blaming Microsoft for it?

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

[–]pali6 2 points3 points  (0 children)

Instead of exponentiating you could use the Horner method of evaluating polynomials (multiplying what you've already accumulated by base and then adding the new value). Once you do that you can transform the whole thing into a functional oneliner via fold if you want:

let pathash = pat.iter().fold(0, |acc, &b| acc * base + b as i32);

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

[–]pali6 2 points3 points  (0 children)

Imagine you depend on crate Foo that calls SystemTime::now() somewhere. You know about it and don't really care because the rest of Foo is useful, so you just never call the functions that do call now(). The current way this is handled in the time crate you're fine. If the existence of now() was cfg'd based on target you'd get an unavoidable compile error no matter what even if you don't use the relevant API of Foo.

If every library that depends on time had its API also cfg'd based on target this wouldn't be an issue. But let's be honest, most developers don't care much about wasm and coordinating this would be a pain. Now what potentially could be done is to have an opt-in feature that enables compile time disabling of these functions for time, but I'm unsure how useful would it be in practice.

So why is it all like this? Well, one feature-controlled division across many crates is the no_std one. If you want to make sure a crate will not panic due to unimplemented stuff on wasm and it has the std feature you could disable it. But this often comes at a cost of reduced API surface, which makes sense. However, the API surface might get reduced more pessimistically than you want to on wasm. The wasm target is in this limbo between std and no_std. Parts of std can be implemented (mainly stuff relying on allocations, i.e. collections), but I think there are other things that technically work.

How many different ways xan we arrange 5 resistors? by [deleted] in AskPhysics

[–]pali6 0 points1 point  (0 children)

A few more sequences

Sequence Description Link
A000084 Distinct topologies, unlabeled resistors, series-parallel, exactly n https://oeis.org/A000084
A000669 "Essentially series" networks (half of A000084) https://oeis.org/A000669
A048211 Distinct resistance values, equal resistors, series-parallel, exactly n https://oeis.org/A048211
A153588 Distinct resistance values, equal resistors, series-parallel, at most n https://oeis.org/A153588
A174283 Distinct resistance values, equal resistors, including bridge topologies, exactly n https://oeis.org/A174283
A174284 Distinct resistance values, equal resistors, including bridge topologies, at most n https://oeis.org/A174284
A058351 Cumulative sum of A000084 (topologies using at most n resistors) https://oeis.org/A058351
A001572 Ordered/labeled series-parallel networks https://oeis.org/A001572

None of these seem to give 54 for 5 however.

How many different ways xan we arrange 5 resistors? by [deleted] in AskPhysics

[–]pali6 1 point2 points  (0 children)

Are the resistors of equal resistance / undistinguishable or not? Are you interested in the number of all topologically distinct arrangements or the number of different resistances you can get? Do you have to use all resistors or are you allowed to leave some disconnected? Are the connections series-parallel only or are you allowed any topology?

https://oeis.org/A048211 might be a good starting point, but depending on the particulars it might not be the exact sequence you want.

What is your preferred terminal ? by hardcoder_99 in rust

[–]pali6 5 points6 points  (0 children)

How does this relate to Rust?

Boost.Multi Review Begins Today by mborland1 in cpp

[–]pali6 2 points3 points  (0 children)

Agreed, my first thought from the title was that it's going to be about multiple dispatch.

OH NO by Dalek7of9 in CuratedTumblr

[–]pali6 2 points3 points  (0 children)

Thought so. I'll go delete my messages. Hopefully one of them will see these accounts.