Skip to content

Instantly share code, notes, and snippets.

View ChrisJefferson's full-sized avatar

Christopher Jefferson ChrisJefferson

View GitHub Profile
for i in 19 33; do
sed -i.old "${i}s/pub//" "src/perm/mod.rs"; (cargo check && cargo test); mv "src/perm/mod.rs.old" "src/perm/mod.rs"
done
[2022-05-23T11:20:47Z DEBUG cargo::core::compiler::fingerprint] fingerprint at: /home/caj/files/reps/gap/gap/git/Vole/rust/target/debug/.fingerprint/vole-d1c04c16d7491297/lib-vole
[2022-05-23T11:20:47Z DEBUG cargo::core::compiler::fingerprint] old local fingerprints deps "/home/caj/.cargo/registry/src/github.com-1ecc6299db9ec823/anyhow-1.0.57" precalculated="1.0.57"
[2022-05-23T11:20:47Z DEBUG cargo::core::compiler::fingerprint] max output mtime for "/home/caj/.cargo/registry/src/github.com-1ecc6299db9ec823/anyhow-1.0.57" is "/home/caj/files/reps/gap/gap/git/Vole/rust/target/debug/build/anyhow-748e0c6396a630c4/build_script_build-748e0c6396a630c4" 1653295554.632222000s
[2022-05-23T11:20:47Z DEBUG cargo::core::compiler::fingerprint] all paths up-to-date relative to "/home/caj/files/reps/gap/gap/git/Vole/rust/target/debug/.fingerprint/anyhow-748e0c6396a630c4/dep-build-sc
[?25l
[?1049hr
[?25h
[?1049l
@ChrisJefferson
ChrisJefferson / gist:f5e17e65fb1ee49c5d0a2f7fca12c3f5
Created March 18, 2021 16:50
comparing different methods of iterating slices of vectors with enumerate
#![feature(test)]
extern crate test;
pub fn foo_a(out: &mut Vec<usize>, inx: &[usize], base: usize) {
for i in 1..base {
out[i] = *inx.get(i).unwrap_or(&0);
}
}
function cartesianProductOf() {
return _.reduce(arguments, function(a, b) {
return _.flatten(_.map(a, function(x) {
return _.map(b, function(y) {
return x.concat([y]);
});
}));
}, [ [] ]);
};