The Vim on the server is horribly outdated. Many of the things below won’t work, or will require extensive setup. In order to ease the pain, I suggest using the version installed and maintained by Micha via the [EBI-predoc config][config].
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 <type_traits> | |
#include <vector> | |
namespace io { | |
using byte = unsigned char; | |
using sbyte = signed char; | |
template<class T> | |
struct is_byte : std::integral_constant<bool, false> {}; | |
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
// begin() and end() functions for arrays (C++03) | |
// | |
// Written in 2012 by Martinho Fernandes | |
// | |
// To the extent possible under law, the author(s) have dedicated all copyright and related | |
// and neighboring rights to this software to the public domain worldwide. This software is | |
// distributed without any warranty. | |
// | |
// You should have received a copy of the CC0 Public Domain Dedication along with this software. | |
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. |
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
int main(){} |
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 #-} | |
import Prelude hiding ((.), id) | |
import Control.Category | |
import Control.Lens | |
import Control.Lens.TH | |
type Register = Int | |
data Machine = Machine { _ax :: Register, _bx :: Register } deriving Show | |
data SMPMachine = SMP { _cpu0 :: Machine, _cpu1 :: Machine } deriving Show |
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
void breaking() { | |
std::cout << "Nice!~\n"; | |
} | |
std::tuple<double, double> breaking_multi() { | |
return std::make_tuple(567.2, 2.567); | |
} | |
struct a_type { | |
std::tuple<double, double> breaking_multi() { |
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 MagicHash, RecordWildCards #-} | |
import qualified Data.Map as Map | |
import Data.List | |
import Data.Maybe | |
main = print $ recognize chords [F#,B,D#,A,E] | |
{-- types --} | |
type Interval = Int |
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 queue | |
import Data.Vect | |
-- Here's the port of the Liquid Haskell blog post on amortized | |
-- queues. The tricksy bit is that the "amortized" bit depends on | |
-- laziness. This means that while in the REPL (where Idris is lazy) | |
-- this is reasonably efficient. It compiles absolutely horribly | |
-- though because each time push or pop something we rotate the whole | |
-- damned thing. |
###Factorio rules
- Don't be a dick
- The player that hosts has to retrieve the most recent save and remember to replace it with the new one when everything has ended
- Destroying of any property requires consent to those that put it down
###Signed players
- Towards a fully-reflective meta-programming language (G. Neverov, P. Roe)
- D-Expressions: Lisp Power, Dylan Style (J. Bachrach, K. Playford)
- The Java Syntactic Extender (J. Bachrach, K. Playford)
- Template Meta-Programming for Haskell (T. Sheard, S.P. Jones)
- First-class macros have types (A. Bawden)
- Macros that work (W. Clinger, J. Rees)
- Macros as multi-stage computations: type-safe, generative, binding macros in MacroML (S.E. Ganz, A. Sabry, W. Taha)
- Hygienic macro expansion (E. Kohlbecker, D. Friedman, M. felleisen, B. Duba)
- Compile-time meta-programming in a dynamically typed OO language (L. Tratt)
OlderNewer