# All posts

• 2023-Mar-5 » March 2023 updates

New note: Tricky grammar

• 2023-Jan-17 » January 2023 updates

A great idea: let people use your yard as a vegetable garden and receive a percentage of the produce

• 2022-Nov-18 » November 2022 updates

“10 years ago, the Peking University genius Liu Zhiyu, who gave up MIT and chose to be a monk, how is it now?”

• 2022-Jan-3 » "A Man's A Man for A' That" in Modern English

On the occasion of Nima Hoda’s wedding.

• 2021-Jun-20 » Short musings

• 2021-Jan-18 » The Confucian virtue of learning

The Three Character Classic is a 13th century Chinese text with three characters per line which is traditionally read by children. Below is an excerpt from the 1812 translation by Robert Morrison, Presbyterian missionary and author of the first Chinese-English dictionary.

• 2020-Oct-31 » Uncertainty due to computational approximation in Bayesian inference

In Bayesian inference, we can factor approximate computation (e.g. linearization) into the actual posterior probabilities.

• 2020-May-21 » Comment ranking algorithms: Hacker News vs. YouTube vs. Reddit

Comments on social sites have to be sorted somehow. How do big platforms do it – is it some complicated mix of recommender systems, learning-to-rank algorithms, Markov decision processes, neural networks, and learning automata? Well, maybe in some cases but often it’s just a simple formula. In this article we put the formulas used by Hacker News, YouTube, and Reddit, along with a few alternatives, to the test, using virtual comment section simulations. Spoiler alert: YouTube does not do well.

• 2020-Apr-1 » Mathematics as a service

What would a market for mathematics look like?

• 2020-Mar-24 » March 2020 links

James I’s 1597 book Daemonologie, “a philosophical dissertation on contemporary necromancy … touches on topics such as werewolves and vampires”.

• 2020-Feb-17 » Robin Hanson predicts China virus disaster

Robin Hanson says “In few months, China is likely to be a basket case, having crashed their economy in failed attempt to stop COVID-19 spreading.” Quantifying the forecast, he says China’s economy (or growth?) will be “a factor of two to ten down” and seems to expect dramatic results in 6 months.

• 2020-Feb-12 » Ranking cities by weather

Let’s analyze data from https://darksky.net from the last 10 years to compare weather (technically “climate”) in a selection of North American cities.

• 2020-Feb-11 » Q&A with William Saunders: Preventing AI catastrophes

• 2020-Jan-24 » Whence the English names of countries

Some exonyms:

• 2019-Nov-6 » Nov 2019 links

Tall buildings by city: look out for Toronto. The current top cities in North America for sky scrapers are unambiguously New York, Chicago, and Toronto in that order. However, if we count proposed buildings and buildings under construction, Chicago has 18 at least 150m tall (the dataset is only complete for buildings at least 150m) and Toronto has 90.

• 2019-Nov-5 » Ascending auction bidder strategy

Ascending auctions are a common mechanism for selling a set of products. The basics are covered in this video:

• 2019-Sep-30 » Belief aggregation with computational constraints

Imagine a risk-neutral set of traders, each with a common prior which is updated with some private information. The traders buy and sell contingent claims until prices reach an equilibrium. The resultant prices are the conditional expectations of the terminal payoffs under a probability measure $$\mathbb{P}$$. Is $$\mathbb{P}$$ equal to the posterior obtained by updating the common prior with the combined private information? At least under certain conditions, yes.

• 2019-Aug-19 » North American population growth

Which places in North America are growing and which aren’t? City populations are poorly defined and hard to compare but the boundaries of states and provinces are more objective. Here is the growth in population since 1970/71 in states/provinces with over 4 million people.

• 2019-Apr-8 » Counting solutions to equations

There are $$\binom{n-1}{m-1}$$ integer compositions of $$n$$ with $$m$$ parts. Complex polynomials of degree $$n$$ have $$n$$ zeros, counting multiplicity. Where else do we count solutions to equations? Our criteria are that the equations must be parametrized, and that for each parameter value there is a finite solution set. Some examples are given.

• 2019-Feb-5 » Quote: Bertrand Russell's anecdote

To return to my grandmother’s family … the … sister, Lady Charlotte Portal was … apt to express herself unfortunately. On one occasion when she had to order a cab for three people, she thought a hansom would be too small and a four-wheeler too large, so she told the footman to fetch a three-wheeled cab. On another occasion, the footman, whose name was George, was seeing her off at the station when she was on her way to the Continent. Thinking that she might have to write to him about some household matter she suddenly remembered that she did not know his surname. Just after the train had started she put her head out of the window and called out, ‘George, George, what’s your name?’ ‘George, My Lady’, came the answer. By that time he was out of earshot.

-Bertrand Russell, “Autobiography”

• 2019-Jan-16 » Advice for students

• 2018-Jul-16 » Qs

(These are some questions, which may well be already addressed in the literature, I haven’t checked.)

• 2018-Jun-20 » Quote: Knuth on Dijkstra

One of the pleasures I’ve had over the years is to play four-hands piano music with Edsger. … When we’re playing a Haydn waltz the thing I had to get used to was that Edsger doesn’t count one-two-three, one-two-three it’s always zero-one-two, zero-one-two.

-Don Knuth, 2000

• 2018-May-28 » Link: Generated poetry

• 2018-May-25 » Three excellent lecture videos

1. Aakar Patel - English and its influence on our national priorities (2016). This examines the peculiar phenomenon in India where the popular media, due to the distribution of languages spoken and very high advertising revenues, ends up being skewed towards elites and their issues, systematically biasing the propagation of news information.

• 2018-Apr-7 » Quote: Maud Ray Kent

Paraphrasing from Macrae’s biography of J. von Neumann:

• 2018-Jan-17 » Classic probability puzzles and their solutions

Problem: You are given two blank envelopes which each contain money. One envelope contains twice as much as the other. You may choose an envelope and keep the money it contains. After choosing, you have the option to switch for the other envelope. Should you switch?

• 2017-Nov-12 » Quote of the day: Physics

If one wants to summarize our knowledge of physics in the briefest possible terms, there are three really fundamental observations: (i) Space-time is a pseudo-Riemannian manifold $$M$$, endowed with a metric tensor and goverened by geometrical laws. (ii) Over $$M$$ is a vector bundle $$X$$ with a nonabelian gauge group $$G$$. (iii) Fermions are sections of $$(\tilde{S}_{+} \otimes V_R) \oplus (\tilde{S}_{-} \otimes V_{\tilde{R}})$$. $$R$$ and $$\tilde{R}$$ are not isomorphic; their failure to be isomorphic explains why the light fermions are light and presumably has its origins in a representation difference $$\Delta$$ in some underlying theory. All of this must be supplemented with the understanding that the geometrical laws obeyed by the metric tensor, the gauge fields, and the fermions are to be interpreted in quantum mechanical terms.

-Edward Witten, “Physics and Geometry”, 1986

• 2017-Oct-10 » What's the probability of the Riemann Hypothesis?

Usually when we talk about probabilities, we have certain given information, which takes the form of a $$\sigma$$-algebra of possible events, and there is also a probability function that assigns values to each event. The rationality of a probability function is judged based on the relationships between events. For example if $$A \subseteq B$$ then we must have $$P(A) \leq P(B)$$. But as long as these relationships are satisfied (giving a proper probability measure), the probabilities could be anything. As such, we do not judge subjective probabilities based on whether they’re actually accurate or not, just whether they are consistent with each other.

• 2017-Aug-17 » The Fundamental Theorem of Asset Pricing is Bayesianism

If uncertainties encode bet preferences as represented by probabilities, Bayesianism is a collection of Dutch book arguments proving that probabilities must be consistent with each other (defining a probability measure) to be rational. Weisberg has an excellent paper that explains the details. On the other hand, the Fundamental Theorem of Asset Pricing proves that for prices to be arbitrage-free, they must be conditional expectations.

• 2017-Jun-28 » Data from Canadian 700MHz and 2500MHz spectrum auctions

The 700MHz (2014) and 2500MHz (2015) spectrum auctions generated revenues of 5,270,636,002 CAD from 302 licenses and 755,371,001 CAD from 97 licenses. Both auctions used a combinatorial clock auction (CCA) format involving an ascending clock phase followed by a sealed-bid supplementary stage where bids could be made on packages of products. Final prices were determined using Vickrey pricing with a core-adjustment. An activity rule was used which required bidders to make bids or lose eligibility to bid in later clock rounds, along with a revealed preference rule which allows the eligibility limit to be exceeded as long as consistency checks are satisfied. For full details on the auction formats see the official documentation (700MHz rules, 700MHz additional details, 2500MHz rules); and the record of bids placed is here for 700MHz and here for 2500MHz.

• 2017-Jun-21 » Link of the day: Journal of Craptology

http://www.anagram.com/jcrap/

• 2017-Jun-9 » U of Toronto study space info

(a partial list)

• 2017-May-27 » Markov of Chain: Automating Weird Sun tweets

Let’s use python to train a Markov chain generator using all the tweets from a certain list of users, say this one. We’ll use the following libraries.

• 2017-May-20 » Building a shell with JavaScript

ShellJS is a JS library that provides functions like cd() and ls() which you can use to write Node scripts instead of bash scripts. That’s great for scripts, but what about an interactive shell? Well, we could just run the Node repl and import ShellJS:

• 2016-Jul-5 » Modeling aesthetics in mathematics

What exactly is beautiful math?

• 2016-Apr-29 » Quote of the day: Yuri Gurevich

I remember, in a geometry class, my teacher wanted to prove the congruence of two triangles. Let’s take a third triangle, she said, and I asked where do triangles come from. I worried that there may be no more triangles there. Those were hard times in Russia and we were accustomed to shortages. She looked at me for a while and then said: ‘Shut up’.

• 2016-Apr-3 » Link of the day: Learn the Greek alphabet

A handy flashcards web app for memorizing all the Greek letters

• 2016-Mar-15 » Link of the day: Jon Skeet speaks

Jon Skeet on the tricky edge cases that can show up with basic data types and how they model reality. Back to basics: the mess we’ve made of our fundamental data types

• 2015-Aug-28 » Command line Grooveshark post-Grooveshark

In this post I’ll share a way to get a Grooveshark-like experience with a Linux command-line application.

• 2015-Apr-21 » Status of the day

Wojciech Szpankowski:

• 2015-Apr-19 » Quote of the day

The first intellectual operation in which I arrived at any proficiency, was dissecting a bad argument, and finding in what part the fallacy lay; and though whatever capacity of this sort I attained was due to the fact that it was an intellectual exercise in which I was most perseveringly drilled by my father, yet it is also true that the school logic, and the mental habits acquired in studying it, were among the principal instruments of this drilling. I am persuaded that nothing, in modern education, tends so much, when properly used, to form exact thinkers, who attach a precise meaning to words and propositions, and are not imposed on by vague, loose, or ambiguous terms. The boasted influence of mathematical studies is nothing to it; for in mathematical processes, none of the real difficulties of correct ratiocination occur.

-J.S. Mill, Autobiography

• 2015-Mar-27 » Quote of the day

Why not experiment with wholesome personal relationships? Some recreational socialising? Maybe. I dabble. I’m a social primate susceptible to peer pressure. No man is an island, etc, even those with a metaphysic evocative of windowless monads. [I fret that the only thing one can ever know is the intrinsic subjective properties of whichever configuration of matter and energy one happens to instantiate. cf. Lockwood.] Sadly, my conspecifics are a dangerous, expensive and tainted source of opioid supply with endogenous habits of their own to feed. Moreover my inferential realism about so-called perception is a deterrent to intimacy: personal relationships become a branch of speculative metaphysics if each virtual world resembles a solipsistic island-universe. Indeed I worry that the closest I come to staying in touch with the real world is eating bits of it: the epistemology of food, so to speak. And germs. If I meet my end under the wheels of the proverbial London bus, my faith in the mind-independent world will be posthumously vindicated. As it happens, I have just finished reading Simon Critchley’s The Book of Dead Philosophers (2008); perhaps my best hope of immortality lies, not churning out philosophical verbiage, but having the equivalent of a tortoise fall on my head. This untimely fate exhausts my knowledge of Aeschylus.

-David Pearce, Diary Update and Idle Musings

• 2014-Oct-14 » Quote of the day

Programming wisdom:

• 2014-Aug-18 » Quote of the day

This reminds me of a story from the time when Queen Mary and Westfield College, University of London decided to change its name to Queen Mary, University of London. My colleague Wilfrid Hodges was giving a lecture in Germany, and put up his first slide, giving his name and affiliation as “Wilfrid Hodges, Queen Mary, University of London”. Somebody asked, “Is that a joint publication?”

• 2014-Jun-29 » Link of the day

An interesting comparison of the cultures of the US and Germany:

• 2014-May-26 » Some resources for learning Mandarin

(This is an old list from when I was studying it in around 2009.)

• 2014-May-25 » Quote of the day

From Modern Computer Algebra: “We start by using [Newton iteration] to find a custom-Taylored division algorithm that is as fast as multiplication…”

• 2014-May-22 » LessWrong gems

lukeprog ridicules Will_Newsome’s “post-rationality”

• 2014-May-21 » Status of the day

AC in pop culture: Pitbull fans must exist but it’s impossible to find an explicit example.

• 2014-May-18 » Status of the day

Linux tip: Install Helvetica and/or Helvetica Neue on your computer and some websites will look better

• 2014-May-15 » Quote of the day

From a ratemyprofessors.com review of Mike Newman’s teaching: ‘Clearly LOVES math, makes tons of jokes; ie, someone asks how many questions on the midterm and he replies “well… it’s an integer number”.’

• 2014-Feb-27 » Link of the day

http://www.psychologytomorrowmagazine.com/jeff-warren-neuroscience-suffering-end/

• 2014-Jan-7 » General thoughts on computer security

The following is a document I wrote in mid 2008. I haven’t edited it, although I was tempted to since parts of it sound a bit strange now. Rather than improve on it, I’ll just clarify what it was attempting to say: The connections between devices and/or agents have a finite set of security properties which determine the options available to secure the assets involved. These properties can be simply classified, providing a way to systematically explore the space of security configurations. I felt that the ideas in the document were a good summary of some facts about computer security.