as someone who knows nothing about web development, does this framework emphasize security as much as rust itself does? how does this framework compare to other rust web frameworks?
Show HN: Rocket – Web Framework for Rust
41–50 of 123 posts
Re: Show HN: Rocket – Web Framework for Rust
#42Earlier quoted context omitted.
> (which I think is being merged with std) It's on that path, but it's unclear if and when a literal merge into std will happen. Right now, the design of 1.0.0 has been accepted, and once that lands and is released, it will move from "the nursery" to the regualr rust-lang org. From there it could go into std, or it may just stay there forever.
regex has some dependencies, though. aho-corasick, memchr, thread_local, simd, utf8-ranges That functionality would have to be in std. Regex in std would sure be nice, though.
Re: Show HN: Rocket – Web Framework for Rust
#43as someone who knows nothing about web development, does this framework emphasize security as much as rust itself does? how does this framework compare to other rust web frameworks?
Re: Show HN: Rocket – Web Framework for Rust
#44Earlier quoted context omitted.
Edit: should preface this by saying the framework looks really impressive. I've been looking for a Rust web framework to settle on and this is the most appealing. It's funny to note how much something small like this matters. It's syntax sugar and presentation, but the difference a comment like this has at the top of an HN post vs an ambiguous but detailed discussion about feature x...massive in effect. It doesn't se…
Syntax is why sinatra and express got bit. Just add a callback for your route and off you go.
Re: Show HN: Rocket – Web Framework for Rust
#45Earlier quoted context omitted.
> I've also heard it's for systems programming, which makes me think of C and has kept me away from it. One of its major goals is making systems programming more accessible. So you shouldn't dismiss it because "systems programming = C", it's trying to change that! :) That's not to say it won't involve learning some systemsy concepts. But it won't be as scary as C. You can't necessarily bang out scripts quickly. A typ…
There's nothing that makes typed languages inherently more verbose; a Haskell script will tend to be substantially shorter than the equivalent Python. Rust gives you much more control over how your program runs, but this necessarily means paying a price in expressiveness.
But lack of garbage collection and the need for lifetime annotations for references and memory management with Box, Rc, Cell, Mutex, etc, combined with the type definitions makes Rust a lot more verbose than any dynamic language or even statically typed languages with GC like Scala / Go.
That can't be avoided, but you have to be prepared. Rust code can be short and elegant, but it can also be tediously verbose.
Re: Show HN: Rocket – Web Framework for Rust
#46Re: Show HN: Rocket – Web Framework for Rust
#47One of my influences, Armin Ronacher, has been doing a lot of Rust work lately, so I've been thinking about looking at it more closely since I appreciate his Python tastes. Is Rust simple and elegant in the sense that Python is? I've also heard it's for systems programming, which makes me think of C and has kept me away from it. I like how I can bang out scripts quickly in Python. Is the same true of Rust? edit: foun…
I started out as an assembly programmer and before Rust I was using C/C++ for systems and embedded, Typescript for browser frontend, and Python for everything else. I still use Typescript for the browser and Python for Jupyter (prototyping and ML) but Rust has largely replaced C/C++/Python for most of my work. Elegance and simplicity mean different things to different people but I'll give it a shot. Unfortunately, Ru…
Re: Show HN: Rocket – Web Framework for Rust
#48Earlier quoted context omitted.
> I've also heard it's for systems programming, which makes me think of C and has kept me away from it. One of its major goals is making systems programming more accessible. So you shouldn't dismiss it because "systems programming = C", it's trying to change that! :) That's not to say it won't involve learning some systemsy concepts. But it won't be as scary as C. You can't necessarily bang out scripts quickly. A typ…
There's nothing that makes typed languages inherently more verbose; a Haskell script will tend to be substantially shorter than the equivalent Python. Rust gives you much more control over how your program runs, but this necessarily means paying a price in expressiveness.
It's not a hard-and-fast rule. It's something that I've experienced when trying to write small scripts in all kinds of typed languages. I keep going back to Python.
For larger scripty things I've found typed languages to work just as well.
> but this necessarily means paying a price in expressiveness.
I don't think this is true. You can have higher level abstractions in Rust too.
Re: Show HN: Rocket – Web Framework for Rust
#49One of my influences, Armin Ronacher, has been doing a lot of Rust work lately, so I've been thinking about looking at it more closely since I appreciate his Python tastes. Is Rust simple and elegant in the sense that Python is? I've also heard it's for systems programming, which makes me think of C and has kept me away from it. I like how I can bang out scripts quickly in Python. Is the same true of Rust? edit: foun…
That said, Rust is very elegant for the work it is doing. Rust iterators and iterator adapters are a powerful and clean way of manipulating collections, and the `match` syntax is an elegant way of handling errors and Option types.
Rust isn't a scripting language in terms of its strengths, but it isn't far away in terms of how pleasant it is to read and write. I would definitely suggest taking a look at it next time you run into performance constraints in python: it's easy to create python-native modules & interfaces with tools like rust-cpython (https://github.com/dgrunwald/rust-cpython).
Re: Show HN: Rocket – Web Framework for Rust
#50Earlier quoted context omitted.
> (which I think is being merged with std) It's on that path, but it's unclear if and when a literal merge into std will happen. Right now, the design of 1.0.0 has been accepted, and once that lands and is released, it will move from "the nursery" to the regualr rust-lang org. From there it could go into std, or it may just stay there forever.
regex has some dependencies, though. aho-corasick, memchr, thread_local, simd, utf8-ranges That functionality would have to be in std. Regex in std would sure be nice, though.