{"id":372582,"date":"2024-05-21T05:15:52","date_gmt":"2024-05-21T05:15:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=372582"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=372582","title":{"rendered":"<span>Rust \u2014 \u044d\u0442\u043e \u043d\u0435 \u00abmemory safe C\u00bb<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>TL;DR:<br \/> \u2014 \u0432 Rust \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432, \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c;<br \/> \u2014 \u0432 Rust \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e CDD (compiler-driven development, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435). \u042d\u0442\u043e \u043a\u0430\u043a <abbr title=\"Test-driven development, \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\">TDD<\/abbr>, \u0442\u043e\u043b\u044c\u043a\u043e CDD;<br \/> \u2014 Rust \u2014 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u044f\u0437\u044b\u043a, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u0433\u043d\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u041d\u0430 Rust \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443 \u0434\u043b\u044f C \u0438\u043b\u0438 C++. \u041c\u043d\u043e\u0433\u0438\u0435 \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u043d\u0438\u0448\u0430 Rust \u2014 \u044d\u0442\u043e &#171;mission critical&#187; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0430 \u0432\u0441\u0435, \u043a\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u2014 \u0431\u0435\u0437\u0443\u043c\u0446\u044b (<a href=\"https:\/\/www.reddit.com\/r\/golang\/comments\/1ay8ztk\/comment\/krtplkz\/\" rel=\"noopener noreferrer nofollow\">\u0446\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 Rust vs. Golang \u0442\u0440\u0435\u0434\u043e\u0432<\/a>). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0440\u0435\u0434\u0438 \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 Rust, \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043e \u043c\u043d\u0435\u043d\u0438\u0435, \u0447\u0442\u043e memory safety \u0432 Rust \u2014 \u044d\u0442\u043e \u043d\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/1bdw3yp\/fast_development_in_rust_are_we_getting_it_right\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>, <a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/1birmmm\/how_rusts_robustness_saved_my_undergraduate\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>, <a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/1ba1ak5\/anyone_else_like_rust_even_apart_from_the\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/1bd3t0s\/c_safety_by_herb_sutter\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>).<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c:<br \/> \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u0437\u0433\u043b\u044f\u0434 \u043d\u0430 Rust \u043a\u0430\u043a \u043d\u0430 &#171;memory safe C&#187; \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u0443\u0436\u0430\u0435\u0442 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f;<br \/> \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u0441\u043c\u043e\u0442\u0440\u044e \u043d\u0430 Rust \u043a\u0430\u043a \u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044f\u0437\u044b\u043a \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043f\u043e\u0432\u0435\u0437\u043b\u043e \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u043c;<br \/> \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0430 Rust \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0443\u043c\u0430\u044e\u0442;<br \/> \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 Rust \u2014 \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043b\u0443\u0447\u0448\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u042d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435, \u044f \u043d\u0435 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Rust \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441 \u0447\u0435\u043c-\u0442\u043e \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b, \u0442\u043e \u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043e\u0431\u0441\u0443\u0434\u0438\u043c.<\/p>\n<p>Upd: \u043d\u0435 \u0443\u0441\u043f\u0435\u043b \u044f \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u044c, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e 27 \u043c\u0430\u0440\u0442\u0430 2024 \u0433\u043e\u0434\u0430 \u043d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 <a href=\"https:\/\/www.rustnationuk.com\/\" rel=\"noopener noreferrer nofollow\">Rust Nation UK 2024<\/a> \u0431\u044b\u043b\u043e \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0442\u0440\u0438\u0433\u0443\u044e\u0449\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/youtu.be\/6mZRWFQRvmw?t=26498\" rel=\"noopener noreferrer nofollow\">Beyond Safety and Speed: How Rust Fuels Team Productivity<\/a> \u043e\u0442 Lars Bergstrom, Google Android Director of Engineering. \u0412 \u044d\u0442\u043e\u043c \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0442\u0435\u043c \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0438 \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u00ab\u0418 \u0432 \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u041b\u0430\u0440\u0441 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435!\u00bb, \u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443 \u044d\u0442\u043e \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0443 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (\u0442.\u043a. \u044d\u0442\u043e &#8212; \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438). \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0432\u0438\u0434\u0435\u043e \u0432\u0441\u0435\u0433\u043e 30 \u043c\u0438\u043d\u0443\u0442, \u0441\u0441\u044b\u043b\u043a\u0430 \u0441 \u0442\u0430\u0439\u043c\u043a\u043e\u0434\u043e\u043c. \u0412\u0438\u0434\u0438\u043c\u043e, \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 1. \u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0415\u0449\u0435 \u0441\u043e \u0448\u043a\u043e\u043b\u044b \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b C, \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0436\u0435 \u043e\u043d\u043e \u0442\u0430\u043c \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0423 \u043c\u0435\u043d\u044f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0433\u0434\u0435-\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u043a\u043d\u0438\u0433\u0430 \u00ab\u042f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0421\u00bb, \u043d\u043e \u044f \u0435\u0451 \u0442\u0430\u043a \u0438 \u043d\u0435 \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0443\u0436\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u00ab\u0432\u044b\u0443\u0447\u0438\u0442\u044c\u00bb C. \u041a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u043e \u00ab\u0432\u0438\u043d\u043e\u0432\u0430\u0442\u044b\u00bb \u0432 \u044d\u0442\u043e\u043c \u0445\u043e\u043b\u0438\u0432\u0430\u0440\u044b \u043d\u0430 \u0445\u0430\u0431\u0440\u0435. \u0412\u0435\u0434\u044c \u0438\u0437 \u043d\u0438\u0445 \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e C \u2014 \u044d\u0442\u043e \u0436\u043e\u043d\u0433\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u043c\u0438 \u0431\u0435\u043d\u0437\u043e\u043f\u0438\u043b\u0430\u043c\u0438 \u043d\u0430 \u043c\u0438\u043d\u043d\u043e\u043c \u043f\u043e\u043b\u0435 \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435.<\/p>\n<p>\u0414\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c \u0438 \u0431\u044b\u043b \u0443\u0432\u0435\u0440\u0435\u043d \u0432 \u0441\u0432\u043e\u0438\u0445 \u0441\u0438\u043b\u0430\u0445, \u044f \u043e\u043f\u0430\u0441\u0430\u043b\u0441\u044f C, \u0431\u043e\u044f\u043b\u0441\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0430\u043f\u0438\u0448\u0443 \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 <code>hello world<\/code> \u0442\u043e \u0442\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0431\u0443\u0434\u0435\u0442 UB, use after free, segfault, buffer overflow \u0438 \u0442.\u0434. \u0438 \u0442.\u043f. C \u0438 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u043c\u0443 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u044e. \u041a\u0430\u043a \u043b\u044e\u0434\u0438 \u0431\u0435\u0437 \u0441\u0442\u0440\u0430\u0445\u0430 \u043f\u0438\u0448\u0443\u0442 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435, \u0433\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 stdout \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430\u0434\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u0442.\u043a. \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0443 C\/C++ \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1 \u043d\u0438\u0448\u0430: <a href=\"https:\/\/daniel.haxx.se\/blog\/2023\/10\/11\/how-i-made-a-heap-overflow-in-curl\/\" rel=\"noopener noreferrer nofollow\">\u043b\u0435\u0433\u0430\u0441\u0438 \u0421\/\u0421++ \u043a\u043e\u0434<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043e\u043b\u0433\u043e \u0438 \u0434\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430 Rust, \u0438 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u0430\u044f \u043d\u0438\u0448\u0430 \u043d\u0435 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0435\u0442.<\/p>\n<p>\u0421 \u043f\u0435\u0440\u0432\u044b\u0445 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 Rust \u043c\u0435\u043d\u044f \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b. \u041e\u043d \u043a\u0430\u043a C, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439! \u0427\u0442\u043e \u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432 \u0436\u0435\u043b\u0435\u0437\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0431\u0435\u0437 UB? \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0442\u043e\u043c, \u0431\u044b\u0432\u0430\u0435\u0442 \u0435\u0449\u0435 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 2. Rust. \u041d\u0430\u0447\u0430\u043b\u043e<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 Python \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Rust \u0431\u044b\u043b\u043e \u0442\u044f\u0436\u0435\u043b\u043e. \u0412\u0435\u0437\u0434\u0435 \u0441\u0441\u044b\u043b\u043a\u0438, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u0433\u043e\u0434\u0430\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u043e, \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u043b \u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043d\u0438\u0436\u043a\u0438, \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u044e\u0442\u0443\u0431-\u043b\u0435\u043a\u0446\u0438\u0438 \u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u044b \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b. \u041b\u0443\u0447\u0448\u0438\u0439 \u0438\u0437 \u043d\u0438\u0445 \u2014 \u043a\u0443\u0440\u0441 \u043b\u0435\u043a\u0446\u0438\u0439 \u0410\u043b\u0435\u043a\u0441\u0435\u044f &#171;matklad&#187; \u041a\u043b\u0430\u0434\u043e\u0432\u0430 (\u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e <a class=\"mention\" href=\"\/users\/matklad\">@matklad<\/a> \u2014 \u044d\u0442\u043e \u043e\u043d, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u044b, \u043e\u0442\u0437\u043e\u0432\u0438\u0441\u044c) \u0434\u043b\u044f <a href=\"https:\/\/github.com\/matklad\/rust-course\" rel=\"noopener noreferrer nofollow\">Computer Science Center<\/a>. \u0412 \u043d\u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0447\u0435\u0440\u0435\u0437 7 \u0447\u0430\u0441\u043e\u0432 \u043b\u0435\u043a\u0446\u0438\u0439 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0443 \u0446\u0438\u043a\u043b\u043e\u0432, \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u043b\u0435\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0441\u043b\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">#![no_main]    #[link_section=\".text\"]  #[no_mangle]  pub static main: [u32; 9] = [      3237986353,      3355442993,      120950088,      822083584,      252621522,      1699267333,      745499756,      1919899424,      169960556,  ]; <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418\u043b\u0438 \u043c\u043e\u0439 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u0441\u043b\u0430\u0439\u0434 \u2014 \u00ab\u041c\u043e\u0434\u0435\u043b\u044c \u041f\u0430\u043c\u044f\u0442\u0438 C++ \u0437\u0430 \u041e\u0434\u0438\u043d \u0421\u043b\u0430\u0439\u0434\u00bb (<a href=\"https:\/\/compscicenter.ru\/courses\/rustprogramming\/2019-spring\/classes\/4682\/\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u0430\u0439\u0434 35<\/a>).<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043c\u0435\u043d\u044f \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b, \u0441 \u0442\u0435\u0445 \u043f\u043e\u0440 \u044f \u043f\u0435\u0440\u0435\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0435\u0433\u043e, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0440\u0430\u0437 \u043f\u044f\u0442\u044c \u0438 \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0430\u0445\u043e\u0436\u0443 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0449\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u044b \u0434\u043b\u044f \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/raytracing.github.io\/books\/RayTracingInOneWeekend.html\" rel=\"noopener noreferrer nofollow\">Ray Tracing in One Weekend<\/a>, \u0438 \u044f \u0442\u043e\u0436\u0435 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <a href=\"https:\/\/github.com\/Lex98\/raytracer\" rel=\"noopener noreferrer nofollow\">\u0441\u0432\u043e\u0439 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043b\u0443\u0447\u0435\u0439<\/a>. \u042d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 hello world \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0437 \u043a\u043d\u0438\u0433, \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c, \u043a\u0430\u043a \u044f\u0437\u044b\u043a \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438. \u042d\u0442\u043e \u0431\u044b\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e Rust \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u00abmemory safe C\u00bb.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 3. Fearless concurrency<\/h2>\n<p>\u0418\u0437 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u043b\u0435\u043a\u0446\u0438\u0439 \u044f \u0443\u0436\u0435 \u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0432 safe Rust \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0433\u043e\u043d\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0447\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 Rust \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435. \u041d\u043e \u0442\u043e \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u043e\u0432\u0430, \u0438\u0445 \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432 \u0434\u0435\u043b\u0435. \u0412 \u043a\u043e\u043d\u0446\u0435 &#171;Ray Tracing in One Weekend&#187; \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a, \u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u2014 \u044d\u0442\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c. \u041f\u043e\u0434 \u043a\u043e\u043d\u0435\u0446 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u043c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e 1080p \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u043d\u043e \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 100 \u043b\u0443\u0447\u0430\u0445 \u043d\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e. \u0418 \u0437\u0432\u0435\u0437\u0434\u044b \u0441\u043e\u0448\u043b\u0438\u0441\u044c: 12-\u0442\u0438 \u044f\u0434\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440 \u0438 Rust c \u0431\u0435\u0441\u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0439 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u041f\u043e \u043d\u0430\u0447\u0430\u043b\u0443 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c, \u043c\u044c\u044e\u0442\u0435\u043a\u0441\u044b \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043a\u043e\u0434\u0443 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u043e\u043d\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043a\u043e\u0434 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u043f\u043e \u0441\u0443\u0442\u0438 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u043c. \u0414\u043e\u043b\u0433\u043e \u044f \u0431\u0438\u043b\u0441\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c. \u041d\u043e \u0432\u0441\u0435 \u0436\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">let rows = img.rows_mut().collect::&lt;Vec&lt;_>>(); std::thread::scope(|scope| {     ...     for (y, chunk) in rows.into_iter().enumerate() {         scope.spawn(move || {             ...             for (x, pixel) in chunk.enumerate() {                 let mut color = Color::default();                 for _ in 0..samples_per_pixel {                     ...                 }                 *pixel = color.as_rgb(samples_per_pixel);             }             ...         });     } });  img.save(\"image.png\").unwrap(); <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043a\u0438. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439. \u041d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u044c\u044e\u0442\u0435\u043a\u0441\u0430 \u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0435\u0449\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0418 \u043e\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0418 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0432 10 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041d\u043e \u0441\u0443\u0442\u044c \u0434\u0430\u0436\u0435 \u043d\u0435 \u0432 \u044d\u0442\u043e\u043c, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e (\u0434\u0430 \u0438 \u0441\u0435\u0439\u0447\u0430\u0441) \u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043d\u043e \u044f \u0437\u0430 \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432 \u0441\u043c\u043e\u0433 \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a.<\/p>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u0442\u043e\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0435\u0442 \u0433\u043e\u043d\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 <code>img.save<\/code> \u0445\u043e\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0431\u044b\u043b \u0431\u044b \u0435\u0449\u0435 \u0436\u0438\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e \u0435\u0449\u0435 \u0432\u0430\u0436\u043d\u043e, \u0432 \u044d\u0442\u043e\u043c Rust \u043d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0432 \u044f\u0437\u044b\u043a \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0413\u043e\u043d\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0437\u0430\u0434\u0430\u0447 \u043d\u0435\u0442 \u0438\u0437-\u0437\u0430 borrow checker&#8217;\u0430 (\u043d\u0435\u043b\u044c\u0437\u044f \u0438\u043c\u0435\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u043d\u043e\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 (\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0439) \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442), \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0432 <code>std::thread::scope<\/code>.<\/p>\n<p>Upd:<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u0430\u043a<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u044b\u043b \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438, \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e &#171;\u0438\u0437-\u0437\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0432 Rust \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u0439 \u043a\u043e\u0434&#187; \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u043a\u043e\u0440\u0435\u0435 &#171;\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u0432 Rust \u0435\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0443\u043b\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432&#187; \u0447\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0432\u043e\u0434 \u0434\u043b\u044f \u0433\u043e\u0440\u0434\u043e\u0441\u0442\u0438 (\u0434\u0430\u0436\u0435 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0438 \u0438\u0437\u044f\u0449\u0435\u0441\u0442\u0432\u0430 <code>.par_bridge().into_par_iter()<\/code>). \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043c\u043d\u044e, \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 2020 \u0433\u043e\u0434\u0443 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 scoped \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p>\n<p>\u0418 \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u043e \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e Rust \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044f \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b <code>Cargo.lock<\/code> \u0438 \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043b\u043e\u043c\u0430\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c. \u041c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 15 \u043c\u0438\u043d\u0443\u0442 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c \u0438\u0437-\u0437\u0430 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0443\u0447\u0448\u0435 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430 15 \u043c\u0438\u043d\u0443\u0442 \u044f \u0441\u043a\u043b\u0435\u0438\u043b 2 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043a\u043e\u0434 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u041a\u0430\u043a\u043e\u0439 \u0435\u0449\u0435 \u044f\u0437\u044b\u043a \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043d\u0430 \u0442\u0430\u043a\u043e\u0435 \u044f \u043d\u0435 \u0437\u043d\u0430\u044e.<\/p>\n<details class=\"spoiler\">\n<summary>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e \u043d\u0430\u0447\u0430\u043b\u0443 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c, \u043c\u044c\u044e\u0442\u0435\u043a\u0441\u044b \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043a\u043e\u0434\u0443 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u043e\u043d\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043a\u043e\u0434 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u043f\u043e \u0441\u0443\u0442\u0438 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u043c. \u0414\u043e\u043b\u0433\u043e \u044f \u0431\u0438\u043b\u0441\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043a\u0430 \u044f \u043d\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b \u043f\u0440\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"https:\/\/docs.rs\/rayon\/latest\/rayon\/\" rel=\"noopener noreferrer nofollow\">rayon<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0449\u0435. \u042f \u0434\u043e\u043b\u0433\u043e \u043d\u0435 \u043c\u043e\u0433 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0436\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u0438\u0434\u0438\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0435\u0451 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0438 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u043e\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p><a href=\"https:\/\/github.com\/Lex98\/raytracer\/blob\/42a2a95ab920acf32539dcc5c3dcaa8641e5afd7\/raytracer\/src\/main.rs#L36\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434<\/a><\/p>\n<pre><code class=\"rust\">... use rayon::ThreadPoolBuilder; use num_cpus; ...  fn main() {     ...     let samples_per_pixel = 100;     let pool = ThreadPoolBuilder::new()         .num_threads(num_cpus::get())         .build()         .unwrap();      let mut img = RgbImage::new(image_width, image_height);      ...      let mut pixels = img.enumerate_pixels_mut().collect::&lt;Vec&lt;_>>();     pool.scope(|scope| {         \u2026         for chunk in pixels.chunks_mut(image_width as usize) {             scope.spawn(move |_| {                 for (x, y, pixel) in chunk {                     ...                     for _ in 0..samples_per_pixel {                         ...                     }                     **pixel = color.as_rgb(samples_per_pixel);                 }                 ...             });         }     });      img.save(\"image.png\").unwrap(); }  <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0443\u043b \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439. \u041d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u044c\u044e\u0442\u0435\u043a\u0441\u0430 \u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0435\u0449\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0418 \u043e\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0418 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0432 10 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041d\u043e \u0441\u0443\u0442\u044c \u0434\u0430\u0436\u0435 \u043d\u0435 \u0432 \u044d\u0442\u043e\u043c, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e (\u0434\u0430 \u0438 \u0441\u0435\u0439\u0447\u0430\u0441) \u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043d\u043e \u044f \u0437\u0430 \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432 \u0441\u043c\u043e\u0433 \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a.<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/details>\n<p>\u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447, \u0435\u0441\u0442\u044c \u043f\u0443\u043b \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432 \u0438 \u0435\u0441\u0442\u044c \u043f\u0430\u0447\u043a\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043a\u0430\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043a\u0430\u0440\u043c\u043b\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u043e\u0440\u043a\u0435\u0440\u0430\u043c. \u0418 \u044f \u0441\u043e\u0433\u043b\u0430\u0448\u0443\u0441\u044c, \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043d\u043e \u0432 \u043d\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a. \u0412\u043c\u0435\u0441\u0442\u043e \u0434\u0435\u0431\u0430\u0433\u0430 \u0433\u043e\u043d\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0434\u0435\u0434\u043b\u043e\u043a\u043e\u0432, \u043a\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u043e \u0442\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u0434\u0443\u0440\u0430\u043a \u0438, \u0438\u043d\u043e\u0433\u0434\u0430, \u043a\u0430\u043a \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043e\u0442\u043b\u043e\u0432\u0438\u043b \u043d\u0435 \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438: \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u044f \u043f\u043e\u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u0432 <code>pixels.chunks_mut<\/code> \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0447\u0430\u043d\u043a\u043e\u0432 \u0438 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0438\u0432\u0438\u043b\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043c\u0435\u043d\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u043b\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0442\u044b\u0441\u044f\u0447 \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u041d\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>\u0415\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c <a href=\"https:\/\/blog.rust-lang.org\/2017\/11\/14\/Fearless-Concurrency-In-Firefox-Quantum.html\" rel=\"noopener noreferrer nofollow\">\u043e\u043f\u044b\u0442 Mozilla<\/a>. \u041e\u043d\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0445 CSS \u0434\u0432\u0438\u0436\u043e\u043a \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u043c, \u043d\u043e \u0443 \u043d\u0438\u0445 \u043d\u0438 \u0440\u0430\u0437\u0443 \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u0410 \u043d\u0430 Rust \u043e\u043d\u0438 \u0441\u043c\u043e\u0433\u043b\u0438 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0422\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043f\u0435\u0442-\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u043d\u043e \u0438 \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 \u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0445 \u0432\u0440\u043e\u0434\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u043e\u0442\u043e\u043c \u044f <a href=\"https:\/\/github.com\/Lex98\/raytracer\/blob\/master\/raytracer\/src\/main.rs#L40\" rel=\"noopener noreferrer nofollow\">\u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 rayon<\/a> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e (\u043d\u043e \u043d\u0435 \u0442\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043c\u043d\u044e, \u0433\u0434\u0435-\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043c\u044c\u044e\u0442\u0435\u043a\u0441):<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">... use rayon::prelude::*; ...  let mut img = RgbImage::new(image_width, image_height);  ...  img.enumerate_rows_mut().par_bridge().into_par_iter().for_each(     |(_, chunk)| {         ...         chunk.for_each(         |(x, y, pixel)| {             ...             for _ in 0..samples_per_pixel {                 ...             }             *pixel = color.as_rgb(samples_per_pixel);         });         ...     } );  img.save(\"image.png\").unwrap(); <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u0435\u043b\u0430\u0441\u044c \u043a <code>.par_bridge().into_par_iter()<\/code>. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0435\u0433\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.<\/p>\n<p>\u0418 \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043b\u044e\u0441 Rust (\u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 safe Rust) &#8212; \u0432 \u043d\u0435\u043c \u0442\u044f\u0436\u0435\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c, \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e. \u0415\u0441\u043b\u0438 \u043a\u043e\u0434 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0442\u043e \u0432 \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043a\u043e\u0434 \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043e\u0442 \u043d\u0435\u0433\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f (\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435).<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 Rust \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043d\u0430 \u0431\u0430\u0433, \u0433\u0434\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b <code>-<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>+<\/code>. \u0418\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u043b\u0441\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u0440\u0435\u043d\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u044d\u0442\u0438\u043c \u0431\u0430\u0433\u043e\u043c \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b <code>NaN<\/code>. <code>NaN<\/code> \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u0440\u0430\u0436\u0430\u043b \u0432\u0441\u0435, \u0447\u0435\u0433\u043e \u043e\u043d \u043a\u043e\u0441\u043d\u0435\u0442\u0441\u044f, \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u043d\u0430 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u043d\u0434\u0435\u0440\u0435 \u044d\u0442\u043e \u0431\u044b\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0447\u0435\u0440\u043d\u044b\u0445 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0432 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043e <code>signaling NaN<\/code> \u044f \u0443\u0437\u043d\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043d\u0430\u0448\u0435\u043b \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0438 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b \u043a\u043e\u0434.<\/p>\n<p>\u0423\u0432\u044b, \u043d\u0435 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430-\u043b\u0438\u0431\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0442\u0438\u043f\u043e\u0432 (\u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0433 \u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u0441 \u043d\u0430\u043c\u0438 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041d\u043e \u0432\u0441\u0435 \u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043e\u0448\u0438\u0431\u043e\u043a, \u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435, \u0441\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 \u0441\u0442\u043e\u0438\u0442 \u0442\u043e\u0433\u043e.<\/p>\n<\/div>\n<\/details>\n<h2>\u0427\u0430\u0441\u0442\u044c 4. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a<\/h2>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445. \u0412 Rust \u043b\u0443\u0447\u0448\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0430\u043d\u0438\u043a\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u0430\u043d\u0438\u043a\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u044f \u043d\u0435 \u043e\u0442\u043d\u043e\u0448\u0443, \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0441\u0442\u043e\u0438\u0442 \u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u0438 \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u00ab\u0432\u043c\u0435\u0441\u0442\u043e \u043f\u0430\u043d\u0438\u043a\u0438 \u0442\u0443\u0442 \u0431\u044b\u043b\u0430 \u0431\u044b \u0434\u044b\u0440\u0430 \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438\u00bb, \u0442\u043e, \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0441 \u043d\u0438\u043c\u0438 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434 Rust \u043d\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439, \u043c\u043e\u043d\u0430\u0434\u044b \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0430\u0432\u043d\u043e, \u0438 \u044f\u0437\u044b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u0442\u043e\u0436\u0435. \u0418\u0445 \u0441\u043b\u0430\u0431\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0435 \u0434\u0430\u0435\u0442 \u043c\u043d\u0435 \u0437\u0430\u0441\u043d\u0443\u0442\u044c \u0432 3 \u0443\u0442\u0440\u0430. \u042f \u043c\u043e\u0433\u0443 \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 \u0441\u0442\u0430\u0440\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 C, \u043d\u0435\u0442 \u043c\u043e\u043d\u0430\u0434. \u041a\u0430\u043a \u0431\u044b \u044f \u043d\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u043b\u0441\u044f \u043a C, \u0432\u0441\u0435 \u0436\u0435 \u0435\u043c\u0443 \u0431\u043e\u043b\u044c\u0448\u0435 50 \u0443\u0436\u0435, \u043d\u0435 \u0442\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u0431\u044b\u043b\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041b\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043f\u043e\u0447\u0435\u043c\u0443 Golang \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0443 \u043c\u0435\u043d\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042f \u043d\u0435\u0434\u043e\u0443\u043c\u0435\u0432\u0430\u044e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0438\u0445 \u043d\u0435\u0442? \u042f \u043d\u0435 \u043c\u043e\u0433\u0443 \u0431\u0435\u0437 \u0441\u043c\u0435\u0445\u0430 (\u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0441\u043b\u0435\u0437) <a href=\"https:\/\/go.dev\/blog\/errors-are-values\" rel=\"noopener noreferrer nofollow\">\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0443 \u0446\u0438\u0442\u0430\u0442\u0443<\/a>:<\/p>\n<blockquote>\n<p>This is cleaner, even compared to the use of a closure, and also makes the actual sequence of writes being done easier to see on the page. There is no clutter anymore. Programming with error values (and interfaces) has made the code nicer. &#8230; In fact, this pattern appears often in the standard library<\/p>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"go\">type errWriter struct {     w   io.Writer     err error }  func (ew *errWriter) write(buf []byte) {     if ew.err != nil {         return     }     _, ew.err = ew.w.Write(buf) }  ew := &amp;errWriter{w: fd} ew.write(p0[a:b]) ew.write(p1[c:d]) ew.write(p2[e:f]) \/\/ and so on if ew.err != nil {     return ew.err } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0422\u044f\u0436\u0435\u043b\u043e \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u044c\u0441\u044f, \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0434\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043c\u043e\u043d\u0430\u0434\u0430. \u0411\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e, \u044d\u0442\u043e \u043c\u043e\u043d\u0430\u0434\u0430 error, \u0442\u043e\u043b\u044c\u043a\u043e \u0445\u0443\u0436\u0435 \u0441\u0440\u0430\u0437\u0443 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/p>\n<ol>\n<li>\n<p>\u043e\u043d\u0430 \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u0430\u044f, \u0435\u0451 \u043d\u0430\u0434\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e;<\/p>\n<\/li>\n<li>\n<p>\u043e\u043d\u0430 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u0431\u044b \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c N \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0430 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432 \u0442\u0440\u0435\u0442\u0438\u0439, \u0442\u043e \u043a\u043e\u0434 \u0442\u0430\u043a\u043e\u0439 \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443, \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 (\u043f\u043e\u0434\u043e\u0437\u0440\u0435\u0432\u0430\u044e, \u0438 \u043b\u0438\u043d\u0442\u0435\u0440\u044b) \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u0438\u0441\u043a\u043d\u0443\u0442.<\/p>\n<\/li>\n<\/ol>\n<p>\u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0440\u0430\u0437 \u0443\u0436 &#171;this pattern appears often in the standard library\u00bb, \u0441\u0442\u043e\u0438\u043b\u043e \u0431\u044b \u0435\u0433\u043e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u0432\u044b\u043d\u0435\u0441\u0442\u0438? \u0418\u043b\u0438 \u044d\u0442\u043e \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u043e Golang \u0441\u043b\u0438\u0448\u043a\u043e\u043c &#171;brilliant&#187;? \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0446\u0438\u0442\u0430\u0442\u0435 \u0420\u043e\u0431\u0430 \u041f\u0430\u0439\u043a\u0430:<\/p>\n<blockquote>\n<p>The key point here is our programmers are Googlers, they\u2019re not researchers. They\u2019re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They\u2019re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt<\/p>\n<\/blockquote>\n<p>\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043d\u0438 \u0432\u0438\u0434\u0435\u043b \u044d\u0442\u0443 \u0446\u0438\u0442\u0430\u0442\u0443, \u044f \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u043e\u0433\u0443 \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e &#171;they\u2019re not researchers&#187;. \u041d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c &#171;researcher&#187;, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044f\u0437\u044b\u043a\u043e\u043c, \u043d\u043e \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0442\u0435, \u043a\u0442\u043e \u044f\u0437\u044b\u043a \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u043b, \u0431\u044b\u043b\u0438 \u043a\u0430\u043a \u0440\u0430\u0437 \u0438\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043b\u044e\u0434\u044f\u043c \u0436\u0438\u043b\u043e\u0441\u044c \u043b\u0443\u0447\u0448\u0435 \u0438 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043a\u043e\u0434 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c.<\/p>\n<p>\u042d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0435\u0432\u044c\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u00ab\u041f\u043e\u0447\u0435\u043c\u0443 Golang \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0443 \u043c\u0435\u043d\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u00bb, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0432\u0434\u0440\u0443\u0433 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u0442\u043e \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u043d\u043e \u043e\u0442 \u043c\u044b\u0441\u043b\u0435\u0439 \u043e\u0431 \u0443\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 \u0432 \u044f\u0437\u044b\u043a\u0435, \u0430 \u0441 \u0434\u0440\u0443\u0433\u043e\u0439, \u2014 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u0432\u0435\u0442\u043e\u043c \u044d\u0442\u043e\u0439 \u0431\u043e\u043b\u044c\u044e, \u0430 \u0442\u043e \u0447\u0435\u0433\u043e \u044f \u043e\u0434\u0438\u043d \u0441\u0442\u0440\u0430\u0434\u0430\u044e.<\/p>\n<\/div>\n<\/details>\n<p>\u0412 Rust \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u043a\u0440\u0443\u0442\u0430\u044f: \u0435\u0441\u043b\u0438 \u043d\u0430\u043b\u043e\u0432\u0447\u0438\u0442\u044c\u0441\u044f, \u043e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u044d\u0442\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435\u0442, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043d\u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u0430\u044e\u0442 \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">let installed_apps: HashSet&lt;String> = fs::read_dir(steam_library)?     .map_ok(|entry| entry.path())     .filter_ok(|path| path.is_file())     .filter_map_ok(|file_name| {         let f = file_name             .file_name()?             .to_str()?             .strip_prefix(\"appmanifest_\")?             .strip_suffix(\".acf\")?             .to_string();         Some(f)     })     .collect::&lt;Result&lt;_, _>>()?; <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u042d\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u044f\u0440\u043b\u044b\u043a\u0438 \u0443\u0436\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u0433\u0440 \u0438\u0437 \u0441\u0442\u0438\u043c. \u041d\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u043d\u0438 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0442\u0443\u0442 \u0432\u043e\u0442 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043d\u043e \u044f \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0435\u0433\u043e \u043d\u0430 Rust, \u0442.\u043a. \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0434\u0438\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a. \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u043f\u043b\u043e\u0445\u043e. \u0414\u0430, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u043e\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u0435\u0449\u0435 \u0438 \u043d\u0435 \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442:<\/p>\n<ol>\n<li>\n<p>\u0447\u0442\u043e <code>fs::read_dir<\/code> \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 <code>fs::read_dir<\/code>, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0442\u043e <code>path.file_name()<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>Option<\/code>, \u0442.\u043a. <code>path<\/code> \u2014 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0443\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043a \u0444\u0430\u0439\u043b\u0443;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0442\u043e <code>file_name.to_str<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>Option<\/code>, \u0442.\u043a. \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u043d \u0431\u044b\u0442\u044c UTF-8;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0442\u043e <code>.strip_prefix<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>Option<\/code>, \u0442.\u043a. \u0441\u0442\u0440\u043e\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <code>prefix<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0447\u0442\u043e <code>.strip_suffix<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>Option<\/code>, \u0442.\u043a. \u0441\u0442\u0440\u043e\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <code>suffix<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0421\u043a\u0430\u0436\u0443 \u0441\u0440\u0430\u0437\u0443: \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e, \u0431\u044b\u0432\u0430\u0435\u0442 \u0438 \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435&#8230; \u043a\u0445\u043c&#8230; \u0432 \u043e\u0431\u0449\u0435\u043c, \u0441\u0430\u043c\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, 38+! \u0411\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0434\u0435\u0442\u044f\u043c \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c!<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">let mut buffer = String::new();  let _ = fs::read_dir(shortcuts)?     .map_ok(|entry| entry.path())     .filter_ok(|path| {         path.extension()             .and_then(|ext| ext.to_str())             .and_then(|ext| ext.strip_suffix(\"url\"))             .is_none()     })     .map_ok(|p| -> anyhow::Result&lt;Option&lt;PathBuf>> {         buffer.clear();         let mut file = fs::File::open(&amp;p)?;         file.read_to_string(&amp;mut buffer)?;         let app_id = buffer             .find(template)             .and_then(|url_position| buffer.get((url_position + template.len())..))             .map(|app_id_start| {                 app_id_start                     .chars()                     .take_while(char::is_ascii_digit)                     .collect::&lt;String>()             });         let Some(id) = app_id else {             return anyhow::Result::Ok(None)         };         if installed_apps.contains(&amp;id) {             return anyhow::Result::Ok(None)         };         anyhow::Result::Ok(Some(p))     })     .flatten()     .filter_map_ok(|path| path)     .map_ok(|p| trash::delete(p))     .flatten()     .collect::&lt;anyhow::Result&lt;(), _>>()?; <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0415\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e, \u044f \u0441\u0430\u043c \u0441 \u0442\u0440\u0443\u0434\u043e\u043c \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u0442\u0443\u0442 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0431\u0435\u0437 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0442\u0438\u043f\u043e\u0432 \u0438\u0437 IDE). \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0435\u0441\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u043e, \u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u0434, \u043e\u043d \u043c\u043d\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043d\u0435 \u043f\u0440\u0438\u0448\u0435\u043b. \u041d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e (\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b, \u0447\u0442\u043e \u043e\u043d \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f). \u042f \u0435\u0433\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u0442.\u043a. \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u041f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0431\u043e\u043b\u0435\u0435 \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u043b\u0443\u0447\u0448\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">let mut buffer = String::new();  for entry in fs::read_dir(shortcuts)? {     let path = entry?.path();     if path         .extension()         .and_then(|ext| ext.to_str())         .and_then(|ext| ext.strip_suffix(\"url\"))         .is_none()     { continue }      let mut file = fs::File::open(&amp;path)?;     buffer.clear();     file.read_to_string(&amp;mut buffer)?;      let Some(app_id) = buffer         .find(template)         .and_then(|url_position| buffer.get((url_position + template.len())..))         .map(|app_id_start| {             app_id_start                 .chars()                 .take_while(char::is_ascii_digit)                 .collect::&lt;String>()         }) else { continue };      if !installed_apps.contains(&amp;app_id) {         trash::delete(path)?;     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0434 \u0441\u0442\u0430\u043b\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0435\u0433\u0447\u0435 \u0447\u0438\u0442\u0430\u0442\u044c, \u043d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f, \u0442\u043e \u0432 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u044f \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0435\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 1 \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u043e\u043a. \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435. \u042d\u0442\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u0438\u0433\u0440\u0430\u043b\u043e \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0440\u043e\u043b\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e. \u041e\u0431 \u044d\u0442\u043e\u043c \u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u0436\u0435, \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u0443 \u043d\u0430\u0441&#8230;<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 5. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438<\/h2>\n<p>\u042d\u0442\u043e \u0432\u0441\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0443 \u043d\u0430\u0441 152 \u0440\u0435\u043b\u0438\u0437\u0430 \u0432 \u0434\u0435\u043d\u044c, \u043d\u0430\u0434\u043e \u0444\u0438\u0447\u0438 \u043f\u0438\u043b\u0438\u0442\u044c, \u043d\u0430\u043c \u043d\u0435\u043a\u043e\u0433\u0434\u0430 \u0432\u043e\u0435\u0432\u0430\u0442\u044c \u0441 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c. \u0414\u0430, \u043d\u0430\u0448 \u043a\u043e\u0434 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u043e\u0442 NullPointerException (\u0438\u043b\u0438 \u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445), \u043e\u0442 <a href=\"https:\/\/blog.acolyer.org\/2016\/10\/06\/simple-testing-can-prevent-most-critical-failures\/\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0435\u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a<\/a>, \u043e\u0442 \u0433\u043e\u043d\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0442 \u043a\u0443\u0441\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u0442.\u0434., \u043d\u043e \u0437\u0430\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u043e! \u041f\u043e\u043a\u0430 \u0432\u044b \u0442\u0430\u043c \u043e\u0448\u0438\u0431\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435, \u043c\u044b \u0443\u0436\u0435 \u043d\u0430 \u0440\u044b\u043d\u043e\u043a \u0432\u044b\u0439\u0434\u0435\u043c \u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0438\u043c \u0435\u0433\u043e!<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u0432\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043c\u044b\u0441\u043b\u0438 \u0443 \u043c\u0435\u043d\u044f \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e, \u0438 \u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0430\u044e \u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0442\u0435\u043c\u044b \u0441 \u0434\u0440\u0443\u0437\u044c\u044f\u043c\u0438 \u0438 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438, \u043d\u043e \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043d\u0430 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043d\u0435 \u0434\u0430\u043b\u0430 \u043e\u0434\u043d\u0430 \u043d\u0435\u0434\u0430\u0432\u043d\u044f\u044f \u0447\u0435\u0440\u0435\u0434\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e Python.<\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435 \u044f python \u0431\u044d\u043a\u0435\u043d\u0434 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. Python \u043a\u0430\u043a \u044f\u0437\u044b\u043a \u043c\u043d\u0435 \u0441\u043a\u043e\u0440\u0435\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u0447\u0435\u043c \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u043d\u043e \u0443 \u043d\u0435\u0433\u043e \u0442\u043e\u0447\u043d\u043e \u0435\u0441\u0442\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u044c (\u0445\u043e\u0442\u044f \u043f\u043e\u043d\u0435\u043c\u043d\u043e\u0433\u0443 \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u043d\u0430\u0434\u0435\u0436\u0434\u0443 \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435). \u041d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u043b  \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0440\u0430\u043a\u0435\u0442\u043d\u0443\u044e \u0445\u0438\u0440\u0443\u0440\u0433\u0438\u044e, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u00ab\u043f\u043e\u043b\u0443\u0447\u0438 json, \u0441\u043e\u0445\u0440\u0430\u043d\u0438 json \u0432 \u0431\u0430\u0437\u0435, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0439 json, \u043f\u0435\u0440\u0435\u043f\u0440\u0430\u0432\u044c json \u0434\u0430\u043b\u044c\u0448\u0435\u00bb.<\/p>\n<p>\u041c\u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437. \u041a\u043e\u0433\u0434\u0430 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 100% \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u0442\u0438\u043f\u0430\u043c\u0438, \u0432 sentry \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>AttributeError: 'NoneType' object has no attribute '...'<\/code>, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c \u0438 \u043f\u044b\u0442\u0430\u0435\u0448\u044c\u0441\u044f \u043f\u043e \u043b\u043e\u0433\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c: \u044d\u0442\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u0432\u0440\u0435\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0441\u0434\u0435\u043b\u0430\u043b \u0438\u043b\u0438 \u044d\u0442\u043e \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0440\u0435\u0434\u043a\u0430\u044f \u0431\u0430\u0433\u0430 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0422\u0417 \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u0438\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0432 \u0440\u0430\u0437\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438, \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0430\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443, \u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0437\u0430 \u0433\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0435\u043b\u044b\u0445 (\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c) \u0438\u0441\u0442\u043e\u0440\u0438\u0439 \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u0440\u043e \u0434\u0435\u0431\u0430\u0433 \u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 Python \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041d\u0435\u0442 \u043f\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u0435\u0435 \u043d\u0430 \u0441\u0432\u0435\u0442\u0435, \u0447\u0435\u043c \u043f\u043e\u0432\u0435\u0441\u0442\u044c \u043e \u043f\u0438\u0442\u043e\u043d\u0435 \u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435. \u0420\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c \u043a\u043e\u0434 \u0432 Python \u043e\u0447\u0435\u043d\u044c \u0442\u0440\u0443\u0434\u043d\u043e, \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0442\u0435\u0441\u0442\u044b \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435, \u043d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u00ab\u0414\u0430 \u0447\u0442\u043e \u0436 \u0437\u0430 \u0442\u0438\u043f \u0443 \u044d\u0442\u043e\u0439 \u0445\u0440\u0435\u043d\u0438 \u0442\u0430\u043a\u043e\u0439\u00bb, \u00ab\u0410 \u044d\u0442\u043e-\u0442\u043e \u0442\u0443\u0442 \u043e\u0442\u043a\u0443\u0434\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c?\u00bb, \u00ab\u041e\u0442\u043a\u0443\u0434\u0430 \u0435\u0449\u0435 \u044d\u0442\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u0437\u043b\u043e\u00bb \u0438 \u0442.\u0434. \u0438 \u0442.\u043f.<\/p>\n<details class=\"spoiler\">\n<summary>\u041b\u0438\u0447\u043d\u044b\u0439 \u043e\u043f\u044b\u0442 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 Python \u043a\u043e\u0434\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435 Python \u043a\u043e\u0434\u0430, \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u0431\u044b\u043b \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u0435\u043b\u0435\u043c, \u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0436\u0435 \u0434\u0435\u043b\u0430\u043b \u0441\u0430\u043c.<\/p>\n<p>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0435\u0440\u0432\u0430\u044f:<br \/> \u041a\u0430\u043a-\u0442\u043e \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 \u043c\u0435\u0441\u0442\u0435, \u0433\u0434\u0435 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0438 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u0441\u0435\u0440\u0432\u0438\u0441. \u0412\u0441\u0435 \u0431\u044b\u043b\u043e \u0441 \u043d\u0438\u043c \u0445\u043e\u0440\u043e\u0448\u043e, \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u043b \u0434\u0435\u043d\u044c\u0433\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u0434\u0430\u0436\u0435 \u0444\u0438\u0447\u0438 \u043d\u043e\u0432\u044b\u0435 \u0432 \u043d\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438. \u041d\u043e \u0431\u044b\u043b\u0430 \u0443 \u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u042d\u0442\u043e \u0431\u044b\u043b \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 Python 2.7. \u0410 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Python 2.7 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0430\u0441\u044c. \u0418 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437 \u0442\u0435\u0441\u0442\u043e\u0432 (\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0431\u0435\u0437 \u0442\u0438\u043f\u043e\u0432). \u0418 \u0435\u0449\u0435 \u043d\u0430\u0434\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445. \u0418 \u043f\u043e-\u0445\u043e\u0440\u043e\u0448\u0435\u043c\u0443 \u2014 \u043a\u043e\u0434 \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c \u043f\u043e\u0434 \u043d\u043e\u0432\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u0418 \u0442\u0435\u0441\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0448\u043b\u043e \u043c\u0438\u043c\u043e \u043c\u0435\u043d\u044f, \u043d\u043e \u044f \u0432\u0438\u0434\u0435\u043b, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043b\u0433\u0438\u0439 \u0438 \u043c\u0443\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u044b\u043b \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<p>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0432\u0442\u043e\u0440\u0430\u044f:<br \/> \u041d\u0430\u0448\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b (\u043d\u0438\u0447\u0435\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 XML, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 URLs). \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445, \u043d\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0435\u0433\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e (\u0438\u043b\u0438 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430). \u041d\u0430\u043c \u044d\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0435\u0449\u0435\u0439 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c, \u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0437\u0430\u043e\u0434\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0421\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u0435\u043b\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e\u0435, \u043d\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0423 \u043d\u0430\u0441 \u0431\u044b\u043b\u0438 \u0441\u0432\u043e\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0438\u0437 \u043d\u0438\u0445 \u0431\u044b\u043b\u043e \u043b\u0438\u0431\u043e \u0442\u044f\u0436\u0435\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0441\u043e\u0442\u0435\u043d \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 (\u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u043d \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0430 \u043a\u0430\u043a\u043e\u0439 \u043d\u0443\u0436\u0435\u043d \u0432\u0441\u0435\u043c). \u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u0438 \u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0435\u0434\u0435\u043b\u044e \u043d\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0441\u044f. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443, \u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b (\u0445\u043e\u0442\u044f \u0438 \u0441\u0430\u043c\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0432\u043c\u0435\u0441\u0442\u043e 404 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c 200) \u0445\u0432\u0430\u0442\u0430\u043b\u043e 10 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u0418 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e: \u0440\u043e\u0443\u0442\u0438\u043d\u0433, \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u043e\u043d\u0430 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043d\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043d\u0430 \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0418 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0431\u044b\u043b\u0430 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430, \u0438 \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445 \u0431\u044b\u043b\u0438 \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438, \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u043b \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u042f \u0440\u0443\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u043f\u0443\u0442\u044c, \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u043f\u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044e \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u044b, \u043d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043d\u0430\u0445\u043e\u0434\u0438\u043b \u043d\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b. \u0422\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435 \u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f, \u0438 \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430, \u0442\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0442\u043e \u0435\u0449\u0435 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c.<\/p>\n<p>\u042f \u0431\u044b \u0441 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435 Golang, \u043d\u043e, \u043a \u043c\u043e\u0435\u043c\u0443 \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043c\u043d\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c. \u041d\u0430\u0432\u0435\u0440\u043d\u043e, \u044d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c Python, \u043d\u043e \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0437\u0430\u0431\u044b\u0442\u044c \u0435\u0451 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u0430\u0436\u0435 warning \u043d\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442 zero value, \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441\u0430\u043c\u043e \u0437\u0430 \u0441\u0435\u0431\u044f (\u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0441\u0447\u0435\u0442 \u0435\u0441\u0442\u044c \u043b\u0438\u043d\u0442\u0435\u0440, \u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0410 \u043f\u0440\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f zero value \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043c\u043d\u0435 \u0434\u0430\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f).<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Python (\u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432) Rust \u0434\u0430\u0435\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0442\u0438\u043f\u043e\u0432, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0441\u0435\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u042d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0447\u0438\u043d\u0438\u0442\u044c, \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u0441 \u043c\u0435\u043d\u044c\u0448\u0438\u043c\u0438 \u0443\u0441\u0438\u043b\u0438\u044f\u043c\u0438. \u0412 Rust \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435, \u0438 \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u043d\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u00ab\u043f\u0440\u043e\u0449\u0435\u00bb \u0438 \u0434\u043b\u044f \u00ab\u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438\u00bb.<\/p>\n<details class=\"spoiler\">\n<summary>\u041e\u043f\u044b\u0442 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 Rust \u043a\u043e\u0434\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043c\u043e\u0435\u043c\u0443 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0443 \u043b\u0443\u0447\u0435\u0439. \u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442, \u043a\u0430\u043a \u044f \u0435\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b, \u043c\u043d\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0432\u0434\u0440\u0443\u0433 \u043f\u0440\u0438\u0448\u043b\u0430 \u0438\u0434\u0435\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0446\u0432\u0435\u0442\u0430 \u043d\u0435 f64 (double), \u0430 u8 (unsigned char), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u043b\u0438\u0434\u0435\u043d \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (\u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0446\u0432\u0435\u0442\u0430 \u0437\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0438 \u043f\u043e\u0442\u043e\u043c \u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c \u043d\u0430 <code>samples_per_pixel<\/code>, \u0430 \u043c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0446\u0432\u0435\u0442).<\/p>\n<p>\u041d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430! \u041a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043f\u043e\u0434 f64, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u043e\u0432 \u0442\u0430\u043c \u043d\u0435\u0442 (\u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0435\u0441\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/github.com\/Lex98\/raytracer\/blob\/master\/raytracer\/src\/base\/vec3.rs#L18\" rel=\"noopener noreferrer nofollow\">\u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0443\u0436\u0430\u0441<\/a>. \u042d\u0442\u043e \u043d\u0435 \u0442\u043e, \u043a\u0430\u043a \u043d\u0430\u0434\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u0438 \u0432 Rust, \u043c\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a \u0434\u0430\u043b\u0435\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0439\u0442\u0438. \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0430\u043b\u0435\u043a\u043e). \u0418 \u044f \u043d\u0430\u0447\u0430\u043b \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433. \u041f\u0440\u043e\u0441\u0442\u043e \u0444\u0438\u043a\u0441\u0438\u043b \u043a\u043e\u0434, \u043f\u043e\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u0418 \u043a\u043e\u0434 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u0411\u0435\u0437 \u0442\u0435\u0441\u0442\u043e\u0432, \u0431\u0435\u0437 \u043d\u0438\u0447\u0435\u0433\u043e. \u0421 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0430 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043a\u043e\u0434 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f, \u043e\u043d \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b.<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e: \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043e\u0447\u0435\u043d\u044c \u0441\u043c\u0435\u0448\u043d\u043e, \u0438 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e&#8230; \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b. \u041a\u0430\u043a \u044f \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u044f\u0441\u043d\u0438\u043b, \u043f\u043e\u043a\u0430 \u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0437\u0430\u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0438\u043b \u043d\u0443\u043b\u0438 \u0432 \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0438 \u0441\u0438\u043d\u0438\u0439 \u043a\u0430\u043d\u0430\u043b\u044b, \u0438 \u043e\u043d\u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c. \u0412\u043c\u0435\u0441\u0442\u043e \u043d\u0443\u043b\u0435\u0439 \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/doc.rust-lang.org\/std\/macro.todo.html\" rel=\"noopener noreferrer nofollow\">todo!()<\/a>. \u0414\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e, \u0432\u0441\u0435 \u0442\u0438\u043f\u044b \u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u043e\u043d \u0437\u0430\u043f\u0430\u043d\u0438\u043a\u0443\u0435\u0442, \u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435 \u043c\u043d\u0435 \u044d\u0442\u043e \u0445\u0443\u0434\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435, \u043d\u0435 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u043e\u043d\u043e \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u043b\u043e \u043d\u0430 \u0441\u0443\u0442\u044c. \u0418 \u043a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0438 \u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0442 \u0432 Rust, \u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u042f \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0438\u0448\u0443 \u043d\u0430 \u043d\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u0449\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438 \u0441\u043c\u043e\u0442\u0440\u044e \u0443\u043c\u043d\u044b\u0435 \u043b\u0435\u043a\u0446\u0438\u0438 \u043d\u0430 \u044e\u0442\u0443\u0431\u0435 \u0432 \u043d\u0430\u0434\u0435\u0436\u0434\u0435 \u0441\u0442\u0430\u0442\u044c \u0443\u043c\u043d\u0435\u0435, \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e.<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/details>\n<p>\u0418 \u0432\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c, \u0441\u043f\u0443\u0441\u0442\u044f \u044f \u0443\u0436 \u043d\u0435 \u0437\u043d\u0430\u044e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043c\u044b \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u0442\u043e\u0433\u043e \u043f\u043e\u0432\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0441\u043f\u043e\u0434\u0432\u0438\u0433 \u043c\u0435\u043d\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e.<\/p>\n<p>\u042f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%BB%D0%B3%D0%BE%D1%80%D0%B8%D1%82%D0%BC_%D0%90%D1%85%D0%BE_%E2%80%94_%D0%9A%D0%BE%D1%80%D0%B0%D1%81%D0%B8%D0%BA\" rel=\"noopener noreferrer nofollow\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0410\u0445\u043e \u2014 \u041a\u043e\u0440\u0430\u0441\u0438\u043a<\/a>. \u0414\u0430\u0436\u0435 \u043d\u0430\u0448\u0435\u043b \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u0443\u044e <a href=\"https:\/\/cp-algorithms.com\/string\/aho_corasick.html\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a>, \u0441\u0438\u0436\u0443, \u043f\u0438\u0448\u0443. \u0414\u043e\u0448\u0435\u043b \u0434\u043e \u0447\u0430\u0441\u0442\u0438 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 <code>go<\/code> \u0438 <code>get_link<\/code> \u0438 \u0432\u0440\u0435\u0437\u0430\u043b\u0441\u044f \u0432 \u0431\u0435\u0442\u043e\u043d\u043d\u0443\u044e \u0441\u0442\u0435\u043d\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u041f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0441\u0442\u0440\u043e\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u0430 \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043a\u0438. \u0412\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0432\u0435\u0441\u0435\u043b\u043e. \u0421\u0438\u0436\u0443 \u044f \u0438 \u0434\u0443\u043c\u0430\u044e: \u0434\u0430, \u0442\u044f\u0436\u0435\u043b\u043e \u043d\u0430 Rust \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u044f\u043a\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f, \u0441\u0432\u044f\u0437\u043d\u044b\u0435 \u0441\u043f\u0438\u0441\u043a\u0438, \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0435 \u043e\u0431\u0445\u043e\u0434\u044b \u0438 \u043f\u0440\u043e\u0447\u0435\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u043e\u0442 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f:<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">fn go(&amp;mut self, curr_node_idx: usize, ch: char) -> usize {     let curr_node = &amp;mut self.nodes[curr_node_idx];     if let Entry::Vacant(all_links) = curr_node.all_links.entry(ch) {         if let Entry::Occupied(next) = curr_node.next.entry(ch) {             all_links.insert(*next.get());         } else {             let new_link = if curr_node_idx == 0 {                 0             } else {                 let next_link = self.get_link(curr_node.parent);                 self.go(next_link, ch)             };             all_links.insert(new_link);         }     }     curr_node.all_links[&amp;ch] }  fn get_link(&amp;mut self, curr_node_idx: usize) -> usize {     let curr_node = &amp;mut self.nodes[curr_node_idx];     *curr_node.suffix_link.get_or_insert_with(|| {         if curr_node_idx == 0 || curr_node.parent == 0 {             0         } else {             let next_link = self.get_link(curr_node.parent);             let next_node = self.go(next_link, curr_node.ch.expect(\"cannot be empty, only root node.ch is empty\"));             next_node         }     }) <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041a\u0430\u043a \u043d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. <a href=\"https:\/\/doc.rust-lang.org\/std\/collections\/struct.HashMap.html#method.entry\" rel=\"noopener noreferrer nofollow\">Entry API<\/a> \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044f, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0445\u0435\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043d\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437! \u0412\u044b\u043d\u0435\u0441\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u0430\u0441\u0441\u0438\u0432\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432\u044b\u0445\u043e\u0434\u0430 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430! <a href=\"https:\/\/doc.rust-lang.org\/std\/option\/enum.Option.html#method.get_or_insert_with\" rel=\"noopener noreferrer nofollow\">get_or_insert_with<\/a> \u0447\u0442\u043e\u0431\u044b \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c <code>Option<\/code> \u043d\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u0441\u0440\u0430\u0437\u0443 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e! \u0412\u0441\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0437\u0430\u0440\u0430\u0437\u0430 \u0442\u0430\u043a\u0430\u044f.<\/p>\n<p>\u0418 \u0441\u0430\u043c\u043e\u0435 \u0442\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440-\u0442\u043e \u043f\u0440\u0430\u0432. \u0415\u0441\u043b\u0438 <code>all_links<\/code> \u0438\u0437 <code>Entry::Vacant(all_links)<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 <code>self.go<\/code>, \u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0432 <code>curr_node.all_links<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u044e\u0447, \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c\u0441\u044f \u043c\u0435\u0441\u0442\u043e, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0430\u043b\u043e\u0446\u0438\u0440\u043e\u0432\u0430\u043d, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c <code>all_links<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0443\u0434\u0430.<\/p>\n<p>\u0418 \u043c\u043d\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b\u0430\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/blog.sdf.com\/p\/fast-development-in-rust-part-one\" rel=\"noopener noreferrer nofollow\">Fast Development In Rust, Part One<\/a>. \u0418 \u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b \u0432\u0441\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c \u0438 \u0434\u0443\u0431\u043e\u043b\u043e\u043c\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u041d\u0438\u043a\u0430\u043a\u043e\u0433\u043e <code>entry<\/code>, <code>.get().is_some()<\/code>. \u041a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430 <code>self.nodes[curr_node_idx]<\/code> \u0432\u0435\u0437\u0434\u0435. <code>.expect<\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 <code>Option<\/code>. \u0418 \u043a\u043e\u0434 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f.<\/p>\n<p>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 Rust \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043c\u043d\u044b\u0439. \u0423 \u043d\u0435\u0433\u043e \u0432 \u0437\u0430\u043d\u0430\u0447\u043a\u0435 \u0435\u0441\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/blog.rust-lang.org\/2022\/08\/05\/nll-by-default.html\" rel=\"noopener noreferrer nofollow\">Non-lexical lifetimes<\/a>. \u0418 \u043e\u043d \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0436\u0438\u0432\u0443\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0433\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0418 \u0432\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u0441 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u043c\u0441\u044f \u043a\u043e\u0434\u043e\u043c \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u0430\u0437\u0430\u0434. \u0418 \u0443\u0436\u0435 \u043c\u0438\u043d\u0443\u0442 \u0447\u0435\u0440\u0435\u0437 5-10 \u044f \u0432\u0435\u0440\u043d\u0443\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u043d\u0430\u0437\u0430\u0434!<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">fn go(&amp;mut self, curr_node_idx: usize, ch: char) -> usize {     assert!(curr_node_idx &lt; self.nodes.len());     let curr_node = &amp;mut self.nodes[curr_node_idx];     if let Entry::Vacant(all_links) = curr_node.all_links.entry(ch) {         if let Entry::Occupied(next) = curr_node.next.entry(ch) {             all_links.insert(*next.get());         } else {             let new_link = if curr_node_idx == 0 {                 0             } else {                 let next_link = self.get_link(self.nodes[curr_node_idx].parent);                 self.go(next_link, ch)             };             self.nodes[curr_node_idx].all_links.insert(ch, new_link);         }     }     self.nodes[curr_node_idx].all_links[&amp;ch] }  fn get_link(&amp;mut self, curr_node_idx: usize) -> usize {     assert!(curr_node_idx &lt; self.nodes.len());     if let Some(link) = self.nodes[curr_node_idx].suffix_link {         link     } else {         let new_link = if curr_node_idx == 0 || self.nodes[curr_node_idx].parent == 0 {             0         } else {             let next_link = self.get_link(self.nodes[curr_node_idx].parent);             self.go(next_link, self.nodes[curr_node_idx].ch.expect(\"cannot be empty, only root node.ch is empty\"))         };         self.nodes[curr_node_idx].suffix_link = Some(new_link);         new_link     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u043c\u0435\u043d\u044f \u043d\u0435 \u0431\u044b\u043b\u0430 \u0432\u0430\u0436\u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u0443\u0447\u0430\u043b, \u043a\u0430\u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0412\u0440\u044f\u0434 \u043b\u0438 \u0431\u044b \u044f \u0441\u0442\u0430\u043b \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041e\u043d \u0443\u0436\u0435 <a href=\"https:\/\/crates.io\/crates\/aho-corasick\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d<\/a> \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u043d\u0435 \u0441 \u0432\u043e\u0442 \u044d\u0442\u0438\u043c \u0441\u043c\u0435\u0445\u043e\u043c \u0438 \u043d\u0435 \u0441\u043d\u0438\u043b\u043e\u0441\u044c. \u041d\u043e \u0432\u043e\u0442 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c. \u0421\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u044e, \u043b\u0438\u0448\u043d\u0435\u0435 \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432\u044b\u0445\u043e\u0434\u0430 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u041d\u043e \u044d\u0442\u043e \u0432\u0441\u0435 \u0431\u044b\u043b\u0438 \u043f\u0440\u0435\u0436\u0434\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043c\u0435\u0448\u0430\u043b\u0438 \u043c\u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u043e\u0434.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u0435\u0449\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043d\u044b\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <abbr title=\"Breadth-first search , \u043f\u043e\u0438\u0441\u043a \u0432 \u0448\u0438\u0440\u0438\u043d\u0443\">BFS<\/abbr> \u0442.\u043a. \u0442\u0430\u043a \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0436\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0433\u043e\u0440\u0435 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 <code>go<\/code> \u0438 <code>get_link<\/code> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438, \u0432\u043e\u043e\u0440\u0443\u0436\u0438\u0432\u0448\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0430\u043c\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438 \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <abbr title=\"Breadth-first search , \u043f\u043e\u0438\u0441\u043a \u0432 \u0448\u0438\u0440\u0438\u043d\u0443\">BFS<\/abbr>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0448\u043b\u0430 \u043c\u043d\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443.<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">fn bfs_suffix_links(&amp;mut self) {     let mut queue = VecDeque::new();     queue.push_back(0);     while let Some(curr_node_idx) = queue.pop_front() {         queue.extend(self.nodes[curr_node_idx].next.values());          if self.nodes[curr_node_idx].ch.is_none() || self.nodes[curr_node_idx].parent == 0 {             continue;         }          let current_node_char = self.nodes[curr_node_idx].ch.expect(\"only root node has empty .ch\");          let parent_node = self.nodes[curr_node_idx].parent;         let parent_suffix_link = *self.nodes[parent_node].suffix_link.get_or_insert(0);          if self.nodes[parent_suffix_link].next.get(&amp;current_node_char).is_some() {             let new_suffix_link = *self.nodes[parent_suffix_link].next.get(&amp;current_node_char).expect(\"already checked\");             self.nodes[curr_node_idx]                 .all_links                 .insert(current_node_char, new_suffix_link);         }     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418 \u043e\u043d\u0430 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0430 \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041d\u043e \u043f\u043e\u0442\u043e\u043c \u043a\u043e\u0434 \u0441\u0442\u0430\u043b \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u044d\u0442\u043e \u0431\u044b\u043b \u043a\u043e\u0434 \u043d\u0430 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043c\u0435\u0440\u0434\u0436\u0435\u043c, \u044f \u0431\u044b \u0441\u043a\u0430\u0437\u0430\u043b \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0435 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e. \u0412 Rust \u0436\u0435, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0431\u0443\u0442\u044b\u043b\u043e\u0447\u043d\u044b\u043c \u0433\u043e\u0440\u043b\u044b\u0448\u043a\u043e\u043c \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e. \u0427\u0442\u043e \u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u043b:<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">fn bfs_suffix_links(&amp;mut self) {     let mut queue = VecDeque::new();     queue.push_back(0);     while let Some(curr_node_idx) = queue.pop_front() {         assert!(curr_node_idx &lt; self.nodes.len());         let curr_node = &amp;mut self.nodes[curr_node_idx];         queue.extend(curr_node.next.values());          \/\/ Root node         let Some(current_node_char) = curr_node.ch else {             curr_node.suffix_link = Some(0);             continue;         };          \/\/ Root children         if curr_node.parent == 0 {             curr_node.suffix_link = Some(0);             continue;         }          let parent_node = curr_node.parent;         let parent_suffix_link = *self.nodes[parent_node].suffix_link.get_or_insert(0);          if let Some(&amp;new_suffix_link) =             self.nodes[parent_suffix_link].next.get(&amp;current_node_char)         {             self.nodes[curr_node_idx]                 .all_links                 .insert(current_node_char, new_suffix_link);         }     } } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041a\u0430\u043a \u044f \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432\u044b\u0448\u0435, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043a\u043e\u0434 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0438 \u043d\u0430\u0447\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0435\u0433\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c. \u041f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0448\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0437\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0448\u044c, \u043a\u0430\u043a \u043d\u0430 \u044d\u0442\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. \u0415\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435\u0442, \u0442\u043e \u0432\u0441\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 100%. \u0415\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0435\u0441\u0442\u044c, \u0442\u043e, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u044d\u0442\u043e \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e, \u0430 \u043c\u043e\u0436\u0435\u0442, \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435. \u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043c\u043d\u0435 \u044d\u0442\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442. \u042d\u0442\u043e \u0436\u0435 <abbr title=\"Test-driven development, \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\">TDD<\/abbr>!<\/p>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u0432 Rust \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <abbr title=\"Test-driven development, \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\">TDD<\/abbr> (\u043d\u0430\u0432\u0435\u0440\u043d\u043e, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c CDD \u2014 compiler-driven development, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435), \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0435\u0441\u0442\u043e\u0432 \u2014 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0438\u0448\u0435\u0448\u044c \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u0443\u044e \u0444\u0438\u043b\u044c\u043c\u0430 \u0443\u0436\u0430\u0441\u043e\u0432 \u043a\u0443\u0447\u0443 \u043a\u0430\u043a-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0448\u044c \u0435\u0451 \u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0431\u044b\u0441\u0442\u0440\u043e, \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u0418\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u043c\u043e\u0435\u0439 \u0433\u043e\u043b\u043e\u0432\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0438 \u043c\u043d\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0435\u0451 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0443 \u0432\u0430\u0441 \u0432 \u0433\u043e\u043b\u043e\u0432\u0435, \u0442\u043e, \u043f\u0440\u043e\u0448\u0443, \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c, \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u043f\u043e\u0434\u0432\u043e\u0434\u043a\u043e\u0439 \u043a \u044d\u0442\u043e\u0439 \u043c\u044b\u0441\u043b\u0438.<\/p>\n<p>\u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u0438\u0435 \u043c\u044b\u0441\u043b\u0438 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 Rust. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043d\u0430\u0448\u0435\u043b \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 <a href=\"https:\/\/youtu.be\/6mZRWFQRvmw?t=26498\" rel=\"noopener noreferrer nofollow\">Beyond Safety and Speed: How Rust Fuels Team Productivity<\/a> \u043e\u0442 Lars Bergstrom, Google Android Director of Engineering \u043d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 <a href=\"https:\/\/www.rustnationuk.com\/\" rel=\"noopener noreferrer nofollow\">Rust Nation UK 2024<\/a>. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0435\u0433\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e 30 \u043c\u0438\u043d\u0443\u0442. \u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u043a\u0442\u043e\u0432:<br \/> \u2014 Rust-\u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u044b (\u043a\u0430\u043a \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043a\u043e\u0434\u0430, \u0442\u0430\u043a \u0438 \u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435), \u043a\u0430\u043a \u0438 Golang \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 2 \u0440\u0430\u0437\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u044b, \u0447\u0435\u043c C++ \u043a\u043e\u043c\u0430\u043d\u0434\u044b;<br \/> \u2014 2\/3 \u043e\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0438\u043b\u0438, \u0447\u0442\u043e \u0441\u043f\u0443\u0441\u0442\u044f 2 \u043c\u0435\u0441\u044f\u0446\u0430 (\u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435) \u0431\u044b\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0432\u0435\u0440\u0435\u043d\u044b \u0432 \u0437\u043d\u0430\u043d\u0438\u0438 Rust \u0434\u043b\u044f \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445;<br \/> \u2014 85% \u043e\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0438\u043b\u0438, \u0447\u0442\u043e \u0443 \u043d\u0438\u0445 \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u042f \u0434\u0430\u0436\u0435 \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c, \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441\u0430\u043c\u043e \u0437\u0430 \u0441\u0435\u0431\u044f.<\/p>\n<p>\u0421 \u0447\u0435\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u043f\u043e\u0440\u0438\u0442\u044c, \u0442\u0430\u043a \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 Rust-\u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0434\u043e\u043b\u0433\u043e. \u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u043e.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u2014 <a href=\"https:\/\/kobzol.github.io\/rust\/cargo\/2024\/03\/10\/rust-cargo-wizard.html\" rel=\"noopener noreferrer nofollow\">cargo-wizard<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438;<br \/> \u2014 <a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/1bgyo8a\/try_cranelift_codegen_backend_for_faster_compile\/\" rel=\"noopener noreferrer nofollow\">Cranelift<\/a> \u2014 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0434\u0435\u0431\u0430\u0433 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e.<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u043e \u0434\u0430\u0436\u0435 \u0441\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c (\u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c) \u044f \u043d\u0435 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e Rust \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043a \u0436\u0435 \u0431\u044b\u0441\u0442\u0440\u043e, \u043a\u0430\u043a Golang. \u0418 \u0435\u0441\u043b\u0438 \u0432\u044b Google (\u0438\u043b\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u0441\u0445\u043e\u0436\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430) \u0442\u043e \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e \u043d\u0430 \u0432\u0441\u0435 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0442\u044b\u0441\u044f\u0447 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0432\u044b \u043f\u043b\u0430\u0442\u0438\u0442\u0435 \u0437\u0430 \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0434\u0430\u0436\u0435 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0436\u0434\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0434 \u0447\u0435\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u043c. \u0417\u0430\u0434\u0430\u0439\u0442\u0435 \u0441\u0435\u0431\u0435 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0410 \u0432\u043b\u0438\u044f\u0435\u0442 \u043b\u0438 \u043d\u0430 \u0432\u0430\u0448\u0443 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438?\u00bb \u0418\u043b\u0438 \u0435\u0449\u0435 \u043b\u0443\u0447\u0448\u0435: \u00ab\u0410 \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435: \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0438\u043b\u0438 \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u0434\u0435\u0431\u0430\u0433 \u0431\u044b\u0441\u0442\u0440\u043e\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430?\u00bb \u0423 \u043c\u0435\u043d\u044f \u043d\u0435\u0442 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0443 \u0432\u0441\u0435\u0445 \u0441\u0432\u043e\u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u044b.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 6. \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c<\/h2>\n<p>Upd: \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u0430 <a href=\"https:\/\/www.rustnationuk.com\/\" rel=\"noopener noreferrer nofollow\">Rust Nation UK 2024<\/a> \u0431\u044b\u043b\u043e \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043f\u0440\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 &#8212; <a href=\"https:\/\/www.youtube.com\/watch?v=33FG6O3qejM&amp;t=170s\" rel=\"noopener noreferrer nofollow\">Easy Mode Rust<\/a>. \u042d\u0442\u043e \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u0438 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0438\u0445) \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c Rust \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e &#171;\u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u043e\u0441\u043b\u0435 2 \u043c\u0435\u0441\u044f\u0446\u0435\u0432&#187;, \u043d\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041d\u0438\u043a\u0430\u043a\u043e\u0433\u043e borrow checker&#8217;\u0430, \u043d\u043e\u0432\u044b\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432, \u0442\u0440\u0435\u0439\u0442\u043e\u0432, \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a\u043e\u0432, \u043b\u0430\u0439\u0444\u0442\u0430\u0439\u043c\u043e\u0432, unsafe, async, \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0438 \u0442.\u0434. \u0418 \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u0443 Rust \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u0438, \u0447\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043a\u043e\u0433\u0434\u0430\/\u0435\u0441\u043b\u0438 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a\u043e\u0434 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u0443\u0442\u044b\u043b\u043e\u0447\u043d\u044b\u043c \u0433\u043e\u0440\u043b\u044b\u0448\u043a\u043e\u043c, \u0442\u043e \u0435\u0433\u043e \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0438\u0434\u0438\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u044b\u0439 Rust.<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430, \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e, \u0432\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e \u00ab\u0441\u0446\u0435\u043d\u044b \u043f\u043e\u0441\u043b\u0435 \u0442\u0438\u0442\u0440\u043e\u0432\u00bb. \u0418 \u0440\u0430\u0437 \u0443\u0436 \u043c\u044b \u0432\u0441\u0435 \u0442\u0443\u0442 \u0441\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u044f \u0437\u0430\u043e\u0434\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u00abRust \u0441\u043b\u043e\u0436\u043d\u044b\u0439\u00bb. \u0418 \u044f \u0434\u0430\u0436\u0435 \u043d\u0435 \u0438\u043c\u0435\u044e \u0432 \u0432\u0438\u0434\u0443 \u00abRust \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u044d\u0442\u043e \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0438\u0439 \u043c\u0438\u0440 \u0441\u043b\u043e\u0436\u043d\u044b\u0439\u00bb, \u0445\u043e\u0442\u044f \u0432 \u044d\u0442\u043e\u043c \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u0434\u043e\u043b\u044f \u043f\u0440\u0430\u0432\u0434\u044b (\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a IO \u0432\u044b\u0448\u0435 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u044d\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442). \u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e Rust \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u044f\u0437\u044b\u043a. \u042f \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043a\u0430\u0436\u0443: \u044f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e <a href=\"https:\/\/www.youtube.com\/watch?v=oY0XwMOSzq4\" rel=\"noopener noreferrer nofollow\">Rust \u0441\u043a\u0443\u0447\u043d\u044b\u0439<\/a> (\u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0434\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 -> \u0441\u043a\u0443\u0447\u043d\u044b\u0439 \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435).<\/p>\n<p>\u0412 \u043a\u043e\u0434\u0435 \u043d\u0430 Rust \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0442 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u0435\u0439. \u0410 \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c, \u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u00ab\u041e, \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\u00bb \u0438\u043b\u0438 \u00ab\u043b\u0438\u043d\u0442\u0435\u0440\u044b \u0434\u0430\u0436\u0435 \u0442\u0430\u043a\u043e\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u00bb. \u0410 \u0432\u043e\u0442 \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u0434\u0435, \u0442\u043e \u0440\u0435\u0434\u043a\u043e \u0443\u0434\u0438\u0432\u043b\u044f\u044e\u0441\u044c (\u0445\u043e\u0442\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f <a href=\"https:\/\/github.com\/rust-lang\/rust\/blob\/master\/tests\/ui\/weird-exprs.rs\" rel=\"noopener noreferrer nofollow\">\u0431\u044b\u0432\u0430\u044e\u0442<\/a>). \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0433\u0434\u0435 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u0441 \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u0442 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0414\u0430\u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u0443\u0436\u0430\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0432 Rust \u2014 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043b\u0430\u0439\u0444\u0442\u0430\u0439\u043c\u043e\u0432 \u2014 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u0435, \u0434\u0430 \u0438 \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043b\u0430\u0439\u0444\u0442\u0430\u0439\u043c\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c.<\/p>\n<p>\u041f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 Rust \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u042f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043f\u0440\u043e <abbr title=\"Compiler-driven development, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\">CDD<\/abbr>, \u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0435\u0449\u0435 \u0441 \u043e\u0434\u043d\u0438\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c \u2014 \u043f\u0430\u0440\u043d\u044b\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u0427\u0430\u0441\u0442\u043e \u0434\u043b\u044f \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0438\u043f\u0438\u0447\u043d\u044b \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0438\u0448\u0435\u0442, \u043a\u0430\u043a \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u044f\u043c\u043e \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 (\u044d\u0442\u043e \u043d\u0435 \u043d\u0430 100% \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u043a: \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435, \u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b).<\/p>\n<p>\u0412 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e Rust \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u043c \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/cypherpunks.ca\/~iang\/pubs\/gradingcurve-secdev23.pdf\" rel=\"noopener noreferrer nofollow\">Grading on a Curve: How Rust can Facilitate New Contributors while Decreasing Vulnerabilities<\/a>.<\/p>\n<blockquote>\n<p>A first-time contributor to a C++ project was approximately 70 times as likely to introduce a vulnerability as a first-time contributor to an equivalent Rust project. This provides strong evidence that even if one were to accept that Rust is a more difficult language to learn than C++, it can still provide a sizable net benefit to new contributors to such projects<\/p>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430: \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0435\u0441\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043a \u00ab\u043e\u043f\u044b\u0442\u0443\u00bb, \u043e\u043f\u044b\u0442 \u0442\u0430\u043c \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442, \u0430 \u043d\u0435 \u043e\u0431\u0449\u0438\u0439 \u043e\u043f\u044b\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430.<\/p>\n<\/div>\n<\/details>\n<p>\u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435! \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043a\u0440\u0438\u0432\u0430\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432 Rust \u2014 \u044d\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u0441\u0442\u0443\u043f\u0435\u043d\u044c\u043a\u0430, \u0432\u044b\u0441\u043e\u0442\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0432\u043d\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u0438\u043b\u0438 \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c \u0432 Rust) \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u043d\u0435 \u0431\u043e\u044f\u0442\u044c\u0441\u044f \u0435\u0433\u043e \u043f\u0438\u0441\u0430\u0442\u044c. \u0412 Rust, \u0435\u0441\u043b\u0438 \u043a\u043e\u0434 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f, (\u0430 \u0435\u0449\u0435 \u043b\u0443\u0447\u0448\u0435 \u0438 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u0438 \u043d\u043e\u0432\u044b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b) \u0442\u043e \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0432\u044c\u044e\u0435\u0440\u0443, \u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u043c \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>\u041d\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u043d\u043e\u0433\u0438\u0435 \u043b\u044e\u0434\u0438 (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438\u0437 \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u0438\u0448\u0435\u0442 \u043d\u0430 Rust \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u043e\u043d \u0441\u043b\u043e\u0436\u043d\u044b\u0439? \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0442\u0443\u0442 2 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430:<br \/> \u2014 \u0435\u0441\u043b\u0438 \u0438\u0437\u0443\u0447\u0430\u0442\u044c Rust \u043a\u0430\u043a \u00ab\u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0438 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439\u00bb (\u0442.\u0435. \u043a\u0430\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 C), \u0442\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u042d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0438, \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c <code>.clone()<\/code>, <code>Rc&lt;RefCell><\/code> \u0438 <code>Arc&lt;Mutex><\/code> \u0438 \u0442.\u0434. \u0412\u044b\u0448\u0435 \u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043a\u043e\u0434.<br \/> \u2014 \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0436\u0435 \u043d\u0430\u0434\u043e \u0432\u044b\u0436\u0438\u043c\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u043a\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u00ab\u0431\u044b\u0441\u0442\u0440\u043e, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u0435\u0448\u0435\u0432\u043e\u00bb \u0432 Rust \u0435\u0441\u0442\u044c \u00ab\u043f\u0440\u043e\u0441\u0442\u043e, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u00bb. \u041c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u00ab\u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u00bb, \u043d\u043e \u043a\u0430\u043a \u0432 \u0430\u043d\u0435\u043a\u0434\u043e\u0442\u0435 \u00ab\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c-\u0442\u043e \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e 2\u00bb.<\/p>\n<p>\u041f\u0440\u043e \u00ab\u043f\u0440\u043e\u0441\u0442\u043e, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438 \u043d\u0435\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u00bb (\u0441\u043a\u043e\u0440\u0435\u0435 \u043d\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e, Rust \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432) \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u0448\u0435, \u043f\u0440\u043e \u00ab\u043f\u0440\u043e\u0441\u0442\u043e, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u00bb \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u00ab\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u00bb \u0438 \u00ab\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u00bb \u0441 <code>unsafe<\/code>.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u0441\u043b\u043e\u0436\u043d\u043e<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <a href=\"https:\/\/doc.rust-lang.org\/std\/fs\/fn.read_dir.html\" rel=\"noopener noreferrer nofollow\">read_dir<\/a> (\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043f\u0430\u043f\u043a\u0438). \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0443 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 \u044d\u0442\u043e \u043f\u0443\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u043d\u0430\u043c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f?<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e: \u0432 Rust \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438, \u0442.\u0435. <a href=\"https:\/\/doc.rust-lang.org\/std\/string\/struct.String.html\" rel=\"noopener noreferrer nofollow\">String<\/a>. \u041d\u043e \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0412 Rust \u0441\u0442\u0440\u043e\u043a\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e UTF-8, \u0430 \u043f\u0443\u0442\u044c \u2014 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e (\u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 <a href=\"https:\/\/fasterthanli.me\/articles\/i-want-off-mr-golangs-wild-ride\" rel=\"noopener noreferrer nofollow\">I want off Mr. Golang&#8217;s Wild Ride<\/a> \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e UTF-8 \u0441\u0442\u0440\u043e\u043a\u0438 \u2014 \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u0434\u043b\u044f \u043f\u0443\u0442\u0438, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0430\u043c, \u0430 \u043c\u044b \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435).<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u043e, \u0432 Rust \u0435\u0441\u0442\u044c <a href=\"https:\/\/doc.rust-lang.org\/std\/ffi\/struct.OsString.html\" rel=\"noopener noreferrer nofollow\">OsString<\/a>, \u043e\u043d \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438 \u0442\u0430\u043c \u043d\u0435\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440 \u0431\u0430\u0439\u0442. \u041f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435, \u043d\u043e \u0432\u0435\u043a\u0442\u043e\u0440 \u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0430\u043b\u043b\u043e\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0443\u0447\u0435! \u042d\u0442\u043e \u0447\u0442\u043e, \u043d\u0430\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u043f\u043a\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044c, \u043d\u0430\u0434\u043e \u0435\u0449\u0435 \u0438 \u0432 \u043a\u0443\u0447\u0435 \u0447\u0442\u043e-\u0442\u043e \u0430\u043b\u043b\u043e\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c? \u0417\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a-\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c. \u0418\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c <a href=\"https:\/\/doc.rust-lang.org\/std\/ffi\/struct.OsStr.html\" rel=\"noopener noreferrer nofollow\">&amp;OsStr<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a <code>OsString<\/code>, \u043a\u0430\u043a <code>&amp;str<\/code> \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a <code>String<\/code>, \u0442.\u0435. \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u043e\u043b\u0441\u0442\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c (\u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c + \u0434\u043b\u0438\u043d\u0430 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435) \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0431\u0430\u0439\u0442. \u0410 \u044d\u0442\u0430 \u0441\u0430\u043c\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0433\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e: \u0432 \u043a\u0443\u0447\u0435, \u043d\u0430 \u0441\u0442\u0435\u043a\u0435, \u0437\u0430\u0448\u0438\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438 \u0442.\u0434. \u041d\u043e \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u044d\u0442\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u0441\u0442\u0440\u043e\u043a\u0430, \u0442.\u0435. \u0434\u043b\u044f <code>&amp;OsStr<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043c\u0435\u0442\u043e\u0434\u044b +- \u043a\u0430\u043a \u0443 \u0441\u0442\u0440\u043e\u043a\u0438, \u0430 \u043c\u044b \u0436\u0435 \u043d\u0435 \u043f\u0435\u0440\u0432\u043e\u0431\u044b\u0442\u043d\u044b\u0435 \u043b\u044e\u0434\u0438, \u043c\u044b \u0436\u0438\u0432\u0435\u043c \u0432 21 \u0432\u0435\u043a\u0435, \u043a\u0442\u043e \u0432 2024 \u0433\u043e\u0434\u0443 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u0435\u0442 \u043f\u0443\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0440\u043e\u043a?<\/p>\n<p>\u0422\u043e\u0447\u043d\u043e \u043d\u0435 \u043c\u044b; \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0438\u043f <a href=\"https:\/\/doc.rust-lang.org\/std\/path\/struct.Path.html\" rel=\"noopener noreferrer nofollow\">&amp;Path<\/a>. \u042d\u0442\u043e \u0443\u0436\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0443\u0442\u044c, \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u0443\u0442\u0435\u0439, \u0432\u043d\u0443\u0442\u0440\u0438 \u0443 \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043d\u0430\u043c <code>OsStr<\/code>, \u0442\u0430\u043a \u0447\u0442\u043e \u0442\u0443\u0442 \u0432\u0441\u0435 \u0442\u043e\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e. \u041d\u043e \u0438 \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0435 \u043b\u0443\u0447\u0448\u0435!<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0430\u043f\u043a\u0443 \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u0430\u043a <code>&amp;str<\/code>. \u0418 \u0447\u0442\u043e, \u043d\u0430\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>Path<\/code>, \u0430 \u043c\u043e\u0436\u0435\u0442, \u0435\u0449\u0435 \u0438 <code>OsStr<\/code>, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0442 <code>Path<\/code> \u0441\u043e\u0431\u0440\u0430\u0442\u044c? \u042d\u0442\u043e \u0436\u0435 \u0443\u0436\u0430\u0441 \u043a\u0430\u043a \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e <code>&amp;Path<\/code>, \u0430 <a href=\"https:\/\/doc.rust-lang.org\/std\/convert\/trait.AsRef.html\" rel=\"noopener noreferrer nofollow\">AsRef<code>&lt;Path><\/code><\/a>, \u0442.\u0435. \u0434\u0436\u0435\u043d\u0435\u0440\u0438\u043a. \u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 <code>AsRef<\/code> \u0434\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <code>as_ref()<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0435\u0448\u0435\u0432\u044b\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0435 \u0440\u0430\u0437 \u043d\u0430 \u0432\u0441\u044e \u043d\u0430\u0448\u0443 \u0446\u0435\u043f\u043e\u0447\u043a\u0443:<br \/> \u2014 <code>String<\/code> -> <code>OsString<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e, \u0442.\u043a. \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 \u043d\u0438\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435, \u0438 \u0443 <code>String<\/code> \u0441\u0442\u0440\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439;<br \/> \u2014 <code>OsString<\/code> -> <code>&amp;OsStr<\/code> \u0442\u043e\u0436\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0430\u043b\u0438\u0434\u043d\u043e, \u0442.\u043a., \u043f\u043e \u0441\u0443\u0442\u0438, \u0435\u0441\u043b\u0438 \u0443 <code>OsString<\/code> \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u043e\u043b\u0435 <code>capacity<\/code>, \u0442\u043e \u0443 \u043d\u0430\u0441 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f <code>&amp;OsStr<\/code>;<br \/> \u2014 <code>&amp;OsStr<\/code> -> <code>&amp;Path<\/code> \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u0432\u0430\u043b\u0438\u0434\u043d\u043e, \u0442.\u043a. <code>Path<\/code> \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>OsStr<\/code> \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435, \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0443 \u043d\u0438\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0430\u0445.<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0442\u0438\u043f\u044b (\u0430 \u0435\u0449\u0435 \u0438 <code>&amp;str<\/code>) \u0434\u0435\u0448\u0435\u0432\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 <code>&amp;Path<\/code>. \u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0432 \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u043d\u0430\u043c \u0432\u0438\u0434\u0443.<\/p>\n<p>\u0424\u0443\u0445, \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u043b\u0433\u043e, \u043d\u043e \u044d\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0432\u0442\u043e\u0440\u044b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0430\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0436\u0435 \u0435\u0439 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0412\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043d\u0435\u0442 \u0434\u0430\u0436\u0435 \u043d\u0430\u043c\u0435\u043a\u0430 \u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a \u0434\u0435\u0442\u0430\u043b\u044f\u043c, \u043f\u0440\u0438\u0447\u0435\u043c \u0434\u0430\u0436\u0435 \u0432 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u0445 (<s>Golang \u0438 zero values<\/s>). \u0412\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0443\u0442\u044c \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430. \u0412\u0435\u0434\u044c \u044d\u0442\u043e \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u043e \u2014 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0443\u0442\u0438 \u043f\u043e \u043a\u0443\u0441\u043a\u0430\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a.<\/p>\n<p>\u0412\u0435\u0441\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0443\u0442 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c: \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u0439 \u043a\u043e\u0434, \u0442\u043e \u043e\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0438 \u043d\u0430\u0434 \u043d\u0438\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0443\u043c\u0430\u0442\u044c. \u0418 \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438) \u0434\u0443\u043c\u0430\u044e\u0442 \u043d\u0430\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>Unsafe<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 <code>unsafe<\/code> \u043a\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e. \u0422\u0440\u0443\u0434\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 C, \u0442.\u043a. \u0432 Rust \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. <a href=\"https:\/\/www.youtube.com\/watch?v=vz1_aRlF2TI&amp;list=PLlb7e2G7aSpTfhiECYNI2EZ1uAluUqE_e\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 <code>unsafe<\/code> \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0430 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e Rust<\/a>, <a href=\"https:\/\/youtu.be\/lQyYAmjblt0?list=PLlb7e2G7aSpTfhiECYNI2EZ1uAluUqE_e&amp;t=4428\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u0438\u0441\u0430\u0442\u044c <code>unsafe<\/code> \u043a\u043e\u0434 \u0441\u043b\u043e\u0436\u043d\u043e<\/a>, <a href=\"https:\/\/youtu.be\/C-BpSwZOnNE?list=PLlb7e2G7aSpTfhiECYNI2EZ1uAluUqE_e&amp;t=1355\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0447\u0435\u043c\u0443 \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c unsafe<\/a> \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442 \u0443\u0436\u0435 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0439 \u0410\u043b\u0435\u043a\u0441\u0435\u0439 \u041a\u043b\u0430\u0434\u043e\u0432. \u042f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0430\u0436\u0443: \u0435\u0441\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u0447\u0442\u043e Rust \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u043d\u0435\u043c \u043d\u0430\u0434\u043e \u043f\u0438\u0441\u0430\u0442\u044c <code>unsafe<\/code> \u043a\u043e\u0434, \u0442\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0443 \u043d\u0435\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0441\u0430\u043c \u0444\u0430\u043a\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f <code>unsafe<\/code> \u0434\u0435\u043b\u0430\u0435\u0442 Rust \u0441\u043b\u043e\u0436\u043d\u044b\u043c (\u0438\u043b\u0438 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c), \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043b\u0438\u0431\u043e 100% <code>safe<\/code> \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u0434\u0435.<\/p>\n<\/div>\n<\/details>\n<p>\u0415\u0449\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u044e\u0442 \u0432 \u0432\u0438\u0434\u0443 &#171;\u0440\u0430\u0437\u043c\u0435\u0440&#187; \u044f\u0437\u044b\u043a\u0430. \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u0433\u043e\u0432\u043e\u0440\u044f\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 C \u0438\u043b\u0438 Golang, \u043c\u043e\u043b, \u0432\u043e\u043d \u043a\u0430\u043a\u043e\u0435 \u0432\u0441\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435, \u0432\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u044b\u0443\u0447\u0438\u0442\u044c \u0438 \u0442\u044b \u0443\u0436\u0435 \u0432\u0435\u0441\u044c \u044f\u0437\u044b\u043a \u0437\u043d\u0430\u0435\u0448\u044c! \u042d\u0442\u043e\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u044f \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u0441\u043e\u0432\u0441\u0435\u043c. \u0427\u0442\u043e \u043f\u043e\u0434 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0436\u0435 \u043e\u0442 \u043c\u0435\u043d\u044f \u0443\u0441\u043a\u043e\u043b\u044c\u0437\u0430\u0435\u0442. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432? \u0420\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438? \u0427\u0442\u043e \u0431\u044b \u044d\u0442\u043e \u043d\u0438 \u0437\u043d\u0430\u0447\u0438\u043b\u043e, \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439. \u041d\u0438 C, \u043d\u0438 Golang \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438, \u0440\u0430\u0437\u043c\u0435\u0440 \u0438\u043c \u0442\u0443\u0442 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442. \u042f\u0434\u0440\u043e \u0430\u0442\u043e\u043c\u0430 \u0442\u043e\u0436\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e) \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u044d\u0442\u043e \u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<p>\u041f\u043e \u0442\u0430\u043a\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 Brainfuck \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u041d\u0430 \u0432\u0435\u0441\u044c \u044f\u0437\u044b\u043a \u0432\u0441\u0435\u0433\u043e 8 \u043a\u043e\u043c\u0430\u043d\u0434; \u0435\u0441\u043b\u0438 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c, \u0432\u0441\u0435 \u00ab\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u00bb \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u0440\u043e\u0449\u0435 \u043d\u0435\u043a\u0443\u0434\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0442\u043e\u0433\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0433\u043a\u043e Brainfuck \u043f\u0438\u0441\u0430\u0442\u044c, \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c \u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c, \u044f \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u043c\u0441\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u043c\u043e\u0435\u0439 \u043d\u0435\u0440\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430 \u044d\u0442\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442.<\/p>\n<p>Rust \u0436\u0435 \u043d\u0435 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0442\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c. \u0423 \u043e\u0434\u043d\u043e\u0433\u043e <code>Result<\/code> \u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0441\u0447\u0438\u0442\u0430\u043b 39 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u041c\u043d\u0435 \u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u2014 \u0434\u0435\u043b\u043e \u043e\u0442 \u0441\u0438\u043b\u044b 30 \u0441\u0435\u043a\u0443\u043d\u0434, \u0437\u0430\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0437\u043d\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0438 \u0437\u0430\u0447\u0435\u043c (\u043f\u0440\u043e IDE \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u043b\u0447\u0443, \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043d\u0430\u0434\u043e \u043a\u0443\u0440\u0441\u043e\u0440 \u043d\u0430\u0432\u0435\u0441\u0442\u0438).<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438 \u043e <code>Result<\/code>. \u041c\u043e\u043d\u0430\u0434\u044b \u2014 \u044d\u0442\u043e \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e. \u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u044f \u0447\u0438\u0442\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u043e \u043c\u043e\u043d\u0430\u0434\u044b, \u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0432\u0438\u0434\u0435\u043e \u043f\u0440\u043e \u043d\u0438\u0445, \u043d\u043e \u044f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435 \u043f\u043e\u043c\u043d\u044e, \u043a\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0444\u0443\u043d\u043a\u0442\u043e\u0440 \u0438 \u043a\u0443\u0434\u0430 \u043e\u043d \u043c\u043e\u0440\u0444\u0438\u0440\u0443\u0435\u0442. \u0427\u0442\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u043e\u0434\u0435. \u042d\u0442\u043e \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438! \u0418\u043b\u0438 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041d\u0438\u043a\u0442\u043e, \u0432\u0440\u043e\u0434\u0435, \u0435\u0449\u0435 \u043e\u0442 \u0448\u043e\u043a\u0430 \u043f\u0440\u0438 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0443\u043c\u0435\u0440, \u0430 \u0447\u0435\u043c \u043c\u043e\u043d\u0430\u0434\u044b-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435? \u0421\u043b\u043e\u0432\u043e \u0440\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435, \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 7. \u0417\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0434\u043e\u0436\u0438\u043b \u0434\u043e \u044d\u0442\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u2014 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u0430\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u0430\u0448\u0435 \u0432\u0440\u0435\u043c\u044f. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u043d\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b\u0438 \u0435\u0433\u043e \u0437\u0440\u044f. \u042f \u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u043b, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c 40\u043a \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u0430, \u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u0438\u0448\u0438\u0442\u0435 \u0438\u0445 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c.<\/p>\n<p>\u0418 \u043f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u0432 \u043d\u0430 \u0445\u0430\u0431\u0440\u0435: \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043c\u043e\u0439 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c&#8230; \u0430, \u0443 \u043c\u0435\u043d\u044f \u0436\u0435 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u0430, \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435, \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u044f \u0447\u0438\u0442\u0430\u044e \u0445\u0430\u0431\u0440 \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/804915\/\"> https:\/\/habr.com\/ru\/articles\/804915\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>TL;DR:<br \/> \u2014 \u0432 Rust \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432, \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c;<br \/> \u2014 \u0432 Rust \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e CDD (compiler-driven development, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435). \u042d\u0442\u043e \u043a\u0430\u043a <abbr title=\"Test-driven development, \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\"> \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435&#187;>TDD<\/abbr>, \u0442\u043e\u043b\u044c\u043a\u043e CDD;<br \/> \u2014 Rust \u2014 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u044f\u0437\u044b\u043a, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u0433\u043d\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u041d\u0430 Rust \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0437\u0430\u043c\u0435\u043d\u0443 \u0434\u043b\u044f C \u0438\u043b\u0438 C++. \u041c\u043d\u043e\u0433\u0438\u0435 \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u043d\u0438\u0448\u0430 Rust \u2014 \u044d\u0442\u043e &#171;mission critical&#187; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0430 \u0432\u0441\u0435, \u043a\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u2014 \u0431\u0435\u0437\u0443\u043c\u0446\u044b (<a href=\"https:\/\/www.reddit.com\/r\/golang\/comments\/1ay8ztk\/comment\/krtplkz\/\" rel=\"noopener noreferrer nofollow\">\u0446\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 Rust vs. Golang \u0442\u0440\u0435\u0434\u043e\u0432<\/a>). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0440\u0435\u0434\u0438 \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 Rust, \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043e \u043c\u043d\u0435\u043d\u0438\u0435, \u0447\u0442\u043e memory safety \u0432 Rust \u2014 \u044d\u0442\u043e \u043d\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/1bdw3yp\/fast_development_in_rust_are_we_getting_it_right\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>, <a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/1birmmm\/how_rusts_robustness_saved_my_undergraduate\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>, <a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/1ba1ak5\/anyone_else_like_rust_even_apart_from_the\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/www.reddit.com\/r\/rust\/comments\/1bd3t0s\/c_safety_by_herb_sutter\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>).<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0431\u044b \u0445\u043e\u0442\u0435\u043b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c:<br \/> \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u0437\u0433\u043b\u044f\u0434 \u043d\u0430 Rust \u043a\u0430\u043a \u043d\u0430 &#171;memory safe C&#187; \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u0443\u0436\u0430\u0435\u0442 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f;<br \/> \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u044f \u0441\u043c\u043e\u0442\u0440\u044e \u043d\u0430 Rust \u043a\u0430\u043a \u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044f\u0437\u044b\u043a \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043f\u043e\u0432\u0435\u0437\u043b\u043e \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u043c;<br \/> \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0430 Rust \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0443\u043c\u0430\u044e\u0442;<br \/> \u2014 \u043f\u043e\u0447\u0435\u043c\u0443 Rust \u2014 \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u043b\u0443\u0447\u0448\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u042d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435, \u044f \u043d\u0435 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Rust \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441 \u0447\u0435\u043c-\u0442\u043e \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b, \u0442\u043e \u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043e\u0431\u0441\u0443\u0434\u0438\u043c.<\/p>\n<p>Upd: \u043d\u0435 \u0443\u0441\u043f\u0435\u043b \u044f \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0432\u044b\u043b\u043e\u0436\u0438\u0442\u044c, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e 27 \u043c\u0430\u0440\u0442\u0430 2024 \u0433\u043e\u0434\u0430 \u043d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 <a href=\"https:\/\/www.rustnationuk.com\/\" rel=\"noopener noreferrer nofollow\">Rust Nation UK 2024<\/a> \u0431\u044b\u043b\u043e \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0441 \u0438\u043d\u0442\u0440\u0438\u0433\u0443\u044e\u0449\u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/youtu.be\/6mZRWFQRvmw?t=26498\" rel=\"noopener noreferrer nofollow\">Beyond Safety and Speed: How Rust Fuels Team Productivity<\/a> \u043e\u0442 Lars Bergstrom, Google Android Director of Engineering. \u0412 \u044d\u0442\u043e\u043c \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0442\u0435\u043c \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0438 \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u00ab\u0418 \u0432 \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u041b\u0430\u0440\u0441 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435!\u00bb, \u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443 \u044d\u0442\u043e \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0443 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (\u0442.\u043a. \u044d\u0442\u043e &#8212; \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438). \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0432\u0438\u0434\u0435\u043e \u0432\u0441\u0435\u0433\u043e 30 \u043c\u0438\u043d\u0443\u0442, \u0441\u0441\u044b\u043b\u043a\u0430 \u0441 \u0442\u0430\u0439\u043c\u043a\u043e\u0434\u043e\u043c. \u0412\u0438\u0434\u0438\u043c\u043e, \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 1. \u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0415\u0449\u0435 \u0441\u043e \u0448\u043a\u043e\u043b\u044b \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b C, \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0436\u0435 \u043e\u043d\u043e \u0442\u0430\u043c \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0423 \u043c\u0435\u043d\u044f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0433\u0434\u0435-\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u043a\u043d\u0438\u0433\u0430 \u00ab\u042f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0421\u00bb, \u043d\u043e \u044f \u0435\u0451 \u0442\u0430\u043a \u0438 \u043d\u0435 \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0443\u0436\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u00ab\u0432\u044b\u0443\u0447\u0438\u0442\u044c\u00bb C. \u041a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u043e \u00ab\u0432\u0438\u043d\u043e\u0432\u0430\u0442\u044b\u00bb \u0432 \u044d\u0442\u043e\u043c \u0445\u043e\u043b\u0438\u0432\u0430\u0440\u044b \u043d\u0430 \u0445\u0430\u0431\u0440\u0435. \u0412\u0435\u0434\u044c \u0438\u0437 \u043d\u0438\u0445 \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e C \u2014 \u044d\u0442\u043e \u0436\u043e\u043d\u0433\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u043c\u0438 \u0431\u0435\u043d\u0437\u043e\u043f\u0438\u043b\u0430\u043c\u0438 \u043d\u0430 \u043c\u0438\u043d\u043d\u043e\u043c \u043f\u043e\u043b\u0435 \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435.<\/p>\n<p>\u0414\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u043c \u0438 \u0431\u044b\u043b \u0443\u0432\u0435\u0440\u0435\u043d \u0432 \u0441\u0432\u043e\u0438\u0445 \u0441\u0438\u043b\u0430\u0445, \u044f \u043e\u043f\u0430\u0441\u0430\u043b\u0441\u044f C, \u0431\u043e\u044f\u043b\u0441\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0430\u043f\u0438\u0448\u0443 \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 <code>hello world<\/code> \u0442\u043e \u0442\u0430\u043c \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0431\u0443\u0434\u0435\u0442 UB, use after free, segfault, buffer overflow \u0438 \u0442.\u0434. \u0438 \u0442.\u043f. C \u0438 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u043c\u0443 \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u044e. \u041a\u0430\u043a \u043b\u044e\u0434\u0438 \u0431\u0435\u0437 \u0441\u0442\u0440\u0430\u0445\u0430 \u043f\u0438\u0448\u0443\u0442 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435, \u0433\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 stdout \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430\u0434\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u0442.\u043a. \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0443 C\/C++ \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1 \u043d\u0438\u0448\u0430: <a href=\"https:\/\/daniel.haxx.se\/blog\/2023\/10\/11\/how-i-made-a-heap-overflow-in-curl\/\" rel=\"noopener noreferrer nofollow\">\u043b\u0435\u0433\u0430\u0441\u0438 \u0421\/\u0421++ \u043a\u043e\u0434<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043e\u043b\u0433\u043e \u0438 \u0434\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430 Rust, \u0438 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u0430\u044f \u043d\u0438\u0448\u0430 \u043d\u0435 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0435\u0442.<\/p>\n<p>\u0421 \u043f\u0435\u0440\u0432\u044b\u0445 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 Rust \u043c\u0435\u043d\u044f \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b. \u041e\u043d \u043a\u0430\u043a C, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439! \u0427\u0442\u043e \u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432 \u0436\u0435\u043b\u0435\u0437\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0431\u0435\u0437 UB? \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0442\u043e\u043c, \u0431\u044b\u0432\u0430\u0435\u0442 \u0435\u0449\u0435 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 2. Rust. \u041d\u0430\u0447\u0430\u043b\u043e<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 Python \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Rust \u0431\u044b\u043b\u043e \u0442\u044f\u0436\u0435\u043b\u043e. \u0412\u0435\u0437\u0434\u0435 \u0441\u0441\u044b\u043b\u043a\u0438, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u0433\u043e\u0434\u0430\u043c\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u043e, \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u043b \u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043d\u0438\u0436\u043a\u0438, \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u044e\u0442\u0443\u0431-\u043b\u0435\u043a\u0446\u0438\u0438 \u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u044b \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b. \u041b\u0443\u0447\u0448\u0438\u0439 \u0438\u0437 \u043d\u0438\u0445 \u2014 \u043a\u0443\u0440\u0441 \u043b\u0435\u043a\u0446\u0438\u0439 \u0410\u043b\u0435\u043a\u0441\u0435\u044f &#171;matklad&#187; \u041a\u043b\u0430\u0434\u043e\u0432\u0430 (\u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e <a class=\"mention\" href=\"\/users\/matklad\">@matklad<\/a> \u2014 \u044d\u0442\u043e \u043e\u043d, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u044b, \u043e\u0442\u0437\u043e\u0432\u0438\u0441\u044c) \u0434\u043b\u044f <a href=\"https:\/\/github.com\/matklad\/rust-course\" rel=\"noopener noreferrer nofollow\">Computer Science Center<\/a>. \u0412 \u043d\u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0447\u0435\u0440\u0435\u0437 7 \u0447\u0430\u0441\u043e\u0432 \u043b\u0435\u043a\u0446\u0438\u0439 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0443 \u0446\u0438\u043a\u043b\u043e\u0432, \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u043b\u0435\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u0441\u043b\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u043e<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">#![no_main]    #[link_section=\".text\"]  #[no_mangle]  pub static main: [u32; 9] = [      3237986353,      3355442993,      120950088,      822083584,      252621522,      1699267333,      745499756,      1919899424,      169960556,  ]; <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0418\u043b\u0438 \u043c\u043e\u0439 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u0441\u043b\u0430\u0439\u0434 \u2014 \u00ab\u041c\u043e\u0434\u0435\u043b\u044c \u041f\u0430\u043c\u044f\u0442\u0438 C++ \u0437\u0430 \u041e\u0434\u0438\u043d \u0421\u043b\u0430\u0439\u0434\u00bb (<a href=\"https:\/\/compscicenter.ru\/courses\/rustprogramming\/2019-spring\/classes\/4682\/\" rel=\"noopener noreferrer nofollow\">\u0441\u043b\u0430\u0439\u0434 35<\/a>).<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043c\u0435\u043d\u044f \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b, \u0441 \u0442\u0435\u0445 \u043f\u043e\u0440 \u044f \u043f\u0435\u0440\u0435\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0435\u0433\u043e, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0440\u0430\u0437 \u043f\u044f\u0442\u044c \u0438 \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0430\u0445\u043e\u0436\u0443 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0449\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u043b \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0443\u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u044b \u0434\u043b\u044f \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/raytracing.github.io\/books\/RayTracingInOneWeekend.html\" rel=\"noopener noreferrer nofollow\">Ray Tracing in One Weekend<\/a>, \u0438 \u044f \u0442\u043e\u0436\u0435 \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c <a href=\"https:\/\/github.com\/Lex98\/raytracer\" rel=\"noopener noreferrer nofollow\">\u0441\u0432\u043e\u0439 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u043b\u0443\u0447\u0435\u0439<\/a>. \u042d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 hello world \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0437 \u043a\u043d\u0438\u0433, \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c, \u043a\u0430\u043a \u044f\u0437\u044b\u043a \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438. \u042d\u0442\u043e \u0431\u044b\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e Rust \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u00abmemory safe C\u00bb.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 3. Fearless concurrency<\/h2>\n<p>\u0418\u0437 \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u043b\u0435\u043a\u0446\u0438\u0439 \u044f \u0443\u0436\u0435 \u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u0432 safe Rust \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0433\u043e\u043d\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0447\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 Rust \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435. \u041d\u043e \u0442\u043e \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u043e\u0432\u0430, \u0438\u0445 \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432 \u0434\u0435\u043b\u0435. \u0412 \u043a\u043e\u043d\u0446\u0435 &#171;Ray Tracing in One Weekend&#187; \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a, \u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u2014 \u044d\u0442\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c. \u041f\u043e\u0434 \u043a\u043e\u043d\u0435\u0446 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u044f \u043c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043e\u0442\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e 1080p \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u043d\u043e \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 100 \u043b\u0443\u0447\u0430\u0445 \u043d\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e. \u0418 \u0437\u0432\u0435\u0437\u0434\u044b \u0441\u043e\u0448\u043b\u0438\u0441\u044c: 12-\u0442\u0438 \u044f\u0434\u0435\u0440\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440 \u0438 Rust c \u0431\u0435\u0441\u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0439 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u041f\u043e \u043d\u0430\u0447\u0430\u043b\u0443 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c, \u043c\u044c\u044e\u0442\u0435\u043a\u0441\u044b \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043a\u043e\u0434\u0443 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u043e\u043d\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043a\u043e\u0434 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u043f\u043e \u0441\u0443\u0442\u0438 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u043c. \u0414\u043e\u043b\u0433\u043e \u044f \u0431\u0438\u043b\u0441\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c. \u041d\u043e \u0432\u0441\u0435 \u0436\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"rust\">let rows = img.rows_mut().collect::&lt;Vec&lt;_>>(); std::thread::scope(|scope| {     ...     for (y, chunk) in rows.into_iter().enumerate() {         scope.spawn(move || {             ...             for (x, pixel) in chunk.enumerate() {                 let mut color = Color::default();                 for _ in 0..samples_per_pixel {                     ...                 }                 *pixel = color.as_rgb(samples_per_pixel);             }             ...         });     } });  img.save(\"image.png\").unwrap(); <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043a\u0438. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439. \u041d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u044c\u044e\u0442\u0435\u043a\u0441\u0430 \u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0435\u0449\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0418 \u043e\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0418 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0432 10 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041d\u043e \u0441\u0443\u0442\u044c \u0434\u0430\u0436\u0435 \u043d\u0435 \u0432 \u044d\u0442\u043e\u043c, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e (\u0434\u0430 \u0438 \u0441\u0435\u0439\u0447\u0430\u0441) \u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043d\u043e \u044f \u0437\u0430 \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432 \u0441\u043c\u043e\u0433 \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a.<\/p>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u0442\u043e\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0435\u0442 \u0433\u043e\u043d\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 <code>img.save<\/code> \u0445\u043e\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0431\u044b\u043b \u0431\u044b \u0435\u0449\u0435 \u0436\u0438\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e \u0435\u0449\u0435 \u0432\u0430\u0436\u043d\u043e, \u0432 \u044d\u0442\u043e\u043c Rust \u043d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0432 \u044f\u0437\u044b\u043a \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0413\u043e\u043d\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0437\u0430\u0434\u0430\u0447 \u043d\u0435\u0442 \u0438\u0437-\u0437\u0430 borrow checker&#8217;\u0430 (\u043d\u0435\u043b\u044c\u0437\u044f \u0438\u043c\u0435\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u043d\u043e\u0439 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 (\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0439) \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442), \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f \u0432 <code>std::thread::scope<\/code>.<\/p>\n<p>Upd:<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u0430\u043a<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u044b\u043b \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438, \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e &#171;\u0438\u0437-\u0437\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0432 Rust \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u0439 \u043a\u043e\u0434&#187; \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u043a\u043e\u0440\u0435\u0435 &#171;\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u0432 Rust \u0435\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0443\u043b\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432&#187; \u0447\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0432\u043e\u0434 \u0434\u043b\u044f \u0433\u043e\u0440\u0434\u043e\u0441\u0442\u0438 (\u0434\u0430\u0436\u0435 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0438 \u0438\u0437\u044f\u0449\u0435\u0441\u0442\u0432\u0430 <code>.par_bridge().into_par_iter()<\/code>). \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043c\u043d\u044e, \u043a\u043e\u0433\u0434\u0430 \u044f \u043f\u0438\u0441\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0432 2020 \u0433\u043e\u0434\u0443 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 scoped \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e.<\/p>\n<p>\u0418 \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u043e \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e Rust \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044f \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b <code>Cargo.lock<\/code> \u0438 \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438\u0441\u044c, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043b\u043e\u043c\u0430\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c. \u041c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c 15 \u043c\u0438\u043d\u0443\u0442 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c \u0438\u0437-\u0437\u0430 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0443\u0447\u0448\u0435 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430 15 \u043c\u0438\u043d\u0443\u0442 \u044f \u0441\u043a\u043b\u0435\u0438\u043b 2 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043a\u043e\u0434 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u041a\u0430\u043a\u043e\u0439 \u0435\u0449\u0435 \u044f\u0437\u044b\u043a \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043d\u0430 \u0442\u0430\u043a\u043e\u0435 \u044f \u043d\u0435 \u0437\u043d\u0430\u044e.<\/p>\n<details class=\"spoiler\">\n<summary>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e \u043d\u0430\u0447\u0430\u043b\u0443 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c, \u043c\u044c\u044e\u0442\u0435\u043a\u0441\u044b \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043a\u043e\u0434\u0443 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u043e\u043d\u0438 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043a\u043e\u0434 \u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0441\u044f \u043f\u043e \u0441\u0443\u0442\u0438 \u043e\u0434\u043d\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u043c. \u0414\u043e\u043b\u0433\u043e \u044f \u0431\u0438\u043b\u0441\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043a\u0430 \u044f \u043d\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b \u043f\u0440\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"https:\/\/docs.rs\/rayon\/latest\/rayon\/\" rel=\"noopener noreferrer nofollow\">rayon<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0449\u0435. \u042f \u0434\u043e\u043b\u0433\u043e \u043d\u0435 \u043c\u043e\u0433 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u0436\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u0438\u0434\u0438\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0435\u0451 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0438 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u043e\u0435:<\/p>\n<details class=\"spoiler\">\n<summary>\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/summary>\n<div class=\"spoiler__content\">\n<p><a href=\"https:\/\/github.com\/Lex98\/raytracer\/blob\/42a2a95ab920acf32539dcc5c3dcaa8641e5afd7\/raytracer\/src\/main.rs#L36\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434<\/a><\/p>\n<pre><code class=\"rust\">... use rayon::ThreadPoolBuilder; use num_cpus; ...  fn main() {     ...     let samples_per_pixel = 100;     let pool = ThreadPoolBuilder::new()         .num_threads(num_cpus::get())         .build()         .unwrap();      let mut img = RgbImage::new(image_width, image_height);      ...      let mut pixels = img.enumerate_pixels_mut().collect::&lt;Vec&lt;_>>();     pool.scope(|scope| {         \u2026         for chunk in pixels.chunks_mut(image_width as usize) {             scope.spawn(move |_| {                 for (x, y, pixel) in chunk {                     ...                     for _ in 0..samples_per_pixel {                         ...                     }                     **pixel = color.as_rgb(samples_per_pixel);                 }                 ...             });         }     });      img.save(\"image.png\").unwrap(); }  <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0443\u043b \u043f\u043e\u0442\u043e\u043a\u043e\u0432. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439. \u041d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u044c\u044e\u0442\u0435\u043a\u0441\u0430 \u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0435\u0449\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438. \u0418 \u043e\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0418 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0432 10 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041d\u043e \u0441\u0443\u0442\u044c \u0434\u0430\u0436\u0435 \u043d\u0435 \u0432 \u044d\u0442\u043e\u043c, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u043e (\u0434\u0430 \u0438 \u0441\u0435\u0439\u0447\u0430\u0441) \u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043d\u043e \u044f \u0437\u0430 \u043f\u0430\u0440\u0443 \u0447\u0430\u0441\u043e\u0432 \u0441\u043c\u043e\u0433 \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0431\u0435\u0437 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a.<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/details>\n<p>\u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0434\u0430\u0447, \u0435\u0441\u0442\u044c \u043f\u0443\u043b \u0432\u043e\u0440\u043a\u0435\u0440\u043e\u0432 \u0438 \u0435\u0441\u0442\u044c \u043f\u0430\u0447\u043a\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-372582","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=372582"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372582\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=372582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=372582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=372582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}