Skip to content

Instantly share code, notes, and snippets.

View yaahc's full-sized avatar
💭
🦊

Jane Losare-Lusby yaahc

💭
🦊
View GitHub Profile
@yaahc
yaahc / charter.md
Created July 18, 2020 23:46
Error Handling Project Group Charter

Error Handling Project Group Charter

Motivation

The error handling project group aims to reduce confusion on how to structure error handling for users in the rust community. This will be accomplished by creating learning resources and pushing effort to upstream widely used crates into std. As a secondary goal this project group will also try to resolve some known issues with the Error trait and reporting errors in panics/termination.

Goals

agree on and define common error handling terminology

@yaahc
yaahc / cc.error
Created July 13, 2020 21:12
cargo cc compiler error
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "depend/bitcoin/src" "-I" "depend/bitcoin/depends/x86_64-unknown-linux-gnu/include" "-Wall" "-Wextra" "-o" "/home/jlusby/git/zfnd/zcashconsensus/target/debug/build/bitcoinconsensus-10d848f2845186e9/out/depend/zcash/src/script/zcashconsensus.o" "-c" "depend/zcash/src/script/zcashconsensus.cpp"
cargo:warning=In file included from /usr/include/x86_64-linux-gnu/sys/types.h:176,
cargo:warning= from /usr/include/stdlib.h:394,
cargo:warning= from /usr/include/c++/9/cstdlib:75,
cargo:warning= from /usr/include/c++/9/ext/string_conversions.h:41,
cargo:warning= from /usr/include/c++/9/bits/basic_string.h:6493,
cargo:warning= from /usr/include/c++/9/string:55,
cargo:warning= from /usr/include/c++/9/stdexcept:39,
cargo:warning= from depend/bitcoin/src/uint256.h:11,
cargo:warning= from
use tracing_futures::Instrument;
pub struct FancyGuard<'a> {
span: &'a tracing::Span,
entered: bool,
}
impl<'a> FancyGuard<'a> {
pub fn new(span: &'a tracing::Span) -> FancyGuard<'a> {
span.with_subscriber(|(id, sub)| sub.enter(id)).unwrap();
use backtrace::Backtrace;
use eyre::EyreHandler;
use std::error::Error;
use std::{fmt, iter};
fn main() -> eyre::Result<()> {
// Install our custom eyre report hook for constructing our custom Handlers
install().unwrap();
// construct a report with, hopefully, our custom handler!
@yaahc
yaahc / todo.md
Last active August 8, 2019 22:26
My todo list of PR ideas related to rustlang
# Rustaceans! We Can Help!
## Abstract
Are you a new rustacean trying to take your first steps into rust's open source
community? Are you trying to meet people in the rust community but don't know
where to start? Are you a maintainer interested in attracting new contributors?
Then have I got the talk for you! Together we will explore some approaches to
finding issues to work on, finding new projects, structuring your projects to
help new contributors, and meeting other rust developers to become a happy and
@yaahc
yaahc / cfp.md
Created July 16, 2019 00:24
colorado gold rust cfp draft

Insert catchy title for the contribution tour

Abstract

The story so far of my experience joining the rust FOSS community. Starting from learning about the community and its values, through my initial efforts to contribute to various projects, and finishing in my current more refined views towards selecting open source work and how to approach it constructively.

Details

//! Struct for merging multiple sorted channels into a single iterator
use crossbeam::channel::Receiver;
use std::cmp::Ordering;
use std::fmt::Debug;
use tracing_proc_macros::trace as instrument;
/// Representation of a merged set of channels as an iterator
///
/// Depends upon the assumption that all data in chans is already sorted.
layout title categories
post
Lifetime definitions
rust rustlang lifetime borrow reference generics

Confusing terms

My problem with understanding lifetime heavy code is that I find all the terms involved confusable. This post is my attempt to record clear distinctions