Live data from Hacker News

A deep dive into Rust and C memory interoperability

notashes.me

31–40 of 84 posts

Re: A deep dive into Rust and C memory interoperability

#31

Earlier quoted context omitted.

I’m not sure what those two things have to do with each other, though I did just wake up. The only thing the new allocator stuff would give you is the ability to allocate a standard library data structure with the Postgres allocator. Scoping and handles and such wouldn’t change, and using your own data structures wouldn’t change. It’s also very possible I’m missing something!

> The only thing the new allocator stuff would give you is the ability to allocate a standard library data structure with the Postgres allocator. Yeah no this is basically all I'm saying. I'm excited for this.

Ah yeah, well it's gonna be a good feature for sure when it ships!

Re: A deep dive into Rust and C memory interoperability

#32
post #3

Something I'd like to know for mixing Rust and C. I know it's possible to access a struct from both C and Rust code and have seen examples. But those all use accessor functions on the Rust side rather than accessing the members directly. Is it possible to define a structure in one of the languages and then via some wrapper or definitions be able to access it idiomatically in the other language? Can you point to some…

Here's one of my recorded talks going through an example of using a `#[repr(C)]` struct (in this case one that's auto-generated by Bindgen): https://youtu.be/LLAUzghhNHg?t=2168

Re: A deep dive into Rust and C memory interoperability

#33
post #12

This 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.

The author admits to it.

https://www.reddit.com/r/rust/comments/1mh7q73/comment/n6uan...

The reply to that comment is also a good explainer of why the post has such a strong LLM smell for many.

Re: A deep dive into Rust and C memory interoperability

#34
post #12

This 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?

it sounds nothing like AI to me! or AI has advanced to the point where it is hard to tell - e.g. I wouldn't expect a sentence like "You’re not just getting 64 bytes of memory. You’re entering into a complex contract with a specific allocator implementation." from one.

Re: A deep dive into Rust and C memory interoperability

#35
post #23

Earlier quoted context omitted.

Do you see Emojis in tables/code now and assume the person is using an llm? I dont really see it.

Maybe I'm too paranoid! If it's not LLM then I don't think it's a very well-organized post though. 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 j…

Not TFA’s author

As a non-native English speaker, 90% of my vocabulary come from technical books and SF and Fantasy novels. And due to an education done in French, I tend to prefer slightly complicated sentences forms.

If someone uses LLM to give their posts clarity or for spellchecking, I would aplaud them. What I don’t agree with, LLM use or no, is meandering and inconsistency.

Re: A deep dive into Rust and C memory interoperability

#36

Earlier quoted context omitted.

Do you see Emojis in tables/code now and assume the person is using an llm? I dont really see it.

The author admits to it. https://www.reddit.com/r/rust/comments/1mh7q73/comment/n6uan... The reply to that comment is also a good explainer of why the post has such a strong LLM smell for many.

Yeah, I completely agree with that reply, thanks for the link.

BTW that Reddit post also has replies confirming my suspicions that the technical content wasn't trustworthy, if anyone felt like I was just being snobby about the LLM writing: https://www.reddit.com/r/rust/comments/1mh7q73/comment/n6ubr...

Re: A deep dive into Rust and C memory interoperability

#37
post #34
post #12

This 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?

it sounds nothing like AI to me! or AI has advanced to the point where it is hard to tell - e.g. I wouldn't expect a sentence like "You’re not just getting 64 bytes of memory. You’re entering into a complex contract with a specific allocator implementation." from one.

While I usually hate all the accusations of writings being LLM generated, I find your example a bit odd as that phasing is very typical of ChatGPT, especially when it was glazing everyone after that one update they had to reverent.

“It’s not just _________. It’s _________________.”

This was in almost every response doubling down on the users ideas and blowing things out of proportion. Stuff like…

“It’s not just a good idea. It’s a ground up rewriting of modern day physics.”

Re: A deep dive into Rust and C memory interoperability

#38
post #37
post #34

Earlier quoted context omitted.

it sounds nothing like AI to me! or AI has advanced to the point where it is hard to tell - e.g. I wouldn't expect a sentence like "You’re not just getting 64 bytes of memory. You’re entering into a complex contract with a specific allocator implementation." from one.

While I usually hate all the accusations of writings being LLM generated, I find your example a bit odd as that phasing is very typical of ChatGPT, especially when it was glazing everyone after that one update they had to reverent. “It’s not just _________. It’s _________________.” This was in almost every response doubling down on the users ideas and blowing things out of proportion. Stuff like… “It’s not just a goo…

I picked up on it very quickly as well. Here are some more phrases that match that same LLM pattern. Sure, you could argue that someone actually writes like this, but after a while, it becomes excessive.

- Your program continues running with a corrupted heap - a time bomb that will explode unpredictably later.

- You’re not just getting 64 bytes of memory. You’re entering into a complex contract with a specific allocator implementation.

- The Metadata Mismatch

- If it finds glibc’s metadata instead, the best case is an immediate crash. The worst case? Silent corruption that manifests as mysterious bugs hours later.

- Virtual Memory: The Grand Illusion

- CPU Cache Architecture: The Hidden Performance Layer

- Spoiler: it’s even messier than you might think.

Re: A deep dive into Rust and C memory interoperability

#39
post #37
post #34

Earlier quoted context omitted.

it sounds nothing like AI to me! or AI has advanced to the point where it is hard to tell - e.g. I wouldn't expect a sentence like "You’re not just getting 64 bytes of memory. You’re entering into a complex contract with a specific allocator implementation." from one.

While I usually hate all the accusations of writings being LLM generated, I find your example a bit odd as that phasing is very typical of ChatGPT, especially when it was glazing everyone after that one update they had to reverent. “It’s not just _________. It’s _________________.” This was in almost every response doubling down on the users ideas and blowing things out of proportion. Stuff like… “It’s not just a goo…

huh, interesting, I guess I haven't read enough of it to pick up on the patterns
Post reply on HN