This is from the Fall 2013 version of the course. For the most recent version, try http://rust-class.org/pages/ps1-comments-comments.html.

Comments on PS1 Comments

Responses to Comments

Here are my responses to your (sometimes slightly edited) comments from PS1. Thanks for the (mostly) constructive and thoughtful comments! If you have follow-ups on any of these, please post them in the Piazza forum.

Rust documentation is god awful. The web server portion of this assignment should've taken me all of three minutes, instead I spent 1.5 hrs trying to use undocumented methods. It would be nice if you could provide us with some common code snippits like reading files for instance. That is not something I should have to spend 20 minutes trying to figure out. I have the feeling that rust is going to be counter productive to actually learning anything about operating systems due to the excessive time spent on fruitless google searches/banging my head on the keyboard.

I definitely agree on the poor current state of Rust documentation...hope some students in the class will end up improving it. On the "snippits like reading files" request, pay more attention to the class notes posted on the course site (hopefully you'll find useful things there occasionally): Class 2: Getting Started with Rust. (I don't meant to be picking on you, but just a reminder to everyone that I do post notes and other materials on the course site regularly, so you should be looking there as well as in the Piazza forums.)

If I had been using another language, this assignment would have been hours shorter. The amount of code actually added was small, it was mostly trying to find answers in the sparse documentation. Once again, this is something to be expected with a developing language... but it doesn't change the fact that the implementation details quadrupled the time the work should have taken. I'm not upset, just annoyed. Now that I've flailed about a bit, hopefully the next assignment won't take quite as long.

Otherwise, this past class with all of the history was fascinating, and I loved the supplementary readings!

I understand this, and I hope it will get better as the semester goes on. I think part of the challenge with learning Rust (other than the lack of documentation, which, as mentioned above, I hope students in this class will help improve!) is that it seems sort of familiar to languages you already know, but then is different in surprising ways. But, my sense (so far) is most of Rust is well designed and fairly consistent, so once you get a bit more experience with it things will come more naturally and you'll be better able to guess or figure out quickly how things work. And, thanks for mentioning the supplementary readings! I hope everyone is noticing them, and finding them worthwhile.

So far so good! Rust is tough, in my mind it's a weird hybrid of C, Ruby, and ... who knows, something else. I would appreciate some sort of centralized list that gets updated as the class goes on with good "official" links for learning rust. I find I spend a lot of time sifting around the internet trying to find the same few pages that are nice, organized Rust API docs.

Great idea (except the "official" part)! That's the kind of thing the Piazza forum should work well for. Since you suggested it, maybe you can start this, and hopefully others will add links to it as the semester goes on. (The one huge drawback of doing this using Piazza is it is only visible to the class, or at least, people willing to go through the class enrollment process on Piazza. I am trying to convince Pooja to change this so we could make the page visible to the world including search engines, but can't make any promises. So, if you want to make a more public shared list of Rust resources, you could set up something more visible using another site, but the easiest thing to do would be to use Piazza forum for this.)

The Rust documentation is far worse than I could possibly have imagined. There are so many changes from version to version that most of the examples which can be found online don't work in our environment. I also haven't found any advantages of working in Rust over Java or even C++, since at least those languages have extensive documentation. Doing simple things in Rust like iterating over strings is far more complicated than it needs to be due to the lack of stable documentation.

We'll be getting to the big advantages in terms of safety (over C++) and concurrency safety, performance and flexibility (over Java) that Rust provides soon. After that, I hope you'll understand why most of the things you should care about doing are much easier/better in Rust (and the documentation problems should get better as the language matures, and hopefully also as students in this class contribute to improving it!)

What is the limit to what we can share on Piazza? Are helpful tricks and hints an honor violation? Are code snippets an honor violation?

For the first question, the main limit is only people who enroll in a course can actually see the content in Piazza. This means that its hard to share it (e.g., by sending out a link), and it won't be indexed by search engines (so no one who isn't looking for it directly in the class can find it). For the other interpretation of your question (which is probably what you mean), I encourage as much sharing as possible, so long as you aren't posting answers in a way that will be detrimental to other students. So, it is definitely encouraged that you post helpful tricks and hints about things that you found worked. It is also encouraged that you post code snippets, either if you have problems with them (e.g., here's what I'm trying to do X, but its not working, here's what I think is going on, does anyone have any ideas?), as well as any code snippets that you write that you are proud enough of to want to share with other students. Don't post a complete solution to an assigned problem, but short of that, I encourage all kinds of sharing that will be beneficial to students.

I really like the pace and detail of the lectures so far. You ask very good questions of the class-- things I have wanted a definitive answer to."

Thanks! Very few "good questions", though, have "definitive answers". I think the nature of a good question is one that doesn't have a definitive answer, but that has many possible answers and it takes thought and argument to justify the best one.

I still don't understand how different types of pointers work (ie. ~ vs & vs ~[~ T]).

The short answer is ~ means an "owned" pointer. The long answer is we haven't talked about this yet, and the different pointer types are one of the most interesting things about Rust. I was hoping to defer getting into this until later, but it is also the case that you can't really write any non-trivial Rust program without starting to encounter issues that depend on understanding the different pointer types. (The Rust documentation in the manual on this is actually reasonably good, but the ideas are complex enough that I think it will be worth talking about in class soon.)

Rust is a hard language to learn due to the lack of documentation but having Piazza and the developers' test code that Weilin Xu mentioned helped a lot.

Great - I hope other people noticed this (search for the Piazza post if not) and are finding it useful. Its not as nice as having a polished document, but is definitive.

Need more hands on examples with Rust, kind of frustrating with docs out there that give headers but no concrete examples.

Check out the developers' test code, as mentioned in the previous comment.

Do we need the dinosaur textbook, other classes had used it in the past?

There's no required textbook for the class. There are several semi-decent books that cover much of the material in the class, including the "Dinosaur" book. If I had to pick a textbook for this class, I would pick Andy Tanenbaum's Modern Operating Systems, but I don't think it is worth the outrageous price the publisher charges for it to want to require students to buy it, especially when there are so many great open resources as alternatives. If you prefer to learn things from a book, though, by all means select one you find useful. There are many that include much of the material we cover in this class.

Extra credit project should be to make better docs for Rust.

Yes, as mentioned in a few other comments, everyone wants this. If getting "extra credit" makes you happy, I can provide some, but I would expect that the other benefits (e.g., fame, fortune, gratitude, experience, etc.) of doing this would be worth far more than any points I could offer you.

I'm actually really excited to be learning rust, but this first assignment was hard because of how undocumented the language is. Perhaps some another class devoted to the basics of Rust, and some sort of guide to useful functions, or at least to links which could be useful? It might be good to post a pinned thread to the Piazza forum for people to post links to helpful sites as well as their own documentation.

Yes, this would be useful. I'm not sure what you actually mean by a "pinned thread" or if its necessary for me to do this or any student can (I haven't used Piazza before this class, but Piazza's founder convinced me to try it when we were on a panel together, so if you have suggestions for more useful ways I should be using it please explain what and how. I'm hoping this kind of collecting links resource can (and will!) just be created by any student.

To start, I feel that the course is being taught well, and I have greatly enjoyed the lecture material.

That being said, the use of Rust is getting in the way of my fundamental understanding of the course material. If this were a programming languages course, I would be all about learning something unfamiliar and new to not only to me, but new as a language as a whole. This is for operating systems, however. On this assignment, for every minute I spent on relevant material, I spent 20 trying to figure out the most basic of things in Rust (string manipulation, file i/o, etc). I learned way more relevant information about the language from the provided code in zhttpto.rs than any of the online documentation (which is very inconsistent due to the language still being at pre-release), and I feel awkward going on to the dev IRC channel to ask for help on a homework assignment.

Using C/C++ would not only get rid of some major frustrations, but would also be beneficial for future interview and job opportunities, as it is a far more relevant language in today's work environment. Most of all, it wouldn't feel like a road block to my understanding and learning in this class.

Once again, I'm loving the lectures, and the teaching is some of the best I've received in any CS course, but this was an unnecessarily frustrating assignment, and I hope you will consider going in a more conventional path in the future."

Thanks! I think this is a fair point, but I hope you'll give Rust a chance. By PS3, if you've decided you'd prefer to use another language, that will be fine with me (except you'll need to start from scratch, rather than using the code we provide in Rust, and get your partner to agree to use the other language). As for the job opportunities, it is risky to learn Rust compared to C/C++ in some sense, since many interviews will expect you to know C/C++. (But, I think at least if you take the required prereqs, you've already done a fair bit of C++ in other classes?) On the other hand, you may stand out a lot more in the job market if you know Rust, and a few years from now, may be one of the only people available with significant experience in Rust for a company that needs one. (Of course, if Rust doesn't get adopted much, there won't be any, other than Mozilla. But, I feel there's a pretty good chance Rust will be at least moderately successful, and possibly extremely successful.)

Using Rust was painful. Some library functions from Rust either didn't work correctly or yielded unexpected results that I didn't want, especially the ones from str module. So I decided to custom-develop the library functions by myself instead of being subordinate to language specific issues. I think we can better use our time learning more about the OS instead of wrestling with language specific semantics or bugs.

That's great! If you're building your own libraries, especially if they are better than the provided ones now, you are learning a lot from this, and maybe will produce something that people will want to include in future Rust libraries.

I would like a class or two about rust pointer and memory management. Or maybe just a detailed explanation of an interesting bit of the rust source in order to improve my understanding of the language.

Yes, I was planning to do this in about Class 11 where it fits in better with the intellectual content of the class. (The very tenative schedule is here, but we're not sticking to it. Given the comments, though, and need to understand this for most Rust programs, I will move this up (probably get to it next week).

I don't like rust at all, I would rather suffer through C

You need to be more open minded (or at least explain some good reason why you don't like it, rather than just that it is unfamiliar)! You can't decide whether or not you like a language by writing one short program in it. But, if you really want to use C for everything, you can use C for the assignments in this class (you'll just have to write all the code from scratch, rather than using our provided starting code). There's no requirement that you use Rust for the assignments.