{"id":171361,"date":"2013-03-02T23:52:03","date_gmt":"2013-03-02T19:52:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=171361"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=171361","title":{"rendered":"<span class=\"post_title\">\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c clojure-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u042f\u0437\u044b\u043a Clojure \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0442\u0435\u0441\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0435\u0439 \u0441 Java. \u041f\u0440\u044f\u043c\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Java-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0430 Clojure \u2014 \u0434\u0435\u043b\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438 \u043e\u0431\u044b\u0434\u0435\u043d\u043d\u043e\u0435. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 Clojure \u0432 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code>(ns clj-lib.core   (:use clj-lib.util))  (defn prod   ([x] (reduce * x))   ([s x] (reduce * s x)))  (defprotocol IAppendable   (append [this value]))  (extend-protocol IAppendable   Integer (append [this value] (+ this value))   String (append [this value] (str this &quot;,&quot; value)))  (defmulti pretty type) (defmethod pretty Integer [x] (str &quot;int &quot; x)) (defmethod pretty String [x] (str &quot;str &quot; x)) <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043d\u0435\u0442\u0443 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 get-\u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u0435\u0442\u043e\u0434 \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u2014 \u0438\u0445 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0437 Java.<\/p>\n<h2>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b Java<\/h2>\n<p>  Clojure \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440, \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u0414\u043b\u044f \u043f\u0443\u0449\u0435\u0433\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0432\u0441\u0435 <u>\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435<\/u> \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438\u0437 <i>java.util.*<\/i>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u0441\u043f\u0438\u0441\u043a\u0438, \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u0434\u0430\u0436\u0435 \u043b\u0435\u043d\u0438\u0432\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438) \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <i>java.util.List<\/i>. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0432\u0441\u0435 \u00ab\u043c\u0443\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435\u00bb \u043c\u0435\u0442\u043e\u0434\u044b (<i>add<\/i>, <i>clear<\/i> \u0438 \u0442.\u043f.) \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <i>UnsupportedOperationException<\/i>. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430\u043c\u0438 \u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438 \u2014 \u043e\u043d\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 <i>Set<\/i> \u0438 <i>Map<\/i> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>  \u0412\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 2 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 <i>java.lang.Runnable<\/i> \u0438 <i>java.util.concurrent.Callable<\/i>. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u0438 \u043f\u0440\u044f\u043c\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 <i>java.lang.concurent<\/i> (\u0445\u043e\u0442\u044f, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043b\u0443\u0447\u0448\u0435 \u0441 executor&#8217;\u0430\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u043e \u0438\u0437 Clojure).<\/p>\n<p>  \u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u043e\u0439 \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 Clojure \u0441\u0432\u043e\u0439 \u0442\u0438\u043f \u0434\u043b\u044f \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u044b\u0445 <a href=\"https:\/\/github.com\/clojure\/clojure\/blob\/master\/src\/jvm\/clojure\/lang\/BigInt.java\">clojure.lang.BigInt<\/a>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c Clojure \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c <i>java.util.math.BigInteger<\/i>. \u0421 \u0434\u043b\u0438\u043d\u043d\u044b\u043c\u0438 \u0432\u0435\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u00ab\u0441\u044e\u0440\u043f\u0440\u0438\u0437\u0430\u00bb \u043d\u0435\u0442\u0443 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <i>java.util.math.BigDecimal<\/i>. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f <i>clojure.lang.Ratio<\/i> \u0434\u043b\u044f \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0440\u043e\u0431\u0435\u0439.<\/p>\n<h2>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0438 gen-class<\/h2>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0441\u0430\u043c\u044b\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 <a href=\"http:\/\/clojure.org\/compilation\">\u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/a> clojure-\u043a\u043e\u0434 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 class-\u0444\u0430\u0439\u043b\u043e\u0432. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <a href=\"http:\/\/clojure.github.com\/clojure\/clojure.core-api.html#clojure.core\/gen-class\">gen-class<\/a> \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u0430, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<pre><code>(ns clj-lib.core   (:use clj-lib.util)   (:gen-class     :main false     :name &quot;cljlib.CljLibCore&quot;     :prefix &quot;&quot;     :methods      [^:static [prod [Iterable] Number]      ^:static [prod [Number Iterable] Number]      ^:static [append [Object Object] Object]      ^:static [pretty [Object] Object]])) ... <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 <i>Iterable <\/i>\u043a\u0430\u043a \u0442\u0438\u043f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>prod<\/i>. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0442\u0443\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438 <i>ISeq<\/i>, \u0438 \u043c\u0430\u0441\u0441\u0438\u0432, \u0438 \u0434\u0430\u0436\u0435 <i>String<\/i>. \u041d\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432 Java \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435.<\/b><\/p>\n<div class=\"spoiler_text\">\u0415\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e <i>clj_lib.core<\/i>. \u0414\u043b\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u043b\u0430\u0441\u0441 <i>clj_lib.core.IAppendable<\/i> \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 <i>clj_lib.core<\/i>. \u0422.\u0435 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 \u0438 \u043f\u0430\u043a\u0435\u0442 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0443\u0447\u0448\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u044f\u0432\u043d\u043e.  <\/div>\n<\/div>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432 REPL&#8217;\u0435:  <\/p>\n<pre><code>(compile 'clj-lib.core)<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b <i>classes\/cljlib\/CljLibCore.class<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u041d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 REPL-\u0430 \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u043e \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c <a href=\"http:\/\/leiningen.org\">leiningen<\/a> \u043f\u0440\u043e\u0435\u043a\u0442:  <\/p>\n<pre><code>(defproject clj-lib   ...   :aot [my-app.core],   ...   ) <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 jar-\u043e\u043a leiningen \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<pre><code>lein jar<\/code><\/pre>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c my-lib.jar \u0438 clojure.jar \u043a \u043d\u0430\u0448\u0435\u043c\u0443 Java-\u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c:  <\/p>\n<pre><code>import java.math.BigDecimal; import java.util.Arrays; import java.util.List;  import clj_lib.core.IAppendable; import cljlib.CljLibCore;  public class Program {  \tstatic void pr(Object v) { \t\tSystem.out.println(v); \t} \t \tstatic class SomeClass implements IAppendable { \t\tpublic Object append(Object value) { \t\t\t\/\/ some code \t\t\treturn null;   \t\t} \t}  \tpublic static void main(String[] args) throws Exception { \t\t \t\tpr(CljLibCore.pretty(1)); \t\tpr(CljLibCore.pretty(&quot;x&quot;));  \t\tInteger x = (Integer) CljLibCore.append(-1, 1); \t\tpr(CljLibCore.append(x, 1)); \t\t \t\tpr(CljLibCore.append(new SomeClass(), new SomeClass()));  \t\t \t\tList&lt;Integer&gt; v = Arrays.asList(1, 2, 3, 4, 5); \t\tpr(CljLibCore.prod(v)); \t\tpr(CljLibCore.prod(BigDecimal.ONE, v)); \t} } <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0440\u0430\u043d\u0442\u0430\u0439\u043c \u0421lojure \u2014 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0415\u0449\u0435 \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 Java \u2014 \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u041d\u043e \u0432\u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0447\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c <a href=\"http:\/\/clojure.github.com\/clojure\/clojure.core-api.html#clojure.core\/extend-protocol\">extend-protocol<\/a> \u2014 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0445\u043e\u0440\u043e\u0448\u043e.<\/p>\n<p>  \u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043a\u0430\u043a \u0442\u0430\u043a\u043e\u0432\u043e\u0439. \u0415\u0449\u0435 \u0438\u0437 IDE \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043d\u0443\u0436\u043d\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (\u0438\u043b\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0432\u044f\u0437\u043a\u0443 \u043d\u0430 Clojure). \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0438\u043c\u0435\u0442\u044c \u00ab\u0447\u0435\u0441\u0442\u043d\u044b\u0439\u00bb class-\u0444\u0430\u0439\u043b \u0432 classpath.<\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <i>clojure.lang.RT<\/i><\/h2>\n<p>  \u0421\u0435\u0440\u0434\u0446\u0435\u043c \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 \u0421lojure \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441. \u0412 \u043d\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0435\u0439\u0432\u043e\u0440\u0434\u043e\u0432, \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <i>first<\/i>\u0438 <i>rest<\/i>) \u0438 \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e. \u041a\u043b\u0430\u0441\u0441 \u043d\u0435\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439, \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430 \u0441\u0432\u043e\u0439 \u0441\u0442\u0440\u0430\u0445 \u0438 \u0440\u0438\u0441\u043a. \u0417\u0430\u0442\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0434\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439:<\/p>\n<ul>\n<li><i>Var var(String ns, String name) <\/i> \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 var-\u044f\u0447\u0435\u0439\u043a\u0443 \u043f\u043e \u043f\u043e\u043b\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u0438;<\/li>\n<li><i>Keyword keyword (String ns, String name) <\/i> \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 keyword (\u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c null);<\/li>\n<li><i>void load(String path) <\/i> \u2014 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 clj-\u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438.<\/li>\n<\/ul>\n<p>  \u0418 \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445, \u043f\u0440\u043e\u0449\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u043a <a href=\"https:\/\/github.com\/clojure\/clojure\/blob\/master\/src\/jvm\/clojure\/lang\/RT.java\">\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/a>. \u0412\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code>RT.var(&quot;clojure.core&quot;, &quot;eval&quot;).invoke(&quot;(+ 1 2)&quot;); <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0430 <i>RT<\/i>:  <\/p>\n<pre><code>import java.math.BigDecimal;  import clojure.lang.RT; import clojure.lang.Sequential; import clojure.lang.Var;  public class Program {  \tstatic void pr(Object v) { \t\tSystem.out.println(v); \t}  \tpublic static void main(String[] args) throws Exception { \t\t \t\tVar pretty = RT.var(&quot;clj-lib.core&quot;, &quot;pretty&quot;); \t\tVar append = RT.var(&quot;clj-lib.core&quot;, &quot;append&quot;); \t\tVar prod = RT.var(&quot;clj-lib.core&quot;, &quot;prod&quot;);\t\t  \t\tpr(pretty.invoke(1)); \t\tpr(pretty.invoke(&quot;x&quot;));  \t\tInteger x = (Integer) append.invoke(-1, 1); \t\tpr(append.invoke(x, 1)); \t\t \t\tSequential v = RT.vector(1, 2, 3, 4, 5); \t\tpr(prod.invoke(v)); \t\tpr(prod.invoke(BigDecimal.ONE, v)); \t} } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0443\u0436\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 Java \u2014 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <i>IAppendable <\/i>\u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e java-\u0444\u0430\u0439\u043b\u0430. \u0417\u0430\u0442\u043e \u043e\u0442\u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 AOT.<\/p>\n<h2>Java-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 reify<\/h2>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439. \u041f\u0438\u0448\u0435\u043c Java \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:  <\/p>\n<pre><code>public interface ICljLibCore { \tNumber prod(Iterable x); \tNumber prod(Number s, Iterable x); \tObject append(Object self, Object value); \tString pretty(Object x); } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 Clojure \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:  <\/p>\n<pre><code>(defn get-lib []   (reify ICljLibCore     (prod [_ x] (prod x))     (prod [_ s x] (prod x))     (append [_ t v] (append t v))     (pretty [_ x] (pretty x)))) <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u043a\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 ICljLibCore \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u043b\u0435:   <\/p>\n<pre><code>   public static final CLJ_LIB_CORE = ICljLibCore = (ICljLibCore) RT.var(&quot;clj-lib.core&quot;, &quot;get-lib&quot;).invoke();    ...    CLJ_LIB_CORE.pretty(&quot;1&quot;); <\/code><\/pre>\n<p>  \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u2014 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0432 \u044d\u0442\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0447\u0435\u0441\u0442\u043d\u044b\u0435 java-doc. \u041f\u0440\u043e\u0449\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c Clojure \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043d\u0430 Java (\u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u0445\u0432\u0430\u0442\u0430\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438), \u043f\u0440\u043e\u0449\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b. \u0418, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0438\u043a\u043e\u0433\u043e AOT.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0417\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b-\u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Clojure \u043a\u043e\u0434\u0430 \u0438 \u043c\u0435\u0442\u0430-\u0434\u0430\u043d\u043d\u044b\u0445 (\u0438 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u044d\u0442\u043e \u0432 \u0432\u0438\u0434\u0435 leiningen-\u043f\u043b\u0430\u0433\u0438\u043d\u0430). \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0432 DI-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Spring \u0438\u043b\u0438 Guice). \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e, \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0437\u0430 \u0438 \u043f\u0440\u043e\u0442\u0438\u0432.    \t \t\t   \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\/171361\/\"> http:\/\/habrahabr.ru\/post\/171361\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u042f\u0437\u044b\u043a Clojure \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0442\u0435\u0441\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0435\u0439 \u0441 Java. \u041f\u0440\u044f\u043c\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Java-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0430 Clojure \u2014 \u0434\u0435\u043b\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438 \u043e\u0431\u044b\u0434\u0435\u043d\u043d\u043e\u0435. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 Clojure \u0432 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.  <\/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-171361","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/171361","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=171361"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/171361\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=171361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=171361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=171361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}