{"id":5941,"date":"2017-01-20T00:28:31","date_gmt":"2017-01-19T15:28:31","guid":{"rendered":"http:\/\/yonezo.biz\/?p=5941"},"modified":"2017-01-20T00:28:31","modified_gmt":"2017-01-19T15:28:31","slug":"%e3%80%90ocaml%e3%80%91%e3%80%8cwelcome-from-elioms-distillery%e3%80%8d%e3%82%92%e6%9b%b8%e3%81%8d%e6%8f%9b%e3%81%88%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"post","link":"https:\/\/yonezo.biz\/?p=5941","title":{"rendered":"\u3010OCaml\u3011\u300cWelcome from Eliom&#8217;s distillery!\u300d\u3092\u66f8\u304d\u63db\u3048\u3066\u307f\u308b"},"content":{"rendered":"<p>\u524d\u56de\u306f\u8af8\u3005\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u306b\u300cWelcome from Eliom&#8217;s distillery!\u300d\u3068\u8868\u793a\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u305f\u3069\u308a\u7740\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u300cWelcome from Eliom&#8217;s distillery!\u300d\u304c\u3069\u3053\u3067\u51fa\u529b\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u3001\u307e\u305a\u306f\u8abf\u3079\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f5c\u6210\u3055\u308c\u305f\u300chello\u300d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u9069\u5f53\u306bgrep\u3059\u308b\u3068\u3001<\/p>\n<pre class=\"brush: bash;\">\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb _server\/hello.cmo \u306b\u4e00\u81f4\u3057\u307e\u3057\u305f\r\nhello.eliom:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 h1 [pcdata \"Welcome from Eliom's distillery!\"];\r\n\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb local\/lib\/hello\/hello.cma \u306b\u4e00\u81f4\u3057\u307e\u3057\u305f\r\n<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<p>\u30d0\u30a4\u30ca\u30ea\u30d5\u30a1\u30a4\u30eb\u306f\u3068\u308a\u3042\u3048\u305a\u7f6e\u3044\u3068\u3044\u3066\u3001hello.eliom\u3067\u3059\u306d\u3002<\/p>\n<p>\u3053\u3053\u3067\u6307\u5b9a\u3057\u3066\u3044\u308b\u307f\u305f\u3044\u3067\u3059\u3002<\/p>\n<p>\u958b\u3044\u3066\u307f\u308b\u3068\u3002<\/p>\n<p>[%%shared<br \/>\nopen Eliom_lib<br \/>\nopen Eliom_content<br \/>\nopen Html.D<br \/>\n]<\/p>\n<p>module Hello_app =<br \/>\nEliom_registration.App (<br \/>\nstruct<br \/>\nlet application_name = &#8220;hello&#8221;<br \/>\nlet global_data_path = None<br \/>\nend)<\/p>\n<p>let main_service =<br \/>\nEliom_service.create<br \/>\n~path:(Eliom_service.Path [])<br \/>\n~meth:(Eliom_service.Get Eliom_parameter.unit)<br \/>\n()<\/p>\n<p>let () =<br \/>\nHello_app.register<br \/>\n~service:main_service<br \/>\n(fun () () -&gt;<br \/>\nLwt.return<br \/>\n(Eliom_tools.F.html<br \/>\n~title:&#8221;hello&#8221;<br \/>\n~css:[[&#8220;css&#8221;;&#8221;hello.css&#8221;]]<br \/>\nHtml.F.(body [<br \/>\nh1 [pcdata &#8220;<span style=\"color: #ff0000;\">Welcome from\u00a0Eliom&#8217;s distillery!<\/span>&#8220;];<br \/>\n])))<\/p>\n<p>&nbsp;<\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002\u6700\u521d\u306e\u65b9\u306f\u307e\u3060\u308f\u304b\u3089\u306a\u3044\u304c\u3001\u5f8c\u534a\u3067\u8a72\u5f53\u306e\u6587\u5b57\u5217\u304c\u898b\u3048\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3092\u5909\u66f4\u3059\u308b\u3068\u53cd\u6620\u3055\u308c\u308b\u306e\u304b\uff1f<\/p>\n<p>\u4e0a\u8a18\u3001\u8d64\u5b57\u90e8\u5206\u3092\u9069\u5f53\u306b\u5909\u66f4\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u300cWelcome from yonezos distillery\u300d<\/p>\n<p>\u30c6\u30ad\u30b9\u30c8\u7de8\u96c6\u3057\u3066\u4fdd\u5b58\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u3092\u66f4\u65b0\u3002<\/p>\n<p>\u5f53\u7136\u3067\u3059\u304c\u3001\u3053\u308c\u3060\u3051\u3067\u306f\u53cd\u6620\u306f\u3055\u308c\u307e\u305b\u3093\u3002\u5f53\u7136\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u5fc5\u8981\u306a\u3093\u3060\u308d\u3046\u306a\u3068\u3002<\/p>\n<p>\u524d\u56de\u306f\u300cmake test.byte\u300d\u3068\u304b\u3084\u308a\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306f\u3069\u3046\u3059\u308b\u306e\u3060\u308d\u3046\uff1f<\/p>\n<p>&nbsp;<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u518d\u5ea6\u3084\u3063\u3066\u307f\u307e\u3059\u304c\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash;\">$ make test.byte\r\njs_of_eliom -ppx -c -package lwt.ppx -package js_of_ocaml.ppx -package js_of_ocaml.deriving.ppx\u00a0 hello.eliom\r\nmake: js_of_eliom: \u30b3\u30de\u30f3\u30c9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\r\nMakefile:206: \u30bf\u30fc\u30b2\u30c3\u30c8 '_client\/hello.cmo' \u306e\u30ec\u30b7\u30d4\u3067\u5931\u6557\u3057\u307e\u3057\u305f\r\nmake: *** [_client\/hello.cmo] \u30a8\u30e9\u30fc 127\r\n<\/pre>\n<p>\u5e2b\u5320\u66f0\u304f\u300c\u30d1\u30b9\u304c\u901a\u3063\u3066\u306a\u3044\uff1f\u300d\u3068\u306e\u4e8b\u3067\u3001.profile\u3092\u30c1\u30a7\u30c3\u30af\u3002<\/p>\n<pre class=\"brush: bash;\"># OPAM configuration\r\n. \/home\/develop\/.opam\/opam-init\/init.sh &amp;gt; \/dev\/null 2&amp;gt; \/dev\/null || true\r\n<\/pre>\n<p>\u4e0a\u8a18\u8a18\u8ff0\u304c\u3042\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p>\u3067\u3001\u8a18\u8ff0\u304c\u3042\u308b\u306e\u306b\u30c0\u30e1\u306a\u5834\u5408\u306f<\/p>\n<pre class=\"brush: bash;\">$ source .profile\r\n<\/pre>\n<p>\u3067\u53cd\u6620\u3057\u307e\u3059\u3002<\/p>\n<p>\u3067\u3001\u518d\u5ea6make test.byte\u3068\u3084\u308b\u3082\u30a8\u30e9\u30fc\u3002<\/p>\n<pre class=\"brush: bash;\">$ make test.byte\r\njs_of_eliom -ppx -c -package lwt.ppx -package js_of_ocaml.ppx -package js_of_ocaml.deriving.ppx\u00a0 hello.eliom\r\njs_of_eliom -ppx -o local\/var\/www\/hello\/eliom\/hello.js\u00a0 -package lwt.ppx -package js_of_ocaml.ppx -package js_of_ocaml.deriving.ppx\u00a0 \\\r\n_client\/hello.cmo\r\neliomc -ppx -c -package lwt.ppx -package js_of_ocaml.deriving.ppx\u00a0 hello.eliom\r\neliomc -ppx -a -o local\/lib\/hello\/hello.cma\u00a0 \\\r\n_server\/hello.cmo\r\nocsigenserver\u00a0 -c local\/etc\/hello\/hello-test.conf\r\nocsigenserver: ocsigen:main: Fatal - The port 8080 is already in use.\r\nMakefile:58: \u30bf\u30fc\u30b2\u30c3\u30c8 'test.byte' \u306e\u30ec\u30b7\u30d4\u3067\u5931\u6557\u3057\u307e\u3057\u305f\r\nmake: *** [test.byte] \u30a8\u30e9\u30fc 8\r\n<\/pre>\n<p>\u300cocsigensetver\u304c\uff18\uff10\uff18\uff10\u63b4\u3093\u3067\u3066\u5b9f\u884c\u3067\u304d\u306a\u3044\u308f\u3002\u300d\u3068\u3044\u3046\u611f\u3058\u306a\u306e\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u5225\u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u5b9f\u884c\u3057\u305f\u307e\u307e\u3068\u306a\u3063\u3066\u3044\u305focsigenserver\u3092C-c\u3067\u9589\u3058\u307e\u3059\u3002<\/p>\n<p>\u518d\u5ea6meke test.byte\u3068\u3084\u308b\u3068\u3001\u3081\u3067\u305f\u304f\u300cWelcome from yonezos distillery!\u300d\u3068\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u300cmake test.byte\u300d\u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u3067\u3059\u304c\u3001make\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u3092\u884c\u3046\u3068\u3057\u3066\u300ctest.byte\u300d\u3063\u3066\u4f55\uff1f<\/p>\n<p>make\u3067tab\u30ad\u30fc\u3092\u62bc\u3059\u3068\u3001\u7d9a\u3051\u3066\u6253\u3066\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u51fa\u3066\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash;\">$ make\r\nall\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 install\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 install.lib.byte\u00a0\u00a0\u00a0\u00a0 local\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 run.opt\r\nbyte\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 install.byte\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 install.lib.opt\u00a0\u00a0\u00a0\u00a0\u00a0 opt\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 test.byte\r\nclean\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 install.etc\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 install.opt\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print-install-files\u00a0 test.opt\r\ndistclean\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 install.lib\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 install.static\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 run.byte\r\n<\/pre>\n<p>\u5927\u304d\u304frun\u3068test\u304c\u3042\u3063\u3066\u3001\u958b\u767a\u6642\u306ftest\u3067\u3059\u304b\u306d\u3002<\/p>\n<p>\u5b9f\u884c\u5f62\u5f0f\u306e\u9055\u3044\u3060\u3063\u305f\u304b\u306a\u2026\u3002<\/p>\n<p>byte\u3068opt\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u65b9\u6cd5\u304c\u7570\u306a\u308b\u307f\u305f\u3044\u3067\u3001opt\u306e\u65b9\u304c\uff11\uff10\u500d\u307b\u3069\u65e9\u3044\u3068\u306e\u4e8b\u3002<\/p>\n<p><strong>\u3044\u3084\u3001\u9593\u9055\u3048\u3066\u308b\u304b\u3082\u77e5\u308c\u306a\u3044\u3002<\/strong><\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u3053\u306e\u8fba\u306f\u5b9f\u969b\u306b\u30b5\u30a4\u30c8\u3092\u516c\u958b\u3059\u308b\u969b\u306b\u3082\u3046\u4e00\u5ea6\u6398\u308a\u4e0b\u3052\u308b\u3068\u3057\u3088\u3046\u3002<\/p>\n<p>&nbsp;<\/p>\n<div data-role=\"amazonjs\" data-asin=\"4774183903\" data-locale=\"JP\" data-tmpl=\"\" data-img-size=\"\" class=\"asin_4774183903_JP_ amazonjs_item\"><div class=\"amazonjs_indicator\"><span class=\"amazonjs_indicator_img\"><\/span><a class=\"amazonjs_indicator_title\" href=\"#\">\u5897\u88dc\u6539\u8a02\u95a2\u6570\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b9f\u8df5\u5165\u9580 \u2500\u2500\u7c21\u6f54\u3067\u3001\u6b63\u3057\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u305f\u3081\u306b (WEB+DB PRESS plus)<\/a><span class=\"amazonjs_indicator_footer\"><\/span><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306f\u8af8\u3005\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u306b\u300cWelcome from Eliom&#8217;s distillery!\u300d\u3068\u8868\u793a\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u305f\u3069\u308a\u7740\u304d\u307e\u3057\u305f\u3002 \u3068\u3044\u3046\u308f\u3051\u3067\u3001\u300cWelcome from Eliom&#038;#82 &hellip; <a href=\"https:\/\/yonezo.biz\/?p=5941\">Continue reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,3],"tags":[],"class_list":["post-5941","post","type-post","status-publish","format-standard","hentry","category-6","category-3"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts\/5941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5941"}],"version-history":[{"count":12,"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts\/5941\/revisions"}],"predecessor-version":[{"id":5954,"href":"https:\/\/yonezo.biz\/index.php?rest_route=\/wp\/v2\/posts\/5941\/revisions\/5954"}],"wp:attachment":[{"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yonezo.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}