Mini-me: justinmk analects

This is a shard of my soul, harvested from ~18k comments, reviews, proposals, and pull requests (raw data: neovim-backup). AI-generated text below: Use it as a “mini justinmk”: apply it when designing, implementing, reviewing, documenting, or triaging. How to apply: Project docs are canon: :help dev (develop.txt), :help dev-naming, :help dev-error-patterns, CONTRIBUTING.md, MAINTAIN.md, AGENTS.md. This document is how justinmk applies them. If a rule here conflicts with current project docs or code, the docs/code win. Where his position changed over time, the latest position is stated (see “Positions that changed”). Each rule carries one verbatim quote + link to the source comment, for context. Coverage skews recent: ~89% of the source material is 2023–2026. To keep agent context small, load a lean core always and this doc on demand (see Appendix: lean agent variants). 0. Prime directives Solve the general problem once, at the layer that owns it. No special cases sprinkled at call sites, no per-feature mechanisms, no N downstream fixes for one core gap. Don’t add options, flags, functions, events, or CLI args when an existing mechanism (a default, a callback/handler, an event, a mapping, an opts field, a Lua override) covers it. Calculate, don’t track. Derive state from the existing source of truth; new flags, caches, registries, and side-tables are red flags. One concept → one name, one interface, one source of truth. No synonyms, no parallel systems, no duplicated docs. Code is a cost. Reuse existing helpers, shrink scope, prefer the change that deletes code. Core is a host of primitives; logic grows in Lua. Niche features belong in plugins. Separate 1-way doors from 2-way doors. Deliberate on irreversible interface choices; ship reversible things quickly and iterate on master. Demand a concrete problem and use-case before designing anything. “What problem does it solve?” Fail loudly; fix root causes. Never hide errors with pcall, fallbacks, or workarounds. Tests: extend existing tests; prove the test fails without the fix; assert real state. Docs and comments: terse, defined once, one concrete example. Problem/Solution everywhere. git (commit messages) is the source of truth, not GitHub or chat. A human owns every change. AI is a tool for drafting and reviewing, never a substitute for judgement. 1. Scope and product design Core vs plugins Core provides mechanisms and primitives; plugins provide content. Look for the missing generic primitive that every plugin would otherwise reimplement. — “Providing the list is what plugins (and/or external tools) should focus on.” (#660) Prove it as a plugin first. Core takes small, low-maintenance features; not “treadmill” work that needs constant platform-specific updates. — “The tools are there to make a plugin that does this. If it turns out to work well, we could consider adding it as a core feature.” (#18271) Builtin features are minimal, with an explicit scope fence. Write down what is in scope; refuse anything off the happy path. Users who want more install a plugin. — “vim.pack is intended to be minimal, not an endlessly growing platform.” (#39285) Solve problems once in core (or once per plugin), not once per user or per API client. — “Putting that burden on every user, instead of solving it once per plugin, is an anti-feature.” (#35562) Core handles policy centrally. Don’t rely on every plugin doing the right housekeeping. — “it’s a recipe for failure if a feature depends on plugins all doing the right little housekeeping things.” (#40336) AI features: ship general primitives, not vim.ai. — “vim.ai isn’t wanted unless there is a clear need for it.” (#33356) Options, flags, and configuration A new option is almost always the wrong approach. If a flag fixes a real problem, make that the default. If users need control, give them a function/callback (filter, on_*) or make the existing Lua function overridable. — “special case boolean flags are strongly discouraged. if the problem solved by this pr is actually a problem, it should just be the default behavior.” (#33692) — “If overriding vim.paste is hard, let’s fix that instead of adding a zillion options.” (#17526) Use the existing configuration surfaces: Vim options (not Lua .config()/.enable() modules for declarative settings), mappings, FileType handlers/ftplugins, autocmds, nvim -c. — “the options system is “the UI” for all kinds of “declarative” concepts.” (#40562) — “Mappings are a 100% valid part of the “options” interface of Vim.” (#35111) A generic, grouped setting is acceptable (e.g. ‘jumpoptions’, ’nottyfast’): one concept that gathers the clumsiness in one place. Narrow per-feature booleans are not. — “a ‘generic’ setting like ’nottyfast’ is acceptable because it’s a single concept that gathers all the clumsiness in one place.” (#38699) Don’t add fields that merely forward parameters; let the user pass a function. — “If we are just forwarding parameters to nvim_buf_set_extmark that’s a signal that maybe the user can define a function” (#36469) Options are hard to remove. Prefer a temporary internal workaround over a permanent option. — “options are hard to get rid of. I thought we discussed a temporary workaround, not a permanent option.” (#36995) Support CTRL-C instead of adding a timeout option. — “Everyone asks for an option for every timeout, but none of that would be necessary if CTRL-C is supported instead.” (#42331) No meta-options (settings that suppress other settings). If a subsystem needs per-buffer control, make its settings real editor options. — “this is like an option that disables options to avoid setting options.” (#43000) Defaults Good out of the box; useful behavior is on by default; opt-out is documented (delete the nvim.* augroup, unmap, :mapclear). Builtin default mappings are like any plugin’s mappings. — “If discovering how to opt-out of this is hard, disabling it by default means it will be discovered by much fewer people from the other direction.” (#32079) Be bold when the case is clear; accept backlash for a better OOTB experience. — “Although this is a controversial change, I think it’s worth the backlash for a better OOTB experience.” (#36135) On a 50/50 call, tradition/consistency wins; a coin-flip means “do nothing”. Popular configs and distros are not evidence. — “If it’s 50/50, then the tie-breaker is consistency/tradition.” (#28969) Defaults are simple and composable; power behavior is opt-in. Pick the default that is easier to extend than to revert. — “We want the default statusline to be something users build on, not something they have to surgically revert.” (#35428) Don’t cater to partial preferences (wanting some defaults but not others). — “I’m really not interested in catering to people that like some of the defaults, but not others. They can use :mapclear.” (#33740) Serve the common case; declare bankruptcy on the long tail (16-color terminals, every shell). — “The way we deal with this kind of ’terminal-tradition hell’ is to declare bankruptcy and focus on the common case.” (#26385) Relationship to Vim (current stance) Nvim owns its features and design; Vim is not a spec. Design in terms of Nvim’s codebase. — “going forward we should be very, very aggressive about declining the vast majority of legacy Vim’s work.” (#40473) Vim patches: allowlist, not denylist. Track only patches with concrete changes Nvim wants; mark the rest N/A. Don’t track “missing features”. — “We should only track patches that contain concrete changes that we want.” (#41258) Don’t be bug-for-bug compatible; ask how you’d build it today. — “we also don’t need to be bug-for-bug backwards-compatible… ask “if cmdwin didn’t exist, how would we implement it?”” (#40449) Still: don’t fork Vim runtime files/syntax/quickfix/user manual; send portable fixes upstream (Vim, libuv, luv, tree-sitter, LSP servers). Avoid gratuitous drift (e.g. option names). — “We generally don’t fork the runtime files. We will merge the fix from Vim when it lands.” (#37050) Borrow Vim’s decisions, not its code; document deliberate divergences (vim_diff). Vimscript is frozen but permanent: no new Vimscript syntax/functions; new capability goes through Lua and the API. — “Vimscript is an intentional feature, it’s never going away.” (#40555) — “we should strongly avoid adding new vimscript functions.” (#24493) Vim’s editing model (text objects, buffers, :read, cmdwin, quickfix) is the target, not vscode/helix/modeless editors. — “Textobjects are the primary text manipulation interface for vim. Insert-mode stuff is what vscode does.” (#29428) UX DWIM is a central tenet; be predictable and human-readable; prefer simple rules to “smart” behavior. — “So please, let’s stop trying to be smart about this. Simple rules are a much better UX.” (#34745) Never trap or block the user. Messages are passive; press-enter only for genuinely dangerous situations; the pager is entered only via g<. — ““Press ENTER” should be very rare except for actually dangerous situations. “Editing a readonly file” is not a dangerous situation.” (#22478) Buffers are the main UI. Build on buffers, :write, options, marks, URIs; buffer names round-trip. — “Buffers are the main UI of Vim… Worrying about buffers being open is just the wrong way to use Vim :)” (#40427) Builtins work out of the box on every platform and UI (Windows, GUIs, TUI). — “It’s not acceptable that Windows users need to install extra things to get builtin editor features.” (#32504) CTRL-C always works. Every blocking or long-running operation (waits, requests, regex, :global, :connect) is interruptible, and an interrupt fails loudly as “interrupted”, never as a silent nil or a misleading “timeout”. — “Important: CTRL-C should continue to work.” (#12857) — “Raise “interrupted” instead (like vim.system():wait()), so Lua code stops instead of continuing with a spurious nil.” (#42887) Prefer designs whose worst case is bounded and undoable; degrade gracefully by doing less. — “RHS (resolved keys) “degrades gracefully” by doing less (and a single u reverts it), whereas LHS worst-case is unbounded” (#41657) 2. Architecture Logic lives in Lua (runtime/lua/vim/_core/); C is for hot paths and existing C-owned logic. C entry points delegate to Lua (func_lua, nlua_call_excmd, NLUA_EXEC_STATIC). If Lua is too slow, that reveals a missing API. — “If the Lua impls are somehow more costly than the C impls, that usually indicates that Lua is missing things that it needs… Lua reduces the chance of segfaults.” (#39166) — “Although we prefer Lua for most business-logic code, doing this conversion in C makes sense in this case because: 1. setting options is a hot path” (#40477) Moving C to an equal amount of Lua is not by itself a win; the move should simplify. Client-server first. Put logic in the server; UIs are just UIs; the TUI is a remote UI; RPC is first-class. — “Strongly prefer doing as much as possible on the server, in general.” (#34354) One mechanism per paradigm; no inner platforms. Pick one of the existing paradigms (provider, autocmd event, RPC notification, callback) and reuse it; improve that system instead of building a parallel one. — “pick one from the list, and then use the existing mechanism for achieving that, instead of reinventing it.” (#19156) Unify duplicated subsystems: one jobs layer, one message system, one progress interface, shada+context as one subsystem, events for both editor and RPC consumers. — “We really need to have 1 job-control layer, not 2 parallel ones.” (#39552) — “The editor exists to provide high-level interfaces that are useful and cohesive.” (#39552) A decision lives in the module that owns the concept, at the highest level that has the information, not wherever the symptom appeared. — “This is a sound and obvious bugfix, but the logic should be owned by context.c.” (#42969) Events are the extension interface (often instead of a new option). A subscription+registry need means “this should be a core event”. — “Anytime a subscription + registry is needed, it’s a strong signal that the feature should be a core event (autocmd).” (#41745) New events: generic with a typed payload (data fields, not one event per variant), emitted only by core, deferred to a safe state (aucmd_defer), and tested against hostile handlers (delete the buffer, switch windows). Prefer adding data to existing events over new events. “attach” APIs signal a missing event. — “they can execute arbitrary code at random places in the editor, which leads to unending bugs. aucmd_defer avoids that.” (#25134) — “We would not add a new event for this, it could perhaps be a v:event field.” (#25788) Calling user code from a new place in the engine is a risk to verify: if that codepath already fires autocmds, it is likely safe; otherwise aucmd_defer. — “calling vimscript/lua from new parts of the internal Vim engine always raises risks, that need to be actually verified.” (#42761) Providers are plain module functions users override (like vim.ui.select), not registries, setter APIs, or globals. Document monkey-patching as the override mechanism. — “our general provider pattern is that people override stuff.” (#38906) Use plain functions when the semantics are a function call; don’t route calls through event machinery. Handles and primitives first; objects only to enforce a normalized shape (vim.pos, Uri), convertible at the edges. No OOP wrappers for win/buf/tab. — “Do not start with these special objects. Just let plugins work with handles (ids), just like how namespaces already work.” (#21811) State: single source of truth; store state on its owner (buffer-local var, the Client object, extmarks/namespaces); no global flags; no long-lived caches unless measured, bounded, and inspectable (:checkhealth). — “no need to track this number. instead, return uicount - #vim.api.nvim_list_uis(), that’s the actual source of truth” (#39216) — “Any global flag is fragile because it depends on carefully arranged assumptions about codepaths that set/unset the flag.” (#32662) — “The need for more storage is a red flag. This can get out of sync during the lifecycle of input and potential side effects.” (#43018) Normalize internally, convert at the edges: UTF-8 and / slashes everywhere internally (including Windows); positions via vim.pos. — “Always use / (forward slashes) internally. (Analogous to how we always use UTF-8 internally.)” (#39382) One unit is the authority for a measurement (e.g. pixels); derive the others on demand. — “Passing different units of the same measurement in many places, risks incoherence.” (#42921) Delete special modes by rebuilding them on normal primitives (cmdwin = normal buf+win; Ex-mode = script on cmdwin). — “Just say no to “inception”. Reimplement cmdwin as a normal buffer+window.” (#40325) Delegate to proven tools (ssh, libuv, curl, the builtin PTY, vim.fn) instead of reimplementing or parsing their formats. — “nvim should avoid parsing ~./ssh/config as much as possible. instead it should delegate almost everything to ssh.” (#34257) Concurrency via processes and shared state (shada/context), not multithreaded features. Security: all-or-nothing :trust, not case-by-case whitelists; never risk code execution from merely reading a file. Peers are untrusted by default (per-channel “trust” flag); validate everything a peer sends (indexes, paths: reject newlines and control chars); keep secrets out of argv (stdin, 0600 temp files). Where safety is unclear, require an explicit user action rather than guess. — “we 100% want to avoid security risks from merely reading a file or directory.” (#38985) — “This needs an owner to think carefully about it, but meanwhile we should not make half-guesses.” (#42753) 3. API and interface design Signatures opts dict in, Dict out. Returning boolean/array/void closes doors; a Dict can grow. Every new API function takes opts; opts can also be added to an existing API, so a missing opts is no reason for a new function. — “Returning boolean is probably a mistake, it closes the door on returning any other info in the future. We should usually return Dict.” (#28432) — “Now that opts can be added to any API” (#30450) Required args are positional; opts holds only optional ones; the callback is last, opts penultimate; the data source (buf) first. — “function is always the last param. we settled that and documented it long ago, it’s not up for debate again” (#39883) When filters multiply, switch to a kwargs table rather than more positional params. — “if more filters are being added then it’s time to make this a ‘kwargs’ arg instead of adding more parameters.” (#28521) Sync by default; a trailing callback makes it async (luv style). No promise/await layers. — “The lack of the callback parameter means “sync”; the presence of the callback means “async”. This is how luv/libuv works” (#34093) Overloads are fine; varargs, polymorphic returns, multi-type params, and codependent fields are not. — “Predictability is strongly preferred. Polymorphic returns are painful.” (#32060) Handlers receive one extensible event dict (ev) when there are more than ~3 args. User extension data goes in a data field, so future builtin fields can’t collide. Functions take explicit positions, have no hidden side effects, and don’t depend on cursor position; interactive commands may. — “we should pretty much never add functions that depend on cursor position. But interactive commands could use cursor position.” (#21393) Shape of the surface area One generic function with a filter beats a family of special-case functions or aliases. — “The get({filter}) pattern is generally preferred and aliases to its special cases should be avoided.” (#30949) No per-scope API families (nvim_buf_x/nvim_win_x/nvim_tabpage_x); one function with a scope in opts. — “We need to stop the nvim_buf and nvim_win stuff, it was a mistake.” (#24390) Toggle pattern: enable(enable:boolean, filter) + is_enabled(); no toggle(), disable(), is_disabled(). — “’toggle’ can be achieved via enable(not is_enabled())… toggle() and disable() are redundant” (#28227) No shallow wrappers, aliases, or cosmetic sugar over existing APIs; no 1:1 duplicates of Vimscript functions; no _fast/async_ variants of every function. — “I’m not in favor of lots of shallow wrappers around existing API shapes. And this is very shallow indeed, it’s totally cosmetic and gains little.” (#20669) Extend an existing function (new optional param/field) before adding a new one. — “Why add new methods when adding an optional predicate to the existing methods makes perfect sense?” (#33202) A feature that needs a private util usually reveals a missing option on a stdlib primitive (e.g. remote-ssh’s run_wait() became SystemObj:wait({cond})). — “This would be much simpler as an enhancement to vim.system():wait().” (#39378) Return plain iterables (:h iterable), not vim.iter objects or new pipe abstractions. Don’t expose internals or derivable data (e.g. ns); keep returned structures flat. — “anything that is easy to calculate or available via other APIs, we may not want to include.” (#35729) The API is low-level; the Lua stdlib is the ergonomic layer. Don’t mirror the API in Lua. — “API is a low-level extension point for exposing internals. It’s irrelevant for Lua which is a high-level interface intended to be maximally ergonomic.” (#29064) Ex commands are for interactive ergonomics: DWIM, few subcommands, no key=value params, no “clever” behavior; they need not mirror the Lua API, and have a lower bar for breaking changes. — “Just duplicating the programmatic interface in Ex commands is not valuable.” (#35053) The : cmdline is the interface; CLI args only expose it. No new --foo flags. — “generally we want to guide users to a single interface, and the : cmdline is the interface, while a few limited CLI args expose that interface from CLI” (#39378) Where things live vim.* is the stdlib, with a quality bar. Builtin plugins live in pack/dist/opt/nvim.foo or plugin/ (tiny, lazy require()); filetype features in ftplugins; subsystem features in the subsystem’s module; never in junk drawers (vim.lsp.util) or new top-level vim. names. — “The vim global has a quality bar that “builtin plugins” don’t meet. The vim global is for the “stdlib”, not random plugins.” (#34557) — “plugin/ files are expected to be cheap and idempotent” (#43025) Few, coarse modules; no hyper-granular modules or sub-submodules; a topic module covers its whole topic; collection functions go in vim.iter/vim.list, not new tbl_*. — “do not create lots of granular modules. just put everything in _ssh.lua , until it’s clear that separate modules are needed.” (#35027) Incubate internally, graduate later: _-prefixed names, vim._core/util.lua, nvim__ experimental APIs, <Plug>(nvim-…) mappings. Locals over exports. — “Start using it internally. Then we can get a feel for how it should look before making it public.” (#39883) Stability, privacy, deprecation Underscore = private = no compatibility, ever (single underscore; no “super private” double variant in Lua). Don’t make experimental things convenient; don’t recommend _ functions to users. — “ANYTHING with underscore prefix is unreleased, may break at any time, and will never have migration phases. That is what allows us to expose ’experiments’ quickly.” (#37929) Unreleased (HEAD) features get no migration; “experimental” means breakable without a deprecation cycle. — “Unreleased changes do not get migrations.” (#38344) Not breaking: behavior changes, extra return data, changes to private functions, default and UI changes. The api-contract protects runtime stability, not build-time convenience. — “returning extra data is not usually considered breaking.” (#30379) Breaking changes need a clear “why the current behavior is broken”; accidental behavior that holds the ecosystem back can be broken. Cosmetic changes that break plugins get reverted. — “If we have a way to explain why the current behavior broken, then it’s easy to defend an incompatible change.” (#39984) Deprecation: soft-deprecate released renames (keep an alias, remove docs/completion: “zero footprint”), “frozen” phase in _deprecated.lua, vim.deprecate(…, 'x.y') with removal in batches. Deprecate aggressively because new code copies whatever exists. — “deprecated functions must have zero footprint in docs, auto-completion, and meta structures.” (#30762) — “new contributions tend to mimic existing stuff. So removing these unwanted patterns helps there.” (#24113) Large cleanups wait for “Nvim 2.0”. 4. Naming Reuse existing vocabulary and precedent (:help dev-naming, dev-name-common); git grep for precedent, ideally more than one case; same name internally and externally; inputs and outputs round-trip. — “look for existing precedent, ideally more than 1 case. that includes the name, shape, etc.” (#42486) No new jargon, verbs, or synonyms (“vocabulary creep”, “concept-creep”). — “We need to choose one name and stick with it. Avoid random synonyms.” (#40830) One single-word “nonce” per concept, used everywhere (helps search and discovery). — “using the same ’nonce’ helps discovery” (#37938) Short names; length proportional to scope; drop words implied by context/module; a short comment beats a long name. — “Shorter is better, when it doesn’t harm readability or discoverability.” (#30387) — “a short comment is usually better than a long name” (#40992) Name by meaning, not implementation (no “curl”, “virt_text”, “float” in names unless that is the meaning). — ““exit” is an implementation detail. the fact that curl is used internally isn’t relevant and shouldn’t be surfaced in the request() interface” (#34140) Consistent prefixes create discoverable groups (term* options, stl_, decor_, te_). Callbacks: handlers are on_<event>; never cb; see develop.txt for the continuation callback exception. One invariant rule beats case-by-case taste, because people copy code. — “It is much easier to communicate one invariant rule rather than multiple, subjective rules.” (#34523) Settled words: buf/win (not bufnr/buffer), pos, opts, data, info, config (not setup), enable/is_enabled, has (not contains), with (not containing), get/ set/del, close (not destroy), proc, Dict, hl, excmd, “virtual text” (not “ghost text”), M for module tables, L for lua_State. — “never use “contains” (use “has” instead) or “containing” (use “with” instead) in a function name.” (#30629) Banned words: “helper” (all functions help), “Post” suffix on events, “should”/“correctly” in test names. — “never need to mention “helper” in function names. all functions help, else they should not exist.” (#30560) No UPPERCASE constants in Lua (and lowercase C enums); UPPERCASE is only for C macros. — “the UPPERCASE names are pedantic and unusual for the nvim lua stdlib.” (#32587) Namespaces: augroups/namespaces/hl groups owned by Nvim use dot-separated nvim.foo.bar; core URI schemes nvim-xx://; no nvim- prefix on builtin help tags; legacy tags get old-. — “the convention throughout the codebase, for namespaces/augroups/hlgroups/etc, is to use dot-separator.” (#36099) Names: “Neovim” is the project, “Nvim” the editor, nvim the CLI. Present tense for state values; names don’t repeat non-distinguishing details. 5. Code style and structure Flat control flow: guard clauses, } else if, ternaries for simple cases, one assignment, no needless nesting or indirection. — “could be ‘flattened’ by just changing this 1 line to a } else if {” (#41382) — “Just Say No to indirection.” (#40657) Brace every block; body on the next line. — “Lack of braces is known to be the cause of many unnecessary and damaging bugs” (#266) No reassignment; parens over precedence quizzes; simple common idioms. — “Avoid these precedence quizzes, use parens to make it obvious.” (#24450) Minimal diffs. No cosmetic churn or unrelated formatting; never delete useful comments. — “if there’s not a clear advantage to making a formatting change, then leaving it alone is better” (#5737) Reuse before writing: vim.fn/fnamemodify(), vim.validate, vim.ringbuf, vim.text, existing debounce/log helpers, getdigits, IObuff/NameBuff, bufwinid(). Reusing code also reuses its tests. Avoid raw vim.uv where an abstraction exists; avoid the async module unless needed. — “We should always lean towards that rather than reimplementing stuff. It also avoids a bunch of duplicate test code, since fnamemodify() is already tested.” (#36997) — “it’s just not acceptable to keep duplicating code like this everywhere. it drives me nuts.” (#39782) Lift repeated patterns into a shared util (one decision, one function). — “ideally, the decision should be owned by one centralized function” (#40992) Lua: ('%s'):format() over ..; module table M; local function; full command names (no abbreviations) in code; vim.validate to fail early; Lua patterns are idiomatic (don’t expand them into longhand code). — “use ('...'):format() almost always. using .. to concatenate usually ends up being less readable.” (#34140) C: follow the majority style of the codebase; no hand-written forward declarations (generated); no casts on xfree; XFREE_CLEAR; goto end instead of repeated cleanup; abort on allocation failure; functions over macros; system headers first; no mega-headers; topic prefixes; group related globals in a struct; 100-column limit. — “forward declarations are autogenerated, this is not needed in our codebase…” (#37951) Tooling: no new toolchains or bespoke DSLs; mark generated files (.gen.lua, .gen.h); automate style; turn recurring review nits into lint rules; fewer build flags, boring tooling. — “we intentionally removed python from our codebase, to minimize the things we need tooling for” (#38546) — “Automating code-style is an important tool for reducing time spent on accidental (non-essential) complexity.” (#26391) Scripts are Lua (nvim -l), which is cross-platform; shell only for bootstrapping where nvim isn’t available yet. — “this can be 1 nvim lua script instead of 2 horrible shell scripts” (#39378) 6. Errors, messages, logging Fail early with a meaningful error (error(), assert, vim.validate); incomplete fail-early checks are still a net gain; crashes are never acceptable. — “Incomplete fail-early checks are a net gain, even if they are incomplete.” (#38340) vim.notify is a soft message and must not be used for errors; it is not being expanded. Route messages through nvim_echo/the message system (ui2). — “vim.notify* is a ‘soft’ message and must not be used for errors.” (#39445) Never fail silently; log when something silently does nothing; return (result, err) rather than a silent no-op. Don’t “fix” errors by ignoring them; pcall is a red flag. — “please add a log message. silently doing nothing should be avoided.” (#31824) — “pcall is a red flag, can a condition be checked instead?” (#37075) …but keep expected noise from users: no stacktraces for benign cases, no blank messages, getters return nil without logging, warnings must stay meaningful (expected conditions such as teardown log below WARN). — “Blank (all whitespace) messages should never be shown, in any way.” (#36447) Ex commands are user-facing: a failure shows E…: <reason>, not a Lua traceback; programmatic entry points still raise proper errors. — “Excmds are high-level user-facing interface, so the traceback is mostly noise and exposing implementation details.” (#42785) Message format: topic: prefix (not [foo], not “Error in…”); variable part at the end; name the culprit (in double quotes) and its location; report once. — “Prepending “Error” to all error messages is just noise.” (#33789) — “The variable part of messages should go at the end of most messages.” (#35000) Visibility: :checkhealth, logs, listing handlers (:au), a global jobs table. Imperfect visibility beats none. — “If the choice is imperfect visibility vs no visibility, it is useful to have imperfect visibility.” (#34705) 7. Performance Measure end-to-end before optimizing; post numbers. Skip micro-optimizations that cost readability. — “This is a lot of code, plus new state tracking, for a 1.7x speedup in … vimscript?” (#40230) — “What is the actual real-world user facing common case outcome of this? micro-optimization is not worth the complexity here” (#42853) Hide costs from callers: a good interface leaves callers nothing to tune (e.g. poll for CTRL-C by elapsed time via a cheap clock read, not by call-count). — “Now the only cost that callers need to worry about, is checking the clock. That’s a much better interface.” (#42875) Correctness and coverage first; optimize later. — “I’m not worried about performance. We can always fix that later after we get correct behavior + test coverage” (#40013) Hot paths are the exception: options, autocmds, input, win_line, filetype.match. Avoid allocations there; make unused features cost ~zero (e.g. skip when !has_event(...)). — “Options and autocmds are an extreme hotpath… avoid allocations where possible, if it’s low-cost” (#41942) Callers shouldn’t pay for edge cases; keep backpressure limits; remove features that don’t demonstrate a benefit. 8. Tests Extend an existing test before writing a new it(); net test growth for a small fix is a few lines. Group related assertions (one it() per topic, in the file where related tests live); test code is maintenance cost, and huge loops slow CI. Simpler tests are evidence of a better design. — “We definitely don’t need a 15 line test for this trivial change. Just add an assert to an existing test. The net code increased should be 2-3 lines max.” (#39058) — “Test coverage != test code.” (#40897) A test must fail without the fix. Verify it by reverting the fix. — “please confirm the test fails if the fix is reverted” (#41531) Assert real state with positive confirmation: eq over neq/matches; check preconditions so the test is actually testing something; guard negative assertions against false negatives. — “try to use positive confirmation (eq instead of neq)… avoids false successes.” (#25625) — “that’s the risk with assertions that test ’nothing happened’… always preferable… to test actual state” (#41202) For a UI bug, find the nvim --clean conditions and assert the symptom the user sees. — “would be stronger if we can actually assert the UI symptom you are seeing.” (#42954) Test real end-to-end effects; no mocks, no internals. Logic gets input/output tests; screen tests only where the screen matters. — “Almost none of our tests use mocks. It is strongly preferred to test actual effects (a file exists, a window was opened, …)” (#34940) Cover failure modes (it('validation'), edge cases) for new features. — “also need it('failure modes') … that is almost always required when adding new features.” (#35027) Assert platform behavior instead of skipping; no hardcoded sleeps (use retry(), intermediate screen:expect); fix flaky tests at the cause (a timer instead of a delay, jit.flush() before a GC check) rather than raising timeouts, unless the work legitimately takes longer. A flaky test may be a real bug. — “can’t the non-Windows behavior be asserted? that is generally preferred instead of just skipping stuff.” (#39155) — “This manifests in CI as a flaky test (but is signaling an actual bug).” (#42849) Harness conventions: n.command over feed/feed_command; t.pcall_err, finally(), t.tmpname(); no top-level aliases; don’t use pending()/skip() for things that can never be fixed (return early or prefix “N/A”); tests clean up after themselves. — “feed() is asynchronous and hides errors.” (#25461) Names are terse behavior phrases: no “should”, “correctly”, “works”, “has correct”; don’t repeat the describe() name. — “‘correct’, ‘works’, ‘should’, are always redundant in test names.” (#20671) Non-trivial test code gets a few comments (not one per line). — “this is a lot of test code, with zero comments… (that does not mean add 50 comments)” (#42681) New events get “evil handler” tests (handler deletes the buffer, switches windows). Don’t delete lines in Vim oldtests (keeps upstream merges easy); skip a failing one with the throw pattern instead. — “there is a throw .. pattern that “skips” tests. so that would be a 1-line change instead of 14-lines.” (#42716) 9. Docs, help text, comments Help docs Single source of truth: document a concept once at its owner and link to it (|tag|); never hand-write API docs (generate them). — “docs should be in one place, not repeated everywhere (which leads to even more inconsistency).” (#39540) — “Manually writing :help docs should be avoided for APIs.” (#20571) Concise and high-signal: active voice, no “please”, no buzzwords, no enumerating every case, no over-explaining basic Lua. One characteristic example; input→output tables beat prose. — “Strongly prefer to show one characteristic example, not numerous examples.” (#22367) — “this is rather buzzwordy. prefer active voice and say things clearly” (#39378) Vimdoc conventions: options in ‘single quotes’ (they link; no |bars|); |tag| wherever a *tag* exists; backticks sparingly; lists that render in flow layout; keep old popular tags when renaming. — “options never need bars |..|. the single-quotes linkify the name.” (#40562) Every user-visible change is documented. — “Undocumented features are invisible features :)” (#37040) Document a trivial pattern instead of adding a feature for it. — “So let’s just document that. I don’t see why we need a builtin for this.” (#18843) news.txt A newsletter, not a changelog: user-visible features and highlights; state the user-facing meaning/motivation; concrete numbers for perf; no bug fixes; no news for unreleased features; the “changed” section is rare; breaking changes get a 1-line migration example. — “It’s not a changelog, it’s a high-level newsletter.” (#21677) — “can we give a 1-line example of what users should do instead, to migrate” (#39849) Drafting the news entry first tells you how to write the full doc. Code comments and docstrings Give non-obvious code a 1-line hint with the key insight; ideally an "in" => "out" example; link specs/issues as references. Write for future developers, not the reviewer. — “give a hint about what the input/output looks like. that is often 10x more useful than a long explanation” (#39714) — “The PR comments don’t matter, i.e. you don’t need to explain to me, you need to explain to future developers.” (#36262) Say what code means and why, not how; don’t restate logic in English. — “Try to make comments say what something means, not how it’s done” (#25192) Define concepts once, then refer to them. — “define concepts once, then refer to them. don’t expand them over and over in every place.” (#41073) No transitional wording (“used to”, “no longer”, “now”); history belongs in git. — “’no longer’ is meaningless in the future.” (#42105) Never delete useful comments; make comments useful or remove them. Backticks for symbols in docstrings; Unicode (e.g. …) is welcome in comments and docs. — “for new docstrings use backticks for symbols” (#42716) — “we should embrace unicode.” (#42955) 10. Commits, PRs, and process Problem/Solution Every PR and commit states the Problem (a concrete symptom or user-visible example, i.e. the “why”) and the Solution. The commit message carries the analysis; git is the record, not GitHub or chat. Don’t include what the diff already shows (“Testing”/“Validation” sections are noise). — “When framing the Problem/Solution, the most important info is “why”.” (#40144) — “Please include the key details from the PR description, in the commit message. git is the source of truth, not github.” (#17197) — “the ‘validation’ section is 100% noise” (#41334) The explanation is the work. Reviewers should not have to do detective work. The Problem is self-contained (root cause, not just a link to the issue); for low-level changes it covers the history and asks “does this apply to Vim? why or why not?” — “Reviewers should not need to do detective work to figure out why a PR is needed.” (#24661) — “Also PR Problems should be self-contained.” (#42972) Titles state the user-facing change; fix titles name the symptom, never the implementation: fix(undo): cursor to line 1 after undo of non-curwin change. — “The PR title describes the implementation, which is useless.” (#42751) Justify features with before/after code. — “Show BEFORE and AFTER examples. If that is not compelling, then nothing else matters.” (#29116) Proposal / PR-description structure (larger work) Title: issues area: outcome; PRs conventional-commit style (feat(lua): …, ! for breaking). Optional framing line (“This is a tracking issue, not a manifesto”). # Problem: terse bullets with evidence (repro, stack trace, failing-test output, table of current surface area, quantified waste). Cite the causing commit: “Regression from 6b98b23694d0”, “Since 9725321dd49d”, “Bug exists since …”. # Solution / # Proposal / # Expected behavior: direction first; then goals (“in scope; everything else is out of scope”), interface sketch, implementation steps, analysis (pros/cons, benchmarks). Decisions between alternatives: numbered Options (including “leave it”), then Proposal: Option N, and name the rejected ones (“Not an option: X, because …”). Phases (Phase 1 (✅ #PR), Phase 2…) or checklists with version targets; state/mechanism first, presentation later. Open questions / Closed questions (with answers) or FAQ; Related / ref # / closes #. PR extras as needed: Before/After, Analysis:, Tradeoff, Use-case, Edge case:, Known issues: (what is still broken), BACKCOMPAT: notes, DESIGN (invariants), BREAKING CHANGES, PERF COST, POTENTIAL FOLLOWUPS, credit to prior work. Small PRs: plain Problem: / Solution: lines. Benchmarks: state the setup (“Debug build, best of 5”), one before => after line per workload, and mark unchanged ones “(noise)”. Footer after ---: fix #N, close #N, ref #N, followup to #N, cc @owner. Keep the top post as a living document (✅/❌/strikethrough, “Edit:”); summarize long threads with # Status / # Resolution (plus Out of scope, each item linked to its own issue) and lock them “to keep the summary visible”. Scope and sequencing One topic per PR. Split refactors from logic changes, breaking changes from fixes, and prerequisites into their own PRs (helps review, bisect, revert). — “logic changes should be a separate PR, helps with bisecting etc.” (#32245) Ship step 1; defer bells and whistles to tracked followups; ask “blocker or followup?” — “This PR enables something that was previously impossible. There is no need to also add bells and whistles in this iteration.” (#35424) 1-way vs 2-way doors: debate only what must be decided now; for irreversible interface choices start with the strictest version (easier to relax later). — “Everyone, please focus ONLY on things that MUST be decided NOW.” (#34093) — “let’s make it mandatory for now, and if we really need to, we can relax it later … that’s easier than the reverse.” (#36397) Master is for trying things: merge reversible changes, observe, revert if needed; merge to unblock and keep iterating. — “Master is for trying things, especially easily reversible things.” (#24090) Release discipline: risky work bakes on master after a release; backport only critical, baked fixes; unfinished interfaces stay undocumented/internal so they don’t block releases. Settled decisions stay settled unless there is new information; don’t go in circles. Subjective aesthetic calls are the maintainer’s, not a group debate. — “No, this was already settled, we need to avoid going in circles.” (#38561) Record decisions and research in issues and commit messages, not chat. — “‘See matrix’ is not useful for future reference.” (#26076) — “Would be best to capture all the research you’ve done here, in an issue.” (#42689) Ownership and hygiene The contributor designs and owns the PR: keeps it rebased, fixes CI, stays in Draft until ready, follows up. Merging means the project maintains it. — “Keep the PR rebased regularly… This is the minimum gesture that increases our confidence that this isn’t a drive-by contribution” (#40387) — “If ‘guidance’ means I have to design it, I don’t have time for that, that is the PR author’s job” (#16166) Ground a PR in a real report: link the issue it closes, or say where you hit the bug. Platform gaps (Windows, BSD) are called out in the description. — “is this something you personally noticed? does it close an open issue?” (#42614) git: force-push to the same PR (don’t open new ones); avoid noise commits (else squash); preserve original authors; Co-authored-by where due; generic AI-assisted trailer (AGENTS.md). — “Please do not create multiple PRs to “update” a PR. Just force-push to your branch, it will update the PR.” (#36999) 11. Reviewing (how to review like justinmk) Checklist, in rough order: ...

5 Dec 2026 · Justin M. Keyes

Should Neovim support transitive plugin dependencies?

Neovim 0.12 ships with a plugin manager vim.pack, which automatically installs plugins. But plugins don’t yet have a way to declare dependencies. Some sort of package “spec” is needed for that. And we’re considering it. I was excited to solve the “deps” problem with a simple spec: essentially, “a list of URLs which may each have its own list… of… URLs”. Great, we did it! But wait. Vim and Neovim plugins have been cursed/blessed with an accidental constraint for 20+ years: they must be self-contained (where “must” means “incessantly encouraged”). ...

23 Sep 2025 · Justin M. Keyes

Neovimconf 2024

Following are the video and slides for my Neovimconf 2024 presentation. The playlist for all conference talks is on youtube. State of Neovim 2024: The Giants Have No Timeouts Video What will you get out of this talk? backstory motivation current status plans Ten years No commits for 4 days. Is Neovim dead? – reddit user (2015) ...

19 Nov 2024 · Justin M. Keyes

Where is my mind (2023)

Snapshot of the (technical) problems I’m thinking about right now: AWS: Logging is a special case of telemetry (or vice-versa). Unify telemetry logging client. Incremental step: logging system is a “sink” for the telemetry, and the source of truth for querying metrics logs. Reimplement the metrics “collector” to be browser-compatible. Currently it uses nodejs async_hooks. Need to get this done before another 6+ months of technical debt accrues. 1 week of work. Redevelop the API for capturing a telemetry “span” (user workflow). 1 week of work. WASM-based code sharing solution. 1 month of work. Strategy for scaling development across 20+ teams (100+ developers). Monorepo, libraries, horizontal, LSP: all of the above. 2 weeks of work. Trying to design and develop software while working a Wendy’s drive-thru. Every day. Neovim: Finish talk for Neovimconf 2023. Understand what happened in the last 12 months, be able to explain and demo the most interesting contributions. Deadline in 5 days. 3+ days of work. Finish vim.uri. 1-2 days of work. Finish [optional] support in vimdoc parser. 4 hours of focus time. Finish pkg.json (packspec) specification. Started 4 months ago, idling for 3 months = risk of decay / lost investment (mis-timing, lost momentum, misalignment with key parties). 1 week of work. Implement function name linter. Too much time spent validating function names. 1 day of work. Rename various APIs before 0.10 release (imminent). 2-3 days of work. Need to do a pynvim release. 2 hours of yak shaving. Need to do a node-client release. 2-4 hours of yak shaving. node-client code needs a linting overhaul. 2+ days of work. node-client getNvimFromEnv() needs to work without $PATH. 1 day of work. Rework Nvim --remote interface. 2 weeks of work. Plugins: Make a fugitive-like minimalist wrapper for gh. Prototype = 1 day of work, Beta = 1 week of work.

3 Dec 2023 · Justin M. Keyes

Task management

Problem Task management is how you decide when and what to work on—in life, business, projects. In compsci terms this is a priority queue. But unlike a textbook priority queue, the dimensions and measurements are unspecified, amorphous, and dynamic. And the cost of failure is high: The most pernicious and subtle bugs are from mismatched assumptions made by authors of various components. — Fred Brooks, MMM For many this is like diet fads: try lots of hopeless methodologies, give up, repeat. “I need to rank EVERYTHING” is not a tractable framing if new tasks arrive every week (day? minute?). Yet many task-tracking tools have features to “help” you (globally!) rank items. ...

1 Feb 2023 · Justin M. Keyes

VimConf 2019

I presented a keynote at VimConf 2019. The organizers wrote some notes here. The first part of the talk is a sermon about the state of text-editing art. The rest is an exposition of recent Neovim tech. The main themes are: System vs Application Legacy paradox Leverage = (impact / cost) There were too many slides. I spent years thinking about the topics, and weeks building the presentation.

5 Nov 2019 · Justin M. Keyes

The Restaurant at the End of Computability

Alan Kay system programmers are high priests of a low cult inverse vandalism science is a set of heuristics to get around buggy brains put “not” before popular ideas to get novel ideas. E.g. “not Big Data” => “Big Meaning”. model time explicitly (cf. Rich Hickey / Datomic). “Computation is rendezvous of ephemera” (ref) build for a galactic scale the map is not the territory Dedalus: Datalog in Time and Space “How to deal with distributed systems”. Key features of a concurrency control protocol: atomicity, mutual exclusion, sequencing (order). ...

16 Aug 2018 · Justin M. Keyes

Terminal emulation is a primitive

Terminal emulation is primitive feature. It is not a premium feature. Terminal emulation is a basic facility that should, and will, be available as a scriptable object in every mature application. Some people still insist that terminal emulation is a premium feature, but they’re confused (or distracted in a haze of lifetime “multitasking”). Terminal emulation seems big and bloaty because terminal protocol is fragile and often breaks in alarming fashion (thus users assume it’s big because of the difficultly that leaks through to them), and terminals are miserable to configure (terminfo, termcap, termios, $TERM, $TERMINFO, .Xdefaults, readline, …) so, again, users assume that implementing a terminal is a sacred domain that must not be triffled with by mere applications. Unix already did this: it’s called PTY. Libraries like libvterm plumb the next layer: TTY. ...

22 May 2018 · Justin M. Keyes

Vim's social life

Vim is a shell command, and its fast startup supports that use-case: shell tasks, whether ad-hoc (interactive) or orchestrated (pipeline, script), are cheap and thus frequent. Yet Vim’s startup story is relatively unpolished. We expect shell tools to consume standard input (“stdin”) and emit to standard output (“stdout”)—but Vim supports this awkwardly, at best. The endeavor is never mentioned in Vim tutorials, including the “Unix as IDE” hymnals. And it is puzzled out of Vim’s documentation only by careful inspection. ...

1 Jan 2018 · Justin M. Keyes

Nvim FFS! Features, Future, :smile!

video (4 parts): https://youtu.be/wQh7saOHE5g https://youtu.be/PRfDemv4S9Q https://youtu.be/9ArKIm35zSk https://youtu.be/SgTfsueT5Ok review: Nvim goals push Vim into new territory more-hackable vim better UX make vim (really) ubiquitous grow the vim community crush emacs Nvim activity in 2017 nvim contributors: 330 (Sept 2016: 262) total commits: 9251 (Sept 2016: 6479) since 2014 vim total commits: 7732 (Sept 2016: 6553) since 2004 about me Nvim maintainer. I’m nobody. That’s a feature. Nvim goals: initial fundraiser 🤏 New, modern multi-platform UI. oni? ✅ New testing UI written in Lua ✅ New plugin architecture, with legacy compat layer ✅ Full port of the editor IO to libuv ✅ Cross-platform job control ✅ Distributions for Windows, Linux, Mac. «« Nvim 2017: hackable vim hackable vim: https://github.com/neovim/neovim/wiki/Related-projects 24 API clients 18 UIs easiest way to install vim on any major OS https://github.com/neovim/neovim/releases Nvim 2017: API clients new API client for racket https://gitlab.com/HiPhish/neovim.rkt refactored node client: https://github.com/neovim/node-client Nvim 2017: community Drew Neil’s Modern Vim http://vimcasts.org/blog/2017/05/working-title-modern-vim/ Homebrew core formula http://formulae.brew.sh/formula/neovim 100k installs https://brew.sh/analytics/install ...

29 Nov 2017 · Justin M. Keyes

Performance Profiling

Random pausing is all you need: https://scicomp.stackexchange.com/questions/2173/what-are-some-good-strategies-for-improving-the-serial-performance-of-my-code/2719#2719 https://www.youtube.com/watch?v=xPg3sRpdW1U&feature=youtu.be http://gernotklingler.com/blog/gprof-valgrind-gperftools-evaluation-tools-application-level-cpu-profiling-linux/

1 Jul 2017 · Updated 21 Nov 2024 · Justin M. Keyes

Terminal Control

Unix “TTY” terminal programming is a hodgepodge of tribal lore. There’s no “Best Practices” guide nor canonical “quick start” tutorial. Even Bash (the shell) has wooledge and set -x. But terminal programming is a tenuous détente of undocumented conventions. This post is a low-friction, self-contained tutorial for tinkering with your TTY and quickly seeing results. You can skip to the Two-minute tutorial to start trying things immediately. Tooling The tools for working with terminals are essentially: ...

19 Dec 2016 · Updated 23 Jan 2024 · Justin M. Keyes

Neovim philosophy and features

video (3 parts): https://youtu.be/9Yf3dJSYdEA https://youtu.be/dKNLiY-mb28 https://youtu.be/wT-M6dEwcJ0 nvim by et al. based on Vim by Bram Moolenaar et al. about me I am nobody. That’s a feature. 10+ (???) years of software dev experience 5 years of “serious” Vim My goals for Nvim: Ubiquity (IDE, browser, OS form-fields) Remove friction (cross-plat inconsistencies, defaults). nvim contributors: “et al.” nvim contributors: 262 6479 commits since January 2014 vim (3 years of VCS) contributors: ~323 $ git log --since='3 years ago' \ |sed -r 's/(Problem|Solution).*(\(.*\))/\2/'|grep -E '\(.*\)' vim (12 years of VCS) ...

10 Dec 2016 · Justin M. Keyes

Artifact System

Software projects produce artifacts—a concept less particular than package which has a version, manifest and structure conforming to some package system. Package systems are smart, and thus complex. The key feature of an artifact is that it is dumb. Package management is a hard problem, with lots of half-broken systems serving particular ecosystems: Cargo for Rust, pip for Python, NPM for node.js, Maven for Java. Artifact systems are not so well-studied, though the concept is high-leverage: unlike package systems, an artifact system can: ...

6 Jul 2016 · Updated 29 Oct 2019 · Justin M. Keyes

Economies of scale and self-interested cooperation

Quietly tucked away in the last slide of a 2011 Netflix cloud talk (Mr. Cockcroft talks a lot): Cloud Standardization? Cloud features and APIs should be a commodity not a differentiator Differentiate on scale and quality of service Competition also drives cost down This is a claim that competition and standardization are desirable and beneficial at the individual level—an insight perhaps also employed by Google with its Chrome and Android strategy. ESR made the case that there is economic motivation for sharing code. This was corroborated years later by OpenNT: ...

17 Mar 2016 · Justin M. Keyes

What I've Learned From GitHub

technically superior plugin isn’t always the most popular. hard to gain traction with users. signify is better than gitgtutter, but it didn’t hit the front page of HN sneak is better than seek, but seek hit the front page of HN plugins with better marketing/branding don’t always win. sneak has better branding. (but signify doesn’t really do much to market itself) you can announce the same thing every month and it will be completely new or at least newly-compelling to many people. each time I announced on /r/vim I gained about 50 stars in about a week, which then returned to the normal level of about 1 star every other day. most people don’t check /r/vim every day. ...

17 Feb 2014 · Justin M. Keyes

The Philosopher's Pile of Stones

The generalization of this is “communication”, but trying to focus on “improving communication” leaves important stones unturned. Like “end poverty”, it is a mission that begins without a fully-formed thought. There is no supply of communication that can be buttressed; rather, to improve communication, instances of the abstract must be identified. Shannon crystallized this as the problem of encoding information. We know from practice of information theory that information encoding benefits from semantic awareness: ...

14 Dec 2013 · Justin M. Keyes

How to make Vim like Sublime Text

disadvantages: I became familiar with Vim very gradually. By the time I found out about pico, I had long been editing X86Config with i and :wq. I was thankful for the syntax highlighting and remote availability writing C and Java on a Solaris ssh account. I embraced visual-block-mode during late nights at the CMOS lab after editing hspice input vectors manually became intolerable. I internalized [hjkl] by using Gmail shortcuts. And on OS X, actively-developed open source editors are few. ...

5 Oct 2013 · Justin M. Keyes

Java parser

I wrote a toy parser (or rather a parser specification in the syntax of a parser-generator) for COOL, and I’m wondering if mature, popular languages actually use these things to generate their parsers. The PMD project makes use of a (modified) copy of the JavaCC parser-generator definition for the Java grammar. Inspection of that file reveals the initial 1997 timestamp by author Sriram Sankar. According to Advances in Software Engineering, “The Java 1.1 grammar was developed by Sriram Sankar at Sun Microsystems and a copy of this grammar can be found in the distribution”¹. The syntax of JavaCC at a glance is similar to yacc, CUP, bison. In the PMD Java.jjt file, the familiar token declarations start around line 234, and the grammar starts at line 1122. ...

27 Jun 2013 · Justin M. Keyes

Brendan Eich comments on Dart, JavaScript

I stashed this away long ago and can’t find the source (HN? reddit? a blog?). Funny how lossy the web can be… Brendan Eich: Performance gaps in JS engines get filled all the time. This is different in kind from potentially adding a second VM, requiring cross-VM-heap cycle GC, etc. See https://lists.webkit.org/pipermail/webkit-dev/2011-December/018811.html Dennis described some of C’s flaws (which JS inherited) in typically humble style here: http://cm.bell-labs.com/cm/cs/who/dmr/chist.html JS has too many gaffes and WTFs, but at this point, for most developers, they are (mostly) avoidable paper-cuts. All but: ...

12 Jun 2013 · Justin M. Keyes

Low-level programming discourages automatic optimization

Frances Allen: C has destroyed our ability to advance the state of the art in automatic optimization, automatic parallelization, automatic mapping of a high-level language to the machine. Example from HN user ‘waps’: one example [vs Haskell] that C can never hope to optimize : deforestation. Before optimization : the programmer requests a list to be created, fill it by calling functions and then passes the completed datastructure list (or tree) along to another function, which executes commands according to what the list contains. ...

8 Jun 2013 · Justin M. Keyes

Impossible Ideas

Corollary to Paul Graham’s frighteningly ambitious startup ideas: a list of impossible ideas that interest me personally. ubiquitous, secure, painless (one-click) bitcoin payment ubiquitous, effortless, anonymous, encrypted communication painless, anonymous, decentralized internet access effortless expense/receipt management effortless information management / mind mapping Working on the impossible is like exercise: if you produce something half good then you have something better than any existing similar product.

4 Nov 2012 · Justin M. Keyes

Piñata Programming

We’ve all been there, perhaps some never leave: Having wandered the halls of a haunted debugging session for most of a day, you happen upon a room containing a piñata. In delirium and desperation, you ctrl-v and f5 the piñata until a cookie falls out. Somehow, your mad key-strokes have busted the ghost bug; time to go home, yay! Sometimes software code doesn’t fit perfectly. Third-party integration, protocol bugs, opaque libraries, timing and async bugs, and Katamari technical debt preclude a true understanding of the cause of the program behavior. ...

3 Nov 2012 · Justin M. Keyes

Computer security

hardening your system: remove/disable “root CAs belonging to the U.S. government” on OS X: “DoD Root CA 2” and “DoD CLASS 3 Root CA” why? carnivore, echelon, Clipper chip, NSA data center, (update 2023) may become illegal in the EU: eIDAS hardening network access: set up port knocking https://github.com/moxie0/knockknock

30 Aug 2012 · Updated 21 Nov 2023 · Justin M. Keyes

You say priori, I say posteriori

Levels of aspiration: Arguments like “but it works” or “it gets the job done” are tell-tale signs of someone happy at the lowest level of the technical hierarchy and your cue to just quietly back out of the debate. —DHH  I bet you over-engineered your startup: Of the three startups I've worked with, two of the three were ridiculously over-engineered monstrosities that were way over time budget. It was clear that the CIO/CTO wanted to do cool fun stuff and not build a marketable product. The other was cobbled together with completely shit code, was constantly breaking on releases, and was glued together with perl scripts. They're now publicly traded. 

10 Jul 2012 · Justin M. Keyes

Talk: Silicon Carbide and Body-Machine Interfaces

Notes from Dr. Stephen E. Saddow's presentation, "Silicon Carbide Biomedical Technology for Bone Implants, Stents and Brain-Machine Interfaces". Electrical Engineering Department Department of Molecular Pharmacology and Physiology University of South Florida Abstract: Amorphous silicon carbide (SiC) has been used for several years as a non-biofouling coating in biomedical devices such as coronary stents and bone implants. However, up to recently, the biocompatibility of single crystal SiC, which presents appealing bio-sensing potentialities, has been in question. A comprehensive study of the biocompatibility of this wide band-gap semiconductor has been performed with extremely promising results which show the higher performance of SiC in bio-environments with respect to Si, the leading semiconductor, and introduce SiC into a unique class of materials that is both bio- and hemocompatible.  Goal: avoid glial scarring Carbon electrodes: replace gold/metal electrodes which can become toxic. Semiconductors (Si): long-term (unlike polymers) won’t corrode (unlike metals, eventually) …but is it biocompatible/hemocompatible? Silicon Carbide (SiC): ...

28 Oct 2011 · Justin M. Keyes

Singularity

human singularity: compulsive excellence (Fountainhead) neuro-chic: designer DNA trivializes current human cognitive limiations, perhaps changes human nature such that current human inclinations are obsolete technological singularity: AI, self-replicating nanobots = telekinesis energy singularity: near-perpetual motion One who overcomes his apparent nature is far more interesting than one whose nature is effortlessly extraordinary. The extraordinary are the drivers of stability and improvement.

28 Sep 2011 · Justin M. Keyes

The Most Interesting Things

In the spirit of Hilbert’s problems, here are the most interesting things I currently know of: Emergence fundamental (non-contact) forces & particles (muons, quarks, …) ⇨ fluid dynamics, etc. Collatz Ecologies “how structure emerges out of iteration” “When stable patterns emerge in some iterated system, it’s possible to build new systems on top of the old ones. Moreover, these new systems can be seen as independent of the old ones.” Collatz conjecture: Pick any (nonzero, whole) number. If it’s odd, multiply it by 3 and add 1; if it’s even, divide by 2. Now you have a new number. Apply the same rules, get a new number and keep going. The conjecture predicts that no matter what number you started with, eventually you’ll end up at 1, at which point you’re stuck in a little loop: 1, 4, 2, 1. ...

1 Sep 2011 · Updated 21 Nov 2023 · Justin M. Keyes

Why write?

It is a question that you will face, should you deign to start a blog (or column, journal, etc.). EUTHYPHRO: Why do you have a blog? YOU: Because it exercises my urchin mind and I want to share my meager kibbles with SearchEngineGod. Weak answer. Too cliché. We must find a better answer. 10 weeks later… YOU: Friend, ask me “Why do you have a blog?” again! EUTHYPHRO: You still have a blog? ...

18 Jan 2011 · Justin M. Keyes

The Holographic Principle

I am reading about and attempting to discuss the holographic principle, a conjecture in theoretical physics that the three-dimensional universe is a projection of a two-dimensional (i.e., surface area) encoding¹. This would imply that all the particles and properties and everything of our universe may be compressed substantially without losing information: reality is a (logical, not literal) projection of a very large bitmap. The theory also could “explain” surprising properties of the universe, such as the discrete (i.e., quantum) nature² of physics, the origin of gravity, and information density. ...

22 Oct 2010 · Justin M. Keyes

Learning Asymptote

Learning without thought is labor lost; thought without learning is perilous. - Confucius It is said that some people are “quick learners”. Does that mean they can learn anything quickly? No step in the path of learning challenges them? No; rather, they learn quickly compared to others, but that quickness is nevertheless measured in mortal units. For slow and quick learners alike, the process of learning requires some time and concentration. Over time, you can master your shortcomings and adapt to a less-awkward process in order to reduce friction; yet learning continues to be even for the shrewdest autodidact frustrating and slow, compared to what it might be if we had a less-cobwebbed conduit by which to hose the inner sanctum of cognitive retention. ...

5 Oct 2010 · Justin M. Keyes

Tomato in, IPCop out

It even shows inodes usage. A 100 MHz P1 was overkill. I've bid vale to my beige-box IPCop firewall. I had built it in 2004 out of a circa-1996 Pentium machine and a couple NICs. For 6 years I've wondered when this little choo-choo would die... it never did. Some neat things about IPCop compared to its contemporaries: usage graphs, port forwarding, intrusion detection, dynamic DNS; plus other things I never used, such as traffic shaping. ...

20 Aug 2010 · Justin M. Keyes

How to call a Cygwin bash command from Windows CMD

Using Cygwin on Windows, sometimes you need to run a bash command or script from the Windows command line (CMD, DOS, shell). This is particularly useful if you want to use the Task Scheduler instead of messing with cron on cygwin. If you’re going to schedule tasks on a Windows system, then the Windows Task Scheduler is probably the sane way to do it. To run a bash script or command from outside of cygwin, you need to pass it to the bash executable with a little prep work. That “prep work” is contained in the following script (adapted from here), called cygrun.bat: ...

13 Aug 2010 · Justin M. Keyes

Sunset Rubdown

Big Time invented a new adult beverage à la plage. Its working title was “Frankenberry”; the release title is “Sunset Rubdown”. Drink recipe: a good splash of Malibu coconut rum a grave splash of Cointreau (triple sec) a lil’ can of pineapple juice put the ice in now a nice bath of sangria on top The bedrock of ice breaks the fall of the sangria, and the two forbidden flavors are stratified like an ice-cream cake sunset. ...

3 May 2010 · Justin M. Keyes

The Secret History

Tartt, Donna. The Secret History. New York: Knopf Books for Young Readers, 2004. The original copyright year is 1992, so that explains why everyone uses payphones, and most knowledge–or rather, information–still, is available only at a premium, that is, by the study of untranslated primary texts, or contact with the educated. The book is dedicated to Bret Easton Ellis; it turns out that Ellis mentions the characters in one of his own novels. I wonder if the market for cocaine-rusted LA kids with gray-colored glasses has been saturated by Ellis and Tartt? It must be fun for method writers. ...

27 Mar 2010 · Justin M. Keyes

Planes

There is a plane at the end of the road on a planet. I found it by driving as far as possible. I drove undeterred towards the bushes. I followed the path to an opening. I pointed towards the water. I watch the silent traffic on the bridge. Palm trees with wild hair watch the water and the traffic. The big flat plain of water is a hole in the land, a dip in the high frequency, a pending project, an ignored part, ear-marked but forgotten. Jets poke into the sky above from the far side of the clouds, whine, then leave, behind me, and the air is quiet again. Tall brown grass flutters in the water. The white sunlight is comprehensive. The clouds and the blue of the sky cup the flat world. I am trapped under a bowl of infinite perimeter. There are many distractions in the bowl. A jet pushes through the clouds, approaches me, flies over me, leaves me, lands.

5 May 2008 · Justin M. Keyes