Skip to content

Instantly share code, notes, and snippets.

View insaneinside's full-sized avatar

Collin J. Sutton insaneinside

View GitHub Profile
@insaneinside
insaneinside / draft.markdown
Created September 13, 2017 01:22
Whole-Crate Test-Case Reduction with C-Reduce

Whole-Crate Test-Case Reduction with C-Reduce

Sometimes, when working on a complex piece of software — or even a simple program or library with a non-trivial number of moving parts — you run into an issue and have absolutely no idea how to reduce your code to the minimum necessary in order to reproduce the error.

For the past several months I've been blocked by some trait-resolution errors in Symtern, my general-purpose interner crate. I knew the errors were somehow related to

@insaneinside
insaneinside / lsp-mode.rcp
Created August 1, 2017 21:27
el-get recipes for lsp-rust, lsp-mode
(:name lsp-mode
:type github
:pkgname "emacs-lsp/lsp-mode"
:depends (flycheck)
:description "Emacs client for the Language Server Protocol")
@insaneinside
insaneinside / rustdoc-broken-block-comments.rs
Last active March 7, 2016 02:46
Broken block-doc comments? (Issue rust-lang/rust#32088 filed, others after dinner. ;)
/*! The generated documentation for a block-doc comment will include asterisks
* when a paragraph spans multiple lines.
*
* Other problems follow.
*/
/// When a block-doc comment is indented, does *not* use an non-alphabetically-terminated
/// fill-prefix, and its first paragraph does not extend beyond the first line
/// of the comment, its subsequent paragraphs are treated as code blocks when
/// indented. See module's `baz()` fn for example.
@insaneinside
insaneinside / Cargo.toml
Created March 20, 2015 23:20
Example of Cargo- and rustdoc-built tests failing for tests derived from macro doc-comments
[package]
name="bob"
version="0.0.1"
authors=["insaneinside"]
[lib]
name="bob"
path="lib.rs"
@insaneinside
insaneinside / ruby-shell.mk
Last active July 22, 2017 02:28
Ruby as a shell in GNU Make
# Example of using Ruby as the command interpreter for GNU Make
# Set shell to ruby...
SHELL:=ruby
# ...and implicitly pass `-e` (Ruby's "eval" option) prior to the
# command string.
.SHELLFLAGS:=-e
# Tell GNU Make to use a single shell process for all lines in a given recipe.