Bio TODO
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
module Main where | |
import Control.Monad.State | |
import Control.Monad | |
import System.Random | |
type Name = String | |
data Context = Context { ctxNextId :: State Context Int | |
, ctxNextName :: State Context Name } |
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
-- file PathFind/Dijkstra.hs | |
module PathFind.Dijkstra (findPath) where | |
findPath = undefined | |
-- file PathFind/AStar.hs | |
module PathFind.AStar (findPath) where | |
findPath = undefined | |
-- file PathFind.hs | |
module PathFind (findPath, dijkstra, aStar) 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 TemplateHaskell, Rank2Types #-} | |
module Main where | |
import Control.Lens | |
import Control.Monad.State | |
import Data.Monoid | |
import Data.List as L (insert, isInfixOf) |
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
takeFork :: TVar Fork -> STM () | |
takeFork tvFork = do | |
fork <- readTVar tvFork | |
case fork of | |
InUse -> retry | |
Free -> writeTVar tvFork InUse | |
makeDiningPhilosopher :: TVar Fork -> TVar Fork -> STM (TVar Philosopher) | |
makeDiningPhilosopher leftFork rightFork = do | |
takeFork leftFork |
#include <iostream>
constexpr int sum (int a, int b)
{
return a + b;
}
constexpr int ediv (int a, int b)
{
#Knuth arrows in C++ metaprogramming.
Two implementations of Knuth's arrows using constexpr
and template metaprogramming.
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDecJ7pnlH12W8XFJ4nGl7tZomX6esTqrzAZoTLs6ZRn8baYOKwWf57w6uSts4x0xMfVrO5YZtlBA6YSA7ysqiVLkvjCGoWbUw5goJi3kCUnQewuBy0ukobz6i/ZIEJ8vxejNggmRkQnyitBCd7nnvaCWgwDonJj4W1r77xarWvtz3QjjpGMG59i+xjuQ3Fi7sqRmwgQmBcWyo2cerA3aU4BbhmDS6tSHO2gH7I7VmII3mZX+p+0ITBGyfLgCYI85/qugR9rgK79lwEYrAuLkzxj8FArrLQWtgqfshriZRT1lBabh6dX9PWN+ArNseZVgKeycUngKclANYbl3HVfglZ |
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
{ | |
"entries": [ | |
[ | |
0, | |
{ | |
"tag": "Normal" | |
}, | |
"GenerateGUIDEntry", | |
"{\"contents\":{\"guid\":\"662ed4a1-950b-48cd-a91d-1091342070d9\"},\"tag\":\"GenerateGUIDEntry\"}" | |
], |
OlderNewer