Grayjay is a video player for YouTube and other services. I believe its ad-free and "algorithm-free", meaning it just gives you every video from every channel you subscribe to, in chronological order. It was initially for Android and iOS.
It's backed by Louis Rossmann, who does a lot of right to repair advocacy, among other things.
"Grayjay combines video content from multiple platforms, such as YouTube, PeerTube, Twitch, and others, into one app, removing the need to switch between different platforms."
I wonder why the article doesn't mention utilizing the browser cache for your static CSS and JS assets instead of introducing a service worker as first measure.
Few years ago I built a shopping site MPA this way and the page transitions were almost not noticable.
EDIT: appears that Chrome suddenly had decided in 2017 to not validate at all on reload anymore, after Facebook had complained to Chrome devs about Chrome being more a drag on their servers compared to other browsers.
> We began to discuss changing the behavior of the reload button with the Chrome team. […] we proposed a compromise where resources with a long max-age would never get revalidated, but that for resources with a shorter max-age the old behavior would apply. The Chrome team thought about this and decided to apply the change for all cached resources, not just the long-lived ones.
> Firefox was quick in implementing the cache-control: immutable change and rolled it out just around when Chrome was fully launching their final fixes to reload.
> Chrome and Firefox’s measures have effectively eliminated revalidation requests to us from modern version of those browsers.
Manage date and time in UTC/Zulu. Append the time zone if that meta is needed and store both the client and server for backend. That way you don't have to deal with time travel and can handle time shifts.
I would say that concurrency is a caching issue once proper locking has been set.
Same (but not a shopping site). Bundle the JS and CSS into one file each and cache it forever (hash in the filename to bust the cache). Then with each page transition there's exactly one HTTP request to fetch a small amount of HTML and it's done. So fast and simple.
+ you need to pair that with immutable, otherwise you are still sending validation requests each reload time, so you are doing more than one HTTP request.
Makes sense as a theoretical problem. Have you ever seen data that suggests it's a practical problem? Seems like one could identify "should be cached forever but wasn't" using etag data in logs.
Facebook did a study about ten years or so back where they placed an image in the browser cache and then they checked how long it was available for… for something like 50% of users it had been evicted within 12hrs
If one of the most popular sites on the web couldn’t keep a resource in cache for long then most other sites have no hope, and that’s before we consider that more people are on mobile these days and so have smaller browser caches than on desktop
Browsers have finite cache sizes… once they’re full the only way to make space to cache more is to evict something even if that entry is marked as immutable or cacheable for ten years
Exactly this. In our case we went so far to cache all static assets. Putting them into a directory with a hash in the name made them still easy to bust.
On a session basis browser caches are effective but on a session to session basis it’s likely the content will get evicted as resources from other sites gets cached - there’s an oldish Facebook study where they placed an image in the cache and after 12hrs it had been evicted for 50% of visitors
Service Workers offer more controls over cache lifetime, and in Chromium (at least) JS gets stored in an intermediate form (which reduces the re-compile overhead on reuse)
Edit: below isn’t true. You could set immutable in cache header and the browser wouldn’t verify.
——
Original comment:
With browser cache, the browser stills need to send a HEAD request to see if the content was modified. These requests are noticeable when networks are spotty (train, weak mobile signals…)
Service Worker could cache the request and skip the head requests all together
Set max-age in the Cache-Control header to a high value and the browser will not need to revalidate. When deploying a new version, "invalidate" the browser cache by using a different filename.
Even if it's obvious: I was missing a "How to use" section in the README that demonstrates how this tool can be invoked.
EDIT: Ok, there's something in the "Working with STDIN and STDOUT" section. But TBH I'd find it more helpful to have the different use cases collected at the top. To me it wasn't even clear how the command is called.
I would love to see better performance with triggers. Even on an M1 Pro Max when I have triggers I get a slightly noticeable lag. It could just be me though. I run at 5k resolution with a lot of text.
Hmm, he lost me on page nine where "complete" is explained.
> Complete means that every sequence of vectors |a1>, |a2>, ... satisfying lim ...
How are the elements of this sequence related? And why are we only interested in the elements where the index n/m goes to infinity? What does that even mean if the sequence is arbitrary?
That's probably why I also can't make sense of this:
> Loosely speaking, saying that a Hilbert space is complete means that it contains all of its limits.
This is standard mathematical analysis. Infinite sequence of elements may look like it converges to some target element, judging by mutual distances converging to zero. Such sequence is a Cauchy sequence. When the target element actually exists, then the sequence is also convergent. A space where every Cauchy sequence is convergent, is called complete.
Example: if the space is all real numbers except 0, then any sequence of real numbers accumulating around 0 (for howsoever small a distance, there is always infinite number of points closer to 0), the sequence is a Cauchy sequence, but not convergent (because 0 is not present). So that space is not complete (has a hole).
If the space is all real numbers, then the same sequence is also convergent, and the space is complete (no holes).
It helped me to look up an example of a space that is not "complete".
Turns out, rational numbers are the classic example of a space that is not complete. A sequence of rational numbers can approximate pi but pi itself doesn't exist in the space (since its irrational). So the rational numbers that get closer and closer to pi form a limit to a value that's not in the space.
That's a great example. To make it concrete, you can take the sequence such that $a_n$ is the $n$-th partial sum of any of the series here that involve only rational numbers: https://en.wikipedia.org/wiki/List_of_formulae_involving_%CF... multiplied by an appropriate constant.
Agreed that this is pretty terse. The sequences they're talking about are called Cauchy sequences [0]. A sequence a_i is Cauchy if for any epsilon, there exists an N such that if m and n are both greater than N, then |a_m - a_n| < epsilon. A classic example, suppose your space is the set of rational numbers, and consider the sequence a0 = 1, a_1 = 1.4, a_2 = 1.41, ... a_n = sqrt(2) up to n digits after the decimal place. You can verify that this is a Cauchy sequence, successive points get arbitrarily close to each other. This means the rational numbers are incomplete, because this Cauchy sequence of rationals doesn't converge to a rational number. It's the real numbers that forms a complete space.
Completeness is required for nice results like the spectral theorem for self-adjoint operators [1] to hold, which is pretty essential for Quantum Mechanics.
> And why are we only interested in the elements where the index n/m goes to infinity?
If the sequence is finite, then we don’t really care to discuss the “limit” of the sequence.
> Loosely speaking, saying that a Hilbert space is complete means that it contains all of its limits.
For a set S to not contain all of its limits means you can have an infinite sequence of points (a_n) where each a_n is in S and there is no point a in S so that the sequence is eventually as close to a as you’d like.
More formally, there does not exist a in S so that for any e > 0 we can pick an M so that m > M implies | a_m - a | < e.
You can see how “m > M” gives a formal meaning to “eventually,” and “for any e > 0 … | a_m - a | < e” gives a formal meaning to “as close to a as you’d like.”
Putting that into plain English, "If it looks like a sequence is converging, it really is converging to something."
What does it mean to say that the sequence looks like it is converging?
Naively, it means that any two elements far in the sequence are always very close together. We make that intuition more precise by turning it into a challenge-response, "You tell me how close you want the elements to be, I'll tell you how far out to pick your elements." And then we write that mathematically as
∀ ϵ > 0 # You tell me how close
∃ N # I'll tell you how far
such that if N < n, m # so that any 2 elements
then || a_n - a_m || < ϵ # will always be that close
Others have given examples about things like the rational numbers. The canonical example of why it matters comes from Fourier series. Joseph Fourier discovered this one. Consider a bunch of functions f(x) over the interval from 0 to 2π. We can create a dot product with f·g equaling the integral from 0 to 2π of f(x)g(x). And the length of a function f is sqrt(f·f)
Joseph Fourier discovered that the following functions are orthonormal (each has length 1, their dot product with each other is 0).
Given any function, he could compute a series that we now call the Fourier series that looks like it added up to that function. But there were complications. It added up perfectly for smooth functions with the same value at the edges like x(2π-x). But it also added up except at a few points for things like square waves. This caused a crisis in mathematics because at the time square waves were not considered functions, and nobody had ever realized that adding up infinite series of smooth functions could do such weird things. Their idea of functions was essentially what we would call analytic functions today. Basically things that look like power series. And Mr. Fourier had just shown that the analytic functions are not complete.
In addition to revealing problems in how we understood math, his technique was very, very useful. Because now you just had to figure out the physics of how, say, heat spreads out or vibrating strings vibrate just for those those sin and cos terms, and then you could figure out heat and vibration for ANY function.
Resolving the math problems started many decades of research. The results of which included better definitions of the real numbers, the ϵ-δ definition of a limit (or ϵ-N for a series), new theories of integration, and the idea of Hilbert spaces.
You should absolutely not use or recommend that site. It's stuck on incomplete C++14 at best and also contains some pretty bad code. learncpp.com is a much better tutorial and cppreference.com is a much better reference. The only thing cplusplus.com is good at is polluting search results.
Back when I was a software engineer, I used to constantly hear how bad cplusplus was. Yet, in spite of this, I'd fairly often find myself using it because the results were just so much easier to parse.
Just as an example, cppreference doesn't have a page dedicated to std::string (when you search for it on Google, it tkes you to std::basic_string) whereas cplusplus does.
Even comparing the two pages, cplusplus immediately gets to the point that std::string is just a std::basic_string<char>, whereas cppreference has three paragraphs of technical minutiae before it finally points out what std::string is.
Even though cplusplus is out of date and incomplete, it's still often more useful than cppreference when you're trying to get your head around STL for the first time.
cppreference has a steep learning curve with how information dense it looks, but once you’re up to speed you can move a lot faster with the standard library. I find it’s the site I always have a tab open on.
I haven't done any C++ since 2015ish but your link seems incredibly outdated.
Sure you'll learn some C++ syntax, but you'll learn the C++ from 20 years ago, not the modern C++ with smart pointers and all that stuff which is basically turning it into a new language.
as someone that has done a lot of commercial C++ teaching in his time, i would say that this is one to avoid for a beginning programmer. stroustrup is not, imho, one of the worlds great teachers, and i would not recommend C++ as a first programming language. more experienced programmers should go with TC++PL.
Interesting. I'm sort-of experienced (never pro, but lots of little projects in JS & Python. I got Principles to try and fill in gaps in my basic knowledge & so far it seems like it has been helping. I'm a little over halfway through. What else would you reccommend?
The Dream Machine: J.c.r. Licklider and the Revolution That Made Computing Personal by M. Mitchell Waldrop
Not really about a company, though.