I was sharing an office a few floors down with Roko of Basilisk fame, who was the category theory guy. He thought about it for a few minutes and then took us through the proof on the board.
405 karma · joined December 11, 2018
I was sharing an office a few floors down with Roko of Basilisk fame, who was the category theory guy. He thought about it for a few minutes and then took us through the proof on the board.
I will note that setting a - b = 0 for a <= b is pretty standard, and is often called "partial subtraction."
The theorem prover HOL Light is a close cousin of Isabelle/HOL and doesn't adopt this, and just says that x/0 is some unspecified number. You can't prove much interesting about it. You can prove, say, that x/0 * 0 = 0, but you can't prove whether or not x/0 is, say, positive or not.
If you prefer null, there was a logic that allowed for undefined terms and partial functions that became the basis of the IMPS theorem prover. I found it most notable for the fact that it doesn't have reflexivity of equality: 1/0 = 1/0 is false in IMPS.
Functions in these logics are total, so if you want division to be a function (and you probably do), it has to assign something to division by 0.
It would be acceptable to assign an unspecified object from the domain, for which you have no non-trivial theorems, and so all your real theorems must have a precondition about the denominator being non-zero. But if you specify a candidate like 0, you can get some theorems which don't have the precondition. Consider:
a/b * c/d = ac/bd.
This now holds even if one of b or d is 0.
The first time I heard about fingerprinting was with EFF's panoptoclick, which stated how many hashes had been generated from visitors, and how many you shared with them.
The worry would be that the hash is unique to me (i.e. a fingerprint), but I don't see the evidence that it is.
I mean, OCaml's autoformatter just autoformats arbitrary Ocaml files. How do you blow that out of the water?
You'll still want dune, though I could see an argument for generating the dune files from nix expressions.
If you can only optimise calls to yourself, you have a very limited form of tail call optimisation. It's an important point in the context of Scheme, where they made a big deal out of experimenting with continuation passing style. In CPS, all function calls are tail calls, and you want to optimise them all, even though most are not recursive.
The actual quote that monads are monoids in the category of endofunctors comes from MacLane, and is intended for mathematicians.
It gets better. Since 4.08, the preference would be `let*`.
If you're talking about Haskell, you should be talking about folk who write template Haskell, which is the macro system for GHC. There are plenty of Haskell programmers who know how to write Template Haskell, and there are plenty of Haskell programmers who don't. By contrast, I don't think there's a single Lisp programmer who can't write Lisp macros.
That's homoiconicity. Once you learn Lisp, you automatically know how to write Lisp macros. Once you learn Haskell (or Ocaml or Rust), you don't automatically know how to write macros in that language (and the macro system may not even be portable across compilers).
Well, there's Haskell, and I expect any Haskell programmer to be able to pick up Nix very quickly.
Guix has gone with a strict language, Scheme, but I understand they have their own monadic DSL to cope with the peculiarities of following the Nix model. So again, not something that a mainstream language can do well, and even as a Schemer, you're going to have to learn their macro language.
The latest release has included "flakes", promoted from an add-on to an opt-in feature and which, among other things, lets me pin my dependencies and the environment I need to build my private projects. I then don't have to worry about going out of sync with the main package set, and I can share private projects in a (hopefully) fully reproducible way, with people using different versions of nix.