Live data from Hacker News

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

rocket.rs

81–90 of 91 posts

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

#81

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.

You can use the `cargo graph` [0] command to get a graphviz view of the dependency graph. The `Cargo.lock` file which Cargo generates should also contain all the information you want in machine-readable form.

[0]: https://github.com/kbknapp/cargo-graph

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

#82
post #14

There's some super exciting stuff in this release, but what caught my eye was this: > Aynchronous Request Handling (#17) > > In 0.5, Rocket will migrate to the latest asynchronous version of hyperand futures with compatibility for async/await syntax. Of utmost importance is preserving Rocket's usability. As such, these changes will be largely internal, with asynchronous I/O peeking over the covers only when explicitl…

I don’t really understand this. Futures don’t “peak from under the covers” they hit you over the head with syntax. And iirc Rocket uses a thread per request model.

So I’m guessing they have optimized their threaded model with futures, plus given you the ability to turn on a non blocking mode, but your routes will need to use futures if you do that?

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

#83

Once rocket makes it to stable, I think it will be the go to choice for web development in Rust. The focus on creating a great developer story makes rocket a joy to use. I am shocked that Sergio maintained rocket alone for so long. I would have figured there was a team of 3-4 people working on rocket. Glad to see he is getting help!

[deleted]

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

#84
post #80
post #68

Earlier quoted context omitted.

> 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 Py…

"with the right library support"

Well that's the thing it's all about libraries, and now in Rust it's nowhere compare to Python for the web dev.

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

#85

Earlier quoted context omitted.

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.

I disagree. It's something you always have to think about. It might get easier but it doesn't magically go away.

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

#86

Earlier quoted context omitted.

> 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.

I disagree. It's something you always have to think about. It might get easier but it doesn't magically go away.

You often should think about it in other languages too, ie to avoid concurrency bugs. If you don't, there's a good chance your program isn't correct, even if accepted by a less strict compiler.

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

#87

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.

If you try to compile hello-world in C, you would need a gigantic libc.so, with a lot of stuff you do not need.

These 166 packages you need to compile Rocket, not your hello-world. Rocket itself is much more complex then your hello-world, like libc.so is much more complex than hello-world coded in C, I see nothing wrong with it. Rocket and libc.so were created for solving a wide class of problems and hello-world is just one problem from that class.

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

#88
post #25

Earlier quoted context omitted.

> What's it like to work with? Do you prefer it to JS/PHP/Python for web related projects? Coming from dynamic languages it will feel very different, especially if you don't have a lot of experience with typed compiled languages. Personally, I came from a JS background and I love it. It totally sold me on the benefits of a good type system so much so that I sorely miss it when working with JS now. Writing web servers…

>I think the best experience for developing rust right now is in VScode or vim, IMO. Intellij + Rust Intellij plugin is probably the best, in terms of actual usefulness (code completion etc) and stability.

I really dislike intellij, so I've not spend much time trying their rust plugin. If memory serves according to the rust survey, vim or vscode are the most widely used environments.

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

#89
post #24

I am truly moved by what this small (probably one, maybe two person?) team has accomplished here. Just look at their code and its organization, while noting how languages like Rust, Nim, and Go show us how to tackle the software complexity in various software domains. Having been in the enterprise field for a handful of decades, I am convinced that work such as this is signaling a brave new world of software developm…

> a brave new world of software development that is just ahead of us -- small teams, phenomenal productivity It's also the brave new world that lies behind us. Doom, one of the most influential computer games due to technical innovation, was created by a team of 3 programmers (and 8 non-programmers). Small teams of brilliant people can produce phenonemal results. Unfortunately in big companies a manager is not only m…

Calling anyone who isn't brilliant an idiot is a bit. . . uncharitable. Most of us here, myself included, (and probably you) are not rockstar/ninja programmers.

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

#90

Earlier quoted context omitted.

I disagree. It's something you always have to think about. It might get easier but it doesn't magically go away.

You often should think about it in other languages too, ie to avoid concurrency bugs. If you don't, there's a good chance your program isn't correct, even if accepted by a less strict compiler.

Yes. But the point is that you don't have to "dumb down" your program to prove to a static analyser that it is correct.

Look at the kind of programs that NLL now allows. You wouldn't have to jump through those hoops in another language.

Post reply on HN