プリキュア Advent Calendar 2014 - Adventar の 23 日目の記事です.
Clojure + Precureという意味で命名された,PycureおよびRubicureリスペクトです.
つまり世界初のLispによるプリキュア実装です.更にJVMのためのプリキュア実装でもあります.
ソースコードは kaosf/clocure にあります.ここから Clojars (Clojureのライブラリ登録サービス) へのリンクなども確認出来ます.
プリキュア Advent Calendar 2014 - Adventar の 23 日目の記事です.
Clojure + Precureという意味で命名された,PycureおよびRubicureリスペクトです.
つまり世界初のLispによるプリキュア実装です.更にJVMのためのプリキュア実装でもあります.
ソースコードは kaosf/clocure にあります.ここから Clojars (Clojureのライブラリ登録サービス) へのリンクなども確認出来ます.
| require 'bundler/setup' | |
| require 'tapp' | |
| class Operator | |
| def initialize(left, right) | |
| @left = left | |
| @right = right | |
| end | |
| end |
| {-# LANGUAGE TemplateHaskell#-} | |
| module Main where | |
| import Language.Haskell.TH | |
| $( do | |
| location >>= runIO . (\loc -> do | |
| putStrLn $ loc_filename loc -- THの書かれたファイル名 | |
| putStrLn $ loc_package loc -- パッケージ名 | |
| putStrLn $ loc_module loc -- モジュール名 | |
| print $ loc_start loc -- ソースコード上のマクロの開始位置(行, 列) |
| module Main where | |
| true :: a -> b -> a | |
| true x _ = x | |
| false :: a -> b -> b | |
| false _ x = x | |
| iF :: (a -> a -> a) -> a -> a -> a | |
| iF b x y = b x y |
These are for the combined vim-sexp (https://github.com/guns/vim-sexp) and vim-sexp-mappings-for-regular-people (https://github.com/tpope/vim-sexp-mappings-for-regular-people) plugins. vim-sexp is neat on its own but Tim Pope makes common stuff much easier.
Note that some vim-sexp functionality depends on <LocalLeader> mappings. This is a different leader key than the global leader, and is the variable maplocalleader (instead of mapleader). To see if you have this set, use :echo maplocalleader; if it errors out you'll need to set it, otherwise it will echo the key. If you want to set your LocalLeader to <Space>, you'll need two commands in your .vimrc, since by default <Space> is bound to <Right> in normal mode:
nnoremap <Space> <Nop>
let maplocalleader=" "
📝 async/await/observableのECMAScript近況のノートついでに
追記: これは2015年7月ごろの近況です
https://github.com/jhusain/asyncgenerator はObservableに書いてたプロポーサルだったけどこっちはoutdatedになった。
Introducing Incremental DOM — Google Developers — Medium
Reactやvirtual-dom、Glimmer(Ember)などVirtual DOMの実装は色々あるが、これらのVirtual DOM実装には2つの問題がある
これらを解決するためにIncremental DOMと言うものを作っている(WIP)
| REM --source_map_location_mapping is case SENSITIVE ! | |
| REM need extra escaped double quote --source_map_location_mapping="\"C:/tools/closure/^|http://bla/\"" as per http://stackoverflow.com/a/29542669 | |
| java -jar compiler.jar --compilation_level=SIMPLE_OPTIMIZATIONS --create_source_map=C:\tools\closure\latest\maplayer.js.map --output_wrapper "%output%//# sourceMappingURL=maplayer.js.map" --js=C:\tools\closure\mapslayer.js --js_output_file=maplayer.min.js --source_map_location_mapping="\"C:/tools/closure/^|http://bla/\"" |
| module Lib where | |
| import Control.Lens | |
| data Foo = Foo { a :: Int, b :: String, c :: Char } deriving Show | |
| data Bar = Bar { x :: Int, y :: String } deriving Show | |
| constructBar :: Lens Foo Foo Bar Bar | |
| constructBar = lens getFoo2Bar setFooFromBar | |
| getFoo2Bar :: Foo -> Bar |