Skip to content

Instantly share code, notes, and snippets.

Paul Kinsky pkinsky

Block or report user

Report or block pkinsky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pkinsky / zshrc
Last active Apr 26, 2017
zsh for home meerkat minibox
View zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/pk/.oh-my-zsh
#needs to be before theme
# git clone ~/.oh-my-zsh/custom/themes/powerlevel9k
pkinsky / XResources
Created Apr 3, 2018
nixos vm config stuff
View XResources
URxvt.scrollBar: false
urxvt*termName: rxvt
urxvt*font: xft:uushi:pixelsize=16
urxvt*background: #000000
urxvt*foreground: #666699
urxvt*cursorColor: #6699CC
urxvt*colorBD: #CCCCFF

Am I spending my neuroplasticity wisely?

I’ve been setting up structured journal entries recently - quick morning notes, weekly and quarterly retrospectives, etc. As part of this I’ve been curating a list of questions to help self-assess how I’m doing at any given time.

Some of these questions are simple bio-maintenance checklist entries: how’s my diet? Am I getting enough sleep? Are my cholesterol and triglyceride levels normal? Have I been getting enough vitamin D? Have I been doing resistance exercise recently? Cardio?

Then come some less concrete questions: have I been keeping myself intellectually engaged? Have I been engaging in some regular form of artistic creation? When’s the last time I did something nontrivial just for the fun of it? Aside from work stuff, when’s the last time I finished a project? Speaking of work, how are things there? Attempts to answer that question could fill multiple blog posts, so for now I’m going to focus on a specific angle pointed out by

pkinsky /
Created Sep 17, 2019
terrible idea - anamorphism is not idiomatic in rust. I think I need to use refcell (mut pointers up/down tree)
//stack-safe anamorphism (unfolding change). Builds a tree layer by layer.
pub fn ana<X>(f: impl Fn(X) -> Tree<X>, seed: X) -> FixTree {
let mut instructions: Vec<Option<X>> = vec![]; // depth first, Some == add child w/ seed, None == back a level
let mut path_to_root: Vec<&mut Vec<Box<FixTree>>> = vec![]; // pointer to children of focused node
// ^ this breaks it, requires multiple borrows... drop this in a gist (or use refcel, rain says to do so)
let root = f(seed);
match root {
Tree::Leaf(n) => FixTree(Tree::Leaf(n)),
You can’t perform that action at this time.