3 ms·
Good project, to write a shell in Rust. There are other efforts underway to rewrite the low-level UNIX utilities. An all-Rust BusyBox is probably not far off.
by Animats 12y ago
Good project, to write a shell in Rust. There are other efforts underway to rewrite the low-level UNIX utilities. An all-Rust BusyBox is probably not far off.
The author's problems with language and library stability, though, comparable to my experience with Rust. The libraries aren't there yet.
I've been trying to write a program that uses RSS feeds. There's no RSS feed reader library, so I have to write that. RSS requires an XML parsing library, an HTTP library, and an ISO date parser. There are several choices for an XML parsing library, and one of them worked and produced a good tree. It doesn't have any functions for finding elements in the tree, though, so I had to write those.
There are at least three HTTP libraries. One is obsolete, one isn't done yet, and one, "hyper" is usable. Or it was, until last week, when the "io" library had a major redesign. Using "old_io"? That's so last week. Right now, the "hyper" HTTP library is broken, due to some upstream problems with the SSL and cookie libraries being broken by the change at the "io" level. The appropriate issue tickets have been opened and many people are working hard on fixing everything that does I/O to do it the new way.
ISO date parsing wasn't implemented for the date/time module, so I wrote that, forked the date/time module, and submitted a pull request. The author of the date/time library rewrote the code and added it, and now the stock "chrono" module does the date/time formats needed for RSS and Atom feeds.
Compiling my own code, I now get messages like
rssread.rs:262:23: 262:25 warning: obsolete syntax: []
rssread.rs:262 p.feed_str(&string[]);
note: write `[..]` instead
The syntax for a slice that includes everything changed since last week.
The documentation for all these changes runs behind the code, of course, so you have to read blogs, issues, and pull requests to figure out what the language does this week.
Daily Rust development cycle: "sh updaterust.sh", then for each project "cargo clean; cargo update; cargo build; cargo test", then fix what's now broken.
I can understand what the Rust developers are going through. Their public pronouncements [1][2], though, create the illusion of a higher degree of stability than is actually the case. If you have to do any real work, I'd hold off on Rust until the 1.0 release, and maybe a few months after that.
Rust is going to be an important language, but it's not ready for prime time yet.
[1] http://blog.rust-lang.org/2015/01/09/Rust-1.0-alpha.html http://blog.rust-lang.org/2015/01/09/Rust-1.0-alpha.html
[2] http://blog.rust-lang.org/2015/02/20/Rust-1.0-alpha2.html http://blog.rust-lang.org/2015/02/20/Rust-1.0-alpha2.html
- burntsushi 12y agoThat's your perspective. Here's mine. I've been keeping a number of crates updated for Rust nightly for almost a year now (with a lot of help from the Rust community), and the pace of breaking changes has slowed down dramatically. IO reform has been loudly talked about for quite some time now, and it really should be the last big breaking change. Every time I look at the Rust docs, I see more and more green stable indicators. All of the Rust announcements reflect my experience pretty accurately.