Skip to content

Instantly share code, notes, and snippets.

View durka's full-sized avatar

Alex Burka durka

View GitHub Profile
@durka
durka / -
Created October 19, 2017 02:00
durska:clippy alex$ RUST_BACKTRACE=1 TESTNAME=explicit_write cargo +nightly test
Compiling clippy v0.0.165 (file:///Users/alex/Programming/rust/clippy)
Compiling rustc-serialize v0.3.24
Compiling getopts v0.2.15
Compiling lazy_static v0.2.9
thread '<unnamed>' panicked at 'timeout in poll?', /Users/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/jobserver-0.1.7/src/lib.rs:505:29
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::_print
@durka
durka / -
Created October 13, 2017 20:47
DEBUG:rustc_typeck::collect: explicit_predicates_of(def_id=DefId { krate: CrateNum(0), node: DefIndex(0:14) => trait_alias/8cd878b::CD[0] })
DEBUG:rustc_typeck::collect: explicit_predicates_of: is_trait=Some((<Self as CD>, None))
DEBUG:rustc_typeck::collect: explicit_predicates_of: 5 predicates=[Binder(TraitPredicate(<Self as std::clone::Clone>)), Binder(TraitPredicate(<Self as std::default::Defa
ult>))]
DEBUG:rustc_typeck::collect: explicit_predicates_of: 10 predicates=[Binder(TraitPredicate(<Self as std::clone::Clone>)), Binder(TraitPredicate(<Self as std::default::Def
ault>))]
DEBUG:rustc_typeck::collect: explicit_predicates_of: 20 predicates=[Binder(TraitPredicate(<Self as std::clone::Clone>)), Binder(TraitPredicate(<Self as std::default::Def
ault>))]
DEBUG:rustc_typeck::collect: explicit_predicates_of: 30 predicates=[Binder(TraitPredicate(<Self as std::clone::Clone>)), Binder(TraitPredicate(<Self as std::default::Def
ault>))]
@durka
durka / -
Created October 12, 2017 12:54
(gdb) break collect.rs:1441 │·
Breakpoint 1 at 0x7ffff647cfd0: collect.rs:1441. (2 locations) │·
(gdb) run src/test/run-pass/trait-alias.rs │·
Starting program: /home/aburka/rust/vis/build/x86_64-unknown-linux-gnu/stage1/bin/rustc src/test/run-pass/trait-alias.rs │·
[Thread debugging using libthread_db enabled] │·
@durka
durka / _.md
Last active October 1, 2017 15:04
RustFest lightning talk

@durka
durka / -
Created September 26, 2017 17:51
// input helper subroutine for converting from decimal to unary
// step 1 "revconv": reverse the digits and convert them to zermelo
// step 2 "unary": iterate through the digits and construct a unary number
(@in @revconv
[] [$($digit:tt)*]
$stuff:tt
) => {
bf!(@in @unary
[] [] [()] [$($digit)*]
$stuff
@durka
durka / -
Created September 25, 2017 21:44
/// Try downcasting an Any to several types, performing the same or different actions if one of the
/// types matches, otherwise do a fallback
///
/// Syntax is similar to `match`, except the types are separated by commas and the _ case comes
/// first (TODO fix this)
#[macro_export]
macro_rules! downcast {
($any:ident { _ => $code:expr, $($($ts:ty),+ => $codes:expr),* }) => {
$(
$(
#[macro_use] extern crate macrolisp;
use macrolisp::prelude::*;
lisp! {
(ns
(extern [bytes futures
tokio_io
tokio_proto
tokio_service])
(use [(std {io str})
<?xml version="1.0"?>
<AnswerKey xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2005-10-01/AnswerKey.xsd">
<Question>
<QuestionIdentifier>Q</QuestionIdentifier>
<AnswerOption>
<SelectionIdentifier>Yes</SelectionIdentifier>
<AnswerScore>1</AnswerScore>
</AnswerOption>
</Question>
</AnswerKey>
@durka
durka / -
Created September 12, 2017 01:27
rodarmor: As far as ways to entertain oneself go, it's a pretty virtuous one
[8:25pm] thills left the chat room. (Ping timeout: 121 seconds)
[8:28pm] EliDupree: I also sometimes entertain myself by answering questions in here, my only concern about virtue being that help I render here might be biased in favor of helping more e.g. white people (a common concern for helping tech people with tech)
[8:28pm] erictapen left the chat room. (Connection closed)
[8:28pm] lambda-11235 joined the chat room.
[8:29pm] alxs joined the chat room.
[8:30pm] hawnzug left the chat room. (Ping timeout: 121 seconds)
[8:30pm] ambaxter left the chat room. (Quit: )
[8:30pm] danieldg: that's a strange concern. You can't tell anything like that about someone on IRC
[8:30pm] tbodt left the chat room. (Quit: My Mac has gone to sleep. ZZZzzz…)
[8:28pm] EliDupree: I also sometimes entertain myself by answering questions in here, my only concern about virtue being that help I render here might be biased in favor of helping more e.g. white people (a common concern for helping tech people with tech)
[8:30pm] danieldg: that's a strange concern. You can't tell anything like that about someone on IRC
[8:31pm] EliDupree: Sure, I can't, but I can make a reasonable guess about the overall proportions from the rust community surveys and such
[8:32pm] twmb: what?
[8:33pm] danieldg: yeah, that's not the right way to compute this imo
[8:37pm] EliDupree: If I prefer to help people out in a space that statistically has more privileged people in it, then I'm de facto concentrating resources in the hands of the privileged. I don't think it's *bad* per se because it's not zero-sum, but I'd prefer to help people who have less help already at their disposal.
[8:39pm] danieldg: I only consider that to apply if there are baerriers to entry for the space; rust doesn't re