1,327 karma · joined December 13, 2017
I got a letter back several months later saying that they had reviewed my request, measured the foot traffic in the area on several days, and decided to not paint a pedestrian crossing because there was low enough pedestrian traffic that cars would get complacent and ignore it (therefore endangering pedestrians who would have expectations that cars would stop at a pedestrian crossing).
It's the first time I realised there is actually a lot of though that goes into where to place a pedestrian crossing, and when to not place one.
Original page (compressed): 10 kB
Page with server-rendered Katex (compressed): 50 kB
Katex.js (compressed): 80 kB
So after two pages it’s a net win to not render the mathematics server-side.
This “rank decomposition” is a bit interesting algebraically rather than numerically, since then the numerical stability problems disappear. Also, if we take all matrices to be over the integers (and require that “invertible” means the inverse is also an integer matrix), then the rank decomposition is a lot like the Smith normal form of a matrix.
On the other hand, I’ve noticed that children who understand how to read only digital clocks are quite capable of answering what the time is (just read the numbers right off), but have trouble telling how many hours there are from 10am to 3pm.
I agree there is much more one could want out of a uniform random float generator than just k/N where k is a integer drawn uniformly from {0, 1, …, N}, but hitting arbitrarily small floating point numbers is not on this list.
If you are intending to sample numbers in the range [0,1] such that each float occurs with equal probability then that’s fine, but it’s certainly not uniformly random on [0,1].
Clicking the purple durations next to the play button always starts the podcasts playing for me.
This is admittedly not a flat vs non-flat design problem, but it is exacerbated by the flat design. If actions which started something playing were outlined or something, it would be so much easier to use.
If exists(y){x : x % 2 == 0 for x in numbers}: Print y
There is also a “for all” statement which can return the first offender which does not satisfy the condition.
It’s an awkward but incredibly useful language choice - it would be interesting to see it explored more in mainstream languages.
I think (but am not sure) that the Go compiler can add some small primitive types and structs (precisely: those that fit in a machine word) to a []interface{} by storing them inline, removing the need for an allocation. So perhaps you will only see major speed increases when using larger structs.
Your code example for isHot() seems round the wrong way; also doing something like “return temperature > 100” is probably more idiomatic than using if/else just to return true/false.