- Create 5GB FreeBSD image.
- Install FreeBSD on xhyve.
- Mount host directory.
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 #-} | |
module Example where | |
import Data.Functor.Const | |
data Atom = Atom {_point :: !Point} | |
data Point = Point {_x :: !Int, _y :: !Int} | |
type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t | |
type Lens' s a = Lens s s a a |
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
#!/bin/sh | |
nasm -f elf64 test.s && ld -s -o test test.o && ./test |
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 <stdio.h> | |
#define SQ(x) (x)*(x) | |
#define M0(x,y) SQ(x)+SQ(y)<4?0:0xe0 | |
#define M1(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M0(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0)):0xc0 | |
#define M2(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M1(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0xa0 | |
#define M3(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M2(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x80 | |
#define M4(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M3(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x60 | |
#define M5(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M4(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x40 |
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 OverloadedStrings #-} | |
-------------------------------------------------------------------------------- | |
module Echo where | |
-------------------------------------------------------------------------------- | |
import Blaze.ByteString.Builder.Char.Utf8 (fromString) | |
import Data.ByteString (ByteString) | |
import Network.Wai as Wai | |
import Network.Wai.Handler.Warp as Warp | |
import Network.HTTP.Types (status200) | |
import Network.HTTP.Types.Header (hContentType) |
This file has been truncated, but you can view the full 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
* (()()) | |
* ((()())()) | |
* (((()())())()) | |
(((()())())(()())) | |
* ((((()())())())()) | |
((((()())())())(()())) | |
* ((((()())())(()()))()) | |
((((()())())(()()))(()())) | |
((((()())())(()()))((()())())) | |
((((()())())(()()))(((()())())())) |
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
* (()()) | |
* ((()())()) | |
* (((()())())()) | |
(((()())())(()())) | |
* ((((()())())())()) | |
((((()())())())(()())) | |
* ((((()())())(()()))()) | |
((((()())())(()()))(()())) | |
((((()())())(()()))((()())())) | |
((((()())())(()()))(((()())())())) |
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 MultiParamTypeClasses, FlexibleInstances, UndecidableInstances #-} | |
module Prolog (Petja, Vasja, Serg, Father) where | |
data Petja = Petja | |
data Vasja = Vasja | |
data Serg = Serg | |
class Father a b where | |
isFather :: a -> b -> () | |
isFather x y = () |
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 GADTs #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE OverloadedLabels #-} |
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 OverloadedStrings #-} | |
module SimpleThings where | |
import Control.Applicative ((<$>), (<*>)) | |
import Control.Monad (mzero) | |
import Data.Aeson | |
import qualified Data.Aeson as A | |
-- | sum type containing all possible payloads |
NewerOlder