Stefan VanBuren · All Content

https://stefan.vanburen.xyz

6 posts

Tech 50% · Writing 33% · Culture 17%

Subscribe via RSS

  1. Go <code>select</code> without the coin flip

    In Go, it’s common to wait on a condition via a channel while also respecting context cancellation. A common idiom looks like: select { case <-condition: return nil case <-ctx.Done(): return ctx.Err() } An issue with this is that if you’d prefer that condition (i.e., the non-error case) be treated with precedence, you’re racing with ctx.Done(); select chooses a case at random when multiple cases are ready. My coworker suggested a solution with a nested select within the ctx.Done() case to…

    0
  2. Against Taste / Gear Acquisition Syndrome

    I recently read Will Manidis’ Against Taste and found myself nodding along to much of that essay: The taste thesis, at its deepest and most simple structure, reverses this order. It places man at the end of the chain of creation, evaluating what has already been generated, rather than at the beginning, participating in the generation itself. It makes man what he has been slowly becoming for a century: a critic of creation rather than a co-creator. A consumer at his core. This is taste in its…

    0
  3. Sargable

    TIL of “sargable” conditions in SQL queries, which just means that an index can be used to speed up the query. One of those “you already know the concept, but the handle is useful” sort of things.

    0
  4. Tangenting

    Again, not something I learned today, but within the last few weeks: “tangenting”. I read about this in the wonderful Looking At Picture Books Substack, discussing one of my (and Wilhelmina’s) favorites, Goodnight Moon: Tangenting is something you get yelled at for when you’re in art/design school. The theory is that the edges of things shouldn’t touch closely. You should instead look for large overlaps, so the different objects or elements are clearly divided — if they’re too close it feels…

    0
  5. TK

    TK means “to come”. You’ll typically see it as “TKTK” or “TKTKTK”, as a simple way to search (i.e., ⌘+f) for details that haven’t been written yet. I use it when drafting blog posts to skip over a sentence or section I want to come back to write later, to avoid losing momentum. I didn’t learn this today, but within the last year or two (not too sure where!); I was just reminded by [seeing it in print]1 in my library’s edition of Jez Burrow’s Dictionary Stories, which is otherwise lovely so far.…

    0
  6. cells - a language server for CEL

    This weekend, I built a language server for CEL called cells. It currently supports semantic highlighting, diagnostics, documentation on hover, signature help, references, document highlighting (for variable references), completion, and formatting. CEL is a pretty simple language, so a language server for it doesn’t really need to support things like go to definition or some of the other niceties that language servers typically support. It only works on a single .cel file at a time, which is ...

    0