Skip to content

Instantly share code, notes, and snippets.

View pnkfelix's full-sized avatar
🍩
re-pat; ex-🥐

Felix S Klock II pnkfelix

🍩
re-pat; ex-🥐
View GitHub Profile
#[macro_escape];
use std::rt::task::Task;
use std::rt::local::Local;
mod libunwind;
macro_rules! run(
($expr:expr) => (
{
@chris-morgan
chris-morgan / result_for.rs
Created February 20, 2014 02:19
A prototype of a `Result<T, E>`-based `Iterator<T, E>` replacing the `Option<T>`-based `Iterator<T>`.
#[feature(macro_rules)];
// There must be two variants of the macro for this simple prototype, each of
// them lacking one important feature and with one remaining feature completely
// infeasible in a macro_rules! macro. Done properly in the compiler these
// would be entirely reasonable.
// A variant with support for an output value from the else clause, but with no
// support for breaking out of the `for` block.
macro_rules! forr1 (
@pnkfelix
pnkfelix / chickpea-masala.md
Last active June 27, 2017 15:16
Pressure Cooker Chicken and Chickpea Masala
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active November 3, 2025 04:13
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

lunch-box. perf record -g -F99 rustc --crate-name clap src/lib.rs --crate-type lib --emit=dep-info,metadata -C codegen-units=4 -C debuginfo=2 --cfg 'feature="ansi_term"' --cfg 'feature="atty"' --cfg 'feature="color"' --cfg 'feature="default"' --cfg 'feature="strsim"' --cfg 'feature="suggestions"' --cfg 'feature="vec_map"' -C metadata=d202d71b943170bd -C extra-filename=-d202d71b943170bd --out-dir /home/nmatsakis/versioned/rustc-perf/collector/benchmarks/clap-rs/target/debug/deps -L dependency=/home/nmatsakis/versioned/rustc-perf/collector/benchmarks/clap-rs/target/debug/deps --extern bitflags=/home/nmatsakis/versioned/rustc-perf/collector/benchmarks/clap-rs/target/debug/deps/libbitflags-a639890d93be049d.rmeta --extern strsim=/home/nmatsakis/versioned/rustc-perf/collector/benchmarks/clap-rs/target/debug/deps/libstrsim-61acaf2d398b2611.rmeta --extern unicode_width=/home/nmatsakis/versioned/rustc-perf/collector/benchmarks/clap-rs/target/debug/deps/libunicode_width-92d73134b87da7cc.rmeta --extern atty=/home/nmatsa