Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
This blog post series has moved here.
You might also be interested in the 2016 version.
{-# LANGUAGE RankNTypes #-} | |
newtype State s a = State { runState :: forall r. s -> (a -> s -> r) -> r } | |
stateReturn :: a -> State s a | |
stateReturn a = State $ \s k -> k a s | |
stateMap :: (a -> b) -> State s a -> State s b | |
stateMap f (State sa) = State $ \s kb -> sa s (kb . f) |
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ nano ~/.zshrc
path=('/path/to/depot_tools' $path)
#HH
#QA
require_relative "./node" | |
module AST | |
## | |
# Реализация зиппера для обхода структуры AST. | |
# | |
# Что такое зиппер? Это паттерн из функционального программирования, предлагаемый | |
# в качестве более продвинутой замены визиторов. По сути энумератор (или курсор), | |
# умеет ходить не только вперёд/назад, но и вверх/вниз по дереву. Кроме этого | |
# во время обхода дерева зиппер позволяет нам удалять/заменять/добавлять ноды |
import Data.Foldable | |
import Data.Monoid | |
pipeline :: [a -> a] -> a -> a | |
pipeline = appEndo . getDual . foldMap (Dual . Endo) | |
main = print $ pipeline [(+1), (*10)] 100 |
function M(){}; | |
M.contResult = function(value){ | |
return function(cont){ | |
console.log('in result: ' + value); | |
return cont(value); | |
} | |
} | |
M.contBind = function(mValue, mFunc){ |