妻ãããã°ã©ãã³ã°ãå§ãã
ãã®è¨äºã¯ https://adventar.org/calendars/2238 ã®12/9ã®è¨äºã§ãã
ãã¦ãå ã åå¤å±çéã®ITã¨ã³ã¸ãã¢ã®ã³ãã¥ããã£ã®å¿å¹´ä¼ã«ä¸ç·ã«åå ãããã¨ããã£ã¦ãå¤ããããã妻ãããã°ã©ãã³ã°ããã£ã¦ã¿ããã¨ããããã«ãªã£ã¦ãã¾ããã
ã¨ã¯è¨ã£ã¦ã妻ã¯ããã°ã©ãã³ã°ã®ãã®æãå ¨ãç¥ããªãéã¨ã³ã¸ãã¢ãå æ¥åå ãã¦ãNGK2017Bã§ã¯ @Kazuki_Kachi ãããC#(è¨èª) ã¨Câ¯(é³æ¥½)ã¨ãã風ã«ãäºãæãã¤ããã¨ãéãã¨ãã話ãããã¦ã¾ãããæã ããäºãã®ããã¯ã°ã©ã¦ã³ãã«ãã£ã¦æãã¤ããã¨ãã¡ãã£ãããããã¨ãããã®ã§ã質åããããç¸æãã©ãèãã¦ããã®ãï¼ä½ãããããªãã®ãï¼ãã¡ããã¨èããªããæãã¦ãããªãã¨ä½è¨ã«æ··ä¹±ãã¦ãã¾ãã¾ããç¹ã«ãã£ã¨çç³»ãªéãé²ãã§ããèªåããããã¨ãå ¨ãçåã«æããªããããªãã¨ãæ©ããã¨ãããã¨ãããã¨ãã¡ããã¨ç解ãã¦ãããªãã¨ãããªããªã¨æãã¾ããã
ãªããé¡æã«ä½¿ã£ã¦ããã®ã¯ä¸è¨OCamlã®æ¬ã
ããã°ã©ãã³ã°ã®åºç¤ ((Computer Science Library))
- ä½è : æµ äºå¥ä¸
- åºç社/ã¡ã¼ã«ã¼: ãµã¤ã¨ã³ã¹ç¤¾
- çºå£²æ¥: 2007/03/01
- ã¡ãã£ã¢: åè¡æ¬
- è³¼å ¥: 17人 ã¯ãªãã¯: 409å
- ãã®ååãå«ãããã° (127件) ãè¦ã
ã¨ãããã¨ã§ãä»åã¯åå¼·ä¸ã¨ãã½ã¼ããï¼ã¤ã»ã©ä»åã¯ç´¹ä»ãã¦ã¿ããã¨æãã¾ãã
ï¼ï¼å¦»ãæååã表示ã§ããªã
2.3ç« ã®åºæ¬çãªåã¨ãã¦stringã®èª¬æãããã¾ããä¾é¡ã¯ä¸è¨ã®ããã«ãYokohamaãã¨ã横æµãã表示ãã¾ãã
# "Yokohama";; - : string = "Yokohama" # "横æµ";; - : string = "横æµ"
ç°¡åã§ããã妻ãç°¡åã¨æã£ã¦å®è¡ããããã§ããã§ããçµæã¯ããã§ãã
# "横æµ";; - : string = "\230\168\170\230\181\156"
æãããæã
ã¨ã³ã¸ãã¢ãªãããã¼ãåãããæ¥æ¬èªã ããããããããããã¨æã£ã¦ãã°ã°ã£ã¦è§£æ±ºæ³ã調ã¹ã訳ã§ããã§ããå§ãã¦ãããè¦ãã¨ããï¼ãã¨ãªãããã§ãã
ä¸å¿ãæ¬æã§ã¯èª¬æããã¦ãããã¼ã¸ãã¡ããã¨è¾¿ã£ã¦ããã¨Linuxããã«å°éããã®ã§ãããå½ç¶æå³ã¯åãããªã訳ã§ããã¾ããç°¡åã«å®è¡ã§ããããã«Try OCamlã使ã£ã¦ããã®ã§ããã®æ¹æ³ã¯ãããã使ããªããå½ç¶ãããªãã¨ã妻ã¯åãããªããã¨ãããã¨ã§ãä½ãæªãã®ãæ©ãã§è²ã
試ã訳ã§ãã
ç§ãæãã«ããã°ã©ãã³ã°ãããã¨ãã«æ¥æ¬èªãæ£ããæ±ãã®ã¯ããã°ã©ãã³ã°åå¿è ããããã¨ãã¨ã¦ãé£ãããã¨ã ã¨æã£ã¦ãã¾ããã§ããããã£ã¦ä»ã¾ã§æ¥æ¬èªã表示ãããã¨ãã¦åããããªçµé¨ãããããé£ãããä½ãã±ã¢ããªãã¨ãããªãã¨ç¥ã£ã¦ãããã¨ãªãã§ãããã
ã¨ãããã¨ã§ãç§ãä»äºãã帰ã£ã¦ãããããç§ã¯æ¥æ¬èªã表示ãããã¨ãã§ããªãããã£ãã®ï¼ãã¼ã¸ç®ã§èºããããããã¡ã ãã¨è¨ã£ã¦ãã妻ã«ãæ¥æ¬èªã使ãã®ã¯ãããé£ãããã¨ã ããã¨èª¬æããªããä¸è¨ã®ããã«è¨å®ããã¦ã¿ãããã¨æãã¾ããã
# let printer ppf = Format.fprintf ppf "\"%s\"";; val printer : Format.formatter -> string -> unit = <fun> # #install_printer printer;; # "横æµ";; - : string = "横æµ"
ä½è«ã§ããã使ã£ã¦ããæ¬ã¯ç§ã®ãªã®ã§ãå®ã¯æ¥æ¬èªãæ±ãã¨ããã«ä¸ã®è¨å®ï¼è¡ãæ¬ã®ç«¯ã«ææ¸ããã¦ã¾ãããã§ãããã£ã±ãå
¨ãåãããªã妻ã«ãããããã¨ãã夫ãããæ¬ã«æ¸ãè¾¼ããªãã¦çãããä½ãããããããªãåªæã¿ãããªãã®ã§ãä½ã«ä½¿ãã®ãåãããªãã£ããããã ã£ãã®ããã¨ãã訳ã§ãã
æ¥æ¬èªé£ããã
ï¼ï¼æ¡ä»¶åå²ãããããªã
ãã£ã¨åã«ã¤ãã¦ä½ã¨ãªãç解ããï¼ç« ã®æ¡ä»¶åå²ã«ãã£ã¦ãã¾ãããifå¼ã§ããã
ä¾é¡ãè¦ãªãããã¨ããããæ§æã¯ç解ããããã§ãããæ¥æ¬èªã§æ¸ãããå
容ãããã°ã©ã ã¨ãã¦æ¸ãä¸ããã¨ãã§ããªããã¨ããã®ã§ãã
ã¤ã¾ããä»ã¾ã§ç®æ°ãæ°å¦ã§ããã¨ããã®å¼ãç«ã¦ãã¨ãããã¨ãåãè¦æãªãã§ããã
試ãã«ãç°¡åãªç®æ°ã®åé¡ãåºãã¦ã¿ãã¨çãã¯æ£ãããã§ããã©ãã©ãè¨ç®ããã®ï¼ã¨èãã¨çããã§ã¦ããªãã妻ã®é ã®ä¸ã§ã¯ç«å¼ããã¨ããæè¦ããªããçãã¯ï¼ï¼ã ãã¨ãªã£ã¦ãã¾ã訳ã§ãããããããããé ã®ä¸ã§ã¯å¼ãããã®ãããããªãã§ãããããã°ã©ãã³ã°ãããã¨ãã«ããããæ¼ç®åã¨ã使ã£ã¦å¼ã§æ¸ãä¸ããã¨ãè¦æã«ãªã£ã¦ãã¾ã£ã¦ããã®ã§ããããã£ã¦åã®ç« ã®é¢æ°ãä½ã£ããããã¨ãã«ãåãããã«æãã¦ããã¯ããªã®ã§ããã®æ¥ããæãããã°æå³çã«å¼ã«æ¸ãä¸ããããæ¡ä»¶å¼ãæ¸ãããããã«ãã¦ãã¾ãã
ï¼ã¤æè¿ã®ä¾ãç´¹ä»ããã¨ã
å·åãã¶ãç¼ãã¨ãã«è¿½å ã§å¦»ãããã¼ã³ã³ãã®ãã¾ãããã¦ã¤ã³ãã¼ãã®ãã¾ãããã¨èãã¦ããã®ã§ãããã¯æä»çè«çåã§ããï¼ãã¨èãã¦ã妻èªèº«ãè¨ã£ããã¨ãåæã«æãç«ããããã¨ãã§ããã®ãããã¡ãªã®ãããèããããããã¦éãã§ãã¾ãã
å°ãæ
ã¦ãæãã«ã¯ãªãã¤ã¤ãçããè¨ã£ã¦ãã妻ã¯å¯æãã§ãã
ã¨ã¾ãããããªæãã§æ¥å¹´ä»¥éã楽ããéããããã§ãã
å»å¹´ã¯çµå©ãã¦ããã ã£ãã®ã§ãæ¥ããã®ãããã¨ããæ¸ãã¾ããã
妻いつもありがとう - 雨のち曇り時々晴れ@aster_ism
ä¸å¹´çµã£ã¦èªã¿è¿ãã¨ã妻ãä»äºå§ãããè²ã
æä¼ããªãã¨ï¼ã¨æ¸ãã¦ãããã©ãã©ã¡ããã¨ããã°å¦»ã®ã»ãããããã家äºããã¦ããã®ã§ããã£ã¨èªåã®ã§ãããã¨ã¯ãããªãã¨ãªãã¨å°ãåçã
ä»æ¥ã¯å¦»ãä»äºãç§ã¯ä¼ã¿ãªã®ã§ã妻ã«ã¯å°ããã£ããå¯ã¦ããããªãããç§ããå¼å½ã®ããããæºåãã¦ãã¾ãããã®è¨äºã¯ãããããå·ããã¾ã§ã®æéã使ã£ã¦æ¸ãã¦ãã¾ãã