HNHacker News
TopNewBestAskShowJobs

mtzet

521 karma · joined November 25, 2016

submissionscomments
mtzet··on John Carmack on Inlined Code (2014)
> Inlining functions is not a readability thing.

Inlining for readability is precisely what the linked article is about.

mtzet··on Why MIT uses Python instead of Scheme for its undergraduate CS program (2009)
I think both C, Python and Scheme are all perfectly fine choices for a first language. It really depends on what you want to do.

Want to learn how a computer works? Learn C.

Want to study abstract comp-sci concepts? Learn Scheme.

Want to wire together libraries to get something running in the messy real world? Learn Python (or something similiar).

A well-rounded CS education really ought to include all of these to at least some degree.

mtzet··on Mathematician-M.D. claims to have solved the 110-year-old Lindelöf hypothesis
While I agree that a proof of the Riemann hypothesis is unlikely to matter for cryptographical purposes, neither does the AKS primality test. As with many asymptotically efficient algorithms, the constants are simply too large for it to be practical.
mtzet··on Fractions in the Farey Sequences and the Stern-Brocot Tree
Not a very pretty website, but certainly a pretty subject!

This really is the best way of explaining where continued fractions come from. The fact that convergents of the continued fraction provide the best rational approximation always seemed mysterious to me in the classical exposition, but it is almost obvious when explained through the Stern-Brocot tree.

mtzet··on Literate Devops with Emacs Org-Mode (2014)
I'll second the chunking feature. Magit is very good at staging and unstaging files and PARTS of a file. I don't know any good way of doing this on the command line.
mtzet··on Lessons I Wish I Had Learned Before Teaching Differential Equations (1997) [pdf]
> We can use complex numbers to describe a 2-dimensional number-space with a single digit. How do we describe a 3-dimensional number-space with a single digit? What about higher dimensional number-space?

The complex numbers equips the vector space of 2-dimensional real numbers with a multiplication. This structure is known as an algebra.

The analogue for 4 dimensions is the Quaternion Algebra, which is no longer commutative (i.e. a * b != b * a). The elements of unit length correspond (essentially) to rotations in 3 dimensions and they are used for this in e.g. computer graphics.

The analogue for 8 dimensions is the Octonions which are no longer associative (i.e. (a * b) * c != a * (b * c)). The construction can be continued with a doubling of the dimension through the Cayley-Dickson construction, however these higher dimensional versions are even worse.

It is not possible to associate a multiplication to 3-dimensional real space which makes it an algebra. This fact is related to the classification of exceptional Lie groups. The reason is roughly that the units in an algebra form a group, but the 2-sphere is not a Lie group.

mtzet··on 24/192 Music Downloads Are Very Silly Indeed (2012)
I've noticed the same thing with LP's. While LP's are technically inferior to red book CD's, they're often mastered better.
mtzet··on Ask HN: What maths are critical to pursuing ML/AI?
Honestly, I don't think having to learn some stuff before starting anything is nessecary, especially for learning a field as wide as ML/AI. It's much better to start out trying to learning something you're interested in, and then trying to fill in the gaps. This will also help you understand and motivate the underlying theory you're reading.

So for example, start with some source in ML/AI you'd like to read. If you get stuck, ask somewhere (possibly an online forum like this) what field you're having trouble with and how to get started there.

mtzet··on Ask HN: What maths are critical to pursuing ML/AI?
The relationship is that measure theory provides the theoretical framework for making probability theory rigorous.

The only formal prerequisite for learning measure theory is that you should know series and sequences. For a reference, I'm not so sure, maybe Halmos's book. The important parts are probably:

- Monotone convergence theorem

- Dominated convergence theorem

- The construction of the Lebesgue integral

- Fubini's theorem and Tonelli's theorem

I would probably try not to get bogged down in details of construction of measures (unless you like that) and take the Lebesgue measure (essentially length) as given. Also check out the Radon-Nikodym theorem which states that we can always (ish) work with density functions.

mtzet··on Lessons learned teaching data analysis with Python
As a rookie trying to get into the field myself, I think there are quite a few ways to start about it.

The programming part with R, python, julia etc., seems to get the most attention here. I think the most important part here is to learn how to load datasets into your system of choice and work with them to get some nice plots out. The book "R for data science"[1] seems like a good intro for this with R and tidyverse.

Somewhat more overlooked here, are the statistical models. I second the recommendation of "Introduction to Statistical Learning"[2], possibly supplemented with it's big brother "Elements of Statistical Learning"[3] if you're more mathematically inclined and want more details. I like their emphasis on starting with simple models and working your way up. I also found their discussion on how to go from data to a mathematical model very lucid.

[1] http://r4ds.had.co.nz/

[2] http://www-bcf.usc.edu/~gareth/ISL/

[3] http://web.stanford.edu/~hastie/ElemStatLearn/

mtzet··on What Is Mathematics and What Should It Be? [pdf]
Even if the world is fundamentally discrete, that does not mean that continuous models are not valuable. They are.

We are used to doing discrete approximations to continuous problems, but the other way around works too. For example, evaluating the sum

1 + 1/4 + ... + 1/n^2

is quite hard. On the other hand, we may approximate by the integral over x^2, which remarkably has an easy formula.

Continuous and discrete models complements each other, they are not mutually exlusive.

mtzet··on Towards a Better Notation for Mathematics (2010) [pdf]
Mathematician here. There is a sentiment here, that seems to be that the hard part of mathematics is in the notation, and that this could be solved by just implementing all mathematics in a programming language. I quite disagree. I believe that mathematics is hard, because explaining ideas is hard. Additionally, it is quite possible to state and prove an important theorem, without at all explaining where this theorem comes from, why it is important and how on earth you might ever cook up something like this. (In fact, I think there is a very great lack of good mathematical resources, even in pure mathematics).

With regards to notation and mathematical writing in general, the problem is that it is never explicitly taught. Too many students of mathematics never learn to properly structure sentences in mathematics. In studying programming languages, you have no choice but to understand the structure explicitly. I do think mathematics has all the features you mention, it's just not explicit.

> Variable Scope. In mathematical writing, the convention is that every variable is a global variable - and in a paper you quicky run out of variable names to use.

Variables usually have local scope. In a mathematical statement like "for a continuous function f ...", the letter f is not defined after the sentence ends. Another common way to "initialize" variables is by statements like "Let f be a continuous function", and while it is true that it is never formally cleared, it is reintroduced when needed in another context. In some rare cases, you might start a chapter with "In this chapter, we let $H$ denote a fixed Hilbert space...", which is the mathematical equivalent to a global variable.

> Strict Typing. You skim a paper, and you see "x + y". But what is x? a matrix, a vector, a scalar, an operator, a set, a random variable, you have no idea. The "+" operator is so overloaded x and y could be anything.

I don't understand how programming languages are different here. Most modern programming languages also have operator overloading or polymorphism which has precisely this problem. Do you prefer C-style add_object_of_type_T(x, y)?

> Having to hunt down the definitions for every variable is a time consuming and frankly wasteful process. Conventions are built up around this (upper case letters A,B at the beginning of the alphabet are matrices, but upper case letters at the end X,Y are random variables) but they are mostly rater silly. There needs to be an easy way to infer the type of a variable quickly.

The common convention is to introduce variables just before you use them. That's as I would do it in a programming language? You seem to desire an IDE for mathematics, so that I could ctrl-click any variable to the definition. Though I have to say, if that's such a problem, the paper is probably horribly structured.

I don't understand your problem with conventions. Conventions are suggestive, to help you remember the definition, it's much in the same way we choose suggestive variable names in programming languages.

> Anonymous Objects. There is no way to declare a function without either giving a name to it (f(x) = x^2) or at least declaring its input symbols (x |=> x^2). But you can't go, say (x |=> x^2)(y).

Sure you could write (x |-> x^2)(y), you're allowed to introduce any notation you like. But why wouldn't you just write that expression as y^2?

You could declare a function as "the function which ...", which doesn't give it a name. If you want a symbolic expression, I'm not sure how you would do that without declaring any input symbols.

mtzet··on The electric car has dropped out of favor in Denmark
> Pollution created by making a car

And yet, the tax is not specifically on the pollution. You could argue that this might be difficult to do in practice, but in any case such a pollution tax ought to also apply to other products like computers and TV's, which it doesn't.

The problem with a flat tax, is that it doesn't discourage anything other than buying a nice car. In general, an expensive car is not worse for the environment (including parking etc), than a cheap car. A large, bulky car might be that, but that's not what we're taxing here.

mtzet··on Why squared error? (2014)
> Gauss quite openly admitted that the choice was borne out of convenience.

That's quite interesting. Do you have a reference for that?

From my understanding, the popularity of the least squares method came (at least in part) from Gauss' successful prediction of the position of Ceres. Was this just because people not using least squares were not able to calculate it?

← PreviousPage 4 of 4