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
use async_trait::async_trait; | |
use core::{future::Future, pin::Pin}; | |
use futures::join; | |
use http::{header::UPGRADE, StatusCode}; | |
use hyper::{body::HttpBody, client::HttpConnector, Body, Client, Request, Response}; | |
use tracing::debug; | |
#[async_trait] | |
pub trait HttpBackend { | |
async fn make_request(&self, request: Request<Body>) -> crate::error::Result<Response<Body>>; |
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
GC Warning: Failed to expand heap by 402653184 bytes | |
/nix/store/d6vb0y42apgavxdq4c3dlr2rm39y2h79-jetbrains-fhs | |
execve("/nix/store/66f85w6hw07gjjsf10pvblf37gl8zc3z-jetbrains-toolbox/jetbrains-toolbox-1.4.2492/jetbrains-toolbox", ["/nix/store/66f85w6hw07gjjsf10pvb"...], [/* 17 vars */]) = 0 | |
brk(NULL) = 0x25b6000 | |
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f07bbaad000 | |
access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/run/opengl-driver/lib/tls/x86_64/libfuse.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/run/opengl-driver/lib/tls/x86_64", 0x7fffe4664410) = -1 ENOENT (No such file or directory) | |
open("/run/opengl-driver/lib/tls/libfuse.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/run/opengl-driver/lib/tls", 0x7fffe4664410) = -1 ENOENT (No such file or directory) |
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
#! /nix/store/r6b2lipkz6mlhzhcnhsh9i3r6wiqdysj-ruby-2.3.3/bin/ruby | |
#!/usr/bin/env ruby | |
# Bind mounts hierarchy: from => to (relative) | |
# If 'to' is nil, path will be the same | |
mounts = { '/' => 'host', | |
'/proc' => nil, | |
'/sys' => nil, | |
'/nix' => nil, | |
'/tmp' => nil, |
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
const SBOX: [u8; 16] = [3, 14, 1, 10, 4, 9, 5, 6, 8, 11, 15, 2, 13, 12, 0, 7]; | |
const INV_SBOX: [u8; 16] = [14, 2, 11, 0, 4, 6, 7, 15, 8, 5, 3, 9, 13, 12, 1, 10]; | |
fn toy_cipher(p: u8, k0: u8, k1: u8) -> u8 { | |
return k1 ^ SBOX[(p ^ k0) as usize]; | |
} | |
fn find_diffs() -> Vec<Vec<Differential>> { |
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 Tree | |
mutual | |
data Node : (Nat) -> a -> Type where | |
Leaf : a -> Node 1 a | |
Node2 : FingerTree n a -> FingerTree m a -> Node (n + m) a | |
Node3 : FingerTree n a -> FingerTree m a -> FingerTree p a -> Node (n + m + p) a | |
data FingerTree : Nat -> a -> Type where |
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
Saved package config for ghc-mod-5.0.1 written by Cabal-1.21.0.0 using ghc-7.8 | |
LocalBuildInfo {configFlags = ConfigFlags {configPrograms = [], configProgramPaths = [], configProgramArgs = [], configProgramPathExtra = [], configHcFlavor = Flag GHC, configHcPath = NoFlag, configHcPkg = NoFlag, configVanillaLib = Flag True, configProfLib = Flag False, configSharedLib = NoFlag, configDynExe = Flag False, configProfExe = Flag False, configConfigureArgs = [], configOptimization = Flag NormalOptimisation, configProgPrefix = Flag "", configProgSuffix = Flag "", configInstallDirs = InstallDirs {prefix = Flag "/home/gareth/src/ghc-mod/.cabal-sandbox", bindir = Flag "$prefix/bin", libdir = Flag "$prefix/lib", libsubdir = Flag "$arch-$os-$compiler/$pkgkey", dynlibdir = NoFlag, libexecdir = Flag "$prefix/libexec", progdir = NoFlag, includedir = NoFlag, datadir = Flag "$prefix/share", datasubdir = Flag "$arch-$os-$compiler/$pkgid", docdir = Flag "$datadir/doc/$arch-$os-$compiler/$pkgid", mandir = NoFlag, htmldir = Flag "$d |
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
/* | |
compile: g++ thread_template.cpp -lboost_thread | |
Outputs: | |
BOOST_VERSION = 104200 | |
Starting thread 0 | |
Starting thread 1 | |
Thread 0 waiting for work | |
Thread 1 waiting for work |
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
import std.typetuple; | |
template staticReduce(alias F,T...) { | |
static if(T.length==0) { | |
alias TypeTuple!() staticReduce; | |
} else static if(T.length==1) { | |
enum staticReduce=T[0]; | |
} else { | |
enum staticReduce=staticReduce!(F,TypeTuple!(F!(T[0],T[1]),T[2..$])); |
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
import std.typetuple; | |
template staticReduce(alias F,T...) { | |
static if(T.length==0) { | |
alias TypeTuple!() staticReduce; | |
} else static if(T.length==1) { | |
enum staticReduce=T[0]; | |
} else { | |
enum staticReduce=staticReduce!(F,TypeTuple!(F!(T[0],T[1]),T[2..$])); | |
} |