2015-06-01ãã1ã¶æéã®è¨äºä¸è¦§
ï¼ï¼Raspberry Piã«BrickPiãæè¼ãã Raspberry Piã®ç¹å¾´ã®ä¸ã¤ã¯ãå¤é¨ã®å¨è¾ºæ©å¨ã¨ã®æ¥ç¶ãç°¡åãªãã¨ã§ãããã¢ã¼ã¿ãã¤ãããã¨ã§åããã®ãä½æã§ããããããã«ãã»ã³ãµãã¤ããã°æ¤ç¥ãè¡ããããã«ãªããä¸æ¹ãLego Mindstormsã«ã¯ãLegoã®ãããã¯â¦
ï¼ï¼ï¼ã©ã±ããã§ãã³ãã³çãè·³ãè¿ãåé¡ã®è§£ Netwireã®ç´¹ä»ã§ãæåã«ä¸ããåé¡ã¯æ¬¡ã®ããã«ãªã£ã¦ãããåé¡ï¼Netwireã§æ¬¡ã®ã²ã¼ã ãå®ç¾ããªãããä»æ§ï¼ãã³ãã³çã空ä¸ã«æãåºãããã¨ããããã®æããã³ãã³çãè½ã¡ãªãããã«ãæ°´å¹³ã«ç§»åããã©â¦
ï¼ï¼ï¼å£é¢ã§è·³ãè¿ã ååã®è¨äºã®åè§ãããã¯ã¹ã¯ããã¼ãæ¼ãããæãï½è»¸ã«æ²¿ã£ã¦çé度ã§å·¦ãããã¯å³ã«ç§»åãããããããå´é¢ã«å£ããªãããããããã§ãå·¦ãããã¯å³ã«é²ããã¨ãã§ããããã®åç´ãªã²ã¼ã ããããå°ãç¾å®çãªã²ã¼ã ã«ããããã両â¦
ï¼ï¼ï¼ããã¯ã¹ãåãã ããã§ã¯ãåè§ãããã¯ã¹ãå·¦å³ã«åããåç´ãªã²ã¼ã ã®ä½ææ¹æ³ã«ã¤ãã¦è¨è¿°ãããã²ã¼ã ã¯æéã¨ã¨ãã«é²è¡ãã¦ãããNetwireã§ã²ã¼ã ã«ç»å ´ãã¦ãããã®ã®æ¯èãã¯ãWireåã®å¤ã§å®ãããã¦ãããã²ã¼ã ãé²è¡ããä¸ã§ãå¤ãå¤åâ¦
ï¼ï¼ï¼ãã¼ãã¼ãããã®ã¤ãã³ã ååãåã åã®è¨äºã§ã¯æéã«é¢ããã¤ãã³ãã«ã¤ãã¦è¨è¿°ããããããã§ã¯ããã¼ãã¼ããæä½ããã¨ãã®ã¤ãã³ãã«ã¤ãã¦èª¬æããããã¼ãã¼ãããã®ã¤ãã³ãã®å¦çã®ä»æ¹ã¯ãã©ã®ã°ã©ãã£ãã¯ã¹APIãç¨ãããã«ãã£ã¦ç°ãªâ¦
ï¼ï¼ï¼ã¢ãã¼è¨æ³ wireã¯ãå ¥åaãåãã¦ãåºåbãåºããã¨ã§ããã®æ¯ãèãã表ãã¦ããããåã®è¨äºã§ã¯ãå ¥åaã®åå¨ãåããã«ããã£ãã®ã§ãwireã®æ¬è³ªãã¨ããã«ããã£ããããããªããããã§ãããã§ã¯ãåã®è¨äºã§ç¨ããããã°ã©ã ãç価ãªã¢ãã¼è¨â¦
ï¼ï¼ï¼Netwireã®æ¦è¦ æ¯èãã¯æ¬¡ã®ããã«å®ç¾©ããã newtype Behavior t a b = Behavior { stepBehavior :: t -> a -> Maybe (b,Behavior t a b) } netwireã§ã¯ãã¼ã¿åWireã«ãã£ã¦æ¯èãã次ã®ããã«å®ãã¦ãã(5.0以åã®Netwireã§ã¯ãããã¾ã§ã®èª¬æã¨åâ¦
ï¼ï¼æå¶ï¼Inhibition) Netwireãç¹å¾´ã¥ãã¦ããæ©è½ã®ä¸ã¤ã¯ãinhibitionã§ããããã®åèªã®hibitã®é¨åã¯ãã©ãã³èªã®habitã§ãã¤ããã ãæã¡ç¶ããããããã¨ãã表ãã¦ãããæ¥é èªã®inã¯ãä¸ã«ãã表ããä¾ãã°ãå¿çå¦ã§ã¯ãããå¿ççæ©è½ãä»ã®å¿çâ¦
ï¼ï¼ååã¸ã®ã¤ã³ã¹ã¿ã³ã¹å ååã®è¨äºã§ãæ¯èãã次ã®ããã«å®ç¾©ããã newtype Behavior t a b = Behavior { stepBehavior :: t -> a -> (b,Behavior t a b) } ãã®æ®µéã§ã¯ãåã¨ãã¦å®ç¾©ããã ããªã®ã§ããããããªæ§è³ªãæãããããã«ãå¿ è¦ãªåã¯ã©â¦
ï¼ï¼é¢æ°åãªã¢ã¯ãã£ãã»ããã°ã©ãã³ã° é¢æ°åãªã¢ã¯ãã£ãã»ããã°ã©ãã³ã°ãç¹å¾´ã¥ããã®ããã¹ã¤ããã§ãããããã«é¢ãã¦ã¯Yampaã®è¨äºã§ããã¤ãåãä¸ãããããã§ã¯ãæãç°¡åãªã¹ã¤ãããç¨ãã¦ãNetwireã§ã¯ã©ã®ããã«å®ç¾ããã®ãã説æãããã¹â¦
ï¼ï¼Raspberry Pi Raspberry Piã¯ãä¸çªæåã®é ã®ã¦ã¼ã¶ã¼ãªã®ã ãããã®å¾ãé·ããã¨ãç¡æ²æ±°ã ã£ããå æ¥ããããã ã§é ªè¾²æ¥ã®æ¯æ´ããã¦ããã³ã³ãµã«ã¿ã³ãã®æ¹ã¨è©±ããã¦ããã¨ãã«ãå°ä¸ãå°è¡¨ãå°ä¸ã®ãã¡ãã¡ã«ã»ã³ãµã¼ãè¨ãã¦ãæ§ã ãªãã¼ã¿ãåéâ¦
ï¼ï¼ã¹ã¤ãã ã¤ãã³ãã®çºçã«ãããæ¯èãã¯å¤åãããä¾ãã°ããã¼ã«ãåºã«è½ä¸ãããã¨ãåºã«ã¶ã¤ãã£ã¦ããã¼ã«ã¯è·³ãè¿ã£ã¦ããããã®ãããªç¶æ³ãè¨è¿°ããããã«ãé¢æ°åãªã¢ã¯ãã£ãã»ããã°ã©ãã³ã°ã§ã¯ã¹ã¤ãããç¨ãããã¹ã¤ããã®åã·ã°ããã£ã¯â¦
ï¼ï¼ã¤ãã³ã ã¤ãã³ããæ¯èãã¨åãããã«åã§è¡¨ããå³ã¡ãtã¨ããæéã«eã¨ããã¤ãã³ããçºçããã¨ãã newtype Event t a = Event { getEvent :: (t,a) } ã¨ãããã¼ã¿åã§è¡¨ããããã¯ãæ¯èããå®ç¾©ããBehaviorã®åã¨æ¯è¼ããã¨ããä¼¼ã¦ãããã¨ãâ¦
ï¼ï¼åé¡ æåãããããªãåé¡ã§ãããåé¡ï¼Netwireã§æ¬¡ã®ã²ã¼ã ãå®ç¾ããªãããä»æ§ï¼ãã³ãã³çã空ä¸ã«æãåºãããã¨ããããã®æããã³ãã³çãè½ã¡ãªãããã«ãæ°´å¹³ã«ç§»åããã©ã±ããã§åå°ãããªãããã¾ããå·¦å³ã«ã¯å£ããããã®ã¨ãããã³ãã³â¦
ï¼ï¼åä»ãã©ã ãè¨ç® ãã¼ã¯ã¬ã¤ã®ä¿®å£«èª²ç¨ã®å¦çã ã£ãããã«ãå¾ã«ãã¥ã¼ãªã³ã°è³ãã¨ããã¨ã«ãªãM. Blumææãã"Theory Of Algorithms"ã®è¬ç¾©ãåãããæ¥æ¬ã®è¬ç¾©ã¨æ¯è¼ããã¨ããã¼ã¯ã¬ã¤ã®å çãã¡ã®å¤ãã¯ã系統ã ã£ã¦ãããããã説æãã¦ãããâ¦