ç¶ç¶ã¢ããã£ã¦ä½ã«ä½¿ããã åé¡ã«å¯¾ããä¸ã¤ã®ä¾ã ãªã½ã¼ã¹ç®¡çã®åé¡ ããã°ã©ãã³ã°ããã£ã¦ããã¨å¿ ãã¾ã¨ããä»ãã¦ããã®ããªã½ã¼ã¹ç®¡çã®åé¡ã§ããããã§æããªã½ã¼ã¹ã¨ããã®ã¯ããã¡ã¤ã«ã®ãã³ãã«ã ã¨ããã½ã±ããã ã¨ããæä»å¦çã®ããã®ããã¯ã ã¨ããã°ã©ãã£ãã¯ã®ãã³ãã«ã ã¨ããããã話ã§ãGCã®ãªãè¨èªã ã¨ã¡ã¢ãªã®ç®¡çãããã«å«ã¾ããã§ããããã è¨ãã¾ã§ããªãããªã½ã¼ã¹ã確ä¿ããå¾ã¯ãããã¹ãã¿ã¤ãã³ã°ã§ç¢ºå®ã«è§£æ¾ãã¦ããå¿ è¦ãããã¾ãããããå¾ã ã«ãã¦ãç¾å®ã®ããã°ã©ã ã§ã¯ãªã½ã¼ã¹ã®è§£æ¾æ¼ããçºçãã¦ãã¾ãã¾ããåã«è§£æ¾ããã³ã¼ããæ¸ãå¿ããã¨è¨ãã®ãä¸çªåç´ã§ãããããªãçç±ã§ãããããã§ããCè¨èªã®ããã«ãªã½ã¼ã¹è§£æ¾ã®ããã®ç¹å¥ãªä»çµã¿ãæããªãè¨èªã§ã¯ããããå¾¹åºããã®ãçµæ§éª¨ã®æãããã¨ã ã£ãããã¾ããããã¯ã¨ããããããå°ãé«å°ãªæ©ã¿ã¨ãã¦ã¯ãä¾å¤ã¨ã®çµã¿åããã§çºçãã解
éå®ç¶ç¶(shift/reset)shiftã¯resetã¾ã§ã®ç¶ç¶ãã¨ã (reset (+ (shift k (k 1)) 2)) ; => 3 ; k = (fn [x] (+ x 2)) å®è£ shiftã¯ç¶ç¶ã³ã³ããã¹ããè¿ã resetã¯callã«ããç¶ç¶æ¸¡ãå½¢å¼ã«å¤æ callã¯ç¶ç¶ãé©ç¨ãã (macroexpand (quote (reset (+ (shift k (k 1)) 2)))) (cont.core/call + (fn* [G__3646] (cont.core/call (new cont.core.Context (fn* [k] (k 1))) (fn* [G__3647] (cont.core/call (G__3646 G__3647 2) (fn* [G__3645] G__3645)))))) ä¾é決å®æ§è¨ç® (defn amb [& xs] (
Coqã§ç¶ç¶ã¢ãã 2014_05_15 @suharahiromichi 2014_06_01 @suharahiromichi Classã使ç¨ãã¦å®ç¾©ããªãããã ã¢ããã¨ç¶ç¶ã®è©±ãä¸åº¦ã§çä»ãã¦ãã¾ããã¨æããç¶ç¶ã¢ããã«ã¤ãã¦è§£èª¬ãããã¼ã¸ã¯å¤ãããã©ã大é¨åãHaskellã§ãããããCoq SSReflect ã§æ¸ãã¦ã¿ãããã£ã¨ããæ¬è³æã®å 容ãHaskellã«ã¤ãã¦è§£èª¬ããæç®2.ãå¤ãåèã«ããã¦ããã ããã ã¾ãããã£ããããé¢æ°ã®è¨¼æã¯æç®3.ã®Coqã«ãã証æãSSReflectã«ä¿®æ£ãããã®ã§ããã Coqã®ã¢ããã®ããã±ã¼ã¸ã¯æç®1.ã«ããããããã¯ä½¿ç¨ãã¦ããªãããã ãã>>=ãæ¼ç®åã®åªå é ä½ã¯ããããã æ¬è³æã®ã½ã¼ã¹ã³ã¼ãã¯ä»¥ä¸ã«ããã¾ãã https://github.com/suharahiromichi/coq/blob/master/ssr/s
Stop Writing JavaScript Compilers! Make Macros Insteadãèªãã§ãsweet.jsã使ã£ã¦ã¿ãã 解決ãããäº JavaScriptã§ã¯éåæå¦çãå¤ãã®ã§ãç¶ç¶æ¸¡ãã¹ã¿ã¤ã«ã®ã³ã¼ãã°ã£ããã«ãªãã®ã ãã©ãã¿ããªãããcallback hellã¨ãpyramid of doomã¨ãå¼ãã§å«ã£ã¦ããã ããã§ãããã¹ã¨ããã¥ã¼ãã£ã£ã¦ããã®ã使ãããããã«ãªã£ãããããã¹ã使ãå©ç¹ã¯çµæãåºã¦ããªãç¶æ ããã¡ã¼ã¹ãã¯ã©ã¹ãªå¤ã¨ãã¦ä½¿ããäºã ã¨æãããã¹ãã¯ãªããªããã©ãçµå±ææ³ã®æ¯æ´ããªãããpromise.then(function () {...})ã¿ããã«ãéå®ç¶ç¶æ¸¡ãçãªãã¨ã¯ããªãã¡ããããªãã ç¶ç¶æ¸¡ãå½¢å¼ãå«ãªãcall/ccã¨ãshift/resetãå°å ¥ãããããããããªããã¨ã¯ãã£ã¨æã£ã¦ãããããã§ä»æ¥ã¯ãsweet.
logict Provides support for logic-based evaluation. Logic-based programming uses a technique known as backtracking to consider alternative values as solutions to logic statements, and is exemplified by languages such as Prolog and Datalog. Logic-based programming replaces explicit iteration and sequencing code with implicit functionality that internally "iterates" (via backtracking) over a set of
PPL2014ï¼ http://www.fos.kuis.kyoto-u.ac.jp/ppl2014/ ï¼ã«åå ãã¦æ¥ã¾ããã å»å¹´ã«å¼ç¶ãã®åå ï¼ä½ãå»å¹´ã¯çºè¡¨ãªãã§è¦ã«è¡ã£ãã ãï¼ã ã£ãã®ã§ãããå»å¹´ãä»å¹´ãï¼ä¸»ã«ãè¶å¥³å¢ã«ããï¼éå®ç¶ç¶ã®çºè¡¨ãèãã¦ã¯ãéå®ç¶ç¶ã£ã¦ãªãã ã£ããã¨æã£ã¦ã¯ã°ã°ã£ãããæãã¦ããã£ãããã¦ãã¾ããã®ã§ãããå æ¸ã¡ãã£ã¨ã¯å¦ãã§ãããã¨æããOchaCamlãå ¥ãã¦éãã§ã¿ã¾ããã å ¬å¼ãã¼ã¸éãã«ã¤ã³ã¹ãã¼ã«ãã¦ã¿ã¾ã(OSã¯Ubuntu)ãtarãè½ã¨ã㦠cd ~/Project/OchaCaml tar xpfvz cl75unix.tar.gz tar xpfvz OchaCaml.tar.gz patch -p0 < OchaCaml/OchaCaml.diff cd cl75/src make configure ã¨ãããã§ã¨ã©ã¼ã gcc:
OchaCaml: shift/reset-extension of Caml Light September 16, 2017 What is OchaCaml OchaCaml is a Caml Light system extended with delimited control operators, shift and reset. It supports the let-polymorphic type system with answer type modification. Added Features reset (fun () -> M) Delimit the context of M. shift (fun k -> M) Clear the current delimited continuation, bind it to k, and execute M.
2014-01-20 CPSã§å®è£ ããã¢ããã¯ä½æ éãã®ãã¢ããå¤æåã®éãã測ã£ã¦ã¿ã - ã¢ããã¨ãããã¨ã³ã¢ããCPSã§ã¢ãããå®è£ ããã¨éããªããããã以åããã®çç±ã«ã¤ãã¦èãã¦ã¿ãã®ã ããçµè«ã«éããªãã£ããããã§ãç¶ããæ¸ããã¾ããTwitterã§ããæ¹ã«æãã¦ããã ããã®ã ããCPSã§å®è£ ããã¢ããã¯ãéCPSã§å®è£ ããã¢ããã«æ¯ã¹ã¦æ¬¡ã®2ç¹ã®çç±ã«ããé«éã§ããã¨ããããã¼ã¿ã®çæ/å解ãæããããããåææã«ç¶ç¶ãç ´æ£ã§ããããã©ããããã¨ãªã®ã ããããMaybeã¢ãããä¾ã¨ãã¦ä»¥ä¸ã®2ç¹ã確èªãããââãã¨ã確èªãããã£ãã®ã ããæ¤è¨¼ããã¨ããã1ç¹ç®ã«ã¤ãã¦ã¯çµè«ãå¾ããã®ã®ã2ç¹ç®ã«ã¤ãã¦ã¯ãéããªããªããã¨ããçç¾ããçµè«ãåºã¦ãã¾ã£ããããã§ã以ä¸ã®1ç¹ç®ã«ã¤ãã¦ã®ã¿æ¤è¨¼ããè¨é²ãã¤ãããéCPSçMaybeã¢ããã¾ããéCPSçã®Maybeã¢ããã®å®ç¾©ã¯ä»¥ä¸
IOã¢ããä¸ã§åä½ããcall/ccãå®è£ ã§ãããã¨ãåãã£ãã®ã§æ¸ãã¦ããããã ãå®ç¨ã«èãããã®ã§ã¯ãªãã ããã使ãã¨ãã¨ãã°ããããã³ã¼ããæ¸ããã¨ãã§ããã import Control.Applicative import Control.Monad import Data.IORef import System.IO.Unsafe import Continuation (callCC, withContinuationsDo) test :: IO () test = do r <- callCC $ \cc -> return $ Right $ cc . Left case r of Left val -> do putStrLn $ "left: " ++ show val return () Right cc -> do putStrLn "right" cc "f
NECã¯ãããã°ãã¼ã¿åæãé«éåããåæ£å¦çãã¬ã¼ã ã¯ã¼ã¯ãFelissããéçºããï¼çºè¡¨è³æï¼ãããã°ãã¼ã¿åæã§ããç¨ããããHadoopã¯ãMap-Reduceåã®åç´ãªåæã§ããã°é«éã«å®è¡ã§ããããç¹°ãè¿ãæ¼ç®ãå¤ç¨ããæ©æ¢°å¦ç¿å¦çã§ã¯ãã¸ã§ãéã§ã¹ãã¬ã¼ã¸ãçµç±ãã¦ãã¼ã¿ãããåãããHDFSãããã«ããã¯ã¨ãªããæ¼ç®ã®å¹çãä¸ãã«ããã ããã§NECã®Felissã§ã¯ãã¸ã§ãéã®ãã¼ã¿ã®ããåããã¤ã³ã¡ã¢ãªã¼ã§å®æ½ããããã«ãããããã«æ¼ç®ãã¼ãéã®éä¿¡ãªã©ã«ããã¦ã並åå¦çã®éã®ã¡ãã»ã¼ã¸ããã·ã³ã°ã®APIã¨ãã¦ä¸è¬çãªãMPIããåæã«ä½¿ããããã«ãããããã«ãããæ©æ¢°å¦ç¿ã®ãããªè¤éãªæ¼ç®ã«ã¤ãã¦ãé常ã®Hadoopãç¨ããå ´åã¨æ¯ã¹ã¦10åã»ã©é«éã«å®è¡ã§ããããã«ãããFelissã¯HDFSã®ã¤ã³ã¿ãã§ã¼ã¹ãåãã¦ãããæåã®ãã¼ã¿èªã¿åºãã¯HDFSããè¡ããã
使ããã人ã®ããã®ç¶ç¶å ¥éç¶ç¶æ¸¡ãå½¢å¼call/ccã¯æ®éã®é¢æ°call-withç³»é¢æ°call-with-procedurecall-with-continuation-procedurecall-with-current-continuationè©ä¾¡é åºã¨ç¶ç¶call/ccããºã«ãæå ãã«ãã¹ã¬ããé¨åç¶ç¶reset/pcã¨call/pcç°å¢ç ´å£ã¨é¨åç¶ç¶é¨åç¶ç¶ã®ä½¿ç¨æ³PRINT-AND-NEXT-REPLè°è«è³ªåãæå ãã«ãã¹ã¬ããã®ãµã³ãã«ããã°ã©ã ã«ã¤ã㦠使ããã人ã®ããã®ç¶ç¶å ¥é ã¨ããããæ®´ãæ¸ãã ãã©ãã£ããåé·ãªæç« ã«ãªã£ã¦ãããéè¤ãã¦ãããééã£ã¦ããã ããããªãåéãããã¦ãããæ¥ãã«ãã¦ãããããããããªããã©ãææ¬ã èããã¤ãã¿ããæ°æã¡ã§ç¶ç¶ã使ããããã«ãªããã人ã¯èªãã§ã¿ã¦ãã ããã ãã ãæè©®ã¯èã§ãã(ï½ ç¶ç¶æ¸¡ãå½¢å¼ ä¾ã«ãã£ã¦éä¹fact
About åã®å³¶ã®ããã°ã©ãã ãã¾ã«å½¹è ã Practical Schemeã®ä¸»ã WiLiKi:Shiro æè¿ã®ã¨ã³ã㪠ç¡écxré«æ ¡åé¨Defenseæ¯ãè¿ã£ã¦ã¿ãã¨2019å¹´ã¯è²ã å¦ãã§æ¥½...è¦ããããå¿ããæ¹ãé£ãã(ãã¨ããã)ç¼é¡ã®ã¤ãã¨3Dããªã³ã¿Iris Klein Acting ClassSAG-AFTRA conservatory: Voice Actingåµä½æ´»åã£ã¦èªåãæãåºããã°ãªããªãã¨...ã«ã¼ãã使ããã«1ãã100ã¾ã§More... æè¿ã®ã³ã¡ã³ã shiro on æ³ãåãã¨æéãéãéããã®ã¯ãæ°ãããã¨ã«ææ¦ããªããã? (2023/03/14)1357 on æ³ãåãã¨æéãéãéããã®ã¯ãæ°ãããã¨ã«ææ¦ããªããã? (2023/03/01)ãã¢ããªã¼ã㧠on ãã¤ããã¤ããã¤ãã®ã·ã¥ã¼ãªã³ã¬ã³ (2022/04/02)ãã¢ããªã¼ã
About åã®å³¶ã®ããã°ã©ãã ãã¾ã«å½¹è ã Practical Schemeã®ä¸»ã WiLiKi:Shiro æè¿ã®ã¨ã³ã㪠米å½ã®å¤§å¦é²å¦ç¡écxré«æ ¡åé¨Defenseæ¯ãè¿ã£ã¦ã¿ãã¨2019å¹´ã¯è²ã å¦ãã§æ¥½...è¦ããããå¿ããæ¹ãé£ãã(ãã¨ããã)ç¼é¡ã®ã¤ãã¨3Dããªã³ã¿Iris Klein Acting ClassSAG-AFTRA conservatory: Voice Actingåµä½æ´»åã£ã¦èªåãæãåºããã°ãªããªãã¨...More... æè¿ã®ã³ã¡ã³ã shiro on æ³ãåãã¨æéãéãéããã®ã¯ãæ°ãããã¨ã«ææ¦ããªããã? (2023/03/14)1357 on æ³ãåãã¨æéãéãéããã®ã¯ãæ°ãããã¨ã«ææ¦ããªããã? (2023/03/01)ãã¢ããªã¼ã㧠on ãã¤ããã¤ããã¤ãã®ã·ã¥ã¼ãªã³ã¬ã³ (2022/04/02)ãã¢ããªã¼ã㧠on ãã¤ãã
Ruby ã® callcc ã¨ããã¨ã ç¾å¨ã® Ruby ã® Continuation ã¯æ¬ é¥åã§ãã¾ã¨ãã«å©ç¨ã§ããªãã·ãã¢ãã§ããå ·ä½çã«ã¯ãdynamic-wind ç¸å½ã®æ©è½ãããã¾ããã (ç¥) ã¡ãªã¿ã«ãdynamic-wind ç¸å½ã®æ©è½ãå ¥ããã®ã¯ãæ¡å¼µã©ã¤ãã©ãªãå ¨é¨ callcc safe ã«ããä½æ¥ã«ç¸å½ãã¾ãã®ã§ãç¾å®çãããªãããããªãããªããã¨æã£ã¦ãã¾ãã ruby-dev:30988 ã¨ãã話ããã£ã¦ãããã£ãã¼æ¬ é¥åãªã®ãã¼ããç´ãã®ãé£ããã®ãã¼ãã¨æ²ããã§ãã¾ããã ããdynamic-wind ãå®è£ ããã ããªãåºç¯å²ã®ä¿®æ£ã¯ä¸è¦ãªãã¨ã«æ°ãã¤ãã¾ãããã¤ã¾ãç´ãã®ã¯ç°¡åãã¨ããã¨ã³ããªã ãã®åã«: dynamic-wind ã¨ã¯ dynamic-wind ã¨ã¯ãç¶ç¶å¼ã³åºãã§æå®ããç¯å²ã«çªå ¥ãããè±åºãããããã¨ãã«èµ·åãããã³ãã©ãè¨å®ããé¢
追è¨ï¼ãæ±äº¬Nodeå¦å#1ãéåæããã°ã©ãã³ã°ã®æ¹åãã®ã¨ãã»ã³ã¹ãã¨ããã¹ã©ã¤ãã§ãä¼¼ããããªãã¯ããã¯ã使ããã¦ããã®ãè¦ã(p.32-)ã ãããªã«ã¹ã¸ã¯æªããªãã®ãããããªãã JavaScriptã§ã¯éåæçã«é¢æ°ãå¼ã¶ãã¨ãå¤ããä¾ãã°imgã¿ã°ã®ãã¼ããçµãã£ãã次ã«Aãå¦çãã¦ããããçµãã£ããBããã¦â¦ãªã©ã ããããã¨ãCPSå½¢å¼ã§ããã°ã©ã ãæ¸ãã¯ãã«ãªãã func1(arg1, function(res1){ func2(arg2, function(arg3, res2){..})}) ãããã«JavaScriptã§ã¯é¢æ°ãªãã©ã«ãããã¶ãæ±ãã¥ãã -- 'function' ã¨ã 'return' ã¨ã {} ã®ãã¹ãã¨ãâ¦ãã¨ã«ãªã¼åããã«ãä¸è¦å´ -- JavaScriptããã°ã©ãã¯ã©ãæ¸ããã ããï¼ ããããéåæå¼ã³åºãããã¾ãåæçã«è¨è¿°ãã
æè¿C++ã使ãæéãé·ãã®ã§ããã¼ã£ã¨ C++æ¹å¤æç« ãæ¸ãä¸ãã¦ã¿ãâ¦ã (注ï¼ä»¥ä¸ã®æç« ã«ããã¦ãCè¨èªã¨ã¯C/C++ããããã®ã¨ãèããã ãã) gotoã¯ä»ãã30年以ä¸ãåã®ãã¤ã¯ã¹ãã©å çã«ããæ²æ» éåã® ç²æããã£ã¦ãã©ããªã®ããä»æ¥ã§ã¯è¯ããªããã®ã®ä»£åè©ã®ããã« ãªã£ã¦ãããè¯ããªãã¨ãããã¨ã®ä¸»ãªçç±ã¯ããã°ã©ã ã®æµãã è¦ãã«ãããªããçã®ãããªã®ã ããå®éã®ã¨ããã©ã®ç¨åº¦ã®ãã®ã㯠ããåãããªããCè¨èªã«ããã¦ãä¾ãã°ã«ã¼ãæ§æã使ããã«ãã¹ã¦ã gotoã§ã¾ããªããã¨ããã¨ããã¯ã»ã¨ãã©èªæã«ã確ãã«å¤§å¤ã§ããã ä¾ãã°foræãªãã for (A;B;C) body ã¨ãããã®ã¯ããããå½¢å¼çã« A _continue_for: if (B) goto _break_for; C goto _continue_for; _break_for:; ãã®ããã«å¤
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}