mcc on Nostr: A thing I'm having increasingly intense problems with in Rust: in most languages, if ...
A thing I'm having increasingly intense problems with in Rust: in most languages, if I need to do a thing most naturally achieved with a recursive algorithm, I prefer not to use actual recursive recursive function calls. Call stacks can have surprisingly low limits and querying them is usually annoying or impossible. So I like to rewrite recursive algorithms to use a regular stack.
However! This is very difficult in conjunction with Rust's rules about shared mutable pointers :(
Published at
2025-02-19 00:11:17Event JSON
{
"id": "7a6f53b755ac7abf2da0576aed0e7c435110e5b8cf91e31c65715f734a7e9f2e",
"pubkey": "a3162b9720f6b515ac4bd22d5ea4abf0f85f5685130dca40f46fe684fe85b255",
"created_at": 1739923877,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/mcc/statuses/114027651239670917",
"activitypub"
]
],
"content": "A thing I'm having increasingly intense problems with in Rust: in most languages, if I need to do a thing most naturally achieved with a recursive algorithm, I prefer not to use actual recursive recursive function calls. Call stacks can have surprisingly low limits and querying them is usually annoying or impossible. So I like to rewrite recursive algorithms to use a regular stack.\n\nHowever! This is very difficult in conjunction with Rust's rules about shared mutable pointers :(",
"sig": "7639e558bc73977cbf277ac10df13a8f7623ffc868a5241a66c5407e675fd32530c5c23179d3956290768e3af9da4638a0e7d48015e8ad6f3a8cef148ee6c136"
}