Live data from Hacker News

Translating math into code with examples in Java, Racket, Haskell, Python (2011)

matt.might.net

91–95 of 95 posts

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#91
post #83

Earlier quoted context omitted.

>infinity itself is something that cannot be embedded in a finite program I am not sure what you mean by infinity here, but there are many ways in programming to handle infinite streams in an otherwise finite program. Python's itrrtools.count and the ability to map and filter over it would be a basic example. Indeed I could argue that every game's or webserver's event loop is embedding infinity in a finite program.

What you are describing is a potential infinity. I'm talking about an actual infinity.

How is ∞ more "actual" than Python's itertools.count or float('inf') ?

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#92
post #57

Earlier quoted context omitted.

Don't forget the Internet Archive! The first version is from Nov. 14: https://web.archive.org/web/20111114185849/http://matt.might... The article index from Nov. 8 does not include the article: https://web.archive.org/web/20111108003034/http://matt.might... So we can say with confidence that this should have a [2011] tag and was published sometime Nov 8 - Nov 14 in 2011.

It's frustrating when Internet articles don't include publication dates. It's not like it's paper where someone didn't think to record the date. The date certainly exists in the database, filesystem, etc, the author just chooses not to show it, forcing forensics to figure out when it's from. (I was reading another article from his site yesterday after it was linked on lobste.rs and was also trying to figure out how o…

Why would the date "certainly" exist in the database or filesystem? The file might be one file created in 2001 and modified every date after containing every post in it like a mail spool file. It might be a record in a database table with no date column. If it was a single file, then the creation time could be weeks or months before the publication time, and the modification time could be the last time an edit or tweak was made, rendering both useless for this purpose. I think it's more likely not to have a useful date anywhere unless someone went out of their way to put one in.

(Which they should do, it's useful)

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#93
post #80

Earlier quoted context omitted.

Yes, well said. Math is not any form of programming, and programming is not math. Studying the relations between the two can be very helpful, and the difference itself is interesting. One may have specific reasons to us FP to cleanly decouple from certain kinds of side-effects, but there’s nothing un-mathy about mutability, and there are times when it’s a fine choice.

I mean, that’s exactly what the Curry-Howard Isomorphism says: that math and programming are equivalent. Both can express and are equivalent to Turing machines.

That is not what the Curry-Howard Isomorphism -- AKA propositions-as-types -- says. Propositions-as-types is the observation that the typing rules of certain type systems follow the inference rules of certain logics (largely because they were designed this way), and that in general typing rules and inference rules can be made to mimic one another, so that a type system can represent propositions in some logic, and type checking represent proof-checking.

That arbitrary mathematical proofs can be equivalently made by Turing machines (and conversely, that predicate calculus is Turing complete) is a lemma by Turing, published in the same 1936 paper in which he introduced the notion of computation, Turing machines and proved what today is known as the halting problem.

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#94
post #83

Earlier quoted context omitted.

What you are describing is a potential infinity. I'm talking about an actual infinity.

How is ∞ more "actual" than Python's itertools.count or float('inf') ?

The symbol is not an actual infinity. The abstract concept we access with our minds is an actual infinity. That's the point. The abstract principle cannot itself be embedded in a program or symbol. All we can do is describe it with rules we infer from observing it. Like a painting of a tree will never be the tree itself, and we will not be able to infer everything about the tree just by looking at the painting.

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#95

Earlier quoted context omitted.

Most of the structuring (and, therefore, syntax) around an 'enterprise' application, is about how easy it is to 'replace'/'change' functions based on future needs (or known, but yet un-realized requirements). In mathematics, the driver for notation is: how succinctly can I express, what I want to express in this particular effort, yet allowing others to verify my work without mis-interpretation. I am not sure if thos…

> As I progress (perhaps, already at a sunset) of my career, I can see that lack of fluency in mathematics (both algebra and analysis) is a major impediment for transition into more highly compensated (and impactful) , yet, still technical roles for many of us, out there. Do you have an example off the top of your head? I'm assuming that by, "fluency in mathematics (both algebra and analysis)", you mean something bey…

I would outline 3 areas:

1) Modeling capacity/latency of complex system with queuing theory (basically creating spreadsheets that can 'calculate' how much servers you need with what I/O throughput/etc for our software)

2) When looking at tables in data-warehouse, as 'types' -- I felt I could benefit from leveraging modern type theory, where I could at least categorize schemas (filds/relations) into 'Automatically-transformable into target warehouse schema' vs 'human intervention is needed'.

Besides natural complexity, the papers in type theory use that fraction notation :-). For some reason difficult for me.

3) Various data de-anonymization proofing techniques, differential crypto, and tamper-proof logging.

Ability to read financial mathematics and NLP technique is something I do not need now, but I would have benefitted significantly in my past.

Post reply on HN