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 nalgebra as na; | |
| use na::{Scalar, Matrix, MatrixMN, MatrixSlice, Matrix1, DVector, RowDVector}; | |
| use na::{U1, U3, Dynamic, Dim}; | |
| use na::allocator::Allocator; | |
| use na::default_allocator::DefaultAllocator; | |
| use na::storage::Storage; | |
| trait MatrixMapExt<N, R, C, S> | |
| where | |
| N: Scalar, |
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
| [ lampam @ 20:17:42 ] (!!!) (master •10 -53 +188) ~/cpp/other/rust/rsp22 | |
| $ rustup toolchain add nightly | |
| info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu' | |
| 240.9 KiB / 240.9 KiB (100 %) 240.9 KiB/s ETA: 0 s | |
| info: latest update on 2017-11-16, rust version 1.23.0-nightly (fa26421f5 2017-11-15) | |
| info: downloading component 'rustc' | |
| 44.2 MiB / 44.2 MiB (100 %) 5.1 MiB/s ETA: 0 s | |
| info: downloading component 'rust-std' | |
| 59.9 MiB / 59.9 MiB (100 %) 5.0 MiB/s ETA: 0 s | |
| info: downloading component 'cargo' |
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
| [m[m[32m[1m Compiling[m checkerr v0.1.0 (file:///home/lampam/cpp/throwaway/checkerr) | |
| [1m[91merror[E0518](B[m[1m: attribute should be applied to function(B[m | |
| (B[m[1m[94m--> (B[mexamples/E0518.rs:11:1(B[m | |
| (B[m[1m[94m|(B[m | |
| [1m[94m11(B[m (B[m[1m[94m| (B[m#[inline(always)] //~ ERROR E0518(B[m | |
| (B[m[1m[94m| (B[m[1m[91m^^^^^^^^^^^^^^^^^(B[m (B[m[1m[91mrequires a function(B[m | |
| [1m[91merror[E0518](B[m[1m: attribute should be applied to function(B[m | |
| (B[m[1m[94m--> (B[mexamples/E0518.rs:14:1(B[m | |
| (B[m[1m[94m|(B[m |
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
| [m[m[32m[1m Compiling[m checkerr v0.1.0 (file:///home/lampam/cpp/throwaway/checkerr) | |
| [1m[91merror[E0518](B[m[1m: attribute should be applied to function(B[m | |
| (B[m[1m[94m--> (B[mexamples/E0518.rs:11:1(B[m | |
| (B[m[1m[94m|(B[m | |
| [1m[94m11(B[m (B[m[1m[94m| (B[m#[inline(always)] //~ ERROR E0518(B[m | |
| (B[m[1m[94m| (B[m[1m[91m^^^^^^^^^^^^^^^^^(B[m | |
| [1m[94m12(B[m (B[m[1m[94m| (B[mstruct Foo; //~ not a function(B[m | |
| (B[m[1m[94m| (B[m[1m[94m-----------(B[m (B[m[1m[94mnot a function(B[m | |
| [1m[91merror[E0518](B[m[1m: attribute should be applied to function(B[m |
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
| /// Move a file or directory, possibly across filesystems. | |
| /// | |
| /// Properties: | |
| /// * Moves files or folders alike. | |
| /// * The destination must not exist. | |
| /// * The destination can be on a different filesystem. | |
| /// * The operation is O(1) and preserves hard-links if | |
| /// the destination is on the same filesystem. | |
| /// * Symlinks retain their textual path targets. | |
| /// * Permissions and attributes are carried over on a best |
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 os | |
| import sys | |
| alphabet = sys.argv[1] | |
| max_depth = int(sys.argv[2]) | |
| def gen_strings(alphabet, s, depth): | |
| yield s | |
| if depth > 0: | |
| for ch in alphabet: |
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
| diff --git a/Cargo.toml b/Cargo.toml | |
| index 6b34472..63b1d0b 100644 | |
| --- a/Cargo.toml | |
| +++ b/Cargo.toml | |
| @@ -2,8 +2,8 @@ | |
| path = "spell_core" | |
| [dependencies] | |
| -iron = "*" | |
| -router = "*" |
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
| //! Math utils for variable length contiguous vectors. | |
| // Currently restricted to 'f64' to make the design tractible. | |
| // Generic traits would be nice and I would kill for functional-style | |
| // maps and folds, but issues concerning borrowed data and trait bounds | |
| // get ugly fast. | |
| #[derive(Debug,Copy,Clone,PartialEq,PartialOrd)] | |
| pub struct BadNorm(pub f64); |
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
| //! Shim around the `tempdir` crate which doesn't delete the | |
| //! directories on unwind, in order to facilitate debugging. | |
| extern crate tempdir; | |
| pub use tempdir::TempDir as ActualTempDir; | |
| use ::std::io::Result; | |
| use ::std::path::{Path, PathBuf}; | |
| /// Wrapper around `tempdir::TempDir` that does not destroy the directory on unwind. | |
| #[derive(Debug)] |