Skip to content

Instantly share code, notes, and snippets.

Nix thesis

I read https://nixos.org/~eelco/pubs/phd-thesis.pdf, which outlines Nix, a “functional” package manager.

It motivates the need for new take on package management by analogy to memory management in programming languages.

It contrasts how software deployment works today (“Fuck it, I’m sure /usr/bin/local/python is a reference to a python 2.7.12 install with PIL available”) to how we used to write software (“Fuck it, I’m sure 0x7FEA6072 is the address of the array of files; so clearly, assuming a 32-bit address space, the seventh file is at 0x7FEA608A.”)

In both cases, as long as your assumption was correct, things go swimmingly. But it could be easier and rely less on hoping your assumptions are correct.

WITH minutes AS
(SELECT CASE
WHEN job_name = '' THEN '<idle>'
WHEN job_name like 'com.snapsort.logloader.%' then substr(job_name, length('com.snapsort.logloader.') + 1)
ELSE job_name
END AS job_name,
job_id,
date_trunc('minute', ts) as ts,
count(DISTINCT HOST) AS servers,
sum(LOAD) AS LOAD,

False negatives (NO_MATCH -> model)

Olympus PEN E-PL1

listing manufacturer: Olympus
        title:        OLYMPUS Pen E-PL1 - champagne + M.ZUIKO DIGITAL ED 14-42 mm Lens + Pix Medium Case + Pocket in black + 16 GB SDHC Memory Card + PS-BLS1 Battery
        price:        499.99 GBP

our answer:       olympus_pen_e-pl1
    manufacturer: Olympus
    model:        PEN E-PL1
aggregator_expire thread:
root@metrics1:/build1-data# strace -p 25551 -Tc
Process 25551 attached
^CProcess 25551 detached
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
97.95 21.433371 154197 139 nanosleep
1.88 0.411658 32 12876 write
0.12 0.026664 33 798 135 futex
http://s3.amazonaws.com/sortable-assets/misc/colin/eduardo/1/index.html
http://s3.amazonaws.com/sortable-assets/misc/colin/eduardo/2/index.html
Comparisons of 20 runs of keywords/prefix "a", limit of 100,000:
old-times = master
new-times = doing sort on strings to avoid parsing and allocating an unbounded amount of KeywordResults
new-times-geometric = changing how bigNHits grows
new-times-geometric-no-sign = no longer permitting negative numbers in the freq column
x old-times
+ new-times
* new-times-geometric
Value Description
IAB1 Arts & Entertainment
IAB1-1 Books & Literature
IAB1-2 Celebrity Fan/Gossip
IAB1-3 Fine Art
IAB1-4 Humor
IAB1-5 Movies
IAB1-6 Music
IAB1-7 Television
IAB2 Automotive
# 100 Topics
401206 Andrea Jones
2630212 Lee and Kennedy
2162471 Isaac Elzevir
2837219 Ludwig Winter
1221394 David Glenn (garden designer)
341088 Alfred Parsons (artist)
3902967 Rowland Hilder
4884640 Wild Flowers Worth Knowing