A deep dive into Rust and C memory interoperability
21–30 of 84 posts
Re: A deep dive into Rust and C memory interoperability
#22Re: A deep dive into Rust and C memory interoperability
#23This article looked interesting, but I bounced off it because the author appears to have made heavy use of an LLM to generate the text. How can I trust that the content is worth reading if a person didn't care enough to write it themselves?
Do you see Emojis in tables/code now and assume the person is using an llm? I dont really see it.
In addition to the emoji, things that jumped out at me were the pervasive use of bullet lists with bold labels and some specific text choices like
> Note: The bash scripts in tools/ dynamically generate Rust code for specialized analysis. This keeps the main codebase clean while allowing complex experiments.
But I did just edit my post to walk it back slightly.
Re: A deep dive into Rust and C memory interoperability
#24Allocating memory with C and freeing it with Rust is silly. If you want to free a C-allocated pointer in Rust, just have Rust call back in to C. Expecting that allocators work identically in both runtimes is unreasonable and borderline insane. Heck, I wouldn't expect allocators to work the same even across releases of libc from the same vendor (or across releases of Rust's std).
Re: A deep dive into Rust and C memory interoperability
#25This article looked interesting, but I bounced off it because the author appears to have made heavy use of an LLM to generate the text. How can I trust that the content is worth reading if a person didn't care enough to write it themselves?
Do you see Emojis in tables/code now and assume the person is using an llm? I dont really see it.
It's not a binary thing, of course, but it's definitely an LLM smell, IMO.
Re: A deep dive into Rust and C memory interoperability
#26This article looked interesting, but I bounced off it because the author appears to have made heavy use of an LLM to generate the text. How can I trust that the content is worth reading if a person didn't care enough to write it themselves?
> “Memory oppresses me.” - Severian, The Book of the New Sun
That sort of artistic/humourous flourish isn't in character for an LLM.
Re: A deep dive into Rust and C memory interoperability
#27Re: A deep dive into Rust and C memory interoperability
#28Seriously though: I already knew the “don’t mix allocators” rule, but I really enjoyed seeing such a careful and hands-on exploration of why it’s dangerous. Thanks for sharing it.
Re: A deep dive into Rust and C memory interoperability
#29This article looked interesting, but I bounced off it because the author appears to have made heavy use of an LLM to generate the text. How can I trust that the content is worth reading if a person didn't care enough to write it themselves?
Do you see Emojis in tables/code now and assume the person is using an llm? I dont really see it.
Re: A deep dive into Rust and C memory interoperability
#30Section named "The Interview Question That Started Everything" doesn't contain the interview question.
That's the first thing on the page. > Interviewer: “What happens if you allocate memory with C’s malloc and try to free it with Rust’s dealloc, if you get a pointer to the memory from C?” > Me: “If we do it via FFI then there’s a possibility the program may continue working (because the underlying structs share the same memory layout? right? …right?)”