Live data from Hacker News

Rocket v0.4: Typed URIs, Database Support, Revamped Queries

rocket.rs

41–50 of 91 posts

Re: Rocket v0.4: Typed URIs, Database Support, Revamped Queries

#41

Is anyone able to lay out some of the reasons why you might want to write web applications in rust? I was under the impression rust was designed as a safer language for low level systems programming. Thanks!

https://news.ycombinator.com/item?id=18621820

Re: Rocket v0.4: Typed URIs, Database Support, Revamped Queries

#42

Is anyone able to lay out some of the reasons why you might want to write web applications in rust? I was under the impression rust was designed as a safer language for low level systems programming. Thanks!

Web servers for embedded or otherwise constrained systems, bolt-on embedded api servers for your existing apps, or just any high perf app/gateway. All the reasons you would otherwise do it in cpp except nope.

Re: Rocket v0.4: Typed URIs, Database Support, Revamped Queries

#43

Earlier quoted context omitted.

So, Futures are moving into the standard library; there’s been a last minute procedural issue over one name, and then they’ll be in. So “futures 1.0” isn’t as important, the futures library mostly provides extra utilities, not the core of futures themselves. It’s likely this means they’ll be in 1.33, February 28 (if my math is right)

> So, Futures are moving into the standard library; there’s been a last minute procedural issue over one name, and then they’ll be in. That's just the open issue around pinning. There are however a few open discussions around the futures/task/waker parts, from the other RFC. I just wrote down a list of the open points here: https://github.com/aturon/rfcs/pull/15#issuecomment-44549238...

Oh right, I forgot about that but, thank you!

Re: Rocket v0.4: Typed URIs, Database Support, Revamped Queries

#44

Is anyone able to lay out some of the reasons why you might want to write web applications in rust? I was under the impression rust was designed as a safer language for low level systems programming. Thanks!

I'd say that in all the talk of Rust being a C replacement, what gets lost is that it is also a very expressive, modern, functionally flavored language, perfectly suitable for higher-level programming.

If you want type safety, speed, expressive language & native binaries, Rust is a good choice.

Re: Rocket v0.4: Typed URIs, Database Support, Revamped Queries

#45

Earlier quoted context omitted.

It's a bit rough to work with still - the IDE support is still a work in progress (though improving) and there is a compile step with every iteration (incremental compilation has improved this too). Diesel is the main library for interacting with SQL databases, it wasn't async last time I used it, and a quick web search tells me it still isn't - this has been a BIG problem with Rust over the last year, as everyone wa…

>it doesn't leak memory Fairly sure you can leak memory, just no memory safety issues (in safe Rust).

You can also cause segfaults, the point I think is more that it is hard to do this instead of easy as it is in some languages, like C.

Re: Rocket v0.4: Typed URIs, Database Support, Revamped Queries

#47
post #4

I've never tried Rust or Rocket, but it appears to be gaining popularity, so I have the following questions for existing users: What's it like to work with? Do you prefer it to JS/PHP/Python for web related projects? Can you iterate on code quickly, or is there a compile step on every iteration? Are there stable libraries for interacting with MySQL/Redis/Postgres asynchronously? Is there good IDE support, for example…

It's a bit rough to work with still - the IDE support is still a work in progress (though improving) and there is a compile step with every iteration (incremental compilation has improved this too). Diesel is the main library for interacting with SQL databases, it wasn't async last time I used it, and a quick web search tells me it still isn't - this has been a BIG problem with Rust over the last year, as everyone wa…

Isn't diesel being sync largely hid behind a connection/thread pool? Generally you want to limit the connections to the database anyway, so a connection pool is desirable...

Re: Rocket v0.4: Typed URIs, Database Support, Revamped Queries

#48
post #46

Earlier quoted context omitted.

Lambda just announced native support for Rust last week.

Sure thing, but does it make any sense to use Rocket on it?

Rocket specifically? Lots of people like it. Rust generally? Stuff like https://andre.arko.net/2018/10/25/parsing-logs-230x-faster-w... is one success story we’ve already seen.

Re: Rocket v0.4: Typed URIs, Database Support, Revamped Queries

#49
post #45

Earlier quoted context omitted.

>it doesn't leak memory Fairly sure you can leak memory, just no memory safety issues (in safe Rust).

You can also cause segfaults, the point I think is more that it is hard to do this instead of easy as it is in some languages, like C.

Memory leaks can happen in safe code, segfaults cannot. That’s at least one major difference.

Re: Rocket v0.4: Typed URIs, Database Support, Revamped Queries

#50
post #46

Earlier quoted context omitted.

Sure thing, but does it make any sense to use Rocket on it?

Rocket specifically? Lots of people like it. Rust generally? Stuff like https://andre.arko.net/2018/10/25/parsing-logs-230x-faster-w... is one success story we’ve already seen.

gp is asking abt rocket inside lambda.
Post reply on HN