Earlier quoted context omitted.
> This demonstrates the brilliance of Rust's syntax extensions. Sadly this functionality currently requires nightly or using a code generating build script via syntex :( (Rocket currently only works with nightly, but someone could pretty easily add a syntex port since the APIs are the same) With macros 1.1, some of this functionality is available on stable, but not the functionality needed by this. I don't know if we…
For those not watching the compiler development traffic, macros 1.1 (which will enable things like #[derive(FromForm))]) could land in stable as soon as 6 weeks from now. We haven't really started thinking about a "macros 1.2" yet, so syntex will still have some use. If you want to know more about our glorious macros 1.1 future, David Tolnay just have a great meetup talk all about this a few weeks ago: https://air.mo…
Show HN: Rocket – Web Framework for Rust
11–20 of 123 posts
Re: Show HN: Rocket – Web Framework for Rust
#12Is 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: found this http://lucumr.pocoo.org/2015/5/27/rust-for-pythonistas/
Re: Show HN: Rocket – Web Framework for Rust
#13One 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…
And some more recent writing from him as well: https://blog.sentry.io/2016/10/19/fixing-python-performance-...
Re: Show HN: Rocket – Web Framework for Rust
#14This looks very much like Flask, and Flask is one of my favorite ways of writing webapps because it's just so easy to do the simple things.
Re: Show HN: Rocket – Web Framework for Rust
#15Re: Show HN: Rocket – Web Framework for Rust
#16 struct Message {
contents: String,
}
#[put("/", data = "")]
fn update(id: ID, message: JSON)
where message is auto-decoded - it's awesome!Re: Show HN: Rocket – Web Framework for Rust
#17One 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…
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 type system tends to make this task verbose. However, larger applications benefit a lot from that type system.
We've often had feedback from Python/JS shops using Rust that learning Rust had the side effect of teaching them systems programming. I think that's pretty awesome.
Re: Show HN: Rocket – Web Framework for Rust
#18One 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…
The Regex crate (which I think is being merged with std) uses the same syntax as Python's regexes.
The Path/PathBuf type in std makes manipulating paths easy (and type safe). No more slicing notation/regexes to find where extensions start. Also it handles unix/windows / vs \ for you.
Python DuckTyping slightly drives me insane. What interfaces are/aren't typed feels like Russian roulete. Nothing like the 4000th processed file crashing your script
The real win is compatibility. If you avoid unsafe you don't need to think to port to Linux/MacOS/Windows.
Lastly it's a binary. So to share with a coworker, just copy it. No module management.
Re: Show HN: Rocket – Web Framework for Rust
#19One 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…
Re: Show HN: Rocket – Web Framework for Rust
#20One 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'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…
In Java, I don't think the type system gets in the way so much as its classpath. It's been a long time since I've done Java, but you'd have to get your jars in order and write an ant or maven script to do the compile/run steps (or at least a bash script).
I like that with Python I can just do pip install whatever and begin using the module immediately in my main method. In Java, It's not standard practice to copy jars into the system classpath IIRC, so you'd have to copy them around every time you want to do something new.
I need to investigate Rust's command line interface. Obviously, the more it can get close to
python main.py
vs.
javac -cp foo/Bar.jar:baz/Quux.jar Main.java; java --classpath foo/Bar.jar:baz/Quux.jar Main
the better it will be for this use case I mention.
Thanks to both of you for responding!