RSSAmplifier

Blog

Andrew's Blog

andrew222651.comRSS feed ↗47 posts

Latest posts

Tricky grammar

Pronouns in Quotations A question arose: Does a pronoun in a quotation need to be integrated into the surrounding text? The MLA Style Center at https://style.mla.org/agreement-pronouns-quotations/ recommends not doing so. For example: “Laurence is boastful, repeating to his brother that the picture is ‘the best thing I ’ve done yet’.” “One fewer” or “One less”? Consider the phrase “one fewer thing…

February 2025 updates

Chrome extension that asks you to do exercises Notes on analysis Note: Belief elicitation without verification Note: Are users’ upvotes and downvotes enough to remove duplicate posts? Not quite LLM-based proof checker for codebases

May 2024 updates

New notes: Database query API generation Distributed algorithms Kolmogorov complexity in computational complexity Project ideas Statistics sqlafunccodegen : Generate type-annotated Python functions that wrap PostgreSQL functions

January 2024 updates

Have paper books with no digital version? Get them scanned into a PDF Read the web in simplified English spelling: this Chrome extension translates pages to “Cut Spelling” The ultimate guide to the Canadian accent Find the optimal credit card based on your spending Trivial Paleo recipes for meal replacement powder and dry cereal Alternative to BackgroundTasks in FastAPI

March 2023 updates

New note: Interviewing programmers New note: Problem solving strategy in math and beyond Convert images to the solarized color scheme UNESCO World Heritage Site map Optimal alcohol Search for apartments within walking distance of a location

January 2023 updates

A great idea: let people use your yard as a vegetable garden and receive a percentage of the produce Lifting CrossHair (automatic bug finder) from Python to SQL via SQLGlot Photo gallery: Toronto New note: Global keyboard shortcuts for editing like in emacs, screenshots, and media controls

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?” Algorithm for showing overlapping hints in keyboard-driven browser extensions FastAPI add-on that integrates the dry-python “returns” library Xonsh users can use any-nix-shell to stay in xonsh when running nix shell Kaomoji search engine

"A Man's A Man for A' That" in Modern English

On the occasion of Nima Hoda ’s wedding. Original : Is there for honest Poverty That hings his head, an’ a’ that; The coward slave - we pass him by, We dare be poor for a’ that! For a’ that, an’ a’ that. Our toils obscure an’ a’ that, The rank is but the guinea’s stamp, The Man’s the gowd for a’ that. What though on hamely fare we dine, Wear hodden grey, an’ a that; Gie fools their silks, and…

Short musings

There’s a meta-contrarian idea that the mechanisms of academia exclude some really good science that’s just too unconventional. This is not true to the extent claimed. Computer algebra is useful but discovering new algorithms to automate mathematical work is hard. As Robin Hanson and Steve Levitt say, life is long. There’s lots of time to do lots of different things. Juergen Schmidhuber is right :…

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. Chung-ni [another name for Confucius] once called a boy of ten years of age his instructor; for, of old, even perfect and wise…

Highlights of Canadian geography

Mainland Canada extends south to a latitude found in California There’s a piece of France in between Nova Scotia and Newfoundland Victoria, BC has a “warm-summer Mediterranean climate” like Porto, Portugal and Cape Town, South Africa. Canada’s most picturesque spot is Lake Louise

Mathematics as a service

What would a market for mathematics look like? Formal verification might allow an elegant mechanism: Someone posts a proposition in a formal language like Coq and the first to submit a proof that passes verification wins the bounty. Everything can be automated and maybe even trustless. This has been tried, at proofmarket.org, which was shut down due to consistency bugs in the verifier. Even…

March 2020 links

James I’s 1597 book Daemonologie , “a philosophical dissertation on contemporary necromancy … touches on topics such as werewolves and vampires”. 96.5% of 19-year-old males in Seoul have myopia . List of Scottish Canadians . Free ebook of classic novel plot summaries. “Kime”: complex-valued time .

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.

Comparing cities by climate

We analyze data from https://darksky.net from the last 10 years to compare climates in a selection of North American cities. If we define a “ nice day” as one where there are at least 10 hours of daylight, the high apparent temperature is at least 0°C and at most 30°C, the cloud cover (daily value) is at most 70%, and the UV index (daily value) is at most moderate, we get: City Probability of nice…

Q&A with William Saunders: Preventing AI catastrophes

William Saunders was a fellow Fellow at MIRI in 2016 and now researches AI safety at Ought . Below we go over his 2017 paper “Trial without Error: Towards Safe Reinforcement Learning via Human Intervention” . Q : Say we’re training an autonomous car by running a bunch of practice trips and letting the model learn from experience. For example, to teach safe driving we might input a reward if it…

Whence the English names of countries

Some exonyms : India (Hindustan). Same origin: Sanskrit síndhu (“river”), as in Indus River. Japan (Nihon). Same origin, the English comes via Chinese and Malay. China (Zhongguo). Via Sanskrit possibly from Qin, the westernmost ancient Chinese state. Korea (Hanguk). From Goryeo, a Korean kingdom from 918-1392. Germany (Deutschland). From Latin name Germānī used for tribes east of the Rhine.…

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 . C. Hitchens sometimes just made stuff up. Web…

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. Province 1971 Pop. 2016 Pop. Growth Alberta 1,627,874 4,067,175 150% British Columbia 2,184,621 4,648,055 113% Ontario…

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…

Advice for students

Be challenged. Seek material at the level and pace appropriate for you. Learn with people who aren’t all dumber (or smarter) than you. If you’re motivated to learn or build something, do it. If you’re not motivated, don’t force yourself. Be aware of but not afraid of what you don’t yet know. Some things can’t be learned from textbooks because the textbooks don’t exist, e.g. decision theory. Some…

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

Link: Generated poetry

https://www.reddit.com/user/haikubot-1911/comments/?sort=top Procedure: Search for groups of sentences that form haikus. Syllable counting can be done with pyphen . Format the haiku-valid text into three lines and do capitalization. Post the poems and measure quality with votes.

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. 2. David Starkey - When I hear the word ‘art’, I reach…

Quote: Maud Ray Kent

Paraphrasing from Macrae’s biography of J. von Neumann: In 1940 the Germans captured Denmark plus Niels Bohr. A cable arrived in Britain from Otto Frisch’s aunt in Sweden saying, “Met Niels and [wife] Margarethe recently. Both well but unhappy about events. Please inform Cockroft [British nuclear scientist] and Maud Ray Kent”. Who or what was “Maud Ray Kent”? The British decided it was an anagram…

Classic probability puzzles and their solutions

Envelope paradox 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? Pitfall: Clearly there is no reason to switch (or not to switch) since the envelopes are blank and at no point do…

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…

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,…

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…

Link of the day: Journal of Craptology

http://www.anagram.com/jcrap/ The prestigious Journal of Craptology is an open-access publication in the area of cryptology.

U of Toronto study space info

(a partial list) (Above: U of T cannons pointed at Ryerson) Libraries Robarts Library noise low power plugs yes network access good ergonomics poor busyness busy typical hours 8:30-11 Richard Charles Lee Canada-Hong Kong Library noise low power plugs yes network access good ergonomics poor busyness modest typical hours 10-7 Gerstein Science Information Centre noise low power plugs some network…

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. from functional import seq import markovify import re import tweepy import unidecode To use the Twitter API, we need to authenticate ourselves. Register for your personal keys at https://apps.twitter.com/ and then create a config.json file that…

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: $ node > require('shelljs/global'); {} > pwd() { [String: '/tmp'] stdout: '/tmp', stderr: null, code: 0, cat: [Function: bound ], exec: [Function:…

Modeling aesthetics in mathematics

What exactly is beautiful math? [A]bove all, adepts [of mathematics] find therein delights analogous to those given by painting and music. They admire the delicate harmony of numbers and forms; they marvel when a new discovery opens to them an unexpected perspective; and has not the joy they thus feel the esthetic character, even though the senses take no part therein? Only a privileged few are…

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’. - Platonism, Constructivism, and Computer Proofs…

Link of the day: Learn the Greek alphabet

A handy flashcards web app for memorizing all the Greek letters

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

Status of the day

Wojciech Szpankowski: From Wojciech Szpankowski’s book , drawn by Philippe Jacquet: .

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,…

Quote of the day

Programming wisdom: Someone wrote to me once suggesting that JSLint should give a warning when a case falls through into another case. He pointed out that this is a very common source of errors, and it is a difficult error to see in the code. I answered that that was all true, but that the benefit of compactness obtained by falling through more than compensating for the chance of error. The next…

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?” - Peter…

Some resources for learning Mandarin

(This is an old list from when I was studying it in around 2009.) This is enough to learn how to pronounce Chinese people’s names: https://www.youtube.com/watch?v=b9Ayvjy-Dgs Rocket Chinese Grammar & Culture Series with MegaChinese vocabulary software eChineseLearning newsletter Serge Melnyk’s lessons Rosetta Stone software Conversion tools: Characters -> pinyin: http://translate.google.com…

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…”

Status of the day

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

Status of the day

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

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”.’

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…