Jamey Sharp

jamey.thesharps.us · Personal blog · on HN since 2016

Jamey Sharp, a programmer, writes about translating C to Rust with Corrode, setting up per-project Postgres, and lessons from Google Wave.

What HN saysHN commenters link it for the Corrode C-to-Rust translator, now largely superseded by c2rust, and for his guide to a SQLite-convenient Postgres setup.
23HN people shared it
7linked it in comments
26stories submitted
888story points
4 years agolast shared
2016people per year2026

Most-shared posts

  1. 1
    Per-Project Postgres (2019)
    4 people · 8 points · first shared 2019 · discussion on HN
  2. 2
    Corrode: Translating C to Rust (and how you can help)
    4 people · 1 points · first shared 2016 · discussion on HN
  3. 3
  4. 4
    How not to replace email: lessons from Google Wave
    2 people · 338 points · first shared 2018 · 158 comments on HN
  5. 5
    C2rust vs. Corrode
    2 people · 200 points · first shared 2018 · 33 comments on HN
  6. 6
    Testing strategies for Corrode
    2 people · 2 points · first shared 2016 · discussion on HN
  7. 7
    Corrode update: support from Mozilla, and new features
    2 people · 2 points · first shared 2016 · discussion on HN
  8. 8
    How to translate a large C project to Rust
    1 people · 158 points · first shared 2016 · 7 comments on HN
  9. 9
    Search-based compiler code generation
    1 people · 69 points · first shared 2017 · 4 comments on HN
  10. 10
    Authenticating Shared Web Caches
    1 people · 52 points · first shared 2020 · 14 comments on HN
  11. 11
    Which projects should convert to Rust?
    1 people · 35 points · first shared 2017 · discussion on HN
  12. 12
    Translating C99 to Rust
    1 people · 4 points · first shared 2016 · discussion on HN
  13. 13
    Search-based compiler code generation
    1 people · 3 points · first shared 2022 · discussion on HN
  14. 14
    Control Flow in Automatic C to Rust Conversion
    1 people · 3 points · first shared 2017 · discussion on HN
  15. 15

What HN people wrote when they linked it

andolanra · 2022-10-23
The short form is that Corrode is effectively deprecated in favor of c2rust. Indeed, Corrode hasn't been updated since 2017, while c2rust still gets active development—last commit as of my writing this was 2 days ago. It's worth noting that the developer of Corrode was consulted on the early design of c2rust, which means c2rust was able to benefit from hindsight on architectural decisions in Corrode. That ended up leading to a bit of a messy history between the two (c.f. https://jamey.thesharps.us/2018/06/30/c2rust-vs-corrode/ with HN discussion https://news.ycombinator.com/item?id=17436371 —although I believe that after that blog post the c2rust developers did end up acknowledging their inspiration and apologized for not doing so earlier.)
0xCMP · 2023-04-21
I would agree, but I think it's worth checking out one of Siver's postgres repos where I thought he tested things pretty well[0]. Also things like Postgres are often run as a "server" on local dev or CI but could easily be run more ephemerally[1]. That should help with testing various states and behavior of the database. I still would actually follow what you said thought because often times places which rely on stored procedures are, as you say, ruled by developers with the database access to manage those procedures and from what I've seen often do not have anything close to a reproducible setup. Besides the fact that often it's some proprietary database which is much more difficult to run locally than sqlite3 or PostgreSQL. Still I keep that separate from considering if views/stored procedures are actually a good solution. I think sometimes it really is. Honestly Sivers' experiments really convinced me of that. [0]: https://github.com/sivers/store [1]: https://jamey.thesharps.us/2019/05/29/per-project-postgres/
jjwiseman · 2022-08-17
Speaking of making Postgres easy to setup and use, here are instructions for setting up per-project Postgres ("So I worked out how to set up a Postgres database that’s almost as convenient as SQLite."): https://jamey.thesharps.us/2019/05/29/per-project-postgres/
danidiaz · 2016-11-03
> I had a quick look at Hackage and noticed that someone already has written a parser for Java in Haskell The author of "corrode"[1] wrote it in Haskell because there already was a C parser available. As always, the importance of libraries. [1]: http://jamey.thesharps.us/2016/10/corrode-update-support-from-mozilla-…
masklinn · 2016-07-08
In fact they have explicitly documented it: http://jamey.thesharps.us/2016/07/translating-c-to-rust-and-how-you-ca… > The only reason I wrote Corrode in Haskell is because I couldn't find a complete enough C parser for Rust, and I was already familiar with the language-c parser for Haskell.
steveklabnik · 2016-07-08
Thea author wanted me to drop a link to his blog post on contributing: http://jamey.thesharps.us/2016/07/translating-c-to-rust-and-how-you-ca…
mgattozzi · 2016-07-08
It's not that bad to read. The documentation alone makes it easy to work on. This was dropped in the /r/rust thread: http://jamey.thesharps.us/2016/07/translating-c-to-rust-and-how-you-ca… He lays it out fairly well for people to help out.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close