{"id":205844,"date":"2013-12-13T08:07:03","date_gmt":"2013-12-13T04:07:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=205844"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=205844","title":{"rendered":"<span class=\"post_title\">\u042f\u0437\u044b\u043a K: \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u042f \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0431 APL, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u043e \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 <a href=\"http:\/\/en.wikipedia.org\/wiki\/K_(programming_language)\">K<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430 \u0432 \u0441\u0435\u0431\u0435 GUI, \u0441 \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c \u043a \u043d\u0435\u043c\u0443.<\/p>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 K \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043b\u0438 GUI, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u2014 \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c. \u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 API, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e:  <\/p>\n<pre><code>`show$`v        show variable v `hide$`v        hide variable v <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0432\u0441\u0451, \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e. \u0422.\u0435. \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u0447\u0442\u043e GUI \u0432 K \u044d\u0442\u043e \u043f\u0440\u044f\u043c\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435:  <\/p>\n<pre><code>C:\\&gt;k K 3.1 2004-01-28 Copyright (C) 1993-2004 Kx Systems WIN32 2CPU 4030MB ws-1341.x.com 0 EVAL   a:10 _draw 100    \/ list   a 20 51 12 34 31 51 29 35 17 89   `show$`a <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c <br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/9ef\/464\/6e3\/9ef4646e30005ddb7b2032184541b786.png\"\/><br \/>  \u041b\u044e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0435, \u043c\u0435\u043d\u044f\u0435\u043c 35 \u043d\u0430 135 \u0438 \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0440\u0430\u0437\u0443 \u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435:  <\/p>\n<pre><code>  a 20 51 12 34 31 51 29 135 17 89 <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435, \u0442\u043e \u043e\u043d\u043e \u0442\u0443\u0442\u0436\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435.<\/p>\n<p>  \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0430 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u043c\u043d\u043e\u0433\u043e? \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e:  <\/p>\n<pre><code>  a:(10 10000000) _draw 100   \/ 10 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u043f\u043e 10 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u043a\u0430\u0436\u0434\u044b\u0439   `show$`a <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/4c4\/a55\/65f\/4c4a5565fd509d8c979f99c8d033fa5f.png\"\/><br \/>  \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u2014 \u0432\u0441\u0451 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f, \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0418\u043c\u0435\u043d\u0443\u0435\u043c \u043a\u043e\u043b\u043e\u043d\u043a\u0438: \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0447\u0442\u043e \u0438\u043c\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u2014 \u044d\u0442\u043e \u043a\u043b\u044e\u0447, \u0430 \u0441\u043f\u0438\u0441\u043e\u043a \u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 hashtable:  <\/p>\n<pre><code>  t:.((`a;10 _draw 100;);(`b;10 _draw 100))   `show$`t <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c3a\/068\/cf2\/c3a068cf20b4c73cc8433cb13af269f4.png\"\/><\/p>\n<p>  \u041d\u043e \u044d\u0442\u043e \u0432\u0441\u0451 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e, \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0451. \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u2014 \u043f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 hashtable, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u043c \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u0442 \u2014 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<p>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 label.  <\/p>\n<pre><code>  val:10   val..l:&quot;Input field&quot;   `show$`val <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/9e8\/afe\/925\/9e8afe92572c6d02333f710afe82210d.png\"\/><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 gui:  <\/p>\n<pre><code> Display attributes (for variables that have class).   x     width           integer(KFONT width)   y     height          integer(KFONT height)   a     arrangement     nest of symbols(class `form)   o     options         list of symbols(class `radio)   l     label           string   kl    click label     string (also klr)    Data-display attributes (for variables that have class `data).   functions (monadic, constant or array)        default    e    editable        0 or 1                   1    f    format          string from data         11$(11.2$)    g    getdata         data from string         0$ etc.    u    update          update[old;new]          :    fg   foreground      integer(rrggbb)          0    bg   background      integer(rrggbb)         -1(808080)    expressions\/events (strings)    ins, del, f1 ... f12, ctrl_a ... ctrl_z    k, kr, kk    click, click right, double click(precludes e)     c      class(display)  symbol         `data(default) atom, list, dict, list of lists, dict of lists         `chart          as above where atom is list of y values         `plot           as above where atom is matrix of (x;y) values         `check         0 or 1         `radio         symbol (one of ..o; see below)         `button        expression or dictionary of expressions         `form          dictionary of entries of any class(incl. `form) <\/code><\/pre>\n<p>  \u041d\u0435 \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0437 \u043d\u0438\u0445 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b \u0438\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u043c\u0430\u043d\u0443\u0430\u043b\u0430 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u2014 \u044f\u0437\u044b\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u2014 \u0442.\u0435. \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044f \u0441 \u043f\u0430\u043f\u043a\u0430\u043c\u0438 \u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u044d\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b:  <\/p>\n<pre><code>  \\d form   val:100   incr:&quot;val+:1&quot;   incr..l:&quot;Increment&quot;   decr:&quot;val-:1&quot;   decr..l:&quot;Decrement&quot;   incr..c: decr..c: `button   \\d ^   form \/ \u0445\u044d\u0448 \u043a\u043b\u044e\u0447\u0435\u0439-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0445\u044d\u0448\u0435\u0439 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432. .((`val;100;)   (`incr    &quot;val+:1&quot;    .((`l;&quot;Increment&quot;;)      (`c;`button;)))   (`decr    &quot;val-:1&quot;    .((`l;&quot;Decrement&quot;;)      (`c;`button;)))) <\/code><\/pre>\n<p>  \u0410\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c ..a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.  <\/p>\n<pre><code>  form..a:`incr`val`decr   form.val..e:0    \/ \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c03\/227\/980\/c0322798039d1e34c85f9b95bf1d257d.png\"\/><\/p>\n<p>  ..a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0444\u043e\u0440\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u0443 \u043a\u043d\u043e\u043f\u043e\u043a.  <\/p>\n<pre><code>  form.incr10:&quot;val+:10&quot;   form.decr10:&quot;val+:10&quot;   form.incr10..c : form.decr10..c: `button   form..a:(,`incr;`decr10`val`incr10;,`decr)   form..a (,`incr  `decr10 `val `incr10  ,`decr) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/053\/bb4\/506\/053bb450691c4bab9a0cb45f7f09b8f6.png\"\/><\/p>\n<p>  \u0422.\u0435. \u0441\u043c\u044b\u0441\u043b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0451 GUI \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u044f\u0437\u044b\u043a\u0430 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0445 \u0436\u0435 \u043f\u0440\u044f\u043c\u044b\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c. \u041c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c hash \u0432 hash, \u0442.\u0435. \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443 \u0432 \u0444\u043e\u0440\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0443\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438 \u0442\u0434.<\/p>\n<p>  \u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432:<\/p>\n<p>  \u041a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440:  <\/p>\n<pre><code>calc..a:(`exp    `va`vb`vc`vd    `n0`n1`n2`n3    `n4`n5`n6`n7    `n8`n9`lp`rp    `fa`fs`fm`fd`fe    `eval`clear) \/ \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0444\u043e\u0440\u043c\u0435 calc:@[_n;1_-1_ calc..a;:[;&quot;exp,:(~_v)`l&quot;]]\t\/ expressions calc[.;`l]:&quot;abcd0123456789()+-*%:&quot;\t\t\/ labels calc.eval:&quot;exp:5:. exp&quot; calc.clear:&quot;exp:\\&quot;\\&quot;&quot; calc[.;`c]:`button calc.exp:calc.exp..l:&quot;&quot;  `show$`calc <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/0c9\/226\/737\/0c92267375cebb67904275b0524bae32.png\"\/><\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438:  <\/p>\n<pre><code>  p..c:`chart   p:(5 5) _draw 100   `show$`p <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/022\/04f\/8f1\/02204f8f1ca51ebefa3fb60e45abb1dc.png\"\/><\/p>\n<p>  \u0418\u043b\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0445\u0443\u0434\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043c\u0430\u0437\u043c\u044f:  <\/p>\n<pre><code>`show$.,((`p;({[x] (2 30)_draw 30}'!10);.,(`c;`plot;))) <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/d5a\/380\/dbc\/d5a380dbc18550ebf93f7601647e8ff9.png\"\/><\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0449\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0442\u0430\u043a \u0443\u0434\u0438\u0432\u0438\u043b\u0430 \u0441\u0432\u043e\u0435\u0439 \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u044c\u044e \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e (\u043f\u0440\u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0437\u043d\u0430\u043d\u0438\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e), \u0447\u0442\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0437\u0443\u0447\u0430\u0442\u044c K \u0433\u043b\u0443\u0431\u0436\u0435:<\/p>\n<p>  Broadcast \u0441\u0435\u0440\u0432\u0435\u0440: <\/p>\n<pre><code>d:10 _draw 10  w:!0\t\t\/ empty client list  .m.g:{w,:_w;d}\t\/ return data .m.c:&quot;w@:&~w=_w&quot;\t\/ retain clients .m.s:{. x;w 3:\\:x;}\t\/ (log `l 5:,x) apply and broadcast  \\m i 1     listen on port 1 <\/code><\/pre>\n<p>  \u041a\u043b\u0438\u0435\u043d\u0442: <\/p>\n<pre><code>h:3:(`;1)\t\/ connect to server d:h 4:_n\t\/ get database d..t:&quot;if[0=_w;h 3:(_v;_i;:;_v ._i)]&quot;\t\/ send my updates  `show$`d <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u044d\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0410 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u0438 \u0438\u043c\u0435\u044e\u0442 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0432\u0441\u0435\u0433\u043e 9 \u0441\u0442\u0440\u043e\u0447\u0435\u043a. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u0434 (\u0431\u0435\u0437 GUI \u043a\u043e\u043d\u0435\u0447\u043d\u043e) \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u0445 \u043a\u0440\u0443\u043f\u043d\u0435\u0439\u0448\u0438\u0445 \u0431\u0438\u0440\u0436\u0430\u0445 \u0434\u043b\u044f \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u044b\u0445 \u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0442 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u044b \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Q_(programming_language_from_Kx_Systems)\">Q<\/a> (\u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f K).<\/p>\n<p>  \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a19\/7ce\/5f6\/a197ce5f6df578a4977f9eea4b0d9fd2.png\"\/>    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/205844\/\"> http:\/\/habrahabr.ru\/post\/205844\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u042f \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0431 APL, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u043e \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 <a href=\"http:\/\/en.wikipedia.org\/wiki\/K_(programming_language)\">K<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430 \u0432 \u0441\u0435\u0431\u0435 GUI, \u0441 \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c \u043a \u043d\u0435\u043c\u0443.<\/p>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 K \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043b\u0438 GUI, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u2014 \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c. \u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 API, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e:  <\/p>\n<pre><code>`show$`v        show variable v `hide$`v        hide variable v <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0432\u0441\u0451, \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e. \u0422.\u0435. \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u0447\u0442\u043e GUI \u0432 K \u044d\u0442\u043e \u043f\u0440\u044f\u043c\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.  <\/p>\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-205844","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/205844","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=205844"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/205844\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=205844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=205844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=205844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}