This file contains hidden or 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
Ringmem is self-compacting and self-expanding heap | |
for homogeneous elements. | |
Given `Type` having ctor Type(int, string, float) typical use is: | |
> Ringmem<Type> heap; | |
> Type * ptr = heap.place(1, "lol", 4.2); // ctor is called inside | |
> // all hail variadic templates! |
This file contains hidden or 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
#ifndef AUTOWIRE_H | |
#define AUTOWIRE_H | |
#include <map> | |
#include <string> | |
#include <stdexcept> | |
using namespace std; | |
#include "singleton.h" |
This file contains hidden or 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 "variant.h++" | |
#include <string> | |
#include <iostream> | |
using namespace std; | |
template <int N> | |
struct Loudy |
This file contains hidden or 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 | |
, FlexibleContexts | |
, ScopedTypeVariables | |
, TypeFamilies | |
, UndecidableInstances | |
, FlexibleInstances #-} | |
import qualified Data.ByteString as B | |
import Data.ByteString (ByteString) |
This file contains hidden or 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 hidden or 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
type 'state machine = | |
{ state : 'state | |
; transitions : ('state transition) list | |
} | |
and 'state transition = | |
{ predicate : 'state -> bool | |
; arrow : 'state -> 'state | |
; name : string |
This file contains hidden or 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 Varset = Set.Make(String) | |
type ast = | |
| Var of name | |
| Val of int | |
| Fun of info * varname * ast | |
| App of info * ast * ast | |
| BIF of name * (ast -> ast) | |
| Now of info * ast |
This file contains hidden or 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
import Text.ParserCombinators.Parsec hiding (spaces, optional, many, (<|>), token) | |
import Control.Applicative hiding (optional) | |
import Data.List | |
mod_header = | |
Sequence | |
[ header `Called` "header" | |
, includes `Called` "imports" |
This file contains hidden or 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
111 | |
11 11 | |
11 11 | |
2 444 1 | |
244 4410 | |
244 7 440 | |
24 776640 |
This file contains hidden or 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