Live data from Hacker News

Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)

risingwave-labs.com

201–210 of 307 posts

Re: Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)

#201

Earlier quoted context omitted.

>Rust is not difficult because of lifetimes, it just gets in the way of freely prototyping what you want. I'm not a rust programmer, but I guess that's an issue if you come from a dynamic language, not from c++.

Yeah, sadly it is. With e.g. Elixir I can literally get into a REPL and prototype my solution in minutes, right there on the spot, and then just copy a few lines from it and have the solution be 90% done (minus tests, of course). With Go and Rust I have to make a dedicated function somewhere and then have it be called after starting the program. Ain't exactly rocket science but the difference in time to do it and the…

It sounds like Java and IntelliJ's debug "Evaluate expression" feature.

Re: Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)

#202
Please do yourself a favor and don’t waste 5m of your life reading this article like I did.

It’s about a team of allegedly experienced C++ developers at a start-up that spent seven months building a project only to spend another two months rewriting it in Rust and then a few more months moving from async to Tokio. But those lost months have not been in vain, because they have 1600 stars on Github. They actually bragged about their Github stars.

It seems the Rust euphoria has reached such levels that people have stopped thinking critically both about the inexplicably bad business decisions and the near-zero technical content described in the article.

Re: Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)

#203

Earlier quoted context omitted.

Does Ada have strong concurrency support and compile-time data race freedom?

Haskell does have both

Haskell is not a high-performance systems programming language, not sure how it's relevant in a discussion about Rust, C++ and Ada

Re: Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)

#205
post #191

Earlier quoted context omitted.

This, also. C and C++'s build model is a train wreck, especially in C++ code gets rebuilt dozens of times due to headers being simply plopped into whatever translation unit you are building. Rust efficiently solves this by defining building abstractions in the language itself, instead of relying on hacks such as #include, PCH, ...

C++ modules....

Has support for these gotten any better? Last time I was reading about it compiler support was under baked at best.

If they get it fully working and stable I agree modules should go a long way to getting rid of it (entirely if you are willing to wrap old header files in modules yourself).

Re: Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)

#206

Earlier quoted context omitted.

Yeah, sadly it is. With e.g. Elixir I can literally get into a REPL and prototype my solution in minutes, right there on the spot, and then just copy a few lines from it and have the solution be 90% done (minus tests, of course). With Go and Rust I have to make a dedicated function somewhere and then have it be called after starting the program. Ain't exactly rocket science but the difference in time to do it and the…

It sounds like Java and IntelliJ's debug "Evaluate expression" feature.

Yeah but... I want to stick to the CLI. Or in GUI Emacs.

I'll have to check how does NeoVim fare with these things.

Re: Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)

#207
You can't revert this trend - C++ is a legacy language being depreciated by more and more projects.

C++ and Rust are simply not competing on the same level. You don't need a complicated "enterprise" building farm/cluster to build your project, dependencies are managed by the guys who also write your compiler, there is a growing community that actually listen to your feedback and you don't need to wait 40 years to get networking support into the standard library. What C++ can offer? Languages like Rust, Golang and Zig all want their users to focus on their applications, while C++ just wants you to focus on C++. OO was a cool concept back in the 90s, but that was 30 years ago when you have 8MBytes of RAM if you are lucky - who wants to model every program using OO in 2023?

It has never been a better time to depreciate the C++ language and codebases written in C++. Museum is a much better place for C++.

Re: Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)

#208

Earlier quoted context omitted.

> Rust can already be very arcane to decipher sometimes, especially when you start getting errors from async libraries. For what it's worth, the community, library authors, and most importantly the language design teams are all very aware of this. And there's efforts being made to make all these pain points things more ergonomics and approachable. I think it just a slower process than we'd like. I think in part it's…

I think GATs in Rust are really cool. Just like template meta programming in C++ is really cool (despite the countless articles on why it shouldn't be used by mere mortals in production code--it's too powerful and unwieldy!). I worry that Rust will become just as arcane as C++ but will look better at a surface level because it has modern and sane defaults and not 40 years of baggage. Perhaps I'm worried I'm just not…

50 / 50. I find the Rust Users discourse forum to be generally welcoming, though sometimes it seems people find your question too obvious and nobody ever responds. I found that showing that I made an effort and pointing at my source of confusion increases engagement. But it might be sensitive to timezones or such as well, no idea.

Rust's Discord however is AMAZINGLY friendly. I've been contacted in DMs by maintainers of very prominent and popular libraries by outlining a problem that I had, in detail.

And finally, r/rust I witnessed first-hand being extremely toxic at times.

It really depends where you're looking.

Re: Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)

#209

Earlier quoted context omitted.

As a guy who is writing Rust and found it a true value-add in his career, I agree with this and it's my #1 worry. Rust can already be very arcane to decipher sometimes, especially when you start getting errors from async libraries. My entirely egotistical opinion is that the maintainers of the language have to take a very good and critical look of the current status quo and start systematically killing off any comple…

> Rust can already be very arcane to decipher sometimes, especially when you start getting errors from async libraries. For what it's worth, the community, library authors, and most importantly the language design teams are all very aware of this. And there's efforts being made to make all these pain points things more ergonomics and approachable. I think it just a slower process than we'd like. I think in part it's…

> I think it just a slower process than we'd like

I arrived at the same conclusion. I have faith in Rust's maintainers and I know things can't happen as quickly as I'd like them to. I am still human and can rage when something doesn't go my way -- and it looks easy to me as a side observer -- but I don't judge and I applaud the team's dedication and rigor.

Re: Building a Cloud Database from Scratch: Why We Moved from C++ to Rust (2022)

#210
post #166

Earlier quoted context omitted.

Yeah, sadly it is. With e.g. Elixir I can literally get into a REPL and prototype my solution in minutes, right there on the spot, and then just copy a few lines from it and have the solution be 90% done (minus tests, of course). With Go and Rust I have to make a dedicated function somewhere and then have it be called after starting the program. Ain't exactly rocket science but the difference in time to do it and the…

Is it just about a REPL? There is the evcxr hack, though I'm not sure how far you can take it.

Nah, not specifically about the REPL itself, I just need a way to quickly sketch and run a piece of code is all. I know big IDEs support this but I prefer keeping everything in the terminal -- I'll have to go check if Emacs or NeoVim offer something along those lines.
Post reply on HN