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
Currently the behavior is as follows (where stageN <-> stage(N-1) artifacts, except for stage0 libstd): | |
- `x.py build --stage 0`: | |
- stage0 libstd | |
- stage0 rustc (but without putting rustc in stage1/) | |
This leaves you without any rustc at all except for the beta compiler | |
(https://github.com/rust-lang/rust/issues/73519). This is never what you want (currently you should use either `x.py check` or `x.py build --stage 0 src/libstd` instead). | |
- `x.py build --stage 1`: |
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
5 KLPhash | |
5 a42-__- | |
5 aabb-quadtree | |
5 abci-rs | |
5 abort_on_panic | |
5 abra | |
5 absal | |
5 abstractgraph | |
5 aces | |
5 aci_ppm |
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/sh | |
set -euv | |
#cargo check # make sure dependencies are installed | |
CONTAINER="$("docker" "create" \ | |
"-v" "$(realpath ./target):/opt/rustwide/target:rw,Z" \ | |
"-v" "$(realpath .):/opt/rustwide/workdir:ro,Z" \ | |
"-v" ~/.cargo:/opt/rustwide/cargo-home:ro,Z \ | |
"-v" ~/.rustup:/opt/rustwide/rustup-home:ro,Z \ |
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
extern crate syn; | |
use syn::Expr; | |
use std::fs; | |
use std::path::Path; | |
const TARGET_DIR: &str = "runner-tests"; | |
fn main() { | |
let mut args = std::env::args(); |
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 re | |
import socket | |
import subprocess | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.connect(("ctfchallenges.ritsec.club", 8080)) | |
data = s.recv(1024) | |
if data == "": | |
exit(1) |
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
# summary | |
docs.rs is _much_ faster than my hard disk. | |
Adding concurrency reduces overall time but increases individual time | |
Most of the delay on current prod is due to network latency, not CPU time | |
I cannot reproduce the CPU usage locally - requests are just as fast or faster on the version that overloaded prod as on the latest version. | |
## extended timing info | |
### Current prod (I _believe_ c3d3ed3d2e0c4274c0c12a7b1f5e56e68eb8b8bf, remote) |
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
# fibonacci sequence in MIPS | |
# $s0 stores the next to last item in the sequence | |
# $s1 stores the last item in the sequence | |
# this is just for initialization | |
li $t0, 1 # F_1 (since F_0 is 0, we don't need to initialize the registers) | |
seq $t1, $s1, $0 # if s1 == 0 this is the first run | |
# conditional move: if (t1) s1 = t0 |
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 Prelude hiding (gcd, lcm) | |
import Data.Bits ((.&.), Bits) | |
import Data.Semigroup | |
import System.Exit (die) | |
import System.Environment (getProgName, getArgs) | |
import Text.Printf (printf) | |
-- | Calculate whether a number is odd | |
isOdd :: (Integral a, Data.Bits.Bits a) => a -> Bool | |
isOdd n = n .&. 1 == 1 |
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/env python3 | |
from functools import partial | |
def classtree(cls, indent=0): | |
return (classtree(type(cls), indent) if type(cls) != type | |
else (stringy(cls, indent) | |
+ ''.join(map(partial(classtree, indent=indent+3), | |
filter(lambda sub: sub != type, | |
subclasses(cls)))))) |
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<pthread.h> | |
#include<stdio.h> | |
#include<stdlib.h> | |
#include<sys/time.h> | |
#define THREADS 4 | |
void *do_nothing(void* _) { | |
return NULL; | |
} |