Building a modern functional compiler from first principles. Stephen Diehl In 2014 I wrote a short tutorial about building a small imperative language in Haskell that compiled into LLVM. I was extremely happy with the effect the tutorial seemed to have, and the warm response I got from so many people was very encouraging. I've done a great bit of thinking about what the most impactful topic I coul
nullå®å ¨ããããã«ãªããããããããããè¦ãã¤ãã¾ã¤ã æ©æ¢°ãç解ã§ããè¤éãªå¥ç´ã®å表ç¾ããããããã®ã¯ ã¤ã¾ãã¨ãããã®ãããªãã® ãã¶ã¶(åã£ãè ¹ãã証æãªãã¸ã§ã¯ããå¼ãæºãåºã)â Noriyuki OHKAWA (@notogawa) 2016å¹´11æ18æ¥ éãããã¯ç¶åã°ããããã¨ãï¼ æè¿nullå®å ¨ï¼ã ãã®è©±ã®ããã¿ã§ï¼(éçãª)åã§å¥ç´äºã ã表ç¾ãã¦ã·ã¢ã¯ã»ã«ãªãããã ãã¼ã¨è¨ãã®ããã©ãã©è¦èãããï¼ãã¨ãã°ï¼pythonã§çµ±è¨ãªãæ©æ¢°å¦ç¿ãªããã£ã¦ã¦numpyå¼ããããªäººãï¼ndarray(å¤æ¬¡å é å)ã®shape(å¤æ¬¡å é åã®å½¢)ãåããã¨ã©ã¼ã§è½ã¡ããã¨ãããããã¢ã¬ã«ã¤ãã¦äºã ã¨ããï¼ãªãã»ã©åãããã°å®è¡åã«æ¢ãããã¨ãã§ãï¼å®è¡æï¼ã¨ã©ã¼*1ã«ãªã£ã¦ãã¡ã¼ã¿ãããªãã¨ã¯é¿ããããã ããï¼ ãããï¼ããã天å½ã¸ç¶ãéãã©ããã¯ã¾ãå¥ã®è©±ï¼(ä¾å)åã§è
ä¾ååãªãããã«å®å ¨ã«ããã°ã©ãã³ã°ã§ãã¡ã¾ããã ï¼ã¨è¨ã£ãã¨ããã§ï¼ãç¡æã§éã¹ã¡ã¾ããã ï¼ãã¨ãã3000åæãã°ç¡æã§10é£ã¾ããããã¿ãããªæãããï¼ ä¾åå使ããªãå ´åã¨ã©ãéã£ã¦ããã®ã å ¥åºåããæ±ãå§ããã¨ã©ããã£ãå½¢ã®ããã°ã©ã ã«ãªãã®ã 大æ¦ã©ãããæµãã§ããã°ã©ãã³ã°ãããã¨ã«ãªãã®ã ã¨ãï¼ãããã£ã話ãéãã§ã¯ãããªã«è¦ãªãããªã¼ã¨ããæ°ãããã®ã§ï¼ããåºæ¬çãªãã®ãä¸éãã¾ã¨ãã¦ãããã¨æã£ã¦ï¼ ã¾ãï¼èª¬æã«ä½¿ãåé¡è¨å®ã«ã¤ãã¦ï¼è¡åæ¼ç®ï¼ç¹ã«è¡åç©ãèãã¦ã¿ãï¼ãã ãï¼è¡åã®å½¢(è¡ã¯ããã¤ï¼åã¯ããã¤)ã«ã¤ãã¦ã¯ããã°ã©ã ã®å¤ããå ¥åã«ãã£ã¦æ±ºå®ãããããªç¶æ³ã¨ããï¼ããèªä½ã¯æ®éã®åé¡è¨å®ã ã¨æãããï¼ ä¾ååã使ããªããã°ç¹ã«ã©ãã¨ãããã¨ãç¡ãï¼æããè¡åã®åã次ã®ããã«å®ç¾©ãï¼ -- å½¢ã®ã¿æã£ã¦ããï¼ä¸èº«ã®æ°å¤ã«ã¤ãã¦ã¯ç°¡åã®ããçç¥ data Ma
ãªãã¸ã§ã¯ãã¬ã¤ã¢ã¦ã é常ã®Haskellã®å¤(代æ°çãã¼ã¿åããã³é¢æ°)ã¨ãæªè©ä¾¡ã®è¨ç®ã表ããµã³ã¯ã¯ãå ¨ã¦ãã¤ã³ã¿ã§åç §ãããããã¤ã³ã¿ãæãå ã¯é常ã¯ãã¼ãä¸ã®ãªãã¸ã§ã¯ãã ããéçã»ã¯ã·ã§ã³ã«ç½®ããã¦ãããã¨ãããããããã«ãã¦ãã¬ã¤ã¢ã¦ãã¯åãã§ã以ä¸ã®ä¸è¬å½¢ãã¨ãã ãªãã¸ã§ã¯ãã®å é 1ã¯ã¼ãã¯éçé åã¸ã®ãã¤ã³ã¿(infoãã¤ã³ã¿)ã§ããã®å¤ãè©ä¾¡(é¢æ°ãªãé©ç¨)ããããã®ã³ã¼ã(entry code)ã¨ããã®ãªãã¸ã§ã¯ãã®ç¨®é¡ã«é¢ããæ å ±ãéç©ããã¬ã³ã¼ããæãã¦ããããªããGHCã«ããã1ã¯ã¼ãã¯ãã¤ã³ã¿ã¨åã大ãããã¤ã¾ã32ãããOSãªã32ãããã64ãããOSãªã64ãããã§ãããããã¯Intã®ç²¾åº¦ã¨åãã§ãããã 代æ°çãã¼ã¿å 代æ°çãã¼ã¿åã®è©ä¾¡æ¸ã¿ã®å¤ã§ã¯ãinfoãã¤ã³ã¿ãæ§ç¯åã®ç¨®é¡ã表ãããã®å¾ã«æ§ç¯åã®å¼æ°ãå ¥ããã¹ããããç¶ãããããã£ã¦ãNå¼
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}