2012-01-01ãã1å¹´éã®è¨äºä¸è¦§
ãªããã¤ããµã©ã ãã©ï¼å°ãåã«fluent-loggerã®Haskellçã¨ï¼ãã®conduitã¤ã³ã¿ã¼ãã§ã¼ã¹çãä½ã£ãï¼ fluent-logger fluent-logger-conduit Haskellããfluentdã«ãã³ãã³ã¨ã¤ãã³ããã°åããï¼ä»¥ä¸ï¼process-conduitã¨csv-conduitã§dstatã®åºåãåãåºâ¦
ãã®è¨äºã¯ Haskell Advent Calendar 2012 15æ¥ç®ã®è¨äºã§ãï¼ ã¿ããªä½ãã¨ãµã²ãªãã®ä½ã£ãã hackage ã« upload ãã¦ã·ã¢ã¯ã»ããããããã¦ãã¨æãï¼ããï¼ãã°ããããã®ãããï¼ã¦ã¦ã¸ã§ã¦ï¼ãï¼ãã¨ãã°ï¼ãªã·ã´ãã¨ãã§ã½ã¼ã¹ããªã¼ãã³ã«ããã« Haâ¦
å¤ç¬ã®Haskellã«è¡ã£ã¦ããï¼ã®ã§ï¼ææ³ã¨ãã®ãã©ãã¼ã¢ããã«ãªããããªãã¨ãæ¸ãï¼ã¨ã¦ãããä¼ã ã£ãããã«æãï¼é å»ãã¦ç¾å ´ã«ä»ãããRLEãã¦ã¿ããã¨ããä¾é¡("AABBCCC"ã"A2B2C3"ã«ããé¢æ°ãæ¸ãã)ããã£ã¦ãã¦ï¼ id:khibino0 ãããããããã« â¦
sigma.jsã使ã£ã¦ã¿ããã£ãã®ã§ï¼hackageã®(baseãé¤å¤ãã¦)ããã±ã¼ã¸ä¾åé¢ä¿ãè¦è¦åãã¦ã¿ãï¼ é ç¹(=ããã±ã¼ã¸)æ°ãå¤ãã¦ForceAtlas2ã«ããé ç¹é ç½®ãããç¨åº¦å®å®ããã¾ã§ãé·ããFPSãä½ãï¼ã§ãã¾ããã£ã¨å¾ ã£ã¦ãã°ãããªãã«ãªãï¼æåã¯åããâ¦
ghcã¯C preprocessorã使ããï¼ã¨ãªãã¨ï¼ããä¸å±¤å¼·åãªãã¯ããæ±ãã¦Boost.Preprocessorã使ã£ã¦ã¿ãããªããããããªãï¼ããï¼ãã£ã±ãããªãã¨ãªããããããªãï¼ã¨ããããµã³ãã«ã³ã¼ã {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -F -pgmF ./cpp.sh -I/uâ¦
第4å ã¹ã¿ã¼ãHaskell2ã§Lightning Talkãã¦ããï¼LTã¨ã¯ããèªåããæ 使ã人ããªãã£ãã®ã§ï¼ãã£ããæé使ããã¦ããããï¼ä¸»å¬é£ã«æè¬ï¼ã¡ããã©IOã®åã ã£ãã®ã§(ã¨ãããããã¾ã§æ¥ãã®ãå¾ ã£ã¦LTæ ããã£ãã®ã§)ï¼ãããµå ´ã¸ã®å§èªã¨ããæå³ã§ãµâ¦
çµæï¼Lightningã¯ä½æ ãã¨ã³ããªã¼ããã¦ãªãã£ã(æ稿ãã¹ï¼)ï¼Mainã¯Round1ã99ä½ééï¼Round2ããã¾ãå¤ããã100ä½ã§æéï¼ã©ããSIGINTã®ãã³ãã«å¨ãã§ã¹ã³ã¢0æ»ãããã¼ã ãå¤ãã£ãã¿ããï¼åæï¼ä»åã®ããã«å ¬å¼ã®ç¨æããå®è¡ç°å¢ã試ããªãå ´åâ¦
çµæABC3å®300ç¹ï¼ A ååããã®ãã¹ãã£ããä»åãåºåæ«å°¾æ¹è¡ãå¿ è¦ã¨ããAtCoderèªä½ã®ä»æ§ãå®å ¨ã«å¿ãã¦ãã¦1WAï¼ããªããç ããï¼http://arc006.contest.atcoder.jp/submissions/33407 B foldrã§ä¸ããã¢ã¿ãªä½ç½®ãä¸ãã¦ãã£ãï¼http://arc006.conteâ¦
.bashrcã¨ãã§ä»¥ä¸ã®ããã«è¨å® function length() { echo -n ${#1} } function init-prompt-git-branch() { git symbolic-ref HEAD 2>/dev/null >/dev/null && echo "($(git symbolic-ref HEAD 2>/dev/null | sed 's/^refs\/heads\///'))" } if which git 2â¦
(2014/04/05追è¨) ãã®è¨äºã®å 容ã¯ghc-mod-4以éã§ã¯éç¨ããªããªãã¾ããï¼ç§ã®ãããªNo Windowæ´¾ã®Emacs使ãã«ã¨ã£ã¦ã¯ã¨ã©ã¼ã»è¦åããããããã¡ã«åºã¦ãããªãã¨æ£ç´å°ãï¼ãããããã¨Windowã¢ã¼ãã§ã¯M-n/M-pæã«ãããã¢ããã¨ããã¦ããã¦ãã®ããâ¦
å»å¹´ã«ç¶ãã¦ä»å¹´ãã®ã¨ãããããã³ãã¼ãã£ãâ¦(æä¾)åé¡ã¯ããï¼è½ç¤ã浸水ããã²ãªã©è¤éãªå½¢ç¶ãæã£ãLambdaé±åºããLambdaè³æºãæãåºãLambdaæ¢ç´¢ãããããä½ãã¨ãããã®ï¼ã³ã³ãã¹ãéå§æã«ä¸ããããé害è¦ç´ ã®ä»ï¼ã³ã³ãã¹ããé²ãã§ããã¨åâ¦
çµæABCDEå®+Jé¨åç¹ã§503ç¹ã®84ä½ï¼å¾åã¯å¤§å¹ ã«æéä½ããã¦ãã¬ã¤æ¾æ£ï¼Haskellã§vectorã¨ãmonad-memo使ããªãã®ããã·ã¤ï¼ A 誤差å ã«åæ°ã§ããã¾ãç æè¨ãæ¢ãã®ã¿ï¼è¨±å®¹ã¬ã³ã¸ã®æ大ãæéã§å²ã£ã¦ãã£ããæéããããå¤ã許容ã¬ã³ã¸ã®æå°ä»¥ä¸ãªâ¦
çµæABC3å®300ç¹ï¼Aã¨Cã§ã¨ã¦ããã ããªãWAããã£ãã®ã§åé¡è¯ãèªãèªåï¼ã¨ããã§AtCoderã¯é£æ度å¾æé ç¹ããªãã®ã ãããï¼ A ãããªã®ã«WAã£ãï¼ã¾ãåºåæ«å°¾æ¹è¡ãå¿ è¦ã¨ããAtCoderèªä½ã®ä»æ§ãå®å ¨ã«å¿ãã¦ããï¼æ¬¡ã«æ«å°¾ã«'.'ãä»ããã¨ãããã¨ãâ¦
çµæABC3å®300ç¹ã®45ä½ï¼ã¨ãã«ãªã«ãè¨ããã¨ãªãï¼ A ãã¼ã¿ãå°ããã®ã§ç·å½ããã§ããï¼http://arc004.contest.atcoder.jp/submissions/23166 B æé·ã¯ã¾ãç·åã§ï¼æçã¯ä¸è§å½¢ãæ§æããã«è¶³ããã調ã¹ãï¼http://arc004.contest.atcoder.jp/submissioâ¦
æè¿ãªã«ããDebianå¢ããHaskell使ããªãDebianãã¨çããã·ã¥ãã¦ãã¦ã¦ã¢ã¬ãªã®ã§ï¼Gentooå¢ã¨ãã¦ã®è©±ãå°ã ï¼Debianå¢ãç¾æç¹ã®cabalãæã¤èå¼±ãªhackageéä¾åæ§è§£æ±ºãcabalãå¹²æ¸ã§ããªãhackageå¤ããã±ã¼ã¸ã¨ã®ä¾åæ§è§£æ±ºãaptã§ã«ãã¼ãã¦ãããâ¦
ãã£ãã¼ââã®åãMySQLã§ãããã¼ã·ãªã¼ãº JavaScript mruby ãè¦ã¦ï¼ãã®ãã¿ã¯èªåã«ãã§ãããã ãªã¼ã¨æã£ã¦ï¼Haskellã®å¼ãè©ä¾¡ããMySQL UDFãä½ã£ã¦ã¿ãï¼mysql-haskell-plugin mysql> select hs_eval('sum [1 .. 10]'); +--------------------------â¦
GTALibã§ã¯ï¼ã©ã¤ãã©ãªå´ã®æä¾ãã¦ãããJoinListã®Generatorããããããå½¢ãã«ãªã£ã¦ããããï¼ãããã®Generatorã使ã£ã¦ãã°DPååã³ä¸¦ååããããï¼segs,inits,tailsãªã©ã¯ã©ããçµåãªã¹ãæºååã§å¹ççã«æ§æã§ãï¼ãããã®Generatorããã®ããã«â¦
ã ã¼ãã¼ã ã¼ï¼ASã®ã¿ã§ã°ãºã°ãºï¼A,Bã¯åååããåé¡ã ã£ãã®ã§æããã¨ããï¼ A ã¿ã¼ã¶ã³ã®ããã«ãã¿ã渡ã£ã¦ããã岸ã¾ã§è¡ãããåé¡ï¼ãµã³ãã«3ãæªãããã©ãã¿ã¨ãã¿ã®éã¾ã§ä¸¡æ¹ã®ãã¿ãå¼ãã¦æ¬¡ã¸ç¹ããããã®ãèªã¿é£ã°ãã¦ããï¼æågreedyãã¨â¦
ã¾ããR1å ¨é¨ãããã¡ã«ãªããã¨ã¯ï¼R1ãä¸çºãã¹ããªãã£ãã®ã£ã¦å§ãã¦ããï¼ R1A 1062ä½ã§ã®ãªã²ã£ããããï¼AS,AL,BS,BLç²ã£ã¦ã¹ã³ã¢çã«ã¯ãã¼ãã¼ä¸ã ã£ãã®ã ãï¼æéè² ãï¼ç¹ã«å¦ãªãããããã£ãããã§ããªãåé¡èªä½ã大ãã¦é£ããã¯ãªãã£ããï¼â¦
ã¾ã çµãã£ã¦ãªãæéããæ¸ãåºããªã©ï¼Dã¡ã³ããããªãã ããï¼çµæ3å®300ç¹ã®147ä½ï¼Cã§ãããã¾ãã£ãWAãããçãï¼ A ã¨ãã«ãªãï¼æ¸ãã ãï¼http://arc002.contest.atcoder.jp/submissions/6983 main=readLn>>=putStrLn.isLeap isLeap n | 0 == mod nâ¦
Branch Coverage 100% ã¨ãã£ã¦æ¸æåå¼ãããæ¡ä»¶ã«å¯¾ãï¼mallocã¨ãfopenã¨ããããããã¤ã®å¤±æã«ã¼ããã©ã確èªããï¼ã¿ãããªè©±ãåºããã¨ãããã¨æãï¼defineç½®æããæ¹æ³ã¨ãããã¿ããã ãã©ï¼ä½è¨ãªå ´æã¾ã§æ ¹å®ã失æããã¡ãã£ããï¼å¥ã®mallocâ¦
TLEã«ä»å¹´ã¯3æéããåå ã§ãã¦ãªãï¼ããã¤ï¼ã¿ããªãã£ã¨ç§ã«ããããããã¹ãï¼ãã¤ã«ãå¢ãã¦ã¶ãã¯ãªãªéå¶ã ã£ããããªæ°ãããï¼CfPæ¥ãªãã£ãããç´åã«å ¬å¼ãµã¤ã(1å¹´ã®å¡©æ¼¬ãããã¯ãã¼ã¯)ã«ã¢ãã¦ã³ã¹ãããã¾ã§æ¥ç¨ããããªãã£ããï¼ã¾ï¼ããâ¦
ãã¤ã¢ãªã¼ããã®ã¤ã³ãã¼ãæ©è½ç¡ãï¼