Domain Repetition
Tutorials and articles of Inigo Quilez on computer graphics, fractals, math, art, demoscene, shaders and more.
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 2,391 posts.
Tutorials and articles of Inigo Quilez on computer graphics, fractals, math, art, demoscene, shaders and more.
Research in Software Engineering from Rahul Gopinath
My problem is not just with the methods—although I do have problems with the method—but also with the ideology.
Intro I recently worked through a problem from a theory of computation textbook that asked me to prove a property of a language using finite automata. The informal proof is a simple constructive proof where you build an automaton and show that it recognizes the language. This is kind of similar to program…
P(A|B) = [P(A)*P(B|A)]/P(B), all the rest is commentary.
A common example of recursion is the function to calculate the $n$-th Fibonacci number: def naive_fib(n): if n < 2: return n else: return naive_fib(n-1) + naive_fib(n-2) This follows the mathematical definition very closely but it’s performance is terrible: roughly $\mathcal{O}(2^n)$. This is commonly patched up with…
Prime powers have a kinda chaotic pattern in their bits. We bootstrap this idea into a good random number generator, recapitulating history.
Solving systems of linear equations is a staple food of linear algebra. It can be applied as a part of many machine learning tasks, although it is not always...
Claim: as specified, the UTS #35 transliteration-rule language is Turing-complete. This is an exception in Unicode, where algorithms are deliberately bounded and always terminate. The specification defines a revisiting cursor with no rewrite limit. ICU's implementation implements a per-call cap, but the spec itself…
An animated look at local maxima, novelty effects, differentiation, emergent maxima.
In the research field of compression, the usual goal is to achieve the best possible compression rate. The best known algorithms, however, are very slow, and sometimes impractical for real-world ap…
The other day I was amused to find a quote from Einstein , in 1936, about how hard it would be to quantize gravity: “like an attempt to breathe in empty space.” Eight decades later, I think we can still agree that it’s hard.
This is yet another string search algorithm. (Previously my readers have read about Knuth-Morris-Pratt .)
This comes from a question posed to me and others in 2019 by Stefan Langerman, a computational geometer who also happens to be a diamond dealer. The classic ...
Binary search is a workhorse of competitive programming. There are occasional easy problems where binary search is the solution in and of itself; more often, it’s used as a primitive building block…
Motivation I’ve been captivated by the recent movement to popularize mathematics formalization through the Lean theorem prover, and this year I’m diving deeper into learning it. For those unfamiliar with this revolution, I highly recommend watching Kevin Buzzard’s talks on YouTube for an overview of why formal…
This is an example of an image vectorization algorithm. It shows the bilinear interpolation, polynomial approximation, differential analysis, and iterative algorithms working together to solve a practical problem
I’m just going to jump right into the definitions and rigor, so if you haven’t read the previous post motivating the singular value decomposition, go back and do that first. This post will be theorem, proof, algorithm, data. The data set we test on is a thousand-story CNN news data set. All of the data, code, and…
Drawing with the Fourier Series
Psychologically Plausible Deep Learning with Differentiable Tversky Similarity
Over the years, I picked up a number of tricks to optimize code. Today I’ll talk about one of them.
Recently, the formal methods specialist Hillel Wayne posted an interesting article discussing whether Donald Knuth was actually framed when Jon Bentley asked him to demonstrate literate programming . (Knuth came up with an 8-page long monolithic listing, whereas in a critique Doug McIlroy provided a six line shell…
"How two ugly parents (mathematically) can make a beautiful baby"
Learn the meaning behind mathematical symbols used in Machine Learning using your knowledge of Python.
Some friends of mine play the board game Settlers Of Catan . In this game, each player rolls two ordinary dice on their turn, and the number which comes up determines what resources people get for the turn. When a seven is rolled, something special happens: no resources are generated, and instead a robber moves on the…
I have updated this article with new data, better code, and friendlier data visualization. You can read the new version here . Th...
Base changing and other calculations
Regular readers who care about such things — I think there are about three of you — will recall that I have long had a thing about just how unsound many of the claims for the presence of power law distributions in real data are, especially those made by theoretical physicists, who, with some honorable exceptions…