Skip to content

Instantly share code, notes, and snippets.

View typesanitizer's full-sized avatar

Varun Gandhi typesanitizer

View GitHub Profile
@glaebhoerl
glaebhoerl / scopemap.rs
Last active July 3, 2022 12:59
Rust hash table with efficient support for nested scopes (save/restore)
// Based on idea: https://twitter.com/pkhuong/status/1287510400372748290
use hashbrown::raw::RawTable;
pub struct ScopeMap<K, V> {
last_scope_id: ScopeId,
scopes: Vec<ScopeId>, // values are zeroed instead of popped to save a check in get() / is_fresh()
current_scope: ScopeDepth, // index of innermost valid scope
values: RawTable<Entry<K, V>>,
shadowed: Vec<Shadowed<K, V>>,
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@kiran
kiran / impact.md
Last active July 3, 2023 20:46
on impact

Requiring ICs to demonstrate business impact for promotion is, at best, imprecise, and, at worst, disingenuous. Instead, two more valuable and precise measures are:

  1. measuring project management & technical skills (can the engineer effectively/efficiently complete large, unscoped projects?), and
  2. evaluating the engineer's contribution to the team's roadmap (can the engineer identify high-value projects within the team's responsibilities? do they push their team to evaluate the prioritization of their work?)

Engineering ICs cannot plan to affect business impact in a foolproof way -- even if an IC had the means to evaluate the impact of their project, it's rare that they are empowered to select projects. Impactful projects are driven partly by luck: whether the project was timely/actually important, whether you get assigned that project, and whether you are given the resources to make the project successful. The influence of luck on impact often pushes engineers to do short-term/unrisky work, when long-te

@sparrc
sparrc / phabricator_readme.md
Last active March 25, 2024 05:59
Phabricator Ubuntu Installation Guide

Phabricator Ubuntu Installation Guide

This is a supplement to the official Phabricator Installation Guide, because their guide will leave you with all kinds of permission and config errors and ~15,000 setup issues on startup.

Install bonus packages:

# apt-get install mercurial subversion python-pygments sendmail imagemagick

Create necessary users and add phd-user to sudoers: