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 <tuple> | |
| #include <iostream> | |
| template <size_t... Indices> | |
| struct indices { | |
| template <size_t Last> | |
| using append = indices<Indices..., Last>; | |
| }; | |
| template <size_t Size> |
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
| #!/bin/bash | |
| llvm_releases_url="http://llvm.org/releases" | |
| llvm_major_version="3.4" | |
| llvm_minor_version="2" | |
| llvm_version="${llvm_major_version}.${llvm_minor_version}" | |
| llvm_source_directory="llvm-${llvm_version}.src" | |
| llvm_archive_filename="${llvm_source_directory}.tar.gz" | |
| llvm_archive_url="${llvm_releases_url}/${llvm_version}/${llvm_archive_filename}" |
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
| #!/bin/bash | |
| # Bootstrapping script for setup software environment needed by SSReflect course | |
| # http://ilyasergey.net/pnp-2014/ | |
| # Was tested only on | |
| # Ubuntu/Lubuntu 14.04 LTS 64 bit | |
| # Ubuntu 12.04 LTS 64 bit | |
| # Debian 7.6.0 64 bit | |
| # Fedora 20 64 bit |
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 <cstdlib> | |
| #include <iostream> | |
| #include <fstream> | |
| #include <string> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <boost/lexical_cast.hpp> | |
| void create_file(std::string const &filename, std::string const &contents) { | |
| std::ofstream outfile(filename.c_str(), std::ios::binary); |
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 'value expression = | |
| | Const of 'value | |
| | IfThenElse of bool expression * 'value expression * 'value expression | |
| let rec eval : 'value. 'value expression -> 'value = function | |
| | Const value -> value | |
| | IfThenElse (condition, then_expr, else_expr) -> | |
| if eval condition | |
| then eval then_expr | |
| else eval else_expr |
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
| #!/usr/bin/perl -w | |
| use strict; | |
| $_='ev | |
| al("seek\040D | |
| ATA,0, 0;");foreach(1..2) | |
| {;}my @camel1hump;my$camel; | |
| my$Camel ;while( ){$_=sprintf("%-6 | |
| 9s",$_);my@dromedary 1=split(//);if(defined($ | |
| _=)){@camel1hum p=split(//);}while(@dromeda | |
| ry1){my$camel1hump=0 ;my$CAMEL=3;if(defined($_=shif |
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
| value rec meta_binding _loc = | |
| fun | |
| [ Ast.BiAnt x0 x1 -> Ast.ExAnt x0 x1 | |
| | Ast.BiEq x0 x1 x2 -> | |
| Ast.ExApp _loc | |
| (Ast.ExApp _loc | |
| (Ast.ExApp _loc | |
| (Ast.ExId _loc | |
| (Ast.IdAcc _loc (Ast.IdUid _loc "Ast") | |
| (Ast.IdUid _loc "BiEq"))) |
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
| let get_incremetor = | |
| let current_defult_delta = ref 0 in | |
| let closure () = | |
| incr current_defult_delta; | |
| fun ?(delta=(int_of_string (string_of_int (!current_defult_delta)))) n -> | |
| n + delta | |
| in | |
| closure | |
| let () = |
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 ('first, 'second, 'third) irregular = | |
| | Swap of ('second, 'first, 'third) irregular | |
| | Cycle of ('second, 'third, 'first) irregular | |
| | Leaf of 'first * 'second * 'third | |
| let rec map_irregular first_func second_func third_func = function | |
| | Swap swapped -> Swap (map_swapped second_func first_func third_func swapped) | |
| | Cycle cycled -> Cycle (map_cycled second_func third_func first_func cycled) | |
| | Leaf (first, second, third) -> Leaf (first_func first, second_func second, third_func third) |
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 qualified Data.Map as Map | |
| import Data.Maybe (fromMaybe) | |
| import Data.Function (on) | |
| import Data.List | |
| data SimpleType = SimpleType TyCon [TyVar] | |
| data Type = Type TyCon [Type] | |
| | TyVar TyVar |