Skip to content

Instantly share code, notes, and snippets.

View othiym23's full-sized avatar
💭
what is this thing you call, "architecture"

Forrest L Norvell othiym23

💭
what is this thing you call, "architecture"
  • Ellation / Crunchyroll / VRV
  • San Francisco
View GitHub Profile
@othiym23
othiym23 / skiffy.md
Created August 10, 2014 07:56
some sf and fantasy recommendations

The Winterlong Trilogy by Elizabeth Hand

Gothic, Grand Guignol-drenched post-apocalyptic science-fantasy. "Febrile" is a word that comes to mind – the language is overstuffed, it's dense with references to fantasy and folklore, and the characters are run through the wringer. Not the last of her novels to feature a transmogrified Washington DC as a primary venue.

Waking the Moon by Elizabeth Hand

Roman á clef and supernatural romance (in the traditional, not Twilight sense) featuring the hidden war between the Benandanti, a sect of nasty old patriarchal quasi-Catholics, and the forces of Othiym Lunarsa, goddess of a long-suppressed matriarchal death cult. If Camille Paglia ever read this, she probably loved it, but the central story is basically an overheated, fantastic version of Whit Stillman's Metropolitan and so th

Use cases

  1. As npm, I want to safely put only valid metadata and tarballs into the npm cache.
  2. As npm, I want to ensure that multiple npms running concurrently don't download the same things repeatedly.

Requirements

  1. single-machine
  2. no native dependencies
  3. multi-process serialization for both reads and writes
@othiym23
othiym23 / algo.md
Created August 15, 2014 22:28
stale locking v3
  1. acquire $lock, fail
  2. stat $lock, find that it is stale
  3. acquire $lock.STALE
  4. stat $lock, assert that it is still stale
  5. unlink $lock
  6. link $lock.STALE $lock
  7. unlink $lock.STALE
  • my job is to make npm the most useful tool it can be
  • to me, "useful" encompasses values:
    • pragmatism > rigor
      • people don't want their tools to surprise them
    • simplicity > completeness
      • do a few things well
      • let the community fill in the cracks
    • problems > solutions
      • developers love to skip over problems
  • having a clear understanding of several different problems often suggests an approach that will cover many or most of them
var tap = require("tap")
var server = require("./lib/server.js")
var common = require("./lib/common.js")
tap.test("get returns 403", function (t) {
server.expect("/underscore", function (req, res) {
t.equal(req.method, "GET", "got expected method")
res.writeHead(403)
@othiym23
othiym23 / -
Created September 14, 2014 01:10
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:
a.sni.fastly.net has address 199.27.79.162
a.sni.fastly.net has address 185.31.18.162
a.sni.fastly.net has address 23.235.39.162
a.sni.fastly.net has address 185.31.17.162
a.sni.fastly.net has address 23.235.44.162
@othiym23
othiym23 / package.json
Created September 17, 2014 18:04
fails every time
{
"name": "broken-with-shrinkwrap",
"version": "0.0.0-prealpha.0.0",
"dependencies": {
"gifsicle": "1.0.2",
"jpegtran-bin": "1.0.2",
"optipng-bin": "1.0.1"
}
}
--- test.1 2014-09-21 00:50:56.000000000 -0700
+++ test.3 2014-09-21 00:57:02.000000000 -0700
@@ -1,10 +1,14 @@
+.\" Generated with Ronnjs 0.4.0
+.\" http://github.com/kapouer/ronnjs
+.
.TH "NPM\-INSTALL" "1" "September 2014" "" ""
+.
.SH "NAME"
-\fBnpm-install\fR \- Install a package
@othiym23
othiym23 / build.log
Last active August 29, 2015 14:06
`make check` in marked-man
bauchelain% h clone kapouer/marked-man
Cloning into 'marked-man'...
remote: Counting objects: 334, done.
remote: Total 334 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (334/334), 69.87 KiB | 0 bytes/s, done.
Resolving deltas: 100% (160/160), done.
Checking connectivity... done.
bauchelain% cd marked-man
bauchelain% npm install
marked@0.3.2 node_modules/marked
@othiym23
othiym23 / test-npm.patch
Last active August 29, 2015 14:06
for tjfontaine
diff --git a/Makefile b/Makefile
index 11304e1..dc5f1cd 100644
--- a/Makefile
+++ b/Makefile
@@ -147,7 +147,13 @@ test-debugger: all
$(PYTHON) tools/test.py debugger
test-npm: node
- ./node deps/npm/test/run.js
+ rm -rf npm-cache npm-tmp