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
| { | |
| packageOverrides = pkgs: rec { | |
| mercurial = mercurial.override { | |
| stdenv = pkgs.clangStdenv; | |
| }; | |
| }; | |
| } |
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
| package spike.tracing | |
| import com.twitter.finagle.builder._ | |
| import com.twitter.finagle.http._ | |
| import com.twitter.finagle.{SimpleFilter,Service} | |
| import com.twitter.finagle.stats._ | |
| import com.twitter.finagle.tracing._ | |
| import com.twitter.finagle.zipkin.thrift._ | |
| import com.twitter.util.Future | |
| import java.net.InetSocketAddress |
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
| BEGIN { min = 10000000000000; max = 0 } | |
| { | |
| sum += $1; | |
| if ($1 < min) { min = $1 }; | |
| if ($1 > max) { max = $1 }; | |
| } | |
| END { | |
| print min, "\t", sum / NR, "\t", max; |
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
| object Color extends Enumeration { | |
| type Color = Value | |
| val Red, Black = Value | |
| } | |
| sealed trait Tree[A] { def color: Color.Color } | |
| case class Empty[A]() extends Tree[A] { def color = Color.Black } | |
| case class Full[A](color: Color.Color, a: A, l: Tree[A], r: Tree[A]) extends Tree[A] | |
| object Tree { |
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
| {stdenv, fetchurl, bash, coreutils}: | |
| let version = "2.07"; | |
| in stdenv.mkDerivation rec { | |
| name = "perp-${version}"; | |
| src = fetchurl { | |
| url = "http://b0llix.net/perp/distfiles/${name}.tar.gz"; | |
| sha256 = "1222fe31c16014d8b2a78416f93ba9f8c31eddbc381adc9021fa5d9764475815"; | |
| }; |
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
| % cat default.nix | |
| {stdenv, fetchurl}: | |
| let version = "2.0.7"; | |
| in stdenv.mkDerivation rec { | |
| name = "perp-${version}"; | |
| src = fetchurl { | |
| url = "http://b0llix.net/perp/distfiles/${name}-${version}.tar.gz"; | |
| sha256 = "1222fe31c16014d8b2a78416f93ba9f8c31eddbc381adc9021fa5d9764475815"; |
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
| var p = point(2,2); | |
| p.x(); // => 2 | |
| p.y(); // => 2 | |
| var p2 = p.scale(1, 2); | |
| p2.x(); // => 2 | |
| p2.y(); // => 4 | |
| // can it satisfy? |
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
| var hof = function (z, f) { | |
| var x = f(z); | |
| return { | |
| h: function() { return x; }, | |
| t: function() { return hof(x, f); } | |
| }; | |
| } |
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
| location /lua { | |
| default_type 'text/plain'; | |
| content_by_lua 'ngx.print("lua!!!")'; | |
| } |
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 Control.Monad.Free | |
| import Test.QuickCheck | |
| -- tuple based free list | |
| type Nil = () | |
| nilWitness = () | |
| data Pair a b = Pair a b | |
| type Ftor = Pair | |
| --type Ftor a = (,) a |