setTimeout(function, delay)
docs: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
I've always thought that setTimeout
would call the function when the delay was up,
maybe a little later,
but never before.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
setTimeout(function, delay)
docs: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
I've always thought that setTimeout
would call the function when the delay was up,
maybe a little later,
but never before.
Removing ableist language in code is important; it helps to create and maintain an environment that welcomes all developers of all backgrounds, while emphasizing that we as developers select the most articulate, precise, descriptive language we can rather than relying on metaphors. Quite simply, avoiding ableist language lets us make sure we are inclusive of all developers, while moving toward language that is simultaneously more acccessible to developers whose first language might not be our own.
The phrase sanity check is ableist, and unnecessarily references mental health in our code bases. It denotes that people with mental illnesses are inferior, wrong, or incorrect, and the phrase sanity continues to be used by employers and other individuals to discriminate against these people.
There are a ton of alternatives, and one of the best ways to select one is to ask yourself: What am I actually checking? and select something more descriptive. In everyday c
[38;5;231m▄[m[38;5;231m▄[m[38;5;231m▄[m[38;5;195m▄[m[38;5;195m▄[m[38;5;195m▄[m[38;5;195m▄[m[38;5;231m▄[m[38;5;231m▄[m[38;5;231m▄[m | |
[48;5;231m [m[48;5;231m [m[48;5;195;38;5;231m▀[m[48;5;52;38;5;195m▀[m[48;5;94;38;5;195m▀[m[48;5;94m [m[48;5;136;38;5;94m▀[m[48;5;94m [m[48;5;94m [m[48;5;94;38;5;195m▀[m[48;5;52;38;5;195m▀[m[48;5;195;38;5;231m▀[m[48;5;231m [m[48;5;231m [m[38;5;231m▄[m | |
[48;5;231m [m[48;5;159;38;5;231m▀[m[48;5;52;38;5;195m▀[m[48;5;52m [m[48;5;52m [m[48;5;94;38;5;136m▀[m[48;5;52;38;5;94m▀[m[48;5;94;38;5;136m▀[m[48;5;94;38;5;136m▀[m[48;5;52m [m[48;5;52m [m[48;5;52m [m[48;5;52m [m[48;5;52m [m[48;5;52m [m[48;5;52;38;5;195m▀[m[48;5;231;38;5;159m▀[m[48;5;231m [m | |
[48;5;231m [m[48;5;159m [m[48;5;195;38;5;231m▀[m[48;5;159;38;5;16m▀[m[48;5;159;38;5;16m▀[m[48;5;231;38;5;52m▀[m[48;5;231;38;5;94m▀[m[48;5;52m [m[48;5;52m [m[48;5;16m [m[48;5;16m [m[48;5;231;38;5;16m▀[m[4 |
From the Harvest Books paperback edition
"The supranationalism of the antisemites approached the question of international organization from eactly the opposite point of view. Their Aim was a dominating superstructure which would destroy all home-grown nationalist structures alike. They could indulge in hypernationalistic talk even as they prepared to destroy the body politic of their own nation, because tribal nationalism, with its immoderate lust for conquest, was one of the principal powers by which to force open the narrow and moset limits of the nation-state and its sovereignty." (41)
"Only two decades separated the temporary decline of the antisemitic movements from the outbreak of the first World War. This period has been adequately described as a 'Golden Age of Security' because only a few who lived in it felt the inherent weakness of an obviously outmoded political structure which, despite all prophecies of imminent doom,
%YAML 1.2 | |
--- | |
name: JIRA and Confluence markup syntax | |
scope: source.atlassian-markup | |
license: MIT | |
variables: | |
other_text_mods: '\^|\~|\?\?' | |
projects: '(GD|PAAS)' | |
icons: '\((!|\?|/)\)' | |
contexts: |
/* global createImageBitmap */ | |
function loadImageWithImageTag(src) { | |
return new Promise((resolve, reject) => { | |
const img = new Image; | |
img.crossOrigin = ''; | |
img.src = src; | |
img.onload = () => { resolve(img); }; | |
img.onerror = () => { reject(img); }; | |
}); |
A lot of people misunderstood Top-level await is a footgun, including me. I thought the primary danger was that people would be able to put things like AJAX requests in their top-level await
expressions, and that this was terrible because await
strongly encourages sequential operations even though a lot of the asynchronous activity we're talking about should actually happen concurrently.
But that's not the worst of it. Imperative module loading is intrinsically bad for app startup performance, in ways that are quite subtle.
Consider an app like this:
// main.js
This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:
(async main(){...}())
as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problemsI'll leave the rest of this document unedited, for archaeological