Skip to content

Instantly share code, notes, and snippets.

View atengberg's full-sized avatar

atengberg atengberg

  • sidereal
View GitHub Profile

idea for meme (stages revolutions)

avoid making yourself less employable through evaluation of self hypocrisy, first.

see previous.

then avoid rhetorical rationaliz...

tldr be proactive and build it already. also commit to dedication of writing consistently since the destructive interference between time spent coding and creatively, constructively writing seems inescapable otherwise.

@atengberg
atengberg / self.note.md
Last active May 15, 2024 10:47
note to self may15ish - js
// Don't do this:
const badHoleyArray = new Array(10);

Will be forevermore marked as HOLEY (cannot be undone by filling the holes!) and preclude engine's optimizations for arrays.

@atengberg
atengberg / modular-async-iterator_streamer.md
Last active August 22, 2024 11:01
Generically wrap a stream of data values as an thenble-like async iterator

Find yourself with a callback you'd like to make its passed values iterable--ie useful in a for await loop?

function Streamer(key) {
  const _ = Object.create(null);
  _.key = key;
  _.resolver = null;
  _.dataQueue = [];
  const push = function (newData) {
 if (this.resolver) {