Skip to content

Instantly share code, notes, and snippets.

View fairyfloss.js
// fairyfloss theme for blink shell
black = '#5A5475';
red = '#F92672'; // x red
green = '#C2FFDF'; // x green
yellow = '#E6C000'; // x yellow
blue = '#C5A3FF'; // x blue
magenta = '#C5A3FF'; // x pink
cyan = '#C2FFDF'; // x cyan
white = '#F8F8F0'; // x light gray
View examineNaN.js
function examineNaN(x) {
const buf = new ArrayBuffer(8);
const view = new DataView(buf);
view.setFloat64(0, x);
let binStr = '';
for (let i = 0; i < 8; i++) {
binStr += ('00000000' + view.getUint8(i).toString(2)).slice(-8) + ' ';
View perf_zine.txt
find 27968 97997.204322: 707897 cycles:pp:
7fffc034eac7 read_extent_buffer ([kernel.kallsyms])
7fffc032e4f7 btrfs_real_readdir ([kernel.kallsyms])
7fff81229eb8 iterate_dir ([kernel.kallsyms])
7fff8122a359 sys_getdents ([kernel.kallsyms])
7fff81850fc8 entry_SYSCALL_64_fastpath ([kernel.kallsyms])
c88eb __getdents64 (/lib/x86_64-linux-gnu/

Talks I'd love to see at RustConf

hi! I'm on the RustConf program committee this year, so here is a quick list of talks I'd be interested in seeing submitted. These are just things I personally think are interesting and I certainly don't represent the program committee as a whole :). As of today I haven't seen talk proposals about any of these!

introduce a small part of the Rust compiler

I imagine a lot of Rust developers have never read any of the code in the Rust compiler (I haven't!). And I know the language is trying to bring in more contributors! So I think an awesome talk could be:

  • pick a small part of the Rust compiler (maybe a part you've contributed to!)
% self  % total  name
 68.90    68.90  sleeping - ci/ruby-programs/day.rb
 10.33    10.33  black_panther - ci/ruby-programs/day.rb
  6.99     6.99  learn - ci/ruby-programs/day.rb
  6.89     6.89  eat - ci/ruby-programs/day.rb
  6.89     6.89  clean - ci/ruby-programs/day.rb
  0.00   100.00  block in <main> - ci/ruby-programs/day.rb
  0.00   100.00  <main> - ci/ruby-programs/day.rb
  0.00   100.00  <c function> - unknown
# to try this you'll need to edit in the name of your ruby binary and install bcc-tools
# bcc installation instructions are at
from __future__ import print_function
from bcc import BPF
from time import sleep
import os
# load BPF program
View freeze-mac.c
#include <mach/mach_init.h>
#include <mach/port.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
int main() {
for (;;) {
pid_t pid = fork();
if (pid == 0) execv("/usr/bin/true", NULL);
View regexp_compilation.rb
require 'pathname'
def chop_basename(path)
base = File.basename(path)
if /\A#{SEPARATOR_PAT}?\z/ =~ base
return nil
return path[0, path.rindex(base)], base
View things_i_don'

things I don't know

I took this list from What CS majors should know.

I think it is fun to list things I don't know so I did it =D. I actually found it to be a cool exercise -- maybe I should do a fun graphics project and learn about Open GL!

i wrote this because, while i think the things on this list are potentially worth knowing, and I actually think it's an awesome list of project ideas as well as good food for thought for people developing CS curricula (many of the things I don't know are great exercises!) -- I thought it was really weird to say that every CS student should know all of them. I have a CS degree and I learned very few of the things I do know inside my degree.

I classify "do know" as anything that I have a reasonable grasp of or at least some basic experience with -- the kind of experience I'd expect a CS student to be able to get. If I say I don't know something, it means either I know pretty much nothing about it (for "gr

You can’t perform that action at this time.