diff --git a/README.md b/README.md index 7d77b9b..1a96ae9 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,19 @@ ## Logistics - Instructor: [Jeehoon Kang](https://cp.kaist.ac.kr/jeehoon.kang) -- Time: Mon & Wed 14:30pm-15:45pm +- Time: Mon & Wed 14:30-15:45 (2024 Fall) - Place - + Rm. 304, Bldg. E11. **YOUR PHYSICAL ATTENDANCE IS REQUIRED** unless announced otherwise. - + [Zoom room](https://kaist.zoom.us/my/jeehoon.kang) (if remote participation is absolutely necessary). The passcode is announced at KLMS. -- Websites: , + + Rm. 1501, Bldg. E3-1. **YOUR PHYSICAL ATTENDANCE IS REQUIRED** unless announced otherwise. + + [Zoom room](https://kaist.zoom.us/my/jeehoon.kang) (if remote participation is absolutely necessary). + Ask Jeehoon via email for the passcode. +- Websites: , - Announcements: in [issue tracker](https://github.com/kaist-cp/cs220/issues?q=is%3Aissue+is%3Aopen+label%3Aannouncement) + We assume you read each announcement within 24 hours. + We strongly recommend you to watch the repository. -- TA: [Haechan An](https://cp.kaist.ac.kr/haechan.an), [Jungin Rhee](https://cp.kaist.ac.kr/jungin.rhee), [Woojin Lee](https://cp.kaist.ac.kr/woojin.lee) - + Office Hour: Fri 9:15am-10:15am, Rm. 4432, Bldg. E3-1. If you want to come, do so by 9:30am. See [below](https://github.com/kaist-cp/cs220#rules) for office hour policy. +- TA: TBA + + Office Hours: Fri 9:00-10:00, Rm. 4441, Bldg. E3-1. + If you want to come, do so by 9:15. + See [below](https://github.com/kaist-cp/cs220#rules) for the office hour policy. - **IMPORTANT**: you should not expose your work to others. In particular, you should not fork the [upstream](https://github.com/kaist-cp/cs220) and push there. @@ -28,29 +31,28 @@ ### Prerequisites -- It is **strongly recommended** that students already took courses on: +- It is **strongly recommended** that students have completed courses in: + Mathematics (MAS101): proposition statement and proof + Programming (CS101): basic programming skills -- Without a proper understanding of these topics, you will likely struggle in this course. -- In the assignment, for the concepts that don't come out in prerequisite courses, we tried to comment on the relevant resources in the assignment code. Please read them carefully. + A solid foundation in these areas is crucial for success in this course. + + +### Schedule + +TBA ### Tools -Make sure that you're capable of using the following development tools: +Ensure you are proficient with the following development tools: -- [Git](https://git-scm.com/): for downloading the homework skeleton and version-controlling your - development. If you're not familiar with Git, walk through [this - tutorial](https://www.atlassian.com/git/tutorials). - - + **IMPORTANT**: you should not expose your work to others. In particular, you should not fork - the [upstream](https://github.com/kaist-cp/cs220) and push there. Please the following - steps: - - * Directly clone the upstream without forking it. +- [Git](https://git-scm.com/): Essential for downloading homework templates and managing your development process. + If you're new to Git, please complete [this tutorial](https://www.atlassian.com/git/tutorials). + + Follow these steps to set up your repository: + * Clone the upstream repository directly without forking it: ```bash $ git clone --origin upstream git@github.com:kaist-cp/cs220.git $ cd cs220 @@ -58,22 +60,16 @@ Make sure that you're capable of using the following development tools: upstream git@github.com:kaist-cp/cs220.git (fetch) upstream git@github.com:kaist-cp/cs220.git (push) ``` - - * To get updates from the upstream, fetch and merge `upstream/main`. - + * To receive updates from the upstream, fetch and merge `upstream/main`: ```bash $ git fetch upstream $ git merge upstream/main ``` - + If you want to manage your development in a Git server, please create your own private - repository. - - * You may upgrade your GitHub account to "PRO", which is free of charge. - Refer to the [documentation](https://education.github.com/students). - - * Set up your repository as a remote. - + + For managing your development on a Git server, create a private repository: + * Upgrade to a "PRO" GitHub account, available at no cost. + See the [documentation](https://education.github.com/students). + * Configure your repository as a remote: ```bash $ git remote add origin git@github.com:/cs220.git $ git remote -v @@ -82,69 +78,59 @@ Make sure that you're capable of using the following development tools: upstream git@github.com:kaist-cp/cs220.git (fetch) upstream git@github.com:kaist-cp/cs220.git (push) ``` - - * Push to your repository. - + * Push your work to your repository: ```bash $ git push -u origin main ``` -- [Rust](https://www.rust-lang.org/): as the language of homework implementation. We chose Rust - because its ownership type system greatly simplifies the development of large-scale system - software. - - We recommend you to read [this page](https://cp.kaist.ac.kr/helpdesk#technical-expertise) that describes how to study Rust. - - `cargo doc --open` on your local will show you the documentation for each homework. +- [Rust](https://www.rust-lang.org/): You will use Rust for homework. + We chose Rust because its ownership type system greatly simplifies the development of large-scale system software. + + `cargo doc --open` on your local will show you the documentation for each homework. -- [ChatGPT](https://chat.openai.com/) or other LLMs (optional): for your homework. - - In the era of AI, we believe that it is crucial to learn how to wisely use AI in programming. - - So we adjusted the difficulty of homework assuming that you'll use ChatGPT 3.5 (or equivalent) to solve it. +- [ChatGPT](https://chat.openai.com/) or other Large Language Models (LLMs) (optional): Useful for completing your homework. + + In an AI-driven era, learning to effectively utilize AI in programming is crucial. + Homework difficulty is adjusted assuming the use of ChatGPT 3.5 or an equivalent tool. -- [Visual Studio Code](https://code.visualstudio.com/) (optional): for developing your homework. If you prefer other editors, you're good to go. +- [Visual Studio Code](https://code.visualstudio.com/) (optional): Recommended for developing your homework, although you may use any editor of your preference. -- [Single Sign On (SSO)](https://auth.fearless.systems/) +- [Single Sign On (SSO)](https://auth.fearless.systems/): Use the following SSO credentials to access [gg](https://gg.kaist.ac.kr) and the [development server](https://cloud.fearless.systems): + + id: KAIST student id (8-digit number) + + email: KAIST email address (@kaist.ac.kr) + + password: Reset it here: + + Log in to [gg](https://gg.kaist.ac.kr) using the "kaist-cp-class" option, and to the [development server](https://cloud.fearless.systems) using the "OpenID Connect" option. - You can log in to [gg](https://gg.kaist.ac.kr) and [development server](https://cloud.fearless.systems) using the following SSO account: - + id: KAIST student id (8-digit number) - + email: KAIST email address (@kaist.ac.kr) - + password: please reset it here: - - For [gg](https://gg.kaist.ac.kr), please log in with the "kaist-cp-class" option. - For [development server](https://cloud.fearless.systems), please log in with the "OpenID Connect" option. - -- [Development server](https://cloud.fearless.systems/) - - + **IMPORTANT: Don't try to hack. Don't try to freeze the server. Please be nice.** - - + You can create and connect to a workspace to open terminal or VSCode (after installing it). - - + We recommend you to use VSCode and its "Rust Analyzer" and "CodeLLDB" plugins. +- [Development Server](https://cloud.fearless.systems/): + + **IMPORTANT: Do not attempt to hack or overload the server. Please use it responsibly.** + + Create and connect to a workspace to use the terminal or VSCode (after installation). + + We recommend using VSCode with the "Rust Analyzer" and "CodeLLDB" plugins. -## Grading & honor code +## Grading & Honor code ### Cheating -**IMPORTANT: PAY CLOSE ATTENTION. VERY SERIOUS.** +**IMPORTANT: READ CAREFULLY. THIS IS A SERIOUS MATTER.** -- Please sign the KAIST CS Honor Code for this semester. - Otherwise, you may be expelled from the course. +- Sign the KAIST CS Honor Code for this semester. + Failure to do so may lead to expulsion from the course. -- We will use sophisticated tools for detecting code plagiarism​. - - + [Google "code plagiarism detector" for images](https://www.google.com/search?q=code+plagiarism+detector&tbm=isch) and see how these tools can detect "sophisticated" plagiarisms. - You really cannot escape my catch. Just don't try plagiarism in any form. +- We will employ sophisticated tools to detect code plagiarism. + + Search for "code plagiarism detector" on Google Images to understand how these tools can identify advanced forms of plagiarism. + Do not attempt plagiarism in any form. ### Programming assignments (40%) -- We'll announce **all** assignments before the semester begins. -- Submit your solution to . +- All assignments will be announced at the start of the semester. +- Submit your solutions to . +- You are **permitted** to use ChatGPT or other LLMs. +- For the concepts that don't come out in prerequisite courses, we tried to comment on the relevant resources in the assignment code. Please read them carefully. - **How to submit your assignment:** - To submit your solution, you should run `submit.sh` in `scripts` directory. In other words, you should run the following command: ```bash # Run this command at the root directory of this repository. $ ./scripts/submit.sh ``` - - After running the command above, in the `target` directory, you can find a `assignment.zip` file (`assignment09.zip` for example). Submit this file to . + - After running the command above, in the `target` directory, you can find a `assignment.zip` file (`assignment09.zip` for example). Submit this file to . - Read the documentation at . - You can check your grade of each assignment by running the grading script. - You can run the grading script with the following command: @@ -154,18 +140,19 @@ Make sure that you're capable of using the following development tools: # E.g. To grade `assignment09`, run the following command: $ ./scripts/grade.sh 9 ``` -- You're **allowed** to use ChatGPT or other LLMs. Instead, you'll solve more problems than previous semesters. ### Midterm and final exams (60%) -- Date & Time: Oct 18 (midterm) and Dec 13 (final), 13:00pm-15:45pm (or shorter, TBA) +- Dates & Times: Oct 23th (Wed), Dec 18th (Wed), 13:00-15:45 (or shorter, TBA) -- Place: Rm. 304, Bldg. E11, KAIST +- Location: (the same as usual) -- Your physical apperance is required. If online participation is **absolutely necessary**, we'll use Zoom. +- Physical attendance is required. + If necessary, online participation via Zoom will be accommodated. -- You should bring your own laptop. (You can also borrow one from School of Computing Admin Team.) +- You are expected to bring your own laptop. + Laptops can also be borrowed from the School of Computing Administration Team. - We will use [Safe Exam Browser](https://safeexambrowser.org/) to prevent cheatings. - You should have your laptop configured with Safe Exam Browser before the exam. @@ -173,7 +160,11 @@ Make sure that you're capable of using the following development tools: ### Attendance (?%) -- You should solve a quiz at the [Course Management](https://gg.kaist.ac.kr/course/17) website for each session. **You should answer the quiz by the end of the day.** +- A quiz must be completed on the [Course Management](https://gg.kaist.ac.kr/course/20) website for each session (if any). + **Quizzes should be completed by the end of the day.** + +- Failing to attend a significant number of sessions will result in an automatic grade of F. +ach session. **You should answer the quiz by the end of the day.** - If you miss a significant number of sessions, you'll automatically get an F. @@ -182,57 +173,49 @@ Make sure that you're capable of using the following development tools: ### Registration -- Make sure you can log in the [lab submission website](https://gg.kaist.ac.kr). - - + Log in with your `kaist-cp-class` account. - - + Your id is your `@kaist.ac.kr` email address. - - + Reset your password here: https://auth.fearless.systems/if/flow/default-recovery-flow/ - - + If you cannot log in, please contact the instructor. +- Ensure your ability to log into the [lab submission website](https://gg.kaist.ac.kr). + + Use your `kaist-cp-class` account for login. + + Your ID is your `@kaist.ac.kr` email address. + + Reset your password here: [https://auth.fearless.systems/if/flow/default-recovery-flow/](https://auth.fearless.systems/if/flow/default-recovery-flow/) + + Contact the instructor if login issues arise. ### Rules -- Course-related announcements and information will be posted on the - [website](https://github.com/kaist-cp/cs220) as well as on the [GitHub issue - tracker](https://github.com/kaist-cp/cs220/issues). You are expected to read all - announcements within 24 hours of their being posted. It is highly recommended to watch the - repository so that new announcements will automatically be delivered to your email address. +- Course-related announcements and information will be posted on the [course website](https://github.com/kaist-cp/cs220) and the [GitHub issue tracker](https://github.com/kaist-cp/cs220/issues). + It is expected that you read all announcements within 24 hours of their posting. + Watching the repository is highly recommended for automatic email notifications of new announcements. -- Ask questions on course materials and assignments in [this repository's issue tracker](https://github.com/kaist-cp/cs220/issues). - + Don't send emails to the instructor or TAs for course materials and assignments. - + Before asking a question, ask it to [ChatGPT](https://chat.openai.com/). Or search for it in Google and Stack Overflow. - + Describe your question in as much detail as possible. It should include the following things: - * Environment (OS, gcc, g++ version, and any other related program information). - * Command(s) that you used and the result. Any logs should be formatted in code. Refer to [this](https://guides.github.com/features/mastering-markdown/). - * Any directory or file changes you've made. If it is the solution file, just describe which part of the code is modified. - * Googling result. Search before asking, and share the keyword used for searching and what you've learned from it. - + Give a proper title to your issue. - + Read [this](https://github.com/kaist-cp/cs220#communication) for more instructions. - + Questions will be answered within 2 days mostly. +- Questions about course materials and assignments should be posted in [the course repository's issue tracker](https://github.com/kaist-cp/cs220/issues). + + Avoid sending emails to the instructor or TAs regarding course materials and assignments. + + Research your question using Google, Stack Overflow, and ChatGPT before posting. + + Describe your question in detail, including: + * Environment (OS, Rust version, and other relevant program information). + * Used commands and their results, with logs formatted in code. + See [this guide](https://guides.github.com/features/mastering-markdown/). + * Any changes made to directories or files. + For solution files, describe the modified code sections. + * Your Google search results, including search terms and learned information. + + Use a clear and descriptive title for your issue. + + For further instructions, read [this section](https://github.com/kaist-cp/cs220#communication) on the course website. + + The requirement to ask questions online first is twofold: It ensures clarity in your query and allows everyone to benefit from shared questions and answers. - + I'm requiring you to ask questions online first for two reasons. First, clearly writing a - question is the first step to reaching an answer. Second, you can benefit from the questions and answers of other students. +- Email inquiries should be reserved for confidential or personal matters. + Questions not adhering to this guideline (e.g., course material queries via email) will not be addressed. -- Ask your questions via email **only if** they are either confidential or personal. Any questions - failing to do so (e.g. email questions on course materials) will not be answered. +- Office hours will not cover *new* questions. + Check the issue tracker for similar questions before attending. + If your question is not listed, post it as a new issue for discussion. + Office hour discussions will focus on unresolved issues. -- We are NOT going to discuss *new* questions during office hours. Before coming to the office - hour, please check if there is a similar question on the issue tracker. If there isn't, file a new - issue and start discussion there. The agenda of the office hour will be the issues that are not - resolved yet. +- Emails to the instructor or head TA should start with "CS492(uarch):" in the subject line, followed by a brief description. + Include your name and student number in the email. + Emails lacking this information (e.g., those without a student number) will not receive a response. -- Emails to the instructor or the head TA should begin with "CS220:" in the subject line, followed - by a brief description of the purpose of your email. The content should at least contain your name - and student number. Any emails failing to do so (e.g. emails without student number) will not be - answered. +- If attending remotely via Zoom (https://kaist.zoom.us/my/jeehoon.kang), set your Zoom name to ` ` (e.g., `20071163 강지훈`). + Instructions for changing your Zoom name can be found [here](https://support.zoom.us/hc/en-us/articles/201363203-Customizing-your-profile). -- If you join the session remotely from Zoom (https://kaist.zoom.us/my/jeehoon.kang), - your Zoom name should be ` ` (e.g., `20071163 강지훈`). - Change your name by referring to [this](https://support.zoom.us/hc/en-us/articles/201363203-Customizing-your-profile). - -- This course is conducted in English. But you may ask questions in Korean. Then I will translate it to English. +- The course is conducted in English. + However, you may ask questions in Korean, which will be translated into English. ## Ignore diff --git a/rust-toolchain b/rust-toolchain deleted file mode 100644 index df484cb..0000000 --- a/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -1.71.0 diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..a37cce5 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.80.0" +components = [ "rustfmt", "clippy" ] diff --git a/src/assignments/assignment07/small_exercises_grade.rs b/src/assignments/assignment07/small_exercises_grade.rs index 841d811..a6dda7e 100644 --- a/src/assignments/assignment07/small_exercises_grade.rs +++ b/src/assignments/assignment07/small_exercises_grade.rs @@ -98,7 +98,7 @@ mod test { #[test] fn test_range_iter() { - let one_to_tens = vec![ + let one_to_tens = [ vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10], range(Endpoint::Inclusive(1), Endpoint::Inclusive(10), 1).collect(), range(Endpoint::Exclusive(0), Endpoint::Inclusive(10), 1).collect(), @@ -107,7 +107,7 @@ mod test { ]; assert!(one_to_tens.iter().all_equal()); - let ten_to_ones = vec![ + let ten_to_ones = [ vec![10, 9, 8, 7, 6, 5, 4, 3, 2, 1], range(Endpoint::Inclusive(10), Endpoint::Inclusive(1), -1).collect(), range(Endpoint::Exclusive(11), Endpoint::Inclusive(1), -1).collect(), @@ -129,7 +129,7 @@ mod test { ]; assert!(five_evens.iter().all_equal()); - let emptys = vec![ + let emptys = [ vec![], range(Endpoint::Inclusive(2), Endpoint::Inclusive(10), -1).collect(), range(Endpoint::Inclusive(10), Endpoint::Inclusive(-100), 1).collect(), diff --git a/src/assignments/assignment10/small_exercises_grade.rs b/src/assignments/assignment10/small_exercises_grade.rs index 595a708..a382146 100644 --- a/src/assignments/assignment10/small_exercises_grade.rs +++ b/src/assignments/assignment10/small_exercises_grade.rs @@ -181,37 +181,22 @@ mod test { #[test] fn test_natural_join() { - let row1: Vec = vec!["20230001", "Jack"] - .iter() - .map(|s| s.to_string()) - .collect(); - let row2: Vec = vec!["20231234", "Mike"] - .iter() - .map(|s| s.to_string()) - .collect(); + let row1: Vec = ["20230001", "Jack"].iter().map(|s| s.to_string()).collect(); + let row2: Vec = ["20231234", "Mike"].iter().map(|s| s.to_string()).collect(); let table1 = vec![row1, row2]; - let row1: Vec = vec!["20230001", "CS"] - .iter() - .map(|s| s.to_string()) - .collect(); - let row2: Vec = vec!["20230001", "EE"] - .iter() - .map(|s| s.to_string()) - .collect(); - let row3: Vec = vec!["20231234", "ME"] - .iter() - .map(|s| s.to_string()) - .collect(); + let row1: Vec = ["20230001", "CS"].iter().map(|s| s.to_string()).collect(); + let row2: Vec = ["20230001", "EE"].iter().map(|s| s.to_string()).collect(); + let row3: Vec = ["20231234", "ME"].iter().map(|s| s.to_string()).collect(); let table2 = vec![row1, row2, row3]; - let row1: Vec = vec!["20230001", "Jack", "CS"] + let row1: Vec = ["20230001", "Jack", "CS"] .iter() .map(|s| s.to_string()) .collect(); - let row2: Vec = vec!["20230001", "Jack", "EE"] + let row2: Vec = ["20230001", "Jack", "EE"] .iter() .map(|s| s.to_string()) .collect(); - let row3: Vec = vec!["20231234", "Mike", "ME"] + let row3: Vec = ["20231234", "Mike", "ME"] .iter() .map(|s| s.to_string()) .collect(); @@ -222,61 +207,58 @@ mod test { HashSet::>::from_iter(table3) ); - let row1: Vec = vec!["20230001", "Alice"] + let row1: Vec = ["20230001", "Alice"] .iter() .map(|s| s.to_string()) .collect(); - let row2: Vec = vec!["20230002", "Bob"] + let row2: Vec = ["20230002", "Bob"].iter().map(|s| s.to_string()).collect(); + let row3: Vec = ["20230003", "Charlie"] .iter() .map(|s| s.to_string()) .collect(); - let row3: Vec = vec!["20230003", "Charlie"] - .iter() - .map(|s| s.to_string()) - .collect(); - let row4: Vec = vec!["20230004", "David"] + let row4: Vec = ["20230004", "David"] .iter() .map(|s| s.to_string()) .collect(); let table1 = vec![row1, row2, row3, row4]; - let row1: Vec = vec!["20230001", "Apple"] + let row1: Vec = ["20230001", "Apple"] .iter() .map(|s| s.to_string()) .collect(); - let row2: Vec = vec!["20230001", "Avocado"] + let row2: Vec = ["20230001", "Avocado"] .iter() .map(|s| s.to_string()) .collect(); - let row3: Vec = vec!["20230002", "Banana"] + let row3: Vec = ["20230002", "Banana"] .iter() .map(|s| s.to_string()) .collect(); - let row4: Vec = vec!["20230002", "Berries"] + let row4: Vec = ["20230002", "Berries"] .iter() .map(|s| s.to_string()) .collect(); - let row5: Vec = vec!["20230004", "Durian"] + let row5: Vec = ["20230004", "Durian"] .iter() .map(|s| s.to_string()) .collect(); let table2 = vec![row1, row2, row3, row4, row5]; - let row1: Vec = vec!["20230001", "Alice", "Apple"] + let row1: Vec = ["20230001", "Alice", "Apple"] .iter() .map(|s| s.to_string()) .collect(); - let row2: Vec = vec!["20230001", "Alice", "Avocado"] + let row2: Vec = ["20230001", "Alice", "Avocado"] .iter() .map(|s| s.to_string()) .collect(); - let row3: Vec = vec!["20230002", "Bob", "Banana"] + let row3: Vec = ["20230002", "Bob", "Banana"] .iter() .map(|s| s.to_string()) .collect(); - let row4: Vec = vec!["20230002", "Bob", "Berries"] + let row4: Vec = ["20230002", "Bob", "Berries"] .iter() .map(|s| s.to_string()) .collect(); - let row5: Vec = vec!["20230004", "David", "Durian"] + let row5: Vec = ["20230004", "David", "Durian"] .iter() .map(|s| s.to_string()) .collect(); diff --git a/src/lib.rs b/src/lib.rs index 3f4de86..951d5ac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,6 @@ #![deny(macro_use_extern_crate)] #![deny(missing_debug_implementations)] #![deny(non_ascii_idents)] -#![deny(pointer_structural_match)] #![deny(rust_2018_idioms)] #![deny(trivial_numeric_casts)] // #![deny(unused_crate_dependencies)] // TODO: uncomment