diff --git a/labs/Lab1.pdf b/labs/Lab1.pdf index f1140c88..484fab2c 100644 Binary files a/labs/Lab1.pdf and b/labs/Lab1.pdf differ diff --git a/labs/Lab2.pdf b/labs/Lab2.pdf index 4feb9c1e..fd3f2d24 100644 Binary files a/labs/Lab2.pdf and b/labs/Lab2.pdf differ diff --git a/labs/Lab2.tex b/labs/Lab2.tex index 57f5d1d9..54f74587 100644 --- a/labs/Lab2.tex +++ b/labs/Lab2.tex @@ -155,7 +155,7 @@ \section*{Clarifications} \begin{itemize} \item \emph{I noticed a bug where the starter code double counts for consecutive lines.} Leave the double count there (and match the behaviour in your submission). - \item \emph{Ensure --num_threads 1 works} Make sure your assignment does something sane for different inputs of num_threads, including edge cases like 0 and 1. Note the default value for num_threads is 8, so leaving the argument off the command line will not test your single threaded case. + \item \emph{Ensure --num\_threads 1 works} Make sure your assignment does something sane for different inputs of num\_threads, including edge cases like 0 and 1. Note the default value for num\_threads is 8, so leaving the argument off the command line will not test your single threaded case. \item \emph{Does output order matter?} You need to print the same sections, in the same order, as the starter code. The printing of hashes/lists do not need to have the elements in the same order. Do not remove any prints. \end{itemize} diff --git a/labs/Lab3.pdf b/labs/Lab3.pdf index eefd2a39..925952ee 100644 Binary files a/labs/Lab3.pdf and b/labs/Lab3.pdf differ diff --git a/labs/Lab4.pdf b/labs/Lab4.pdf index 5b5b89e0..91b4ecd3 100644 Binary files a/labs/Lab4.pdf and b/labs/Lab4.pdf differ diff --git a/syllabus/ece459-syllabus.pdf b/syllabus/ece459-syllabus.pdf deleted file mode 100644 index 063b4a45..00000000 Binary files a/syllabus/ece459-syllabus.pdf and /dev/null differ diff --git a/syllabus/ece459-syllabus.tex b/syllabus/ece459-syllabus.tex deleted file mode 100644 index 70bdb343..00000000 --- a/syllabus/ece459-syllabus.tex +++ /dev/null @@ -1,289 +0,0 @@ -\input{../common/header} -\date{} - -\begin{document} -\title{\bf\LARGE ECE~459: Programming for Performance\\ (Winter 2024)} -\author{Department of Electrical \& Computer Engineering \\ - University of Waterloo} -\renewcommand{\today}{} -\maketitle -\vspace*{-2em} - -\section*{This is not the Official Version} - -You are reading the version of the syllabus that we maintain in our git repo; however, the University of Waterloo's outlines repository at \url{https://outline.uwaterloo.ca} has the version that counts. The versions should be effectively the same, to the best of our knowledge. - -\section*{About the Course} - -\paragraph{Undergraduate Calendar Description} ``Profiling computer systems; bottlenecks, Amdahl's law. Concurrency: threads and locks. Techniques for programming multicore processors; cache consistency. Transactional memory. Streaming architectures, vectorization, and SIMD. High-performance programming languages.'' - -\paragraph{Prerequisites} ECE~252 or SE~350 (or equivalent); Level at least 4A Electrical Engineering or Computer Engineering or Software Engineering. - -Or, to put that in less formal terms: remember when we talked about semaphores and mutexes and all of that? If not, please review~ \url{https://github.com/jzarnett/ece252/tree/master/lectures} and its video form at~\url{https://www.youtube.com/playlist?list=PLFCH6yhq9yAHFaI00FrrgG0dPg8a5SjTJ}. (Or you can look at CS 343 material). Also, I really hope you feel comfortable with programming. This isn't the place for you if you're not feeling confident in programming. Really. We're going to learn a new language (Rust!) so if you don't feel comfortable with the fundamentals of programming and if learning a new language is frightening then flee while you can! - -\section*{Brief Overview} - -Many modern software systems must process large amounts of data, either in the -form of huge data sets or vast numbers of (concurrent) transactions. This -course introduces students to techniques for profiling, rearchitecting, and -implementing software systems that can handle industrial-sized -inputs. These techniques will enable you to design and build -critical software infrastructure, especially in an age of Big Data. - -While you may have seen some of these ideas in the context of -operating systems (ECE350/SE350/CS350/MTE241) and concurrency (ECE252/CS343), this course gives you tools to make code run -faster. The focus in OS/concurrency is understanding and implementing the -primitives; our focus is on using them effectively. - -We will sometimes see implementation details that you need to get right to write -certain applications, but as with any university-level course, this course -focusses more on the concepts than magic invocations, so that you can continue -to apply the basic ideas after the technologies inevitably change. For instance, -2021 was the first year that this course was in Rust (rather than C and \CPP), -but the core content remains the same. - - -\section*{General Information} - -\paragraph{Course Website} The lecture material will be at \url{https://github.com/jzarnett/ece459} and the videos are at~\url{https://www.youtube.com/playlist?list=PLFCH6yhq9yAGTgG7r30clocD3-QUs9wPL}. The primary source for course materials is github. We'll also use Piazza, and some things, like grades and previous years' exams, will appear in Learn. - -\paragraph{Scheduling} -We have two sections of the course, held at different times. We don't mind if you prefer to attend a different section other than the one that appears on your schedule of courses, depending on your preference. This is especially the case because some sections will use flipped-classroom format. Section 001 will be traditional-lecture format; section 002 will be partially flipped. - -In that section, some lecture slots will be filled by traditional lecture format, and some will be in-class exercises. The in-class exercises are for practice only and not for marks. When there is an in-class exercise, we are expecting you to watch the relevant videos that week to be prepared; if watching the videos, the pace is approximately 2.5 hours per week. - -%Midterm exam date, time, and location to be announced by the ECE department \footnote{\url{https://ece.uwaterloo.ca/electrical-computer-engineering/current-undergraduate-students/academic-planning-and-support/mid-term-examinations/}}. It will be 60 minutes in length. - -There will not be a midterm exam in this course. - -The final exam will happen during the final exam period. Look for it in the registrar's office schedule. - -\textit{Schedule Oddities:} Reading Week is scheduled for Feb 15--23. We encourage you to take at least some days out of the reading week pauses to rest and recharge. In principle, 3rd and 4th year classes don't happen on the day of Capstone Project Symposia. There are a lot of programs represented in our course, to the point where no single program accounts for more than half of the students. Therefore we are not cancelling classes. We understand if you are going to miss it. We're also aware that IRS will be a thing. - -\textit{Final Exam}: The final exam period is Apr 11--25. There will be a Registrar-scheduled written final exam scheduled somewhere between those dates; same drill as for the other courses. - - -\paragraph{About Prof. Zarnett.} -I graduated from the Computer Engineering program at Waterloo (under a previous curriculum), and have since earned my Master's Degree (also at Waterloo) and my P.Eng. license. For the last 10+ years I have also been teaching here at UW and the other courses I have taught and worked on include ECE~150, ECE~155, ECE~252, ECE~254, ECE~290, ECE~350, ECE~356, SE~350, and MTE~241. I'm currently the computer engineering academic advisor, so you can also talk to me about that if you are a CE student! - -In addition to being your instructor, I work full time in software engineering in industry. This imposes certain schedule constraints, but I do my best. The best way to get questions answered is via Piazza. There's also the possibility of asking questions at (virtual) office hours. - -\paragraph{About Prof. Lam.} -Way back when, I put Computer Engineering on my OUAC form. Then I got the AIF in the mail and decided I didn't want to study Computer Engineering after all. Yet here I am! I'm an Associate Professor of Electrical and Computer Engineering. Some of you will know me as the previous Director of Software Engineering. I studied math/CS yet convinced PEO to license me as a P.Eng. - -Professoring is my full time day job. My research interests focus on using compiler and static analysis techniques to ensure program correctness. We'll touch on that at some points in this term. An important part of the reason I chose this day job is to help students. The best way to do that is by talking. I really enjoy talking to students when they come by my office, but who knows what is going to happen this term. In any case: you can always email me at patrick.lam@uwaterloo.ca and schedule 1) an outdoor walk on campus (``walk as a service''); 2) a meeting in a suitable space if the epidemiological situation allows; or 3) a video call, if you'd like to talk to a 2D image of me on your screen. - -%% {About Huanyi Chen.} -%% As a Ph.D. student in the Electrical and Computer Engineering department, my research interests may seem unusual to many of you. I am passionate about exploring the field of computing education, which studies how people learn programming and how to support them as educators. This field has gained increasing attention in recent years, as more and more people are learning to code. I'd love to share with you some valuable strategies that can help you in your own learning. - -%% Although this is my first time teaching at the University of Waterloo, I have many experiences being a teaching assistant for various courses, including but not limited to databases, operating systems, distributed systems, etc. In addition, I've been an instructor at Conestoga College for several terms. I hope everyone can enjoy the course and master the key concepts and skills in the end. - -\paragraph{About the Teaching Assistants.} - -Teaching assistants can help you with the course material, including assignments and exams. They will do most of the assignment marking. - -\paragraph{Lab Instructor.} -We have a lab instructor this term. The LI is responsible for technical matters related to the assignments: git.uwaterloo.ca, git in general, administering the system where you need to run your labs. - -\noindent -\hspace*{2em} -\begin{minipage}{.7\textwidth} - Richard Baverstock -- rbaverst@uwaterloo.ca -\end{minipage} - -\noindent {\bf Teaching Assistants:} -\hspace*{2em} \begin{minipage}{.7\textwidth} - - -S M Taslim Uddin Raju -- smturaju@uwaterloo.ca \\ -Tanmayi Jandhyala -- tjandhya@uwaterloo.ca \\ -Thanushon Sivakaran -- tsivakar@uwaterloo.ca \\ -Vinayak Sharma -- v236shar@uwaterloo.ca - -\end{minipage} - -\section*{Textbook} -There are detailed notes. There's no required textbook for the course. The notes cite a number of sources, some of which are useful books. But there's no single source that does it all, so it would be silly to ask you to buy one. - -\section*{Evaluation} -This course includes assignments and a final -examination. Too many fourth-year courses have projects. This tends to make the end of term unmanageable. We won't contribute to that problem too much.\vspace*{1em} - -\begin{tabular}{l@{\hspace*{5em}}rl} -Academic Integrity Exercise & 1\% \\ -Assignments & 64\% &(4 at 16\% each) \\ -Final exam & 35\% \\ -\end{tabular} - -Special rule related to the final exam: you need to get a grade of at least 30\% on the final exam to pass the course. If your grade for the final exam is less than 30\%, all your assignment grades are cut in half, so your maximum grade for the course will be 43\%. - -We will give you a grade of INC (Incomplete) if you do not attempt all assignments. If you do not complete the assignments within 4 months of the end of the course to the satisfaction of the course instructor, the Registrar's Office will automatically convert your INC (Incomplete) grade to FTC (Failure to Complete), a failing mark. If you complete the assignments successfully within the required timeframe, we will calculate the overall grade using the rules for late assignment submission. Furthermore, any submitted assignment must be an honest attempt---submitting an empty project or similar is not adequate. - -\paragraph{Exams.} Exams will be open-book, open-notes. The University rules say if you do not submit the final exam, without an acceptable reason, your grade in the class will be DNW---Did Not Write. This is very undesirable. Please show up for the final exam. - -\paragraph{Tutorials.} This class has tutorials scheduled. 4th year students basically never attend tutorials so there's no point in using them, right? We won't use them. Please enjoy the extra free hour of your week. - - -\paragraph{Assignments (aka labs).} Since this course has ``programming'' in the -title, you will be expected to write code for these assignments. Here -is a list of assignments for this course. We have 4 -assignments as below: - -\begin{enumerate} -\item Manual parallelization of a computation using threads; and use of nonblocking I/O; -\item Optimizing log file analytics; -\item GPU programming with CUDA; -\item Open-ended program improvement via profiling. -\end{enumerate} -Assignment instructions will be posted on LEARN, and assignment hand-in will be done via \texttt{git} using the university-provided \url{https://git.uwaterloo.ca} (Gitlab) service. You need to set up your account in the Gitlab service as soon as possible to get access to your starter code of your first assignment. - -Auto-grading and auto-feedback systems, including marmoset, may be used for the evaluation of some of your assignments. - -Your assignment code will be checked for plagiarism using MOSS (Measure Of Software Similarity) as well as some manual checks. You may request to opt out of the automatic screening by sending a formal written letter to your instructor explaining why; a meeting will then follow to discuss the subject with the instructor. - -You'll have at least two weeks to do each assignment. Trying to place the assignment due dates in the term is hard. We try to avoid FYDP deadlines, not place them on top of midterms, keep them vaguely in sync with the course material covered so far, and finally we're not allowed to make the due date for them during reading week or after the end of term. Oh, and because there are so many students from so many programs, it is effectively impossible to pick a date that works for everyone. Apologies in advance. That's why there are grace days (see below). - -\paragraph{Generative AI.} -The teaching team is keenly aware of the existence of generative AI (e.g., Github Copilot, ChatGPT) and how such tools can be used to write and test code. This is not a bad thing; IDEs, autocomplete, compilers, libraries, and tools like linters or Valgrind have existed for a long time and can all help you to write your code in an efficient way by doing things for you that at one time you had to do manually. We know that banning them does not work (how could we check that, even?) and in reality (co-op or full time employment), you'll not only use these things, but will probably be less productive than your colleagues if you do not. So -- we trust you to use these things responsibly. What does using it responsibly mean? - -Our asks on this are two simple things. The first is that you should acknowledge if you used code given to you by an AI tool, just as you would if you found something on a website somewhere. The second thing is that you should use the tool(s) to help you, not do it all for you. This means you should understand the output it gives you and can verify that it is correct (remember that this is your professional responsibility under the law). Keep in mind that AI models are subject to ``hallucinations'' (making things up that aren't true or aren't real) and errors (bugs, vulnerabilities). - -\paragraph{Lateness.} Also known as ``Grace Days''. You have five (5) days of lateness to use on submissions throughout the term. Each day you hand in something late consumes one of the days of lateness. Grace days are counted in units of whole days, so if you submit 2 hours late that's 1 grace day, and if you submit 22 hours late that is still 1 grace day. We look at the last commit time in Gitlab on the default branch to determine when your code was submitted. - -If you use too many grace days, here's what happens. The sixth day of lateness causes your lowest assignment mark to be halved. The seventh day causes your lowest two assignment marks to be halved. If you have more than seven days of lateness, we'll start converting marks to 0 and dropping the associated late days. - -You don't get any credit for unused late days. Also, grace days are tracked in Learn for transparency. - -\paragraph{Group work.} -You may discuss assignments with others, but we expect each of you to -do each assignment independently. Acceptable collaboration includes -discussing ideas and structures with others, as well as helping others -debug their code. If your code is too close in structure to someone -else's code, you are going to have a problem. The best way to avoid -such problems is by (1) not sending your code around; and (2) not -writing down anything beyond general notes (pseudocode) about other -peoples' code. We will follow UW's Policy 71 if we discover any cases of -plagiarism (and we have). Under this policy, the instructor may have follow-up conversations with individual students to ensure that the work submitted was completed on their own. Any follow-up may be conducted remotely (e.g., MS Teams, Skype, phone) or in person, depending on the situation. - -We want to emphasize that we take the issue of plagiarism very seriously, and so does the University of Waterloo. If you are uncertain about this subject, please seek some guidance. There are many resources available to you. You can check the university policies, talk to the course instructor, ECE/SE undergrad office, et cetera. - -Or, let's sum this up in two short instructions: -\begin{enumerate} - \item Acknowledge the work of others. - \item If you are uncertain, ask! -\end{enumerate} - -\paragraph{Piazza Policy.} -Piazza is a great tool for collaboration and it allows rapid but asynchronous exchange of information. It almost goes without saying, but we ask you to be respectful and polite when communicating via this medium and to assume the best about others, as tone can be difficult to interpret on a discussion forum. - -Before posting your question, please consider whether this question can be answered by looking at either the course notes, lab manual, or documentation available on the internet (e.g., man pages). To help others find answers later, (1) we discourage screenshot-only posts (since the content does not show up in search results) and (2) we encourage you to please restrict a single thread to one question (or a closely-related set of questions). - -For the most part, we encourage (but do not require) you to make your question(s) public so that other students may benefit from the answer. If something was non-obvious or unclear to you, it was likely to others as well. If your question includes detailed design information or code excerpts related to a deliverable (e.g., an assignment), then please do make it a private question. - -Please also keep in mind that course staff may not be able to answer your question immediately as they have many other responsibilities throughout the term (and the frequency of questions tends to spike before due dates or exams). We encourage you to think through the problem before posting, but acknowledge that just like ``rubber duck debugging'' sometimes the act of writing down the nature of the problem provides insight into solving it. - -\paragraph{Re-marking.} -If you believe that your grade on an assignment is incorrect, you may ask that it be re-marked. To request that a question be re-marked, you will need to submit your request in writing via e-mail to the instructor. - -When you submit your request, it should include the following: (1) Your name and student ID number; (2) a clear indication of which question or part of the deliverable is to be re-marked; and (3) an explanation of why you believe the grade assigned was incorrect. - -Requests for re-marking may be submitted any time before the final exam. Be forewarned: when a deliverable is being re-marked, your grade could go up, it could stay the same, or it could go down. You will be notified of the outcome. - -\paragraph{Extra Credit} -In this class, there will be no opportunities to earn extra credit. Make-up assignments or examinations will not be offered under any circumstances. - -\paragraph{Attendance \& Illness} - -There are video lectures, but we can't make you watch them. In fact, I [PL] don't know whether I would actually watch all the hours of lectures if I was taking the class (I hate video). The lecture notes are the source material for the video lectures and also contain much of the information that we say. Thus, you have some options to choose the materials that work best for you. As you've surely noticed by now, at university, there is a lot that you have to learn on your own by doing assignments. - -We do hope, though, that you stay on top of the material throughout the term and don't try to cram it all before the final exam/assignments. That's why the assignment deadlines are spread throughout the term. You have now had multiple terms of remote teaching over the last two years, and we hope that you've picked up what works and doesn't work for you personally. - -%Personal opinion on attending classes: it is usually a good idea to attend lectures. That said, attendance is not taken and not graded. - -%Some advice Professor Gebotys gave long ago: If you are tired, go sleep at home. Sleeping in the lecture doesn't work; you will get poor quality of sleep and you won't learn the material while you're asleep, either. - -If you feel ill, you should seek appropriate medical attention. If you are feeling unwell during the exam, you should complete the self-declaration of illness form or get a declaration of illness form signed. If you anticipate missing a deliverable deadline or an examination for a non-medical reason, you should contact your instructor as soon as you are aware of the problem. Given sufficient notice, alternate arrangements may be possible. Alternate arrangements are rare and at instructor discretion. We understand that this term may have a higher than average number of emergencies and pledge to be understanding. - -If one of the instructors should be ill, we'll revert that section to online lectures only during the affected period. - - -\paragraph{Laptop and Device Policy} -The human visual system has evolved to perceive saber-toothed tigers -in the savannah. Fortunately, tigers are rare in Waterloo, Ontario -(Geese, on the other hand...). -Unfortunately, your classmates are still human and hence their -attention will be drawn to flashing lights (or Facebook, or movies, or -video games) in their peripheral vision. We encourage -everyone to be respectful of their classmates and to not distract them. - -Wise use of computers and the Internet can be helpful for fully -engaging in class. You might want to try out some syntax, or you might -want to look up constructors, or you might want to verify your -instructor's somewhat outrageous-sounding claim. - -To support the benefits of the Internet while reducing distractions, -we will adopt the following policy for in-person lectures in this class. We are asking that the -first 2 rows of class be text-oriented: if using a device, use a -command prompt or text editor, maximized to the whole screen. Paper is -always good, of course. Mac OS X and UNIX command prompts are probably -your best bet; for those of you on Windows, you can use the Windows -Subsystem for Linux. From the command prompt, you can use compilers -and text-mode web browsers (w3m, lynx, links/elinks, etc....) tmux may -also be helpful in managing multiple terminal sessions. Being -proficient with the terminal is a highly-useful skill for a Software -Engineer. - -We acknowledge that lectures are not always engaging. Instead of -distracting screen content, we recommend non-distracting ways of tuning -out, like doodling on paper (while taking notes), or doing homework. -(we also recommend passing notes to each other instead of talking). - -If you need to sit towards the front of the class and use a GUI -program, then please discuss with your instructor to register -yourself as an exception. If you sign up for -the exception list, we'll ask to you agree to not display games, -videos, or social media on your screen (unless it is part of the -class). - -Enforcement is a sensitive issue, especially given the existence of -exceptions. We are primarily asking each of you to respect the policy -on your own. But, if you see someone with games, videos, or social -media in the terminal zone, you can politely bring it up with them. - -tl;dr: paper or text-oriented programs in first 2 rows of class during regular lectures (not in-class exercises). - -\paragraph{Masks.} - -I'm going to wear a mask throughout the term. I think they're a good idea to protect yourself and others. The university does not -- and probably will not -- require you to wear one in instructional spaces, but that may change. I hope you'll still choose to wear one. N95-equivalent masks are a good idea, even if they aren't perfect and aren't a guarantee of not catching an illness. - -Why wear one? For your health, and the health of others... but you knew that. If that's not convincing... although you may have reasons to expect that your risk is quite low, and even ignoring the possibility of long-term side effects, being sick still sucks. I don't know anyone who has \textit{enjoyed} having COVID-19, or any other respiratory illness. So why not do something to reduce the likelihood of getting the extremely contagious virus? - -Finally: as an academic advisor, I [JZ] have seen a number of petitions in the last few terms where a student got COVID-19 just before or during exams; then they do much worse than usual and end up failing the term, or at least some courses. Repeating a course or a term is not the end of the world, but again, I don't know too many students who are thrilled about the idea of delaying their convocation or having to pay tuition for an extra course on a co-op or non-degree term. - - -\paragraph{Contingency Planning for Pandemic-Related Disruptions.} -The department asks us to plan for either a short-term (e.g., one week) or long-term (e.g., remainder of the term) disruption of in-person activities. In either case, we will cancel all the in-person lectures and in-class exercises during the relevant period and use only the videos for lecture content. Labs (assignments) will not be affected either way as they are already online-learning-friendly. We can replace the final exam with an online final assessment if necessary. - -\section*{University Policies} - -\paragraph{Academic Integrity} -In order to maintain a culture of academic integrity, members of the University of Waterloo community are expected to promote honesty, trust, fairness, respect and responsibility. Check\\ -\texttt{www.uwaterloo.ca/academicintegrity/} for more information. - -\paragraph{Grievance} -A student who believes that a decision affecting some aspect of their university life has been unfair or unreasonable may have grounds for initiating a grievance. Read Policy 70, Student Petitions and Grievances, Section 4, \texttt{adm.uwaterloo.ca/infosec/Policies/policy70.htm} \\ -If in doubt, contact the department's administrative assistant, who will provide further assistance. - -\paragraph{Discipline} -A student is expected to know what constitutes academic integrity (see above section) to avoid committing an academic offence, and to take responsibility for their actions. A student who is unsure whether an action constitutes an offence, or who needs help in learning how to avoid offences (e.g., plagiarism, cheating) or about ''rules'' for group work/collaboration should seek guidance from the course instructor, academic advisor, or the undergraduate Associate Dean. For information on categories of offences and types of penalties, students should refer to Policy 71, Student Discipline, \texttt{www.adm.uwaterloo.ca/infosec/Policies/policy71.htm} . For typical penalties check Guidelines for the Assessment of Penalties, see \\\texttt{www.adm.uwaterloo.ca/infosec/guidelines/penaltyguidelines.htm} . - -\paragraph{Appeals} -A decision made or penalty imposed under Policy 70 (Student Petitions and Grievances) (other than a petition) or Policy 71 (Student Discipline) may be appealed if there is a ground. A student who believes he/she has a ground for an appeal should refer to Policy 72 (Student Appeals)\\~\texttt{www.adm.uwaterloo.ca/infosec/Policies/policy72.htm}. - -\paragraph{Privacy} -Questions about the collection, use, and disclosure of personal information by the University, should be directed to the Freedom of Information and Privacy Coordinator, Secretariat, University of Waterloo, 200 University Avenue West, Waterloo, Ontario, Canada N2L 3G1. The email address of the Freedom of Information and Privacy Coordinator is \texttt{fippa@uwaterloo.ca}. See also University of Waterloo Policy 19: Access to and Release of Student Information; Information and Privacy. -\\ \texttt{https://uwaterloo.ca/secretariat/policies-procedures-guidelines/policy-19} - -\paragraph{Note for Students with Special Needs} -The AccessAbility Services (formerly known as OPD) located in Needles Hall, collaborates with all academic departments to arrange appropriate accommodations for students with disabilities without compromising the academic integrity of the curriculum. If you require academic accommodations to lessen the impact of your disability, please register with the AccessAbility Services office at the beginning of each academic term. -\end{document} diff --git a/syllabus/listings-rust.sty b/syllabus/listings-rust.sty deleted file mode 100644 index b630af1e..00000000 --- a/syllabus/listings-rust.sty +++ /dev/null @@ -1,75 +0,0 @@ -\NeedsTeXFormat{LaTeX2e}[1994/06/01] -\ProvidesPackage{listings-rust}[2018/01/23 Custom Package] - -\RequirePackage{color} -\RequirePackage{listings} - -\lstdefinelanguage{Rust}{% - sensitive% -, morecomment=[l]{//}% -, morecomment=[s]{/*}{*/}% -, moredelim=[s][{\itshape\color[rgb]{0,0,0.75}}]{\#[}{]}% -, morestring=[b]{"}% -, alsodigit={}% -, alsoother={}% -, alsoletter={!}% -% -% -% [1] reserve keywords -% [2] traits -% [3] primitive types -% [4] type and value constructors -% [5] identifier -% -, morekeywords={break, continue, else, for, if, in, loop, match, return, while} % control flow keywords -, morekeywords={as, const, let, move, mut, ref, static} % in the context of variables -, morekeywords={dyn, enum, fn, impl, Self, self, struct, trait, type, union, use, where} % in the context of declarations -, morekeywords={crate, extern, mod, pub, super} % in the context of modularisation -, morekeywords={unsafe} % markers -, morekeywords={abstract, alignof, become, box, do, final, macro, offsetof, override, priv, proc, pure, sizeof, typeof, unsized, virtual, yield} % reserved identifiers -% -% grep 'pub trait [A-Za-z][A-Za-z0-9]*' -r . | sed 's/^.*pub trait \([A-Za-z][A-Za-z0-9]*\).*/\1/g' | sort -u | tr '\n' ',' | sed 's/^\(.*\),$/{\1}\n/g' | sed 's/,/, /g' -, morekeywords=[2]{Add, AddAssign, Any, AsciiExt, AsInner, AsInnerMut, AsMut, AsRawFd, AsRawHandle, AsRawSocket, AsRef, Binary, BitAnd, BitAndAssign, Bitor, BitOr, BitOrAssign, BitXor, BitXorAssign, Borrow, BorrowMut, Boxed, BoxPlace, BufRead, BuildHasher, CastInto, CharExt, Clone, CoerceUnsized, CommandExt, Copy, Debug, DecodableFloat, Default, Deref, DerefMut, DirBuilderExt, DirEntryExt, Display, Div, DivAssign, DoubleEndedIterator, DoubleEndedSearcher, Drop, EnvKey, Eq, Error, ExactSizeIterator, ExitStatusExt, Extend, FileExt, FileTypeExt, Float, Fn, FnBox, FnMut, FnOnce, Freeze, From, FromInner, FromIterator, FromRawFd, FromRawHandle, FromRawSocket, FromStr, FullOps, FusedIterator, Generator, Hash, Hasher, Index, IndexMut, InPlace, Int, Into, IntoCow, IntoInner, IntoIterator, IntoRawFd, IntoRawHandle, IntoRawSocket, IsMinusOne, IsZero, Iterator, JoinHandleExt, LargeInt, LowerExp, LowerHex, MetadataExt, Mul, MulAssign, Neg, Not, Octal, OpenOptionsExt, Ord, OsStrExt, OsStringExt, Packet, PartialEq, PartialOrd, Pattern, PermissionsExt, Place, Placer, Pointer, Product, Put, RangeArgument, RawFloat, Read, Rem, RemAssign, Seek, Shl, ShlAssign, Shr, ShrAssign, Sized, SliceConcatExt, SliceExt, SliceIndex, Stats, Step, StrExt, Sub, SubAssign, Sum, Sync, TDynBenchFn, Terminal, Termination, ToOwned, ToSocketAddrs, ToString, Try, TryFrom, TryInto, UnicodeStr, Unsize, UpperExp, UpperHex, WideInt, Write} -, morekeywords=[2]{Send} % additional traits -% -, morekeywords=[3]{bool, char, f32, f64, i8, i16, i32, i64, isize, str, u8, u16, u32, u64, unit, usize, i128, u128} % primitive types -% -, morekeywords=[4]{Err, false, None, Ok, Some, true} % prelude value constructors -% grep 'pub \(type\|struct\|enum\) [A-Za-z][A-Za-z0-9]*' -r . | sed 's/^.*pub \(type\|struct\|enum\) \([A-Za-z][A-Za-z0-9]*\).*/\2/g' | sort -u | tr '\n' ',' | sed 's/^\(.*\),$/{\1}\n/g' | sed 's/,/, /g' -, morekeywords=[3]{AccessError, Adddf3, AddI128, AddoI128, AddoU128, ADDRESS, ADDRESS64, addrinfo, ADDRINFOA, AddrParseError, Addsf3, AddU128, advice, aiocb, Alignment, AllocErr, AnonPipe, Answer, Arc, Args, ArgsInnerDebug, ArgsOs, Argument, Arguments, ArgumentV1, Ashldi3, Ashlti3, Ashrdi3, Ashrti3, AssertParamIsClone, AssertParamIsCopy, AssertParamIsEq, AssertUnwindSafe, AtomicBool, AtomicPtr, Attr, auxtype, auxv, BackPlace, BacktraceContext, Barrier, BarrierWaitResult, Bencher, BenchMode, BenchSamples, BinaryHeap, BinaryHeapPlace, blkcnt, blkcnt64, blksize, BOOL, boolean, BOOLEAN, BoolTrie, BorrowError, BorrowMutError, Bound, Box, bpf, BTreeMap, BTreeSet, Bucket, BucketState, Buf, BufReader, BufWriter, Builder, BuildHasherDefault, BY, BYTE, Bytes, CannotReallocInPlace, cc, Cell, Chain, CHAR, CharIndices, CharPredicateSearcher, Chars, CharSearcher, CharsError, CharSliceSearcher, CharTryFromError, Child, ChildPipes, ChildStderr, ChildStdin, ChildStdio, ChildStdout, Chunks, ChunksMut, ciovec, clock, clockid, Cloned, cmsgcred, cmsghdr, CodePoint, Color, ColorConfig, Command, CommandEnv, Component, Components, CONDITION, condvar, Condvar, CONSOLE, CONTEXT, Count, Cow, cpu, CRITICAL, CStr, CString, CStringArray, Cursor, Cycle, CycleIter, daddr, DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple, Decimal, Decoded, DecodeUtf16, DecodeUtf16Error, DecodeUtf8, DefaultEnvKey, DefaultHasher, dev, device, Difference, Digit32, DIR, DirBuilder, dircookie, dirent, dirent64, DirEntry, Discriminant, DISPATCHER, Display, Divdf3, Divdi3, Divmoddi4, Divmodsi4, Divsf3, Divsi3, Divti3, dl, Dl, Dlmalloc, Dns, DnsAnswer, DnsQuery, dqblk, Drain, DrainFilter, Dtor, Duration, DwarfReader, DWORD, DWORDLONG, DynamicLibrary, Edge, EHAction, EHContext, Elf32, Elf64, Empty, EmptyBucket, EncodeUtf16, EncodeWide, Entry, EntryPlace, Enumerate, Env, epoll, errno, Error, ErrorKind, EscapeDebug, EscapeDefault, EscapeUnicode, event, Event, eventrwflags, eventtype, ExactChunks, ExactChunksMut, EXCEPTION, Excess, ExchangeHeapSingleton, exit, exitcode, ExitStatus, Failure, fd, fdflags, fdsflags, fdstat, ff, fflags, File, FILE, FileAttr, filedelta, FileDesc, FilePermissions, filesize, filestat, FILETIME, filetype, FileType, Filter, FilterMap, Fixdfdi, Fixdfsi, Fixdfti, Fixsfdi, Fixsfsi, Fixsfti, Fixunsdfdi, Fixunsdfsi, Fixunsdfti, Fixunssfdi, Fixunssfsi, Fixunssfti, Flag, FlatMap, Floatdidf, FLOATING, Floatsidf, Floatsisf, Floattidf, Floattisf, Floatundidf, Floatunsidf, Floatunsisf, Floatuntidf, Floatuntisf, flock, ForceResult, FormatSpec, Formatted, Formatter, Fp, FpCategory, fpos, fpos64, fpreg, fpregset, FPUControlWord, Frame, FromBytesWithNulError, FromUtf16Error, FromUtf8Error, FrontPlace, fsblkcnt, fsfilcnt, fsflags, fsid, fstore, fsword, FullBucket, FullBucketMut, FullDecoded, Fuse, GapThenFull, GeneratorState, gid, glob, glob64, GlobalDlmalloc, greg, group, GROUP, Guard, GUID, Handle, HANDLE, Handler, HashMap, HashSet, Heap, HINSTANCE, HMODULE, hostent, HRESULT, id, idtype, if, ifaddrs, IMAGEHLP, Immut, in, in6, Incoming, Infallible, Initializer, ino, ino64, inode, input, InsertResult, Inspect, Instant, int16, int32, int64, int8, integer, IntermediateBox, Internal, Intersection, intmax, IntoInnerError, IntoIter, IntoStringError, intptr, InvalidSequence, iovec, ip, IpAddr, ipc, Ipv4Addr, ipv6, Ipv6Addr, Ipv6MulticastScope, Iter, IterMut, itimerspec, itimerval, jail, JoinHandle, JoinPathsError, KDHELP64, kevent, kevent64, key, Key, Keys, KV, l4, LARGE, lastlog, launchpad, Layout, Lazy, lconv, Leaf, LeafOrInternal, Lines, LinesAny, LineWriter, linger, linkcount, LinkedList, load, locale, LocalKey, LocalKeyState, Location, lock, LockResult, loff, LONG, lookup, lookupflags, LookupHost, LPBOOL, LPBY, LPBYTE, LPCSTR, LPCVOID, LPCWSTR, LPDWORD, LPFILETIME, LPHANDLE, LPOVERLAPPED, LPPROCESS, LPPROGRESS, LPSECURITY, LPSTARTUPINFO, LPSTR, LPVOID, LPWCH, LPWIN32, LPWSADATA, LPWSAPROTOCOL, LPWSTR, Lshrdi3, Lshrti3, lwpid, M128A, mach, major, Map, mcontext, Metadata, Metric, MetricMap, mflags, minor, mmsghdr, Moddi3, mode, Modsi3, Modti3, MonitorMsg, MOUNT, mprot, mq, mqd, msflags, msghdr, msginfo, msglen, msgqnum, msqid, Muldf3, Mulodi4, Mulosi4, Muloti4, Mulsf3, Multi3, Mut, Mutex, MutexGuard, MyCollection, n16, NamePadding, NativeLibBoilerplate, nfds, nl, nlink, NodeRef, NoneError, NonNull, NonZero, nthreads, NulError, OccupiedEntry, off, off64, oflags, Once, OnceState, OpenOptions, Option, Options, OptRes, Ordering, OsStr, OsString, Output, OVERLAPPED, Owned, Packet, PanicInfo, Param, ParseBoolError, ParseCharError, ParseError, ParseFloatError, ParseIntError, ParseResult, Part, passwd, Path, PathBuf, PCONDITION, PCONSOLE, Peekable, PeekMut, Permissions, PhantomData, pid, Pipes, PlaceBack, PlaceFront, PLARGE, PoisonError, pollfd, PopResult, port, Position, Powidf2, Powisf2, Prefix, PrefixComponent, PrintFormat, proc, Process, PROCESS, processentry, protoent, PSRWLOCK, pthread, ptr, ptrdiff, PVECTORED, Queue, radvisory, RandomState, Range, RangeFrom, RangeFull, RangeInclusive, RangeMut, RangeTo, RangeToInclusive, RawBucket, RawFd, RawHandle, RawPthread, RawSocket, RawTable, RawVec, Rc, ReadDir, Receiver, recv, RecvError, RecvTimeoutError, ReentrantMutex, ReentrantMutexGuard, Ref, RefCell, RefMut, REPARSE, Repeat, Result, Rev, Reverse, riflags, rights, rlim, rlim64, rlimit, rlimit64, roflags, Root, RSplit, RSplitMut, RSplitN, RSplitNMut, RUNTIME, rusage, RwLock, RWLock, RwLockReadGuard, RwLockWriteGuard, sa, SafeHash, Scan, sched, scope, sdflags, SearchResult, SearchStep, SECURITY, SeekFrom, segment, Select, SelectionResult, sem, sembuf, send, Sender, SendError, servent, sf, Shared, shmatt, shmid, ShortReader, ShouldPanic, Shutdown, siflags, sigaction, SigAction, sigevent, sighandler, siginfo, Sign, signal, signalfd, SignalToken, sigset, sigval, Sink, SipHasher, SipHasher13, SipHasher24, size, SIZE, Skip, SkipWhile, Slice, SmallBoolTrie, sockaddr, SOCKADDR, sockcred, Socket, SOCKET, SocketAddr, SocketAddrV4, SocketAddrV6, socklen, speed, Splice, Split, SplitMut, SplitN, SplitNMut, SplitPaths, SplitWhitespace, spwd, SRWLOCK, ssize, stack, STACKFRAME64, StartResult, STARTUPINFO, stat, Stat, stat64, statfs, statfs64, StaticKey, statvfs, StatVfs, statvfs64, Stderr, StderrLock, StderrTerminal, Stdin, StdinLock, Stdio, StdioPipes, Stdout, StdoutLock, StdoutTerminal, StepBy, String, StripPrefixError, StrSearcher, subclockflags, Subdf3, SubI128, SuboI128, SuboU128, subrwflags, subscription, Subsf3, SubU128, Summary, suseconds, SYMBOL, SYMBOLIC, SymmetricDifference, SyncSender, sysinfo, System, SystemTime, SystemTimeError, Take, TakeWhile, tcb, tcflag, TcpListener, TcpStream, TempDir, TermInfo, TerminfoTerminal, termios, termios2, TestDesc, TestDescAndFn, TestEvent, TestFn, TestName, TestOpts, TestResult, Thread, threadattr, threadentry, ThreadId, tid, time, time64, timespec, TimeSpec, timestamp, timeval, timeval32, timezone, tm, tms, ToLowercase, ToUppercase, TraitObject, TryFromIntError, TryFromSliceError, TryIter, TryLockError, TryLockResult, TryRecvError, TrySendError, TypeId, U64x2, ucontext, ucred, Udivdi3, Udivmoddi4, Udivmodsi4, Udivmodti4, Udivsi3, Udivti3, UdpSocket, uid, UINT, uint16, uint32, uint64, uint8, uintmax, uintptr, ulflags, ULONG, ULONGLONG, Umoddi3, Umodsi3, Umodti3, UnicodeVersion, Union, Unique, UnixDatagram, UnixListener, UnixStream, Unpacked, UnsafeCell, UNWIND, UpgradeResult, useconds, user, userdata, USHORT, Utf16Encoder, Utf8Error, Utf8Lossy, Utf8LossyChunk, Utf8LossyChunksIter, utimbuf, utmp, utmpx, utsname, uuid, VacantEntry, Values, ValuesMut, VarError, Variables, Vars, VarsOs, Vec, VecDeque, vm, Void, WaitTimeoutResult, WaitToken, wchar, WCHAR, Weak, whence, WIN32, WinConsole, Windows, WindowsEnvKey, winsize, WORD, Wrapping, wrlen, WSADATA, WSAPROTOCOL, WSAPROTOCOLCHAIN, Wtf8, Wtf8Buf, Wtf8CodePoints, xsw, xucred, Zip, zx} -% -, morekeywords=[5]{assert!, assert_eq!, assert_ne!, cfg!, column!, compile_error!, concat!, concat_idents!, debug_assert!, debug_assert_eq!, debug_assert_ne!, env!, eprint!, eprintln!, file!, format!, format_args!, include!, include_bytes!, include_str!, line!, module_path!, option_env!, panic!, print!, println!, select!, stringify!, thread_local!, try!, unimplemented!, unreachable!, vec!, write!, writeln!} % prelude macros -}% - -\lstdefinestyle{colouredRust}% -{ basicstyle=\ttfamily% -, identifierstyle=% -, commentstyle=\color[gray]{0.4}% -, stringstyle=\color[rgb]{0, 0, 0.5}% -, keywordstyle=\bfseries% reserved keywords -, keywordstyle=[2]\color[rgb]{0.75, 0, 0}% traits -, keywordstyle=[3]\color[rgb]{0, 0.5, 0}% primitive types -, keywordstyle=[4]\color[rgb]{0, 0.5, 0}% type and value constructors -, keywordstyle=[5]\color[rgb]{0, 0, 0.75}% macros -, columns=spaceflexible% -, keepspaces=true% -, showspaces=false% -, showtabs=false% -, showstringspaces=true% -}% - -\lstdefinestyle{boxed}{ - style=colouredRust% -, numbers=left% -, firstnumber=auto% -, numberblanklines=true% -, frame=trbL% -, numberstyle=\tiny% -, frame=leftline% -, numbersep=7pt% -, framesep=5pt% -, framerule=10pt% -, xleftmargin=15pt% -, backgroundcolor=\color[gray]{0.97}% -, rulecolor=\color[gray]{0.90}% -}