{"id":348023,"date":"2023-05-29T21:00:47","date_gmt":"2023-05-29T21:00:47","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=348023"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=348023","title":{"rendered":"<span>Lua: \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u044f\u0437\u044b\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0433<\/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<p><a href=\"https:\/\/www.lua.org\/about.html\" rel=\"noopener noreferrer nofollow\">Lua<\/a> \u2014 \u044d\u0442\u043e, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043c\u043e\u0439 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 &#171;\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u044f\u0437\u044b\u043a&#187;, \u0441 \u043d\u0438\u0437\u043a\u043e\u0439 \u043a\u043e\u0433\u043d\u0438\u0442\u0438\u0432\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u043e\u0439 \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438. \u041e\u043d \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u0435 \u041f\u041e, \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u043a <a href=\"https:\/\/redis.io\/docs\/manual\/programmability\/eval-intro\/\" rel=\"noopener noreferrer nofollow\">Redis<\/a>, <a href=\"https:\/\/openresty.org\/en\/\" rel=\"noopener noreferrer nofollow\">NGINX \u0447\u0435\u0440\u0435\u0437 OpenResty<\/a> \u0438 <a href=\"https:\/\/wiki.wireshark.org\/Lua\" rel=\"noopener noreferrer nofollow\">Wireshark<\/a> (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434.:<\/em> <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_applications_using_Lua\" rel=\"noopener noreferrer nofollow\">\u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435<\/a>). \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0438\u0433\u0440\u0430\u0445, \u043a\u0430\u043a <a href=\"https:\/\/wow.gamepedia.com\/Lua\" rel=\"noopener noreferrer nofollow\">World of Warcraft<\/a> \u0438 <a href=\"https:\/\/luau-lang.org\/\" rel=\"noopener noreferrer nofollow\">Roblox \u0447\u0435\u0440\u0435\u0437 Luau<\/a> (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434.:<\/em> <a href=\"https:\/\/en.wikipedia.org\/wiki\/Category:Lua_(programming_language)-scripted_video_games\" rel=\"noopener noreferrer nofollow\">\u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445<\/a>). \u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u2014 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u0438\u0435 \u0432 \u043b\u044e\u0431\u0432\u0438 \u044f\u0437\u044b\u043a\u0443 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0442\u043e\u0433\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u043c\u043d\u0435 \u0442\u0430\u043a \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0f7\/a40\/096\/0f7a40096fb4c776023843a8ec838d39.png\" alt=\"\u041b\u043e\u0433\u043e\u0442\u0438\u043f \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Lua\" title=\"\u041b\u043e\u0433\u043e\u0442\u0438\u043f \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Lua\" width=\"1440\" height=\"485\"><\/p>\n<div><figcaption>\u041b\u043e\u0433\u043e\u0442\u0438\u043f \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Lua<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430<\/h3>\n<p>\u0412 Lua \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0444\u0438\u0447 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432 \u044f\u0437\u044b\u043a\u0435 \u0432\u0441\u0435\u0433\u043e 8 \u0442\u0438\u043f\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><code>nil<\/code><\/p>\n<\/li>\n<li>\n<p><code>boolean<\/code><\/p>\n<\/li>\n<li>\n<p><code>number<\/code><\/p>\n<\/li>\n<li>\n<p><code>string<\/code><\/p>\n<\/li>\n<li>\n<p><code>userdata<\/code> (\u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0421-\u0448\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0431\u043b\u043e\u043a\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u043a\u0443\u0447\u0435)<\/p>\n<\/li>\n<li>\n<p><code>function<\/code><\/p>\n<\/li>\n<li>\n<p><code>thread<\/code> (\u0434\u043b\u044f \u043a\u043e\u0440\u0443\u0442\u0438\u043d)<\/p>\n<\/li>\n<li>\n<p><code>table<\/code> (\u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438, \u043f\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445)<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u0442 \u043d\u0443\u0436\u0434\u044b \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043e <code>float<\/code>, <code>int<\/code>, <code>usize<\/code>. \u041d\u0435\u0442 \u043d\u0443\u0436\u043d\u044b \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f\u0445 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u0445, \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u0445 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445. \u0414\u0430\u0436\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0442\u0443\u0442 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u044b (<code>table<\/code>) \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u0430-\u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 (<code>metatables<\/code>, <em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432.<\/em>: \u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430\u0445, \u043a\u0430\u043a \u0432 JavaScript). \u0422\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0432\u043e \u0432\u0441\u0451\u043c \u0434\u0435\u043b\u0430\u0435\u0442 Lua \u043b\u0451\u0433\u043a\u0438\u043c \u0432 \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0443\u044e \u043c\u043e\u0449\u044c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0443 \u043d\u0430 Lua:<\/p>\n<pre><code class=\"lua\">-- \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u0434\u0432\u0443\u0445 \u0442\u0438\u0440\u0435  function binary_search(array, value)     local low = 1     local high = #array -- # \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432\u0437\u044f\u0442\u0438\u044f \u0434\u043b\u0438\u043d\u044b      while low &lt;= high do         -- \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u0447\u0435\u0440\u0435\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443         local mid = math.floor((low + high) \/ 2)         local mid_value = array[mid]          if mid_value &lt; value then             low = mid + 1         elseif mid_value &gt; value then             high = mid - 1         else             return mid         end     end      return nil end  res = binary_search({2, 4, 6, 8, 9}, 6) print(res) <\/code><\/pre>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 Lua. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c, \u044d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>local<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432.:<\/em> \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e). \u041f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0441\u0435 \u043e\u043d\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b, \u0442\u0430\u043a \u0447\u0442\u043e <code>local<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u0422\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u044f<\/h3>\n<p>Lua \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435 \u0438 \u043b\u0451\u0433\u043a\u043e\u0441\u0442\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 C. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, Lua &#8212; \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 (DSL-\u0435\u0439), \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <a href=\"http:\/\/terralang.org\/\" rel=\"noopener noreferrer nofollow\">Terra<\/a>, <a href=\"https:\/\/moonscript.org\/\" rel=\"noopener noreferrer nofollow\">MoonScript<\/a> \u0438 <a href=\"https:\/\/fennel-lang.org\/\" rel=\"noopener noreferrer nofollow\">Fennel<\/a>.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u0440\u0430\u0442\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0432\u043e\u0442 \u0442\u043e\u0442 \u0436\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 MoonScript \u0438 Fennel \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e:<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>binary_search = (array, value) -&gt;     low = 1     high = #array      while low &lt;= high         mid = math.floor((low + high) \/ 2)         mid_value = array[mid]          if mid_value &lt; value             low = mid + 1         else if mid_value &gt; value             high = mid - 1         else             return mid      return nil  print binary_search {2, 4, 6, 8, 9}, 6 <\/code><\/pre>\n<pre><code>(fn binary-search [array value]   (var low 1)   (var high (length array))   (var ret nil)   (while (&lt;= low high)     (local mid (math.floor (\/ (+ low high) 2)))     (local mid-value (. array mid))     (if (&lt; mid-value value) (set low (+ mid 1))         (&gt; mid-value value) (set high (- mid 1))         (do           (set ret mid)           (set low high)))) ; no early returns in Fennel   ret) (local res (binary-search [2 4 6 8 9] 6)) (print res) <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>\u0412\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c<\/h3>\n<p>\u041d\u043e \u0438\u0441\u0442\u0438\u043d\u043d\u0430\u044f \u0441\u0438\u043b\u0430 \u044f\u0437\u044b\u043a\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e &#8212; Lua \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b-\u0445\u043e\u0441\u0442\u0430, \u0442\u0438\u043f\u0430 Redis. \u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e, \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 C, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Lua \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <a href=\"https:\/\/fengari.io\/\" rel=\"noopener noreferrer nofollow\">Javascript (\u0441 Fengari)<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/github.com\/yuin\/gopher-lua\" rel=\"noopener noreferrer nofollow\">Go (c GopherLua)<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e, \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a <a href=\"https:\/\/create.roblox.com\/docs\/scripting\/luau\" rel=\"noopener noreferrer nofollow\">Luau \u0434\u043b\u044f \u0438\u0433\u0440\u044b Roblox<\/a>.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u0434\u043d\u043e \u0438\u0437 \u043c\u043e\u0438\u0445 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 Lua \u2014 \u044d\u0442\u043e HAProxy, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u0441 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0430 Apache + mod_php \u0441\u043a\u0440\u0438\u043f\u0442\u0438\u043d\u0433\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e HAProxy, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c:<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">local function fortune(applet)     local responses = {         {             quote = \"The only people who never fail are those who never try.\",             author = \"Ilka Chase\"         },         {             quote = \"The mind that is anxious about future events is miserable.\",             author = \"Seneca\"         },         {             quote = \"A leader is a dealer in hope.\",             author = \"Napoleon Bonaparte\"         },         {             quote = \"Do not wait to strike until the iron is hot; but make it hot by striking.\",             author = \"William B. Sprague\"         },         {             quote = \"You have power over your mind - not outside events. Realize this, and you will find strength.\",             author = \"Marcus Aurelius\"         }     }      local response = responses[math.random(#responses)]     local resp = string.format([[         &lt;html&gt;             &lt;body&gt;                 &lt;p&gt;%s&lt;br&gt;&amp;nbsp;&amp;nbsp;--%s&lt;\/p&gt;             &lt;\/body&gt;         &lt;\/html&gt;     ]], response.quote, response.author)      applet:set_status(200)     applet:add_header(\"content-length\", string.len(resp))     applet:add_header(\"content-type\", \"text\/html\")     applet:start_response()     applet:send(resp) end  core.register_service(\"fortune\", \"http\", fortune) <\/code><\/pre>\n<pre><code>global     lua-load fortune.lua  defaults     retries                 3     timeout http-request    10s     timeout queue           1m     timeout connect         10s     timeout client          1m     timeout server          1m     timeout http-keep-alive 10s     timeout check           10s  frontend fe_main     bind :8080     mode http     http-request use-service lua.fortune if { path \/fortune } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0418 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0451:<\/p>\n<pre><code class=\"bash\">$ haproxy -f haproxy.cfg<\/code><\/pre>\n<pre><code class=\"bash\">$ curl localhost:8080\/fortune     &lt;html&gt;     &lt;body&gt;     &lt;p&gt;Do not wait to strike until the iron is hot; but make it hot by striking.&lt;br&gt;&amp;nbsp;&amp;nbsp;--William B. Sprague&lt;\/p&gt;     &lt;\/body&gt;     &lt;\/html&gt; <\/code><\/pre>\n<p>\u0417\u0430\u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c? \u041b\u0435\u0433\u043a\u043e \u0432\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0443\u0436\u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u043e \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443. \u0418\u043b\u0438 \u0436\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 (endpoint) \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 (healthcheck) Redis-\u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">-- \u044d\u0442\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u0444\u043e\u0440\u043a redis-lua \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 TLS: local redis = require(\"redis-tls\")  local settings = { host = \"127.0.0.1\", port = 6379, database = 14, password = nil, }  local utils = { create_client = function(params) local client = redis.connect(params.host, params.port, 1, false) if params.password then client:auth(params.password) end return client end, }  local function redis_health(applet) -- pcall \u043a\u0430\u043a try\/catch, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, -- \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 true\/false \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 local ok, client = pcall(utils.create_client, settings) if not ok then local string_resp = '{\"ok\":false}\\n' applet:set_status(500) applet:add_header(\"content-length\", string.len(string_resp)) applet:add_header(\"content-type\", \"application\/json\") applet:start_response() applet:send(string_resp) return end  local resp = client:ping() local string_resp = string.format('{\"ok\":%s}\\n', resp) applet:set_status(200) applet:add_header(\"content-length\", string.len(string_resp)) applet:add_header(\"content-type\", \"application\/json\") applet:start_response() applet:send(string_resp) end  core.register_service(\"redis_health\", \"http\", redis_health) <\/code><\/pre>\n<pre><code>global     lua-load redis.lua  frontend fe_main     bind :8080     mode http     http-request use-service lua.redis_health if { path \/redis_health } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>Redis-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\/\u043b\u0435\u0436\u0438\u0442:<\/p>\n<pre><code class=\"bash\">$ curl 127.0.0.1:8080\/redis_health   {\"ok\":false}<\/code><\/pre>\n<p>Redis-\u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d:<\/p>\n<pre><code class=\"bash\">$ curl 127.0.0.1:8080\/redis_health   {\"ok\":true}<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>register_action<\/code> \u0438 <code>register_fetches<\/code> (\u0441\u043c. <a href=\"https:\/\/manpages.ubuntu.com\/manpages\/impish\/man1\/haproxy-lua.1.html\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0438<\/a>) \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u0432\u0435\u0440\u0445 \u041f\u041e \u0431\u0435\u0437 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e<\/h3>\n<p>\u041e\u043d\u043e \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0432\u0435\u043b\u0438\u043a\u043e, \u043d\u043e \u0432 \u043d\u0451\u043c \u0432\u0435\u0434\u0451\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043e\u043a, \u0430 \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 <a href=\"https:\/\/luarocks.org\/\" rel=\"noopener noreferrer nofollow\">LuaRocks<\/a>. \u041e\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f <a href=\"https:\/\/luarocks.org\/modules\/openresty\/lua-cjson\" rel=\"noopener noreferrer nofollow\">\u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438 JSON<\/a> \u0434\u043e <a href=\"https:\/\/luarocks.org\/modules\/tieske\/penlight\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0439 \u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435<\/a> (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434.:<\/em> \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f <a href=\"https:\/\/tweaked.cc\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u0432 Minecraft<\/a>) &#8212; \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u0430\u0439\u0434\u0451\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451.<\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 <a href=\"https:\/\/leafo.net\/\" rel=\"noopener noreferrer nofollow\">\u041b\u0438\u0444 \u041a\u043e\u0440\u043a\u043e\u0440\u0430\u043d (Leaf Corcoran)<\/a>, \u043d\u0430\u043f\u0438\u0441\u0430\u0432\u0448\u0438\u0439 <a href=\"https:\/\/leafo.net\/lapis\/\" rel=\"noopener noreferrer nofollow\">Lapis<\/a> &#8212; \u0444\u0430\u043d\u0442\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 OpenResty, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0430\u0439\u0442 LuaRocks.<\/p>\n<p><em>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434.:<\/em> \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432, \u0432 Lua \u043d\u0435\u0442 \u043d\u0438 \u043c\u0435\u043b\u043a\u0438\u0445, \u043d\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u043a\u0430\u043d\u0434\u0430\u043b\u043e\u0432 \u0438\u043b\u0438 \u0438\u043d\u0442\u0440\u0438\u0433 (\u0441\u043c. Rust ?:  <a href=\"https:\/\/thephd.dev\/i-am-no-longer-speaking-at-rustconf-2023\" rel=\"noopener noreferrer nofollow\">^1<\/a>, <a href=\"https:\/\/www.jntrnr.com\/why-i-left-rust\/\" rel=\"noopener noreferrer nofollow\">^2<\/a>, <a href=\"https:\/\/gist.github.com\/fasterthanlime\/42da9378768aebef662dd26dddf04849\" rel=\"noopener noreferrer nofollow\">^3<\/a>)<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0415\u0441\u0442\u044c \u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0432\u044b\u0432\u043e\u0434? Lua \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/tylerneylon.com\/a\/learn-lua\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435<\/a> \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0451\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 HAProxy, \u0430\u0434\u0434\u043e\u043d\u043e\u0432 \u0434\u043b\u044f World of Warcraft, \u0438\u0433\u0440 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 Roblox, <a href=\"https:\/\/awesomewm.org\/\" rel=\"noopener noreferrer nofollow\">\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u043a\u043e\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430<\/a>, <a href=\"https:\/\/nmap.org\/\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0435\u0442\u044f\u043c\u0438<\/a> \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0430\u0441 \u0447\u0443\u0442\u043e\u0447\u043a\u0443 \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0435\u0435.<\/p>\n<p><em>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434.:<\/em> \u0438 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u0434\u0432\u0438\u0436\u043a\u0438 &#8212; <a href=\"https:\/\/love2d.org\/\" rel=\"noopener noreferrer nofollow\">Love2D<\/a>, <a href=\"https:\/\/defold.com\/\" rel=\"noopener noreferrer nofollow\">Defold<\/a> \u0438 <a href=\"https:\/\/github.com\/tsnake41\/raylib-lua\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Raylib<\/a>.<\/p>\n<hr>\n<p>\u041e\u0442 \u0441\u0435\u0431\u044f \u044f \u0431\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/fennel-lang.org\" rel=\"noopener noreferrer nofollow\">Fennel<\/a>, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0439 \u0432\u044b\u0448\u0435 \u0432 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435. \u042d\u0442\u043e LISP, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 Lua \u2014 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c Lua c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c\u044e LISP-\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>\u0410 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 HABR23. \u0413\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0435 \u0441\u043a\u0430\u0436\u0443, \u0430 \u0442\u043e \u0440\u0435\u043a\u043b\u0430\u043c\u0430 \ud83d\ude42<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u044f \u0432\u0435\u0434\u0443 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u043a\u0430\u043d\u0430\u043b \u0434\u043b\u044f \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0438 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u0432 IT, <a href=\"https:\/\/t.me\/novusnota\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c, \u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435!<\/a><\/p>\n<\/p>\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\/738414\/\"> https:\/\/habr.com\/ru\/articles\/738414\/<\/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<p><a href=\"https:\/\/www.lua.org\/about.html\" rel=\"noopener noreferrer nofollow\">Lua<\/a> \u2014 \u044d\u0442\u043e, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043c\u043e\u0439 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 &#171;\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u044f\u0437\u044b\u043a&#187;, \u0441 \u043d\u0438\u0437\u043a\u043e\u0439 \u043a\u043e\u0433\u043d\u0438\u0442\u0438\u0432\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u043e\u0439 \u0432 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438. \u041e\u043d \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u0435 \u041f\u041e, \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u043a <a href=\"https:\/\/redis.io\/docs\/manual\/programmability\/eval-intro\/\" rel=\"noopener noreferrer nofollow\">Redis<\/a>, <a href=\"https:\/\/openresty.org\/en\/\" rel=\"noopener noreferrer nofollow\">NGINX \u0447\u0435\u0440\u0435\u0437 OpenResty<\/a> \u0438 <a href=\"https:\/\/wiki.wireshark.org\/Lua\" rel=\"noopener noreferrer nofollow\">Wireshark<\/a> (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434.:<\/em> <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_applications_using_Lua\" rel=\"noopener noreferrer nofollow\">\u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435<\/a>). \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0438\u0433\u0440\u0430\u0445, \u043a\u0430\u043a <a href=\"https:\/\/wow.gamepedia.com\/Lua\" rel=\"noopener noreferrer nofollow\">World of Warcraft<\/a> \u0438 <a href=\"https:\/\/luau-lang.org\/\" rel=\"noopener noreferrer nofollow\">Roblox \u0447\u0435\u0440\u0435\u0437 Luau<\/a> (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434.:<\/em> <a href=\"https:\/\/en.wikipedia.org\/wiki\/Category:Lua_(programming_language)-scripted_video_games\" rel=\"noopener noreferrer nofollow\">\u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445<\/a>). \u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u2014 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u0438\u0435 \u0432 \u043b\u044e\u0431\u0432\u0438 \u044f\u0437\u044b\u043a\u0443 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0442\u043e\u0433\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u043c\u043d\u0435 \u0442\u0430\u043a \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041b\u043e\u0433\u043e\u0442\u0438\u043f \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Lua<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430<\/h3>\n<p>\u0412 Lua \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0444\u0438\u0447 \u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432 \u044f\u0437\u044b\u043a\u0435 \u0432\u0441\u0435\u0433\u043e 8 \u0442\u0438\u043f\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><code>nil<\/code><\/p>\n<\/li>\n<li>\n<p><code>boolean<\/code><\/p>\n<\/li>\n<li>\n<p><code>number<\/code><\/p>\n<\/li>\n<li>\n<p><code>string<\/code><\/p>\n<\/li>\n<li>\n<p><code>userdata<\/code> (\u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0421-\u0448\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0431\u043b\u043e\u043a\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u043a\u0443\u0447\u0435)<\/p>\n<\/li>\n<li>\n<p><code>function<\/code><\/p>\n<\/li>\n<li>\n<p><code>thread<\/code> (\u0434\u043b\u044f \u043a\u043e\u0440\u0443\u0442\u0438\u043d)<\/p>\n<\/li>\n<li>\n<p><code>table<\/code> (\u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438, \u043f\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445)<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u0442 \u043d\u0443\u0436\u0434\u044b \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043e <code>float<\/code>, <code>int<\/code>, <code>usize<\/code>. \u041d\u0435\u0442 \u043d\u0443\u0436\u043d\u044b \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\u0441\u044f \u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f\u0445 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u0445, \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u0445 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445. \u0414\u0430\u0436\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0442\u0443\u0442 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u044b (<code>table<\/code>) \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u0430-\u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 (<code>metatables<\/code>, <em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432.<\/em>: \u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430\u0445, \u043a\u0430\u043a \u0432 JavaScript). \u0422\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0432\u043e \u0432\u0441\u0451\u043c \u0434\u0435\u043b\u0430\u0435\u0442 Lua \u043b\u0451\u0433\u043a\u0438\u043c \u0432 \u043e\u0441\u0432\u043e\u0435\u043d\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0443\u044e \u043c\u043e\u0449\u044c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0443 \u043d\u0430 Lua:<\/p>\n<pre><code class=\"lua\">-- \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 \u0434\u0432\u0443\u0445 \u0442\u0438\u0440\u0435  function binary_search(array, value)     local low = 1     local high = #array -- # \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432\u0437\u044f\u0442\u0438\u044f \u0434\u043b\u0438\u043d\u044b      while low &lt;= high do         -- \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u0447\u0435\u0440\u0435\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443         local mid = math.floor((low + high) \/ 2)         local mid_value = array[mid]          if mid_value &lt; value then             low = mid + 1         elseif mid_value &gt; value then             high = mid - 1         else             return mid         end     end      return nil end  res = binary_search({2, 4, 6, 8, 9}, 6) print(res) <\/code><\/pre>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 Lua. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c, \u044d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>local<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432.:<\/em> \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e). \u041f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0441\u0435 \u043e\u043d\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b, \u0442\u0430\u043a \u0447\u0442\u043e <code>local<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u0422\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u044f<\/h3>\n<p>Lua \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u043e\u0439 \u0446\u0435\u043b\u044c\u044e \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435 \u0438 \u043b\u0451\u0433\u043a\u043e\u0441\u0442\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 C. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, Lua &#8212; \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 (DSL-\u0435\u0439), \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <a href=\"http:\/\/terralang.org\/\" rel=\"noopener noreferrer nofollow\">Terra<\/a>, <a href=\"https:\/\/moonscript.org\/\" rel=\"noopener noreferrer nofollow\">MoonScript<\/a> \u0438 <a href=\"https:\/\/fennel-lang.org\/\" rel=\"noopener noreferrer nofollow\">Fennel<\/a>.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u0440\u0430\u0442\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0432\u043e\u0442 \u0442\u043e\u0442 \u0436\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 MoonScript \u0438 Fennel \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e:<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>binary_search = (array, value) -&gt;     low = 1     high = #array      while low &lt;= high         mid = math.floor((low + high) \/ 2)         mid_value = array[mid]          if mid_value &lt; value             low = mid + 1         else if mid_value &gt; value             high = mid - 1         else             return mid      return nil  print binary_search {2, 4, 6, 8, 9}, 6 <\/code><\/pre>\n<pre><code>(fn binary-search [array value]   (var low 1)   (var high (length array))   (var ret nil)   (while (&lt;= low high)     (local mid (math.floor (\/ (+ low high) 2)))     (local mid-value (. array mid))     (if (&lt; mid-value value) (set low (+ mid 1))         (&gt; mid-value value) (set high (- mid 1))         (do           (set ret mid)           (set low high)))) ; no early returns in Fennel   ret) (local res (binary-search [2 4 6 8 9] 6)) (print res) <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>\u0412\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c<\/h3>\n<p>\u041d\u043e \u0438\u0441\u0442\u0438\u043d\u043d\u0430\u044f \u0441\u0438\u043b\u0430 \u044f\u0437\u044b\u043a\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e &#8212; Lua \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b-\u0445\u043e\u0441\u0442\u0430, \u0442\u0438\u043f\u0430 Redis. \u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e, \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 C, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b Lua \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <a href=\"https:\/\/fengari.io\/\" rel=\"noopener noreferrer nofollow\">Javascript (\u0441 Fengari)<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/github.com\/yuin\/gopher-lua\" rel=\"noopener noreferrer nofollow\">Go (c GopherLua)<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e, \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a <a href=\"https:\/\/create.roblox.com\/docs\/scripting\/luau\" rel=\"noopener noreferrer nofollow\">Luau \u0434\u043b\u044f \u0438\u0433\u0440\u044b Roblox<\/a>.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u0434\u043d\u043e \u0438\u0437 \u043c\u043e\u0438\u0445 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 Lua \u2014 \u044d\u0442\u043e HAProxy, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u0441 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0430 Apache + mod_php \u0441\u043a\u0440\u0438\u043f\u0442\u0438\u043d\u0433\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e HAProxy, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c:<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">local function fortune(applet)     local responses = {         {             quote = \"The only people who never fail are those who never try.\",             author = \"Ilka Chase\"         },         {             quote = \"The mind that is anxious about future events is miserable.\",             author = \"Seneca\"         },         {             quote = \"A leader is a dealer in hope.\",             author = \"Napoleon Bonaparte\"         },         {             quote = \"Do not wait to strike until the iron is hot; but make it hot by striking.\",             author = \"William B. Sprague\"         },         {             quote = \"You have power over your mind - not outside events. Realize this, and you will find strength.\",             author = \"Marcus Aurelius\"         }     }      local response = responses[math.random(#responses)]     local resp = string.format([[         &lt;html&gt;             &lt;body&gt;                 &lt;p&gt;%s&lt;br&gt;&amp;nbsp;&amp;nbsp;--%s&lt;\/p&gt;             &lt;\/body&gt;         &lt;\/html&gt;     ]], response.quote, response.author)      applet:set_status(200)     applet:add_header(\"content-length\", string.len(resp))     applet:add_header(\"content-type\", \"text\/html\")     applet:start_response()     applet:send(resp) end  core.register_service(\"fortune\", \"http\", fortune) <\/code><\/pre>\n<pre><code>global     lua-load fortune.lua  defaults     retries                 3     timeout http-request    10s     timeout queue           1m     timeout connect         10s     timeout client          1m     timeout server          1m     timeout http-keep-alive 10s     timeout check           10s  frontend fe_main     bind :8080     mode http     http-request use-service lua.fortune if { path \/fortune } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0418 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0451:<\/p>\n<pre><code class=\"bash\">$ haproxy -f haproxy.cfg<\/code><\/pre>\n<pre><code class=\"bash\">$ curl localhost:8080\/fortune     &lt;html&gt;     &lt;body&gt;     &lt;p&gt;Do not wait to strike until the iron is hot; but make it hot by striking.&lt;br&gt;&amp;nbsp;&amp;nbsp;--William B. Sprague&lt;\/p&gt;     &lt;\/body&gt;     &lt;\/html&gt; <\/code><\/pre>\n<p>\u0417\u0430\u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c? \u041b\u0435\u0433\u043a\u043e \u0432\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0443\u0436\u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u043e \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443. \u0418\u043b\u0438 \u0436\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 (endpoint) \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 (healthcheck) Redis-\u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"lua\">-- \u044d\u0442\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u0444\u043e\u0440\u043a redis-lua \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 TLS: local redis = require(\"redis-tls\")  local settings = { host = \"127.0.0.1\", port = 6379, database = 14, password = nil, }  local utils = { create_client = function(params) local client = redis.connect(params.host, params.port, 1, false) if params.password then client:auth(params.password) end return client end, }  local function redis_health(applet) -- pcall \u043a\u0430\u043a try\/catch, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, -- \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 true\/false \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 local ok, client = pcall(utils.create_client, settings) if not ok then local string_resp = '{\"ok\":false}\\n' applet:set_status(500) applet:add_header(\"content-length\", string.len(string_resp)) applet:add_header(\"content-type\", \"application\/json\") applet:start_response() applet:send(string_resp) return end  local resp = client:ping() local string_resp = string.format('{\"ok\":%s}\\n', resp) applet:set_status(200) applet:add_header(\"content-length\", string.len(string_resp)) applet:add_header(\"content-type\", \"application\/json\") applet:start_response() applet:send(string_resp) end  core.register_service(\"redis_health\", \"http\", redis_health) <\/code><\/pre>\n<pre><code>global     lua-load redis.lua  frontend fe_main     bind :8080     mode http     http-request use-service lua.redis_health if { path \/redis_health } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>Redis-\u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\/\u043b\u0435\u0436\u0438\u0442:<\/p>\n<pre><code class=\"bash\">$ curl 127.0.0.1:8080\/redis_health   {\"ok\":false}<\/code><\/pre>\n<p>Redis-\u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d:<\/p>\n<pre><code class=\"bash\">$ curl 127.0.0.1:8080\/redis_health   {\"ok\":true}<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>register_action<\/code> \u0438 <code>register_fetches<\/code> (\u0441\u043c. <a href=\"https:\/\/manpages.ubuntu.com\/manpages\/impish\/man1\/haproxy-lua.1.html\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0438<\/a>) \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u0432\u0435\u0440\u0445 \u041f\u041e \u0431\u0435\u0437 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e<\/h3>\n<p>\u041e\u043d\u043e \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0432\u0435\u043b\u0438\u043a\u043e, \u043d\u043e \u0432 \u043d\u0451\u043c \u0432\u0435\u0434\u0451\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043e\u043a, \u0430 \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 <a href=\"https:\/\/luarocks.org\/\" rel=\"noopener noreferrer nofollow\">LuaRocks<\/a>. \u041e\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f <a href=\"https:\/\/luarocks.org\/modules\/openresty\/lua-cjson\" rel=\"noopener noreferrer nofollow\">\u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0438 JSON<\/a> \u0434\u043e <a href=\"https:\/\/luarocks.org\/modules\/tieske\/penlight\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0439 \u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435<\/a> (<em>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434.:<\/em> \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f <a href=\"https:\/\/tweaked.cc\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 \u0432 Minecraft<\/a>) &#8212; \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u0430\u0439\u0434\u0451\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451.<\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 <a href=\"https:\/\/leafo.net\/\" rel=\"noopener noreferrer nofollow\">\u041b\u0438\u0444 \u041a\u043e\u0440\u043a\u043e\u0440\u0430\u043d (Leaf Corcoran)<\/a>, \u043d\u0430\u043f\u0438\u0441\u0430\u0432\u0448\u0438\u0439 <a href=\"https:\/\/leafo.net\/lapis\/\" rel=\"noopener noreferrer nofollow\">Lapis<\/a> &#8212; \u0444\u0430\u043d\u0442\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u0431-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430 OpenResty, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0430\u0439\u0442 LuaRocks.<\/p>\n<p><em>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434.:<\/em> \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432, \u0432 Lua \u043d\u0435\u0442 \u043d\u0438 \u043c\u0435\u043b\u043a\u0438\u0445, \u043d\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u043a\u0430\u043d\u0434\u0430\u043b\u043e\u0432 \u0438\u043b\u0438 \u0438\u043d\u0442\u0440\u0438\u0433 (\u0441\u043c. Rust ?:  <a href=\"https:\/\/thephd.dev\/i-am-no-longer-speaking-at-rustconf-2023\" rel=\"noopener noreferrer nofollow\">^1<\/a>, <a href=\"https:\/\/www.jntrnr.com\/why-i-left-rust\/\" rel=\"noopener noreferrer nofollow\">^2<\/a>, <a href=\"https:\/\/gist.github.com\/fasterthanlime\/42da9378768aebef662dd26dddf04849\" rel=\"noopener noreferrer nofollow\">^3<\/a>)<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0415\u0441\u0442\u044c \u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0432\u044b\u0432\u043e\u0434? Lua \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/tylerneylon.com\/a\/learn-lua\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435<\/a> \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0451\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 HAProxy, \u0430\u0434\u0434\u043e\u043d\u043e\u0432 \u0434\u043b\u044f World of Warcraft, \u0438\u0433\u0440 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 Roblox, <a href=\"https:\/\/awesomewm.org\/\" rel=\"noopener noreferrer nofollow\">\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u043a\u043e\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430<\/a>, <a href=\"https:\/\/nmap.org\/\" rel=\"noopener noreferrer nofollow\">\u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0435\u0442\u044f\u043c\u0438<\/a> \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0430\u0441 \u0447\u0443\u0442\u043e\u0447\u043a\u0443 \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0435\u0435.<\/p>\n<p><em>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434.:<\/em> \u0438 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e \u0438\u0433\u0440\u043e\u0432\u044b\u0435 \u0434\u0432\u0438\u0436\u043a\u0438 &#8212; <a href=\"https:\/\/love2d.org\/\" rel=\"noopener noreferrer nofollow\">Love2D<\/a>, <a href=\"https:\/\/defold.com\/\" rel=\"noopener noreferrer nofollow\">Defold<\/a> \u0438 <a href=\"https:\/\/github.com\/tsnake41\/raylib-lua\" rel=\"noopener noreferrer nofollow\">\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Raylib<\/a>.<\/p>\n<hr>\n<p>\u041e\u0442 \u0441\u0435\u0431\u044f \u044f \u0431\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/fennel-lang.org\" rel=\"noopener noreferrer nofollow\">Fennel<\/a>, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0439 \u0432\u044b\u0448\u0435 \u0432 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435. \u042d\u0442\u043e LISP, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 Lua \u2014 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c, \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c Lua c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c\u044e LISP-\u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>\u0410 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 HABR23. \u0413\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0435 \u0441\u043a\u0430\u0436\u0443, \u0430 \u0442\u043e \u0440\u0435\u043a\u043b\u0430\u043c\u0430 \ud83d\ude42<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u044f \u0432\u0435\u0434\u0443 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c-\u043a\u0430\u043d\u0430\u043b \u0434\u043b\u044f \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0438 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u0432 IT, <a href=\"https:\/\/t.me\/novusnota\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c, \u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435!<\/a><\/p>\n<\/p>\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\/738414\/\"> https:\/\/habr.com\/ru\/articles\/738414\/<\/a><br \/><\/br><\/br><\/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-348023","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/348023","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=348023"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/348023\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=348023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=348023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=348023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}