News for hackers. Stuff that matters.
Re:Servo: Inside Mozilla's mission to reinvent the web browser by steveklabnik on Tuesday February 25, 2014 @02:40PM (#7299906)
> I wish it would stabilize

Should be later this year.

> and someone could write an in depth and well structured book on it.

Give me some time. ;)

Re:Servo: Inside Mozilla's mission to reinvent the web browser by cgh on Tuesday February 25, 2014 @02:48PM (#7299958)
Let me first say I really loved your Rust intro and I'll be buying any new book you produce.

Question: are there any moderate-sized codebases (ie not Servo, not Rust itself) that can be used to show idiomatic Rust? In my own experimentation (a simple image utility to resize images and convert to b&w), I ended up writing it a lot like I would C, which I know isn't correct based on snippets I've seen. Or rather, it's correct in that it works, but it's not particularly idiomatic and the Rust elite would sneer at me.

It's like the early days of C++ when people were writing it as "C with classes", complete with pointers everywhere, malloc, etc. A lot of that could have been mitigated with some easily digestible source that clearly demonstrates the idioms. Maybe a small game, a simple text editor, etc.? Does anyone know of anything like this? Or is it too soon for this?

Re:Servo: Inside Mozilla's mission to reinvent the web browser by lastontheboat on Tuesday February 25, 2014 @02:51PM (#7299987)
You might be interested in the ongoing reconstruction of Cave Story written in Rust: https://github.com/drbawb/rust-story
Re:Servo: Inside Mozilla's mission to reinvent the web browser by cgh on Tuesday February 25, 2014 @03:18PM (#7300178)
Yes, this is the size of project I'm talking about. Thanks for pointing this out.
Re:Servo: Inside Mozilla's mission to reinvent the web browser by steveklabnik on Tuesday February 25, 2014 @03:09PM (#7300109)
Thanks. I am currently finishing up "Rails 4 in Action" and "Designing Hypermedia APIs," which I've both been working on for far too long. In this sense, I don't mind that Rust isn't ready for a full book. ;)

I am not entirely sure that 'idiomatic Rust' is something that's fully figured out yet. Rust itself is _certainly_ not idiomatic, as it's a hodge-podge of several historical coding styles.

As I said when I spoke at the Bay Area Meetup, my position in Rust is 'eternal newbie,' so I'm not actually the best one to ask here. Maybe pcwalton can chime in.

Re:Servo: Inside Mozilla's mission to reinvent the web browser by menriquez on Tuesday February 25, 2014 @03:42PM (#7300343)
"...but it's not particularly idiomatic and the Rust elite would sneer at me."

OMFG..and in this day and age is soooooo much more important not to be sneered at by the "elite" then it is to have working code...

man do i miss the days when programming was about getting stuff working not worrying about the political and social impact of how your style was...

Re:Servo: Inside Mozilla's mission to reinvent the web browser by Stratoscope on Tuesday February 25, 2014 @04:40PM (#7300768)
Your comment misses the point entirely.

As you know, Real Programmers can write FORTRAN in any language.

But, do we want to?

No, we want to learn what is new and useful in a new language. We want to learn how to make best use of that language.

That doesn't mean writing code that looks just like the language we used before. What would be the point of using a new language, then?

No one cares what the "Rust elite" think. Didn't you see that that was just a humorous throwaway comment following a much more important point: writing idiomatic code.

Learning to write idiomatic code helps us see what is new and useful in any language.

We won't learn that by writing FORTRAN in the new language.

But seeing how experienced users write their code is a great way to see what is good and interesting about the language.

Re:Servo: Inside Mozilla's mission to reinvent the web browser by duaneb on Tuesday February 25, 2014 @03:54PM (#7300423)
Working code is far less valuable than maintainable code.

EDIT: not always, of course, but unless it's a one-off tool, it doesn't make a lot of sense to NOT be idiomatic.

Re:Servo: Inside Mozilla's mission to reinvent the web browser by cgh on Tuesday February 25, 2014 @03:52PM (#7300410)
I think something was lost in translation here (assuming you aren't a native English speaker). This was a joke.
Re:Servo: Inside Mozilla's mission to reinvent the web browser by shmerl on Tuesday February 25, 2014 @04:27PM (#7300656)
Thanks, I'm looking forward to it :)