This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ちょっとだけ脳内ダンプしたコードがあった | |
こんな感じにTLSEngineの内部には6個のバッファーがあって、状態遷移は基本的にどっかのバッファーの先頭から取ってきて、 | |
加工した結果をどっかのバッファーの末尾に置くって感じで書く予定だった。 | |
CCSがソケット入力バッファーの先頭にあるときに、ハンドシェークの状態が特定の状態にないといけないのは自明のことで、 | |
本当の興味は他のバッファーの状態がどうなってないといけないのか?ということだったんだー |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bootstrap 101 Template</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Bootstrap --> | |
<link href="css/bootstrap.min.css" rel="stylesheet"> | |
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> | |
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TupleSections #-} | |
import Data.List | |
import Data.Maybe | |
import Data.IORef | |
import Control.Applicative | |
import Control.Exception hiding (try, assert) | |
import Control.Monad.State | |
import Control.Monad.Reader | |
import Control.Monad.Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- {-# LANGUAGE RankNTypes #-} | |
--{-# LANGUAGE GADTs #-} | |
-- {-# LANGUAGE FlexibleInstances #-} | |
-- {-# LANGUAGE ImpredicativeTypes #-} | |
-- import Control.Monad.Reader | |
data Term = TmU Int | |
| TmVar Int | |
| TmProd Type Term |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
-- {-# LANGUAGE StandaloneDeriving #-} | |
-- {-# LANGUAGE FlexibleInstances #-} | |
-- {-# LANGUAGE ImpredicativeTypes #-} | |
import Control.Monad.Reader hiding (join) | |
data TermP v where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE GADTs #-} | |
-- {-# LANGUAGE StandaloneDeriving #-} | |
-- {-# LANGUAGE FlexibleInstances #-} | |
-- {-# LANGUAGE ImpredicativeTypes #-} | |
import Control.Monad.Reader hiding (join) | |
data TermP v where | |
TmFamily :: TermP v -> (v -> TermP v) -> TermP v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE GADTs #-} | |
-- {-# LANGUAGE FlexibleInstances #-} | |
-- {-# LANGUAGE ImpredicativeTypes #-} | |
import Control.Monad.Reader | |
data Typ where | |
TBool :: Typ | |
TArrow :: Typ -> Typ -> Typ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
import Control.Monad.Reader | |
data Typ where | |
TBool :: Typ | |
TArrow :: Typ -> Typ -> Typ | |
deriving (Show, Eq) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
import Control.Monad.Reader | |
data Typ t where | |
TBool :: Typ Bool | |
TArrow :: Typ a -> Typ b -> Typ (a -> b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <vector> | |
#include <iostream> | |
#include <utility> | |
#include <string> | |
#include <random> | |
#include <memory> |