Live data from Hacker News

Corrode: C to Rust translator written in Haskell

github.com

11–20 of 127 posts

Re: Corrode: C to Rust translator written in Haskell

#12
post #5

I understand the world play, but perhaps it's a misunderstanding of Rusts name origin ? https://www.reddit.com/r/rust/comments/27jvdt/internet_archa... It's after a fungus https://en.wikipedia.org/wiki/Rust_(fungus)

Oh great, I can't wait to hear this "well, actually"[1] for the rest of my life.

[1] https://www.recurse.com/manual#sub-sec-social-rules

Re: Corrode: C to Rust translator written in Haskell

#13
post #5

I understand the world play, but perhaps it's a misunderstanding of Rusts name origin ? https://www.reddit.com/r/rust/comments/27jvdt/internet_archa... It's after a fungus https://en.wikipedia.org/wiki/Rust_(fungus)

Rust has had iron oxide puns for names for a very long time, even from people who know where Graydon got the name.

Re: Corrode: C to Rust translator written in Haskell

#15
post #5

I understand the world play, but perhaps it's a misunderstanding of Rusts name origin ? https://www.reddit.com/r/rust/comments/27jvdt/internet_archa... It's after a fungus https://en.wikipedia.org/wiki/Rust_(fungus)

This is of itself a misunderstanding of the origin: that's one of many reasons it's called Rust, not the only one. There's no single reason for the name.

Re: Corrode: C to Rust translator written in Haskell

#17

as many "transpilers" / compilers, whatever you might name them, it lacks example input output. I want to see how my new rust code base looks light, does it compile with some heuritics, or just 1:1 C to rust primitives?

  > Because the project is still in its early phases, it is not yet
  > possible to translate most real C programs or libraries.
It is currently trying to port over semantics exactly, so the Rust code is far from idiomatic Rust. Doesn't mean it's not useful, just saying that it's trying to be 1:1.

Re: Corrode: C to Rust translator written in Haskell

#20

as many "transpilers" / compilers, whatever you might name them, it lacks example input output. I want to see how my new rust code base looks light, does it compile with some heuritics, or just 1:1 C to rust primitives?

> Because the project is still in its early phases, it is not yet > possible to translate most real C programs or libraries. It is currently trying to port over semantics exactly, so the Rust code is far from idiomatic Rust. Doesn't mean it's not useful, just saying that it's trying to be 1:1.

I guess the next stage would involve translating common non-idiomatic patterns into idiomatic Rust. Looks like this could be a job for a community-managed database!
Post reply on HN