These are chat archives for rust-lang/rust

1st
Oct 2016
Robert Stone
@rjstone
Oct 01 2016 21:42
What do you think of go vs rust?
Flavius Aspra
@flavius
Oct 01 2016 21:43
go is more pragmatic, rust is where innovation happens
I'd use both
Bradley Weston
@bweston92
Oct 01 2016 21:49
One thing I love about go is the fact you can just have "import "github.com/vendor/package""
Lilian Anatolie Moraru
@lilianmoraru
Oct 01 2016 21:50
[dependencies]
package = { git = "github.com/vendor/package" }
extern crate package;
Bradley Weston
@bweston92
Oct 01 2016 21:51
Yeah that isn't the same though you need a concept of dependency manager (cargo)
If I do go install github.com/coreos/etcd guess what it will install and recursively get dependencies means I don't need to clone the repo then use Cargo to get dependencies
Go does it for you
I'm yet to use Rust so my opinion is probably invalid but I believe Rust to be like other languages where the dependency management is done separately
Lilian Anatolie Moraru
@lilianmoraru
Oct 01 2016 21:54
Well cargo ~ go install
Bradley Weston
@bweston92
Oct 01 2016 21:54
Does cargo get a package and install it to bin folder? (do you use go to know what I mean?)
Lilian Anatolie Moraru
@lilianmoraru
Oct 01 2016 21:55
Indeed, you have to experience Rust. I remember first time getting Servo, a big project, you'd think that you have to fiddle with environment setup, but nope, just cargo build and everything is done for you
cargo install package
Bradley Weston
@bweston92
Oct 01 2016 21:55
Sounds nice :D I need a Rust book by the sounds of it :D
Lilian Anatolie Moraru
@lilianmoraru
Oct 01 2016 21:56
Try, for example: cargo install ripgrep, done, now you can use the fastest grep-like tool there is
Bradley Weston
@bweston92
Oct 01 2016 21:57
Ok so pretty much the same :D
Lilian Anatolie Moraru
@lilianmoraru
Oct 01 2016 21:59
That's one nice thing about Rust, but I don't think that's the main thing why people love it.
The security features it offers and speed is unmatchable. It has a powerful type system where you can write some very nice APIs and ensure that people use it correctly and won't make code mistakes. Etc(Many other features of course)...
Lilian Anatolie Moraru
@lilianmoraru
Oct 01 2016 22:04
@bweston92 Here are a few examples:
  • glium - with the help of the type-system makes sure at compile-time you don't make common OpenGL errors and because it can be sure you can't make them, it removes some OpenGL overhead(runtime checks) that are not needed any more, which improves performance
  • vulkano - again, through the type-system, makes sure(at compile time) you use Vulkan correctly(threading is hard in Vulkan).
  • diesel - with the help of the powerful type-system, it makes sure at compile time that you don't make a number of mistakes when interacting with databases(PostgreSQL, SQLite)
Bradley Weston
@bweston92
Oct 01 2016 22:05
Sounds good, if there is an AMQP and a SMTP and HTTP library I can use in my next service required on Monday :D
Basically listen for events on AMQP, use HTTP to query data regarding events then send via SMTP should be a easy first project
Lilian Anatolie Moraru
@lilianmoraru
Oct 01 2016 22:06
https://github.com/tokio-rs - there are many others, probably should not point to this new in-development one
Bradley Weston
@bweston92
Oct 01 2016 22:06
What is best IDE for Rust or just Idea should be ok?
Lilian Anatolie Moraru
@lilianmoraru
Oct 01 2016 22:06
There are a few, personally I use: https://intellij-rust.github.io/
Bradley Weston
@bweston92
Oct 01 2016 22:07
Sounds good to me
I'm off bed but will pick peoples brains out soon enough :D thanks
Jonas Platte
@jplatte
Oct 01 2016 22:07
Atom has a lot of nice rust packages too
Bradley Weston
@bweston92
Oct 01 2016 22:07
Atom < VSCode < Idea (imo)
Jonas Platte
@jplatte
Oct 01 2016 22:08
Linter is broken in current nightly compiler (not sure about stable) but that is editor independent :(
Otherwise editor support is pretty solid
Also if I understood correctly you don't need iron (http server abstraction stuff) but hyper (http client library)
Bradley Weston
@bweston92
Oct 01 2016 22:09
Correct
Need to make not serve :)
Lilian Anatolie Moraru
@lilianmoraru
Oct 01 2016 22:09
Jonas Platte
@jplatte
Oct 01 2016 22:09
And a quick search for smtp + rust turns up a few results so that shouldn't be to much of an issue either :)
Bradley Weston
@bweston92
Oct 01 2016 22:10
Sounds good :D have a good evening :p will start tomorrow aha
Lilian Anatolie Moraru
@lilianmoraru
Oct 01 2016 22:10
Scroll down for performance measurements: https://aturon.github.io/blog/2016/08/11/futures/