News for hackers. Stuff that matters.
Re:The Future of Computing: Logic or Biology (2003) [pdf] by nabla9 on Wednesday July 04, 2018 @01:00PM (#17458254)
Another way software is similar to biology and physical systems is leaky abstraction.

Once you define something in mathematics, how you defined it does not matter. You can forget all irrelevant details. In the software irrelevant minute details make systems incompatible.

As an example, Norbert Wiener defined ordered pair as:

    (a,b) :=  {{{a}, Ø},{{b}}}
Hausdorff defined it as:

    (a,b) := {{a,1},{b,2}}, where 1 and 2 are two distinct objects different from a and b
Kuratowski's definition

    (a,b) := {{a}, {a,b}}
.. and there are many other definitions and variations, but still we have only one mathematics not many incompatible ones. Some mathematicians restrict them to subsets, but they don't create incompatible mathematics.

If you do something similar in programming languages, you get two different structures you can't use interchangeably without transformation (it incompatibility starts from little endian vs big endian and ending ends with vi vs emacs).

Re:The Future of Computing: Logic or Biology (2003) [pdf] by theaeolist on Wednesday July 04, 2018 @04:12PM (#17459228)
That is because mathematics tolerates informal proofs. Try to do formal mathematics (Coq, Agda, Isabelle/HOL, etc) and you will immediately see that it is not the case that {{a,1},{b,2}} = {{a},{a,b}}. Different definitions of "the same thing" are not "equal" but "isomorphic", and the isomorphisms are a bureaucracy that cannot be ignored -- unless you are doing regular, that is informal, mathematics and all this isomorphism business is just too tedious and 'obvious'.

The problem with programming is that it is always fully formal. It may be lacking in rigour, but it is formal nevertheless. A compiler cannot process informal code (syntactically or semantically) and there is nothing it can classify as "obvious". Hence you need to spell everything out.

Mathematics is like programming in pseudocode, that's why it's so neat.

Re:The Future of Computing: Logic or Biology (2003) [pdf] by gnulinux on Thursday July 05, 2018 @11:14PM (#17468597)
> you will immediately see that it is not the case that {{a,1},{b,2}} = {{a},{a,b}}.

This is true for the examples you gave i.e. Agda and Coq but this is not a theoretical restriction. As long as you can formalize equality with something like axiom of univalence, you can prove similar things (e.g. forall x, f(x) = g(x) => f=g which gives interesting applications like mergeSort = quickSort). Proving univalence constructively is pretty hard, but it's at least partially solved, e.g. cubic type theory can constructively prove univalence. Agda has a branch that has cubic type theory implemented, if you want to check it out. There is also an "official" implementation of cubic type theory by the team who wrote the original paper but it's a pretty lean programming language without even unification.

Re:The Future of Computing: Logic or Biology (2003) [pdf] by smilliken on Wednesday July 04, 2018 @02:14PM (#17458671)
It certainly feels like mathematics is better about leaky abstractions. It gets a lot more slack though because it's interpreted by mathematicians which can plug the leaks.

For example, there's multiple formal definitions of integrals. They aren't strictly equivalent! But when we calculate an integral, we don't concern ourselves with the differences unless they are relevant.

Re:The Future of Computing: Logic or Biology (2003) [pdf] by notduncansmith on Wednesday July 04, 2018 @03:30PM (#17459027)
This distinction seems false. You internally apply a compatibility layer, transforming for interchangeability and caching your computed equivalences. The same is frequently done in software.