{"id":304159,"date":"2020-05-24T21:00:23","date_gmt":"2020-05-24T21:00:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304159"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304159","title":{"rendered":"\u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 Lisp \u0434\u043b\u044f \u0432\u0435\u0431\u0430?"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/503610\/\">\n<p>\u0412\u043e\u0442 \u0435\u0441\u0442\u044c JavaScript \u2014 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0430\u044f \u0432\u0435\u0449\u044c. \u0418 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043e\u043d\u0430 \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440 \u0438 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u0411\u0440\u0430\u0443\u0437\u0435\u0440. \u0411\u0435\u0437 \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440\u0430 \u0438 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0430 DOM-\u0434\u0435\u0440\u0435\u0432\u0430 \u0431\u044b\u043b\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0442\u044f\u0436\u0435\u043b\u0435\u0435 \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 JavaScript.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u044f \u0438 \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u0439 Lisp, \u043d\u043e \u0441 \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440\u043e\u043c. \u0412\u0437\u044f\u043b \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439, \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 littlelisp \u0438 \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043b \u0435\u0433\u043e \u043d\u0430 99%. \u0417\u0430\u0442\u043e\u0447\u0438\u043b \u043f\u043e\u0434 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u0437\u0434\u0430\u043b \u0441\u0432\u043e\u044e IDE, \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/saemonzixel.ru\/Littlelisp1-IDE-Tramvay1.png\" alt=\"image\"\/><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0421\u0430\u043c \u044f\u0437\u044b\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043c\u0435\u0441\u044c\u044e Lisp \u0438 JavaScript-a \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e Lisp \u044f \u0437\u043d\u0430\u043b \u043f\u043b\u043e\u0445\u043e, \u0430 JavaScript \u0445\u043e\u0440\u043e\u0448\u043e:)<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"lisp\">(alert document.location.href)  (setq x &quot;ok!&quot;)  (alert (x.substring 0 2))  ;; \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 if  (setq x (prompt &quot;Value of X:&quot;)) (if (x == null)     (setq x &quot;(none)&quot;)     (alert (+ &quot;x = &quot; x)) :else     (alert (+ &quot;x = &quot; x)) )  ;; \u043a\u0441\u0442\u0430\u0442\u0438 \u0442\u0435\u043b\u0430 while\/if \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a  (setq i 0) (while (i &lt; 10)     (console.log i)     (++ i) )  ;; \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u0445\u0430\u0440 \u0434\u043b\u044f \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432  (x &lt; 2)                ;; -&gt; (&lt; x 2) ((x &lt; 2) &amp;&amp; (x &gt; -1))  ;; -&gt; (&amp;&amp; (&lt; x 2) (&gt; x -1)) ((x &lt; 2) || (x &gt; -1))  ;; -&gt; (|| (&lt; x 2) (&gt; x -1)) (x + 1 2 3)            ;; -&gt; (+ x 1 2 3) =&gt; x+1+2+3 (x ++)                 ;; -&gt; (++ x)  (++ x y z)             ;; -&gt; \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442 \u043d\u0430 1 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 x, y, z \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e  ;; \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 JS-\u043e\u0431\u044a\u0435\u043a\u0442\u0430  (setq obj1 (new Object)) (setq obj1.a 123 obj1.b &quot;abc&quot;) ;; \u043c\u043e\u0436\u043d\u043e \u0437\u0430 \u043e\u0434\u0438\u043d \u0432\u044b\u0437\u043e\u0432  (setq name &quot;c&quot;) (setq obj1.@name ())           ;; @ - \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442 (setq obj1.@name.0 111) (setq obj1.@name.1 222) (setq obj1.@name.2 333)   (alert (obj1.c.join &quot; &quot;))      ;; \u043f\u043e\u043a\u0430\u0436\u0435\u0442 &quot;111 222 333&quot;  ;; \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043e\u043a\u0430-\u0447\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u043f\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443  (defclass \u0422\u0440\u0430\u043c\u0432\u0430\u0439     :extends Object     :instvars &quot;\u0438\u0437_\u0447\u0435\u0433\u043e \u043d\u043e\u043c\u0435\u0440&quot;     :classvars &quot;\u0432\u0441\u0435\u0433\u043e&quot;     :constructor init )  (setq \u0422\u0440\u0430\u043c\u0432\u0430\u0439.\u0432\u0441\u0435\u0433\u043e 0)  (defmeth \u0422\u0440\u0430\u043c\u0432\u0430\u0439.init (\u043d\u043e\u043c\u0435\u0440 \u043e\u0441\u043d\u043e\u0432\u0430) (     (setq this.\u043d\u043e\u043c\u0435\u0440 \u043d\u043e\u043c\u0435\u0440)     (setq this.\u0438\u0437_\u0447\u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0430)     (\u0422\u0440\u0430\u043c\u0432\u0430\u0439.\u0432\u0441\u0435\u0433\u043e ++) ))  (defmeth \u0422\u0440\u0430\u043c\u0432\u0430\u0439.\u043f\u043e\u0435\u0445\u0430\u043b\u0438 () (     (window.alert (+ &quot; \u0422\u0440\u0430\u043c\u0432\u0430\u0439 \u2116&quot; this.\u043d\u043e\u043c\u0435\u0440 &quot; \u0438\u0437 &quot; this.\u0438\u0437_\u0447\u0435\u0433\u043e &quot; \u0437\u0430 \u0432\u0430\u043c\u0438 \u0432\u044b\u0435\u0445\u0430\u043b!&quot;)) ))  (setq \u0422\u0440\u0430\u043c\u0432\u0430\u04391 (new \u0422\u0440\u0430\u043c\u0432\u0430\u0439 9 &quot;\u0431\u0443\u0445\u0430\u043d\u043a\u0438 \u0445\u043b\u0435\u0431\u0430&quot;)) (\u0422\u0440\u0430\u043c\u0432\u0430\u04391.\u043f\u043e\u0435\u0445\u0430\u043b\u0438) (alert (+ &quot;\u0422\u0440\u0430\u043c\u0432\u0430\u0435\u0432 \u0432\u0441\u0435\u0433\u043e: &quot; \u0422\u0440\u0430\u043c\u0432\u0430\u0439.\u0432\u0441\u0435\u0433\u043e))  ;; \u043b\u044f\u043c\u0431\u0434\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c  ((lambda (x y) (alert (x + y)) &quot;a&quot; &quot;b&quot;)  (defun f1 (x) (alert (x + &quot; - ok!&quot;))) (f1 &quot;f1&quot;)  ;; \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u043a\u0430-\u0447\u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0432\u044b\u0437\u043e\u0432 JS-\u0444\u0443\u043d\u043a\u0446\u0438\u0438  ((new Function &quot;msg&quot; &quot;alert(msg);&quot;) document.title)  ;; \u044d\u043a\u0441\u0435\u043f\u0448\u0435\u043d\u044b \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c  (catch (a.b)) ;; \u0432\u0435\u0440\u043d\u0451\u0442 Exception object (Error: &quot;a&quot; is undefined!)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435 \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/github.com\/SaemonZixel\/littlelisp.js\" rel=\"nofollow\">https:\/\/github.com\/SaemonZixel\/littlelisp.js<\/a><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u043a\u043e\u0434 \u043f\u043e\u043a\u0430-\u0447\u0442\u043e \u0432 \u0431\u0435\u0442\u0435 (\u043d\u0430 17 \u043c\u0430\u044f 2020\u0433). \u041e\u0448\u0438\u0431\u043e\u043a \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u043e \u0438 \u044f \u0438\u0445 \u043f\u043e\u0442\u0438\u0445\u043e\u043d\u044c\u043a\u0443 \u043d\u0430\u0445\u043e\u0436\u0443 \u0438 \u043f\u0440\u0430\u0432\u043b\u044e \ud83d\ude41<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0437\u0430\u0442\u043e \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440 \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u043a \u0432 Smalltalk-\u0441\u0440\u0435\u0434\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c! \ud83d\ude42<\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0434\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u044f\u043c \u0432 \u0434\u0435\u0431\u0431\u0430\u0433\u0435\u0440\u0435. \u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0434\u0435\u0431\u0431\u0430\u0433\u0435\u0440.<\/p>\n<\/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=\"https:\/\/habr.com\/ru\/post\/503610\/\"> https:\/\/habr.com\/ru\/post\/503610\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/503610\/\">\n<p>\u0412\u043e\u0442 \u0435\u0441\u0442\u044c JavaScript \u2014 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0430\u044f \u0432\u0435\u0449\u044c. \u0418 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0430\u044f \u043e\u043d\u0430 \u043f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440 \u0438 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u0411\u0440\u0430\u0443\u0437\u0435\u0440. \u0411\u0435\u0437 \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440\u0430 \u0438 \u0438\u043d\u0441\u043f\u0435\u043a\u0442\u043e\u0440\u0430 DOM-\u0434\u0435\u0440\u0435\u0432\u0430 \u0431\u044b\u043b\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0442\u044f\u0436\u0435\u043b\u0435\u0435 \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 JavaScript.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u044f \u0438 \u0440\u0435\u0448\u0438\u043b \u0437\u0430\u043f\u0438\u043b\u0438\u0442\u044c \u0441\u0432\u043e\u0439 Lisp, \u043d\u043e \u0441 \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0434\u0435\u0431\u0430\u0433\u0433\u0435\u0440\u043e\u043c. \u0412\u0437\u044f\u043b \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439, \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 littlelisp \u0438 \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043b \u0435\u0433\u043e \u043d\u0430 99%. \u0417\u0430\u0442\u043e\u0447\u0438\u043b \u043f\u043e\u0434 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u0437\u0434\u0430\u043b \u0441\u0432\u043e\u044e IDE, \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/saemonzixel.ru\/Littlelisp1-IDE-Tramvay1.png\" alt=\"image\"\/><\/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-304159","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304159","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=304159"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304159\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}