Skip to content

Instantly share code, notes, and snippets.

View ashleygwilliams's full-sized avatar
>o_o<

ashley williams ashleygwilliams

>o_o<
View GitHub Profile

Zero One Infinity READMEs

npm has only been a company for 3 years, but it has been a code base for around 5–6 years. Much of it has been rewritten, but the cores of the CLI and registry are still the original code. Having only worked at npm for a year at this point, there’s still a lot of things left for me to learn about how the whole system works.

Sometimes, a user files a bug which, in the process of debugging it, teaches you some things you didn’t know about your own system. This is the story of one of those bugs.

The Bug

Over the past week or so, [several][1] [people][2] [filed issues][3] regarding some strange truncating in npm package pages. In one issue, a user reported what appeared to be a broken link in their README:

===================================================================
--- ./github_markup.html github
+++ ./npm_markup.html npm
@@ -1,NaN +1,NaN @@
-<h1><a id="user-content-marky-markdown" class="anchor" href="#marky-markdown" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>marky-markdown</h1>
-
-<p><a href="https://travis-ci.org/npm/marky-markdown"><img src="https://camo.githubusercontent.com/d64e77199451edab8526da255c23a10d3f3cd2f0/68747470733a2f2f7472617669732d63692e6f72672f6e706d2f6d61726b792d6d61726b646f776e2e7376673f6272616e63683d6d6173746572" alt="Build Status" data-canonical-
<h1><a id="user-content-marky-markdown" class="anchor" href="#marky-markdown" aria-hidden="true"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg></a>marky-markdown</h1>
<p><a href="https://travis-ci.org/npm/marky-markdown"><img src="https://camo.githubusercontent.com/d64e77199451edab8526da255c23a10d3f3cd2f0/68747470733a2f2f7472617669732d63692e6f72672f6e706d2f6d61726b792d6d61726b646f776e2e7376673f6272616e63683d6d6173746572" alt="Build Status" data-canonical-src="https://travis-ci.org/npm/marky-markdown.svg?branch=master" style="max-width:100%;"></a>
<a href="https://codeclimate.com/github/npm/marky-mark

heading\n\n> quote

Zero One Infinity Readmes

npm has only been a company for 3 years, but it has been a code base for around 5-6 years. Much of it has been rewritten, but the cores of the CLI and registry products are still the original code. Having only worked at npm for a year at this point, there's still a lot of things left for me to learn about how the whole system works.

Sometimes, a user files a bug that, in the process of debugging it, teaches you some things you didn't know about your own system. This is the story of one of those bugs.

The Bug

Over the past week or so, [several][1] [people][2] [filed issues][3] regarding some strange truncating in npm package pages. In one issue, a user reported what appeared to be a broken link in their README:

9:05- 9:25 1. Welcome and Introduction (20min)

  • Operational Stuff (10min) [Ashley]

    • Introduction to instructors
    • Where are all the materials
    • Explain the schedule, when are breaks
    • Code of Conduct
    • What to do if you need help
  • What is the intermezzOS project? (10min) [Steve]

vagrant@debian-jessie:/vagrant/hello rust$ make run
cp x86_64-unknown-intermezzos-gnu.json target/libcore
cd target/libcore && cargo build --release --features disable_float --target=x86_64-unknown-intermezzos-gnu.json
RUSTFLAGS="-L target/libcore/target/x86_64-unknown-intermezzos-gnu/release" cargo build --release --target x86_64-unknown-intermezzos-gnu.json
Compiling intermezzos v0.1.0 (file:///vagrant/hello%20rust)
ld -n -o target/kernel.bin -T src/asm/linker.ld target/multiboot_header.o target/boot.o target/x86_64-unknown-intermezzos-gnu/release/libintermezzos.a
target/x86_64-unknown-intermezzos-gnu/release/libintermezzos.a(core.0.o): In function `core::num::bignum::Big32x40::from_small::h0b58df2b9f3e154a':
core.0.rs:(.text._ZN4core3num6bignum8Big32x4010from_small17h0b58df2b9f3e154aE+0x28): undefined reference to `memset'
core.0.rs:(.text._ZN4core3num6bignum8Big32x4010from_small17h0b58df2b9f3e154aE+0x4a): undefined reference to `memcpy'
target/x86_64-unknown-intermezzos-gnu/release/libintermezzos.a(cor

points to discuss:

  • who has permission to unpublish a package?
  • automating the dependents check
    • when we go to unpublish a package, it should check for dependents
    • if dependents are present it should fail
    • we should be able to force unpublish
    • on a force unpublish, all dependent owners should get an email and we should communicate publicly that it is happening via status
  • policy violations should be posted on the blog and status, not just status. they should be reviewed for tone and posted in #announcements
  • so the plan is 20/phone on top of plan charges
  • what happens to upgrades? do they carryover?
  • the data is shared between phones?
  • for someone in nyc what are the extra tax charges?