I’m working on a blog post about Mastodon’s weaknesses and what is being done to fix them. During my research I was delighted by how much interesting work is happening in the Fediverse space—e.g.:
How I make sense of .flatMap(): – .map(): Each input element corresponds to one output element. – .flatMap(): Each input element corresponds to zero or more output elements.
The Social Web Foundation is “a non-profit organization dedicated to making connections between social platforms with the open standard protocol ActivityPub.”
Goals: * Educating general and targeted audiences about the social web * Informing policy-makers about issues on the social web * Enhancing and extending the ActivityPub protocol * Building tools and plumbing to make the social web easier and more engaging to use
Neat #TypeScript trick: If we create a Set with a `const` Array, then the type of its elements is the union of the Array element types. In other words: The Set behaves a little like a tuple.
const packStatus = new Set([ 'draft', 'approved', 'shipped', ] as const); // const packStatus: Set<"draft" | "approved" | "shipped">
packStatus.has('abc'); // type error! // Auto-completion works for the arguments of .has(), .delete(), etc.
“Verso is a web browser built on top of the Servo web engine. We aim to explore embedding solutions for Servo while growing it into a mature browser in one day. This means we want to experiment with multi-view and multi-window first and then build UI elements entirely from Servo itself.”
Caveat: “At the moment, Servoshell should provide a better user experience.”
The term “syntactic sugar” is tricky. Common definition: shorter syntax with a simple transformation to a longer version. Think syntax-aware search-and-replace or macros.
Examples:
a += b // sugar a = a + b // long
{prop} // sugar {prop: prop} // long
(x) => x + x // sugar (x) => { return x } // long
With this definition, async/await is not syntactic sugar for Promises: An async function is executed similarly to a generator (pausing, resuming, …). So no simple transformation from .then().
I’ve always found discrete mathematics (*) much easier to understand than, e.g., calculus or statistics – because it is so similar to programming. Relations, orders, graphs are all part of discrete mathematics.
If you think you don’t like math, you may actually enjoy discrete math.
Math topics that keep being useful for programming: relations, orders, graphs.
Example: You have plugins with conditions such as “plugin A must run before plugin B“.
– These conditions define a partial order: In general, not every plugin can be “compared” with every other plugin. – If we want to sort an Array with plugins, we need a total order. – One algorithm that works with a partial order is topological sorting: https://en.wikipedia.org/wiki/Topological_sorting
“For the first time you'll have a way to see the entire web platform mapped as a set of features, along with their support in browsers.”
“The Dashboard isn't intended as a replacement for Can I Use or the browser compatibility data on MDN. In your day to day life as a developer, it's likely to be less useful than these places. However, showing the platform in this way creates some interesting possibilities.“
Web apps—topics I’d like to be discussed more: – Offline capability – Peer-to-peer operation (syncing etc.)
It’s a shame that most web apps cease to work properly whenever the internet connection is flaky or gone. For me, that happens whenever I travel (train, plane, etc.).
#TypeScript: Arrow functions help with partial evaluation [1] – e.g. a factory for functions for which there already is a type. Then they are more elegant than using .bind() [2]