Perl6 ã¯ä½å¹´çµã£ã¦ãæ£å¼ã«ãªãªã¼ã¹ããã¾ããããã㪠Perl6 ã Audrey Tang ããã¯ããã£ãã®æ°ã¶æã§ä½ãã¾ããããã®å®è£ 㯠Pugs ã¨å¼ã°ãã¦ãã¾ããçæéã®éçºãå¯è½ã«ããç§å¯å µå¨ã¯ Haskell ã§ãã
ãã® Audrey ãããã2006å¹´ã«æ¥æ¬ã§ Haskell について説明ãã¦ããã¾ãã(資料)ãæ®å¿µãªããããã®ããã®å㯠Haskell ã«èå³ããªãã£ãã®ã§ãã¥ã¼ããªã¢ã«ã¯åãã¦ãã¾ãããããã®æ¦è¦ã«ã¯ããæ¸ããã¦ãã¾ãã
ã³ã¼ãã¼ã±ã¼ã¹ãæ¢ãã®ã«ã¦ããããã¹ããæ¸ãã®ã«ç²ããï¼ QuickCheck ã使ã£ã¦ã³ã³ãã¥ã¼ã¿ã«æ¸ããã¡ããã¾ããããæ£è¦è¡¨ç¾ãã¼ã¹ã®ãã¼ãµã¯ã¡ã³ããã³ã¹ãã«ããã®ã«æ°ã¥ããï¼ Parsec ã使ã£ã¦ 15å㧠Perl6 ã®å®å ¨ãªãã¼ãµãæ¸ãæ¹æ³ãåå¼·ãã¾ãããããããããã¯ãã¬ã¼ã¹ã³ã³ãã£ã·ã§ã³ã¯ããããããï¼ STM ã concurrency åé¡ã¯å ¨é¨è§£æ±ºãã¦ããã¾ãã XS ã SWIG ãé çã®ç¨®ã«ãªã£ã¦ãï¼ FFI ãªã C ã³ã¼ããç°¡åã«ããã¤å®å ¨ã«åãè¾¼ãã¾ããã
ãã¼ã¯ã¼ãã¨ãã¦æãããã¦ãã QuickCheckãParsecãSTMãFFI ã«èå³ã湧ãã¾ãããï¼ ãããªå®è·µçãªæè¡ãç¶²ç¾ ãã¦ããæ¬ããReal World Haskell ã§ãã
Real World Haskell: Code You Can Believe In
- ä½è : Bryan O'Sullivan,John Goerzen,Donald Bruce Stewart
- åºç社/ã¡ã¼ã«ã¼: O'Reilly Media
- çºå£²æ¥: 2008/12/05
- ã¡ãã£ã¢: ãã¼ãã¼ããã¯
- è³¼å ¥: 2人 ã¯ãªãã¯: 78å
- ãã®ååãå«ãããã° (40件) ãè¦ã
ãã®æ¬ã®å稿ã¯ãインターネットで公開ãããããããã®ã³ã¡ã³ããããã£ãå¾ã«ãç´åªä½ã¨ãã¦åºçããã¾ããã
åã¯ãªã³ã©ã¤ã³çã® Using Databases ã®ç« ãèªã¾ãã¦é ãããããã§ãHaskell ãã SQLite ãæä½ã§ããããã«ãªã£ãã®ã§ãamazon ã§æ³¨æãåãä»ãåºããã¨ãã«ããäºç´ãã¾ããã(届くまでに3ヶ月かかりましたãããã)
ãã®æ¬ã¯670ãã¼ã¸ããããèªã¿çµããã®ãå¾ ã£ã¦æ¸è©ãæ¸ãã¨æ¬ãéãã¦ãã¾ãããã§ããããã§ããã©ã¤ã³ã°ã§ç³ã訳ãªãã®ã§ãããæãèªã¿ããæç¹ã§ã®æ¸è©ãæ¸ãã¦ããã¾ãã
å 容
åã¯ããã®æ¬ã«ã¯ Haskell ã®åºç¤ã¯æ¸ããã¦ããªãã®ã ããã¨åéããã¦ãã¾ãããããããæåã®4ç« ã«ã¯åºç¤ãæ¸ããã¦ããããã®å 容ãèªãã§æå¿ãã¾ããã
Haskell ã§ã¾ãèºãã®ã¯ãfor æããªããã¨ã§ããç¹°ãè¿ãã¯å帰ã§å®ç¾ããã¨è¨ããåã£ã¦ãã¾ãã°å½ããåã®ãã¨ã«æ°ä»ãã¾ã§ã«æéããããã®ã§ããã§ããã®æ¬ã§ã¯ãå®éã« C ã® for æã Haskell ã®å帰ã«ç´ãæ¹æ³ãã¡ããã¨èª¬æãã¦ããã¾ãã
代æ°ãã¼ã¿åã«ã¤ãã¦ãããã§ããCã®æ§é ä½ãå ±ç¨ä½ã¨å¯¾æ¯ããªãããHaskell ã®ä»£æ°ãã¼ã¿åã解説ãã¦ãã¾ãã(C ãç¥ããªã人ã«ã¯ãåããããã¨ã¯è¨ããªãããããã¾ããã)
Audrey ãããæãã QuickCheckãParsecãSTMãFFI ã«ãããã¡ãã触ãã¦ãã¾ããå㯠Parsec ã«è©³ããã®ã§ãUsing Parsec ç« ã«ã¤ãã¦ææ³ãè¿°ã¹ã¦ããã¾ãã
Parsec にはチュートリアルãããã¾ãããå 容ãå¤ããã¾ãééãããããä¾ã¨ãã¦æãããã¦ããã³ã¼ãã¯åããªããã¨ãããã¾ããä¸æ¹ã§ãUsing Parsec ã®ç« ã ããèªãã§ã使ãããªããããã«ãªãã®ã¯ãã¡ãã£ã¨ç¡çãããæãã§ãã
ã§ãã®ã§ãã¾ã Parsec ã®ãã¥ã¼ããªã¢ã«ãã還暦プログラマの挑戦(Haskell に挑む)ããåèã«ããªãããã£ã¦ã¿ã¦ã次㫠Using Parsec ã®ç« ãèªãã¨ããã§ãããããã¥ã¼ããªã¢ã«ã§ã¯æ°å¼ã®ãã¼ãµã¼ãä½ãã ãã§çµãã£ã¦ãã¾ãã¾ãããUsing Parsec ã®ç« ã«ã¯ãJSON ãªã©å®è·µçãªä¾ãè¼ã£ã¦ãã¾ãã
Real World Haskell ã§å¿ è¦ãªã®ã¯ãMonads ã®ç« ã§ããããã¿ãªãããã¢ãããç解ã§ãã¦ã¾ããï¼ åãããã解説ã£ã¦ãã»ã¨ãã©è¦ããã¨ãªãã§ãããï¼
åã¯1å¹´ã«æ¸¡ã£ã¦èª¿ã¹ãçµæãããããåããåãªããã説æããã¨æã£ã¦ãã¾ããã
- é¢æ°åããã°ã©ãã³ã°ã®å¿ã¯ãå°ããªé¢æ°ãæ¸ãããããã¤ãªãåããããã¨ã ã
- Haskell ã§ã¯æ¼ç®åãèªç±ã«å®ç¾©ã§ããããã®æ¼ç®åã¯ããã¼ã¿ã ãã§ãªãé¢æ°ãé£çµã§ããã
- (ãã¼ã¿ãå«ã)é¢æ°ãã¤ãªãåãããæ¼ç®åãã³ã³ããã¼ã¿ã¨ããã
- ã³ã³ããã¼ã¿ã¯ã¨ã£ã¦ã便å©ãæ¢ç´¢ã¨ããã¼ãµã¼ã¨ããèããã¨ããåãã
- ã§ããåé¡é åãã¨ã«ç¬èªã®ã³ã³ããã¼ã¿ãä½ã£ã¦ããã¨ç ©éã«ãªãã
- ã ãããã³ã³ããã¼ã¿ãä½ãéã®ææ¨ã欲ããã
- ã³ã³ããã¼ã¿ã®æ§è³ªãæ½è±¡åãã¦ããã¨ãã«ãã´ãªã¼è«ã§ããã¢ããã«ãªããã¨ãåã£ããç解ã§ããªãã¦ããããã©ãç°¡åã«è¨ãã¨ç¾¤ã¿ãããªæãã群ã§è¨ãæ¼ç®åãã»ãã«ã¯ãããæ§è³ªãããã§ãããï¼
- æ°å¦çãªè£ä»ãããã¨ã«ããæ¨æºåãããã³ã³ããã¼ã¿ãã ">>=" (bind)ã
- ã¨ãã訳ã§ãã³ã³ããã¼ã¿ãä½ãé㯠>>= ã«ã§ããªãã(ã¢ããã«ã§ããªãã)ãèãã¦ã¿ãã
- æ¨æºåããã®ã ããã1ã¤ã ããã¬ã¼ã ã¯ã¼ã¯ãä¸ãã¦ããããããã doã
- do ã ã¨ãããããå½ä»¤åè¨èªã®ããã«æ¸ãã¦ä¾¿å©ã
- ã¢ããã«ã§ããã°å ±éã®ãã¬ã¼ã ã¯ã¼ã¯ã§ãã do ã使ãããã
Monads ã®ç« ã¯ãã»ã¨ãã©åãããã«èª¬æããã¦ãã¦ãããã¯ãªãã¾ããã
Real World Haskell ã®æ®å¿µãªã¨ããã 2 ã¤æãã¦ããã¾ãã
- unsafePerformIO ã«ã¤ãã¦è§£èª¬ããªã
- ããããªã㨠IO ã¢ããå°çããæãåºããªã
- Haskell Server Pages ãåãä¸ãããã¦ãªã
- PHP ã JavaScript ã® XML ãªãã©ã«ãã便å©ãããã
ã¯ããåãªã欲張ããéç®±ã®é ãã¤ã¤ãã¦ããã ããªã®ã§ãæ°ã«ããªãã§ä¸ããã
Real World Haskell ã¯ããã®åã®éããHaskell ã§å®è·µçãªããã°ã©ã ãæ¸ããã¨ãã¦ãã人ã«ã¨ã£ã¦å¿ é ã§ãã