% Title % Name % Date
List
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
module Main where | |
import GHC as G | |
import GhcMake as G | |
import DynFlags | |
import SrcLoc as G | |
import GHC.Paths | |
import Control.Monad | |
import Control.Monad.IO.Class |
import Control.Monad.State | |
type Name = String | |
data Type = | |
TInt| | |
TBool| | |
TVar Name| | |
TFun Type Type deriving (Show, Eq) | |
data Expr = | |
EInt Int| |
{-# LANGUAGE LambdaCase #-} | |
import Control.Monad | |
import Control.Monad.State | |
import Control.Lens | |
import Data.List | |
import System.Environment | |
type Instr = Char | |
type Code = [Instr] |
(ns macro-combinator | |
(:refer-clojure :exclude [=])) | |
(defn prim [x] (fn [a] `(fn [~x] ~a))) | |
(defn in [v a] (v a)) | |
(defn where [a v] (v a)) | |
(defn = [v b] (fn [a] `(~(v a) ~b))) | |
(defn <- [v b] (fn [a] `(>>= ~b ~(v a)))) | |
(println (in (= (prim 'x) 42) 'x)) | |
; ((clojure.core/fn [x] x) 42) |
s x y z = x z (y z) | |
k x y = x | |
i = s k k | |
c = s (s (k (s (k s) k)) s) (k k) | |
b = s (k s) k | |
hello = | |
s(s(k s)(s(k k)(s(k s)(s(k(s(k s)))(s(s(k s)(s(k k)(s(k b)i)))(k(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s | |
b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(c k)))))))))))))))))))))))))))))))))))))))))) | |
)))))))))))))))))))))))))))(s(s(k s)(s(k k)(s(k s)(s(k(s(k s)))(s(s(k s)(s(k k)(s(k b)i)))(k(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s b(s |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
#! /usr/bin/python2.6 | |
# coding: utf-8 | |
# ref: http://live-e.naist.jp/sensor_overlay/5/doc/yoshida.pdf | |
# ref: http://en.wikipedia.org/wiki/Skip_list | |
# ref: http://msdn.microsoft.com/en-us/library/Aa289151 | |
# 利点 | |
# バランス操作が不要 | |
# lock-free |