Live data from Hacker News

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

rocket.rs

71–80 of 91 posts

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

#71

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.

Sure, however you do pay the significant cost of having to satisfy the borrow checker. There are other nice expressive languages where you don't have to do that so if you actually don't need the speed Rust is maybe not the best choice.

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

#72
All of this is done while pursuing a computer science PhD at Stanford, teaching, and other life activities. Sergio has been digging deep for a really long time. It is great to see that others are helping to advance Rocket's mission but as with most open source projects, the primary author moves it forward. This release isn't just about new features or rewrites. It's about passion for one's work. It's about grit. It's about uncompromising commitment to excellence.

While there will ever be only one Sergio in the world, there are many others in the broader Rust community who are signaling many of the same positive qualities. The signal is only increasing in strength as new talent adopts the language for critical path work.

I am more optimistic than ever about Rust as a tool for general use, not just because of the tools but because of the leadership in its community.

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

#73

With all due respect, 166 packages to compile for a 5 line hello-word is so Nodejsy. It is a smell, a red flag. We should learn more from Go and Erlang. I hope the Tide will do.

>166

Yikes!

Does anyone know where I can get an overview of the entirety of rocket's dependency graph. Crates.io only lists 11 direct dependencies.

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

#74

With all due respect, 166 packages to compile for a 5 line hello-word is so Nodejsy. It is a smell, a red flag. We should learn more from Go and Erlang. I hope the Tide will do.

Tide is pretty expressly being built as a collection of smaller packages; I would expect it to have far more than Rocket.

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

#76

Earlier quoted context omitted.

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.

Sure, however you do pay the significant cost of having to satisfy the borrow checker. There are other nice expressive languages where you don't have to do that so if you actually don't need the speed Rust is maybe not the best choice.

> you do pay the significant cost of having to satisfy the borrow checker

Right, but this is presumably a one-time investment while learning Rust, much less of an ongoing hurdle.

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

#77

Earlier quoted context omitted.

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.

Sure, however you do pay the significant cost of having to satisfy the borrow checker. There are other nice expressive languages where you don't have to do that so if you actually don't need the speed Rust is maybe not the best choice.

Satisfying the borrow-checker usually ends up implying that either:

a) you used .clone() everywhere and therefore are probably modifying something and failing to propagate the modifications to where they need to go; or

b) your design is inherently better, saner, easier-to-optimize, etc., than one which doesn't have to satisfy the borrow checker.

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

#78

With all due respect, 166 packages to compile for a 5 line hello-word is so Nodejsy. It is a smell, a red flag. We should learn more from Go and Erlang. I hope the Tide will do.

I do agree, and Go is definitely better in this regard, but why is that the case? I can't see any technical reasons for it.

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

#79

With all due respect, 166 packages to compile for a 5 line hello-word is so Nodejsy. It is a smell, a red flag. We should learn more from Go and Erlang. I hope the Tide will do.

>166 Yikes! Does anyone know where I can get an overview of the entirety of rocket's dependency graph. Crates.io only lists 11 direct dependencies.

No, but that would be a good project. Probably the easiest way at the moment is to see the compilation output. E.g. from the CI logs:

https://travis-ci.org/SergioBenitez/Rocket/jobs/465537062

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

#80
post #68
post #26

Earlier quoted context omitted.

I've bumped around a site idea I've been working on for five years now. I started with Flask, then Django, then felt bad about page load times so I looked for something faster. That basically made me shelf it for about two years, until last year when Rocket was rising and I gave it a shot. Got hung up again that year due to missing expressiveness in query handling and shelved it again. In the last month I picked it b…

> with how if you can get something to compile it is substantially more likely to work That is what expected the least, when I was starting out. I was looking for something that is a little like Python, but faster than it. It gives me a sense of security to see the compiler call me out for a reason, telling me exactly which cases I forgot. Together with the type system I often find myself in situation where I do some…

I also find that Rust drives me to document more - because when I do something "intuitively" that doesn't work and then spend an hour refactoring until it does work I usually leave a comment about it.

And those are almost always the good "in depth" reasoning comments you want in software, not the mandatory "Function save saves the file to where parameter location is" which just repeats the definition.

I still love Python, but I can't even argue its a productivity win for me to use over Rust anymore, because while I might sometimes make something that seems to work faster the lack of confidence makes scaling the program much harder and there really is nothing syntactically in Rust besides the static typing (which is a good thing in my book anyway, its why Python added function signature type hints after all) and verbosity (semicolons, mandatory braces, etc) that prevents you from writing code as fast as a Python variant with the right library support.

Post reply on HN