Skip to content

Instantly share code, notes, and snippets.

View bananu7's full-sized avatar
🏍️

Bartek Banachewicz bananu7

🏍️
View GitHub Profile

Meta-Programming

  • 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)

###Factorio rules

  1. Don't be a dick
  2. The player that hosts has to retrieve the most recent save and remember to replace it with the new one when everything has ended
  3. Destroying of any property requires consent to those that put it down

###Signed players

@bananu7
bananu7 / queue.idr
Last active August 29, 2015 14:14 — forked from jozefg/queue.idr
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.
@bananu7
bananu7 / a.hs
Created September 1, 2014 16:29 — forked from mikusp/a.hs
{-# 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

Vim Notes

Setup

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].

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() {
{-# 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
int main(){}
@bananu7
bananu7 / arrays.h
Created January 30, 2013 13:56 — forked from rmartinho/arrays.h
// 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/>.
#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> {};