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 <iostream> | |
void f(int &imachangeu) { | |
imachangeu = 7; | |
} | |
int main() { | |
int x = 5; | |
std::cout << x << std::endl; | |
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
// Something like this, anyway ;) | |
// by pumpkin | |
struct class_info_t { | |
struct class_info_t *metaclass; // maybe not exactly a class_info_t, maybe an info_table_t | |
struct class_info_t *superclass; // as above | |
void *cache; | |
void *vtable; | |
struct info_table_t *info; | |
} |
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
/* | |
kernelcache.idc, by pumpkin with contributions from roxfan | |
Copyright (C) 2008 pumpkin | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
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
# Very alpha still, but getting there... | |
# Yeah, I like it this way | |
require 'pp' | |
require 'set' | |
require 'zlib' | |
require 'base64' | |
require 'socket' | |
require 'openssl' | |
require 'stringio' |
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 ExistentialQuantification, TypeOperators #-} | |
module Fold where | |
import Control.Applicative | |
import Control.Functor.Contra | |
import Data.Array.Vector | |
import qualified Data.Foldable as Foldable | |
data Fold b c = forall a. Fold (a -> b -> a) a (a -> c) |
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 EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, TypeFamilies, MultiParamTypeClasses, ScopedTypeVariables, TypeOperators, ImplicitParams, RankNTypes, GADTs, GeneralizedNewtypeDeriving, NoImplicitPrelude, TypeSynonymInstances, TypeOperators #-} | |
module Main where | |
-- ZOMG failgebra by copumpkin (not intended to be useful, but just as a straggly experiment to see what's possible) | |
-- TODO: using2 could take a function mapping from common types to wrapper types and maybe reduce ugliness | |
import Prelude hiding (id, (+), (-), (*), (/), Integral, fromInteger, Real) | |
import qualified Prelude as P | |
import Data.Number.CReal |
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 ScopedTypeVariables #-} | |
module Data.Enumerable where | |
import Data.Int | |
import Data.Word | |
import Data.Ratio | |
import Unsafe.Coerce | |
import Data.List |
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 Prime where | |
open import Coinduction | |
open import Data.Empty | |
open import Data.Nat | |
open import Data.Nat.Properties | |
open import Data.Nat.Divisibility | |
open import Data.Fin hiding (pred; _+_; _<_; _≤_; compare) | |
open import Data.Fin.Props hiding (_≟_) |
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 Search where | |
open import Coinduction | |
open import Function | |
open import Data.Empty | |
open import Data.Nat | |
open import Data.Product | |
open import Relation.Nullary | |
-- Thanks to Ed Kmett for helping me clarify what I was getting at here, |
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 Split where | |
open import Data.Bool | |
open import Data.Nat | |
open import Data.Nat.Properties | |
open import Data.List hiding ([_]) | |
open import Data.Product | |
open import Relation.Binary | |
open import Relation.Binary.PropositionalEquality |
OlderNewer