Live data from Hacker News

The Mathematical Hacker (2012)

evanmiller.org

101–110 of 186 posts

Re: The Mathematical Hacker (2012)

#101
post #60

Earlier quoted context omitted.

I think the math you've been exposed to is mostly on the computational side (compute an integral, solve an equation, etc). Much (most?) of math is quite different from it. Proving that there is a well ordering of the reals, and simultaneously proving that it is impossible to show you such an ordering: Very different from skills needed in programming.

I disagree. You’re only able to prove that ordering of the reals (and that it’s impossible to show) because you are computing the abstract structure underlying the reals (which is based on some lower level ideas etc.) Just because a problem is computationally hard with a step by step CPU doesn’t mean it isn’t computation. This is actually a problem of interest to me, so I’ve definitely been exposed to it and the limi…

> You’re only able to prove that ordering of the reals (and that it’s impossible to show) because you are computing the abstract structure underlying the reals (which is based on some lower level ideas etc.) Just because a problem is computationally hard with a step by step CPU doesn’t mean it isn’t computation.

The set of computable real numbers is countable and thus has measure zero. In other words, almost all real numbers are non-computable, and almost all has an exact definition.

So you can’t compute the real numbers unless you’re meaning something else by computing.

Re: The Mathematical Hacker (2012)

#102
I basically hate math discussions on HN. Why? Because it seems like there's two (at least) "camps" in terms of how they interpret what "math" even means. And the various camps constantly talk around each other, with neither camp seeming to realize that they're arguing about completely different things. So they keep arguing, nobody gets anywhere, and the whole thing is largely a cluster-fuck.

So what do I mean by "camps"? Well, the most obvious dividing line is between people who see "math" as something that everybody does, and that includes everything from elementary school addition up to, well whatever, and has a primary goal of computing something. Then you get the camp who see "math" as the exclusive domain of mathematicians, look down on any maths class at a level lower than abstract algebra or real analysis, and consider the primary goal of math to be more math (eg, proving things that we didn't already consider proven). And the latter often tend to look down their noses at anybody who dares talk about "learning math" but without a goal of becoming a mathematician.

sigh

My position is that "math" includes both of those notions, and that in most conversational contexts you have to explicitly define which one you are talking about up front in order to have even a chance at a productive conversation.

Re: The Mathematical Hacker (2012)

#103
post #90

Earlier quoted context omitted.

>> What I did say is that writing down mathematics is equivalent to writing software. > It is not. That is plainly false. Whether the two look the same or not, maths and computer programs are in fact fundamentally isomorphic. [1] [1] https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...

>isomorphic Certainly not every computation is a proof. What statement does: void f(){ printf("?"); } prove?

It probably doesn't prove anything more than ∫₀¹ x dx.

Also, just like there are trivial, incorrect or incomplete proofs, there can be trivial, incorrect or incomplete programs.

Re: The Mathematical Hacker (2012)

#104
post #87
post #24

Earlier quoted context omitted.

I think the author is making two points among others: 1. LISP based text/books always present the same two cliche examples 2. They never go beyond (1) given how much they talk about recursion. He mentions sqrt of 5 in the explicit formula of Fibonacci sequence and how that could be explored in more detail to find out where that comes from. For that you need to know [0]. That's part of a larger suit of theorems on seq…

I see someone disagreed with me. Not sure about what, but just in case I will show how to derive a formula for Fibonacci using the above. You be the judge if it belongs in a LISP programming textbook, even though this particular result is very elementary. Recurrence relation for Fibonacci is F_k = F_(k-1) + F_(k-2) for k=> 2 with F_0 = F_1 = 1. Also, t^2 - t - 1 = 0 implies t = (1 + sqrt(5))/2, (1 - sqrt(5))/2. Both…

I don't think anyone finds recurrence relations, closed form expressions, or their derivation controversial or disagreeable in any way.

On the other hand, the implication that Lisp textbooks -- or other language texts that use fibonacci or like examples for recursion examples -- shouldn't be using simple recursive definitions as an illustration if there exists a closed form may well raise some eyebrows. What do you want, Collatz Sequences? Additionally, there's an air of attacking the sophistication of devs who choose Lisp specifically, which is the kind of thing that people frequently do find disagreeable (even if there's a reasonable case for it).

Fibonacci and other linear recurrence relations are used because they're simple and often familiar intros that can help conceptualize the way recursion can reduce problems to smaller versions of themselves (which is very much mathematical thinking). They're not there because they represent limits of how Lisp devs generally do or should think.

Re: The Mathematical Hacker (2012)

#105

Earlier quoted context omitted.

What do you mean by “learning Mathematics?” It should be notes that significantly less than 50% of the US population even has to learn calculus so getting into the stuff that most people would consider pretty advanced is not so hard, right? I’d be curious what people’s coolest math tricks are that they’ve used at work. I did like one Taylor Series expansion and felt cool for a week.

You are right about the 50% but you might as well have said “fewer than 99%”. I mean, the real number is far, far less. A very small percentage of US residents would recognize and calculus or be able to solve a simple linear equation.

Apparently around 15% of highschoolers take calculus. I dunno, I think “significantly less than 50%” has a generally right-ish feeling, sort of like, something that most people don’t do but not like super-esoteric. But it is subjective.

https://www.edweek.org/teaching-learning/calculus-is-the-pea...

It is possible that the majority of students forget it though, I tutored calculus for a bit and it didn’t always seem like their hearts were in it.

Re: The Mathematical Hacker (2012)

#106
Mathematics is different from programming as an activity and ontologically.

Activity-wise, mathematics is about intuiting and proving theorems to progress the frontier of knowledge about abstract mathematical objects (groups, probability distributions, triangles, matrices, knots, ...) and their interconnections. This has little to do with programming, but proofs by mathematical induction (German "vollständige Induktion" = "complete(d) induction"), which is actually - like all mathematics - a deductive method, can be better understood after understanding recursion and loops. It is also very hard.

Ontologically, for instance, "x = y" in mathematics means "the unknown value x equals the value y", and that is true always, at any time (until the context changes from one theorem/proof to another, when x and y may be 'recycled' without saying it explicitly). In contrast, "x = y" in (e.g. Python) programming means, "look up the value stored in the memory location labeled y and copy that value to the memory location labeled x." This is rarely said in textbooks and tutorials, so I tend to make a point of stressing this when teaching programming, in particular to non-computer scientists.

What the OP refers to is perhaps more applied mathematics than mathematics, though: using mathematics as a modeling tool.

I like the OP, but what is missing from it is the recognition that a lot of what he talks about is already happening in machine learning: any machine learning is mathematically a numeric optimization process, so all these tools like Tensorflow or PyTorch under the hood use what the OP calls "FORTRAN" way, often implemented in C++ and sometimes actual battle-tested FORTRAN libraries (e.g. via NumPy https://numpy.org/doc/stable/user/building.html#accelerated-...).

Re: The Mathematical Hacker (2012)

#107
post #42
post #22

Earlier quoted context omitted.

I think Yegge is actually completely correct. I started to learn to program when I was 14, and once I understood the concept of functions, I found it much easier to do my calculus and physics work. Fundamentally I understood how to break things down into computable steps. Granted, I think get the impression we might be overloading the term "mathematics".

Mathematics is not just functions and calculus. And it seems to me that you learned the concept of functions through programming first but that there's not evidence that you couldn't have learned it from mathematics at first. Functions are a pretty easy concept, so I think it's pretty easy to introduce it from a variety of points of view. So I'm not sure the anecdote backs up any argument about learning programming m…

Always wonder about this. Other than foundation of maths, the function abd calculus view … my wonder is about the data part of the maths. Not the process. Yes one can view matrix as a function but could it be data. One can real number line, complex or integer as data?

Re: The Mathematical Hacker (2012)

#108
post #78

Earlier quoted context omitted.

Math hard. Can confirm. Starwind have math degree. Starwind much better at programming than Starwind ever was at math.

I spend 5 years doing mathematics and still can't wrap my head around lot of maths. If you really want to see the difficulty in Computer science you'll have to go explore the theoretical stuff which at the end is just maths.

Same here, I remember putting so much effort into a course on Riemannian geometry and still not really fully grasping the content on an intuitive level. That was by far the hardest thing I've ever tried to learn.

The only areas in CS that come close to that in terms of difficulty are discrete math/algorithms related ones and the CS chairs that are involved in such research also tend more towards the applied side of those topics. Really theoretical discrete math stuff resides in math departments most of the time.

Still, having also taken some discrete math classes, in terms of difficulty those somewhat paled in comparison to differential geometry/topology/abstract algebra kind of stuff. I can't even imagine how difficult it must be to be doing research in those areas.

Re: The Mathematical Hacker (2012)

#109
Yes, the numeric language does numeric things. But these examples of closed form solutions ignore that numbers on computers are not the usual mathematical objects, rather having finite size and precision, and so it is hard to say immediately if these solutions using floating-point arithmetic provide the same precision. Of course the precision can be calculated and improved with analysis, still, but this falls under "it doesn't work but it's fast" territory (unless the limited precision is acceptable; I'd personally keep the result as a float then to expose that to the client of these functions).

I would be remiss not to mention the following story:

There is a story that Ken Iverson, the inventor of APL, was passing a terminal at which a Fortran programmer had just typed:

    I = I+1 
Ken paused for a moment, muttered “no it doesn’t”, and passed on.

Re: The Mathematical Hacker (2012)

#110
post #53
post #9

In Steve Yegge’s linked post: > Math is a lot easier to pick up after you know how to program. In fact, if you're a halfway decent programmer, you'll find it's almost a snap. This couldn’t be more wrong. Mathematics is the hardest thing I have ever done. I’m sorry, but mathematics is orders of magnitude more intensive and difficult than most programming. A simple fact that shows this is the amount of programmers who…

> mathematics is orders of magnitude more intensive and difficult than most programming But what level of programming and mathematics are you comparing here though? because college-level algebra and calculus is really not that hard imho (once it "clicks" for you, but it's the same for programming), and if we are comparing math as in what you see in a BSc/Msc of Mathematics (or research-level) then I agree it's hard b…

Calculus is significant more difficult and requires many Times more studying than algebra
Post reply on HN