Skip to content

Instantly share code, notes, and snippets.

Mark Rousskov Mark-Simulacrum

Block or report user

Report or block Mark-Simulacrum

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Mark-Simulacrum / index.html
Created Jan 17, 2015
Calculates numbers that add up to a given sum with a given number of digits. // source
View index.html
<!DOCTYPE html>
<meta name="description" content="Calculates numbers that add up to a given sum with a given number of digits." />
<script src=""></script>
<script src=""></script>
<meta charset="utf-8">
<title>JS Bin</title>
Mark-Simulacrum / TypeMap.js
Created Apr 10, 2015
Type register system
View TypeMap.js
class MapItem {
constructor() {
this.numbered = new Map();
this.matchers = [];
setBase(value) {
if (value === undefined)
throw new Error("setBase called without a base");
if (this.base)
Mark-Simulacrum /
Last active Sep 22, 2016
SimpleString and the &'static str vs. String problem for beginners
  • briansmith:
    • Confusion about &String coercing to &str:
      • Thought this was because of AsRef, but now thinks is probably because of Deref.
    • &'static str is immutable, but String is mutable.
      • Similar to C++; not in a good way.
  • DanielKeep:
    • capacity == 0 && len != 0 to indicate contents are static.
  • rkruppe:
    • Very common speed bump on the learning curve, but it goes much, much
//! A vector type that allows storing small values directly on the stack.
use std::iter::FromIterator;
use std::ptr::drop_in_place;
use std::ops::Deref;
use std::fmt;
pub struct SmallVec8<T> {
View by-wasted.txt
1 Chunk #12: 8388608 bytes total, used 1959664, wasted 6428944
1 Chunk #5: 65536 bytes total, used 2432, wasted 63104
1 Chunk #5: 65536 bytes total, used 7184, wasted 58352
1 Chunk #5: 65536 bytes total, used 10072, wasted 55464
1 Chunk #5: 65536 bytes total, used 14240, wasted 51296
1 Chunk #5: 65536 bytes total, used 19688, wasted 45848
1 Chunk #5: 65536 bytes total, used 24352, wasted 41184
4 Chunk #4: 32768 bytes total, used 256, wasted 32512
1 Chunk #4: 32768 bytes total, used 400, wasted 32368
1 Chunk #4: 32768 bytes total, used 1176, wasted 31592
View gist:50cf817b255639ae9338e98d479e99d0
Checks a package to catch common mistakes and improve your Rust code.
cargo clippy [options] [--] [<opts>...]
Common options:
-h, --help Print this message
--features Features to compile for the package
-V, --version Print version info and exit
Mark-Simulacrum /
Last active Apr 13, 2017
Draft version of a post announcing the infrastructure team to users.rlo

Announcing the unofficial Rust infrastructure team

The Rust infra team will manage, as of now:

  • Making sure the pull request queue is continuing to test and merge.
    • including: Travis, Appveyor, Homu
  • Highfive
  • (currently down, work to bring it up is in progress)
  • Rust's Central Station
    • This runs homu, highfive, etc.
Mark-Simulacrum /
Created Jul 4, 2018
crater hunter, some parts taken from
extern crate serde;
extern crate serde_derive;
extern crate futures;
extern crate percent_encoding;
extern crate reqwest;
extern crate serde_json;
extern crate tokio_core;
extern crate url;
You can’t perform that action at this time.