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 <stdio.h> | |
template <int N> struct fizz { enum { flags = 0 }; }; | |
template<> struct fizz<0> { enum { flags = 1 }; }; | |
template <int N> struct buzz { enum { flags = 0 }; }; | |
template<> struct buzz<0> { enum { flags = 2 }; }; | |
template <int F, int N> struct show { show() { printf("%d\n", N); } }; | |
template <int N> struct show<1, N> { show() { printf("Fizz\n"); } }; |
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 <stdlib.h> | |
#include <stdio.h> | |
int n; | |
int fb; | |
void f() { fb |= 1; } | |
void b() { fb |= 2; } | |
void nop() {} |
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
open import Level using (Level) | |
open import Function using (_$_; _∘_) | |
open import Data.List.Base | |
open import Data.List.Relation.Unary.Any using (Any; here; there) | |
open import Data.List.Relation.Unary.All using (All; []; _∷_) | |
open import Relation.Nullary using (¬_; yes; no) | |
open import Relation.Nullary.Negation using (contradiction) | |
open import Relation.Binary using (_⇒_; Decidable) | |
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_) |
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
let merge_fold_left' ~compare fx fy fxy xs ys ini = | |
let rec loop acc = function | |
| x :: xs, y :: ys -> | |
let c = compare x y in | |
if c < 0 then loop (fx x acc) (xs, y :: ys) | |
else if c > 0 then loop (fy y acc) (x :: xs, ys) | |
else loop (fxy x y acc) (xs, ys) | |
| x :: xs, [] -> loop (fx x acc) (xs, []) | |
| [], y :: ys -> loop (fy y acc) ([], ys) | |
| [], [] -> acc |
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
pkgname=tetrio-desktop | |
pkgver=1.0.0 | |
pkgrel=1 | |
pkgdesc="TETR.IO desktop client. Modern yet familiar online stacker - play against friends and foes all over the world, or claim a spot on the leaderboards!" | |
arch=("any") | |
url="https://tetr.io/" | |
source=("https://tetr.io/about/desktop/builds/TETR.IO%20Setup.tar.gz") | |
license=() | |
md5sums=("b378f5a3cb8c37e327f8377898e0b3d0") | |
depends=("electron>=8.2.5") |
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
[@@@warning "-8"] | |
(** Abstract interface for monoids. | |
*) | |
module type Monoid_S = sig | |
type t | |
val zero : t | |
val ( + ) : t -> t -> t | |
(* Required laws: |
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 T0 = struct | |
module type S = sig type t end | |
end | |
(** Finite-map; open-to-extension; heterogenous values (type determined by the key). | |
* | |
* See the bottom of this file for an example use. | |
* | |
* New key types can be generated on the fly and used to modify or query the | |
* contents of the map. *) |
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
// staged stream emitter (w/o unimportant details), to show how we ought to | |
// do region management. | |
// "NEW" comments indicate where the implementation differs from the current | |
// region-unaware version. | |
def emit(dstR: Code[Region], ir: IR, env: Env): EmTr = | |
... |
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
#lang racket/base | |
(provide | |
do | |
with-bind-function) | |
(require | |
racket/stxparam | |
syntax/parse/define | |
(for-syntax racket/base)) |
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
object Sad { | |
case class TArray(required: Boolean = false) | |
case class A(t: TArray, n: Int) | |
class B { | |
def a: A = a.copy(t = TArray()) | |
def t: TArray = a.t | |
} |