Live data from Hacker News

Rust can be difficult to learn and frustrating, but it's also very exciting

influxdata.com

31–40 of 282 posts

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#31
post #29

Earlier quoted context omitted.

Usually someone will help you out on irc or on the rust subreddit, but I think your point may still stand.

It depends, my biggest struggle right now is with the tokio/futures ecosystem, so I'm on gitter::tokio quite a bit, and have posted once on /r/rust. With patience, I eventually solve many problems, but the lead-time is costly. Plus when I'm doing something wrong in my code, rustc could take over 5 minutes compiling, and then come back complaining. Even when I find someone willing to help me debug, the process takes a…

I think the tokio/async ecosystem just isn't ready for prime time. Hopefully this (and compile times!) get much better.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#32
post #29

Earlier quoted context omitted.

Usually someone will help you out on irc or on the rust subreddit, but I think your point may still stand.

It depends, my biggest struggle right now is with the tokio/futures ecosystem, so I'm on gitter::tokio quite a bit, and have posted once on /r/rust. With patience, I eventually solve many problems, but the lead-time is costly. Plus when I'm doing something wrong in my code, rustc could take over 5 minutes compiling, and then come back complaining. Even when I find someone willing to help me debug, the process takes a…

Oof, I got burned by the tokio/futures ecosystem too. It's definitely a frustrating experience. Thank god it was only a pet project with no deadline pressure, cause it's been 6months now and I'm still waiting for stabilization.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#33
post #25
post #20

Earlier quoted context omitted.

What are you serving? Some of the Rust frameworks for backend should be able to do more than 1000req/s, but it depends what you're doing.

The system's peak _usage_ is 60kreq/min (avg 1k/s), the Python code it's written in can handle maybe 850/s per instance at 100% CPU. Rust is fine, rust is managing almost 2k/s on the same hardware. And this is when I know practically nothing about Rust, I expect I'm likely able to do better given time. It's acting as a simple filter and cache over JSON data on Postgres.

Any reason you didn't scale up horizontally with more python instances?

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#34
I'm optimistic for the future of Rust. I currently program in Go for server side web stuff, but with the proposed changes to the Go language, the decision to choose Go over Rust becomes less compelling; Rust already has generics, a competent module system, better error handling, and ADTs. Go had a very narrow scope and very clear oversights, which are now bigger issues they are trying to shoehorn solutions into with the go v2 proposal.

I've been following rust for a while and have known it is not web ready, but early next year I think will be a different story.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#36

Rust is one of those languages that I just can't see myself ever working with (I mostly do web dev), but it's a language I am really glad I learned and has made me a better overall developer.

Can you please expand on how it made you a better developer?

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#38
post #4

Can anyone recommend exercises for learning a new language. For example, something like "implement a class with these methods", or implement a function that does this. Something that is realistic, should only take an hour or two to implement for a competent programmer, requires you to learn more complicated features of a language, yet I can finish before getting bored or frustrated?

Advent of Code[1] - A set of 50 tasks, released annually, with increasing difficulty. Each task is a short, Christmas related, funny story which makes it easier to follow and complete. You can track your progress so it'll give a sense of completion and satisfaction. The drawback may be that challenges are language agnostic so they aren't crafted for learning specific features of any language.

[1] https://adventofcode.com/2017/events (3 editions has been released so far)

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#39
post #29

Earlier quoted context omitted.

It depends, my biggest struggle right now is with the tokio/futures ecosystem, so I'm on gitter::tokio quite a bit, and have posted once on /r/rust. With patience, I eventually solve many problems, but the lead-time is costly. Plus when I'm doing something wrong in my code, rustc could take over 5 minutes compiling, and then come back complaining. Even when I find someone willing to help me debug, the process takes a…

Oof, I got burned by the tokio/futures ecosystem too. It's definitely a frustrating experience. Thank god it was only a pet project with no deadline pressure, cause it's been 6months now and I'm still waiting for stabilization.

Which stabilization?

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#40
post #25

Earlier quoted context omitted.

The system's peak _usage_ is 60kreq/min (avg 1k/s), the Python code it's written in can handle maybe 850/s per instance at 100% CPU. Rust is fine, rust is managing almost 2k/s on the same hardware. And this is when I know practically nothing about Rust, I expect I'm likely able to do better given time. It's acting as a simple filter and cache over JSON data on Postgres.

Any reason you didn't scale up horizontally with more python instances?

We have seen production users choose to make this port to save on server costs. You can always scale horizontally, but it comes with a price tag.
Post reply on HN