News for hackers. Stuff that matters.
Re:Habitat — A new approach to automation by Cshelton on Tuesday June 14, 2016 @11:55AM (#11902842)
Found this elsewhere, interesting to note, Habitat looks to be built mostly with Rust

https://github.com/habitat-sh/habitat

Re:Habitat — A new approach to automation by holoway on Tuesday June 14, 2016 @01:13PM (#11903503)
This is Adam - Rust has been amazing to work with, and was the prefect choice for this platform. It's great.
Re:Habitat — A new approach to automation by Cshelton on Tuesday June 14, 2016 @01:36PM (#11903726)
You should reach out to the Rust team if you haven't already. I'm sure many would love a blog post on using Rust. I was thinking about using protocol buffers for something in Rust, it's cool to see an example of a real app using it, thanks!
Re:Habitat — A new approach to automation by holoway on Tuesday June 14, 2016 @01:44PM (#11903801)
We're totally going to do it.
Re:Habitat — A new approach to automation by bjz_ on Tuesday June 14, 2016 @05:42PM (#11905560)
Could you elaborate a bit more on why you chose Rust, and why you think it was the right choice for this project?
Re:Habitat — A new approach to automation by holoway on Wednesday June 15, 2016 @03:07AM (#11907633)
Sure. Habitat's supervisor is a very low-level thing - it manages the lifecycle of your service, participates in the gossip ring, etc. That means a failure at runtime of the supervisor is pretty unacceptable, and similarly, you don't want anything (like a long GC pause, for example) to get in the way of the supervisor doing what it needs to do.

Rust gives us 3 things we needed, and it says so right on the website: fast, no segfaults, thread safety. Additionally, it's community is top notch. We've found the language to be great to work with, especially when you're refactoring. The type system makes it clear where it's possible for the code to fail, making it easier for us to reason about keeping the supervisor safe.

I wrote this while I was evaluating languages for the early habitat prototypes: https://medium.com/@adamhjk/rust-and-go-e18d511fbd95#.d35imt...

Best, Adam

Re:Habitat — A new approach to automation by jonaf on Tuesday June 14, 2016 @08:51PM (#11906509)
On the heels of this, I've been exploring Rust a bit lately but haven't been able to find any solid patterns / style guides for idiomatic Rust. Do any such resources exist? For example, the official rust book describes Arc, Mutex, etc but.. Are there more of these in the standard library? What purpose do they serve? What are some good idioms to apply when using them? I can surely make them work, but maybe I should be using some other thing?
Re:Habitat — A new approach to automation by bluejekyll on Tuesday June 14, 2016 @11:06PM (#11906956)
You might want to join users.rust-lang.org.

Like most languages idiom is learned while working with the language. Something I've found for instance is to try and use Iterators to get around sharing rules as they can encapsulate sharing patterns in a lot of cases.

The specific modules you mentioned are for multi-thread support, those are only necessary for sharing memory between threads.

Anyway, I think this is off-topic for this thread.