HNHacker News
TopNewBestAskShowJobs

maxiepoo

265 karma · joined February 1, 2014

submissionscomments
maxiepoo··on Worldle
Wouldn't that make countries like the USA and Canada extremely far apart because they are both large countries? The distance you would get is the distance from Hawaii to somewhere on the northeastern edge of Nunavut/Newfoundland/Labrador
maxiepoo··on Topology and Computability
The analogy goes much further if you take it as "open set" =~ "semidecidable property", i.e., you can determine in finite time that something is in the subset, but may not halt on an input that is not in the subset. A closed set is one whose complement is semidecidable, i.e., "co-semidecidable". This gives some intuition to the finite intersection vs arbitrary union property (though in computability you would restrict to a kind of "effective" union, but still one that could be infinite). Then sets that are closed and open are the decidable properties.

Then the inverse-image definition of a continuous function is clearly satisfied by computable functions. A function f : A -> B is continuous if for any semidecidable property O on B, the property { x \in A. f(x) \in O } is semidecidable (since f is a computable function).

There's some very cool ideas here like Hausdorff == Diagonal is closed =~ the equality predicate is co-semidecidable, i.e., you can implement a partial inequality function that always returns true if the inputs are not equal.

See Martín Escardó's work for more details: https://www.cs.bham.ac.uk/~mhe/papers/barbados.pdf

maxiepoo··on Magnus Carlsen retains title after winning lopsided match
I think it's been popularized by the NBA fandom and the incessant Lebron James vs Michael Jordan debates.
maxiepoo··on Magnus Carlsen retains title after winning lopsided match
Eh, Nepo's good record against Magnus comes mostly from when they were both playing in youth tournaments. He hasn't beaten Magnus in many years.
maxiepoo··on Seemingly impossible functional programs (2007)
A mathematician that has only used a type theory like Coq or Agda and never Haskell.
maxiepoo··on Monads and Macros
Exactly, Haskell's "do" notation is essentially defined as a built-in macro, so if you ever want to use "do" notation in a language that doesn't have it built-in you will need to use macros. (Let-binding overloading is essentially do notation in case that's not clear)
maxiepoo··on Can continuation passing style code perform well?
This won't be a very deep answer, but to connect with the original post, programming in CPS is more closely related to delimited continuations than call/cc is because the continuations are just ordinary functions in the host language, unlike call/cc continuations which are a bit more complex.

As for why delimited continuations are not more popular, many people find shift/reset a bit difficult to program with. In particular the type systems for them are a bit odd and some variants like prompt/control don't have nice type systems for them. Currently, the closely related notion of (algebraic) effect handlers is quite popular in the functional language design community as something quite similar in expressive power but more intuitive for programming and with very natural typing. The Koka language has a lot of nice introductory resources if you are interested in learning more: https://github.com/koka-lang/koka . There's even a serious proposal for adding something based on these to webassembly: https://github.com/effect-handlers/wasm-effect-handlers .

maxiepoo··on Don’t Think, Just Defunctionalize
Yes, this is well known, good catch!

If you read McBride's paper "Clowns to the Left of Me, Jokers to the Right" (https://www.cis.upenn.edu/~cis39903/static/clowns.pdf) is exactly about systematically deriving the type of defunctionalized stacks for the fold over an ADT. The ordinary derivative is then the special case where you are just mapping a function that doesn't change the type.

maxiepoo··on Chili pepper consumption associated with 25% reduction in death from any cause
Finally some good news...
maxiepoo··on Contravariant Functors Are Weird
The idea of polarity comes from the category theoretic notion of a universal property. Nice types have introduction and elimination rules but for negative types the introduction rule is "reversible" whereas for positive types the elimination rule is.

As an example, the function type `A -> B` is negative because the function introduction rule

G, x:A |- M : B ---------------- G |- lam x. M : A -> B

is a bijection: the inverse is

G |- N : A -> B ------------------- G , x:A |- N x : B

The beta and eta equations encode exactly the two properties of this being a bijection.

Positive types, like sums/alternatives/coproducts have their elimination rule as their reversible rule, i.e. "pattern matching". So the rule

G , x1 : A1 |- K1 : B G , x2 : A2 |- K2 : B --------------------- G , x : A1 + A1 |- case x of { in1 x1. K1 | n2 x2. K2 }

Has an inverse

G , x : A1 + A2 |- N : B --------------------------- G , x1 : A1 |- N[in1 x1/x] G , x2 : A2 |- N[in2 x2/x]

The reason people say the positive types are "defined in terms of their introduction rules" is that you say "here are all the ways to build a term of this type" (in1 and in2 for sums) and then the elimination rule is exactly "pattern match on all of those possibilities". There is a dual way to think of the negative types which is "here are all the ways to use a term of this type" and the introduction form is a "co-pattern match" where you say "inspect all of the ways I can be used and say what to do in each case".

If you know about category theory then the idea is that some types are defined by representing a functor C -> Set (positives) and others by representing a functor C^op -> Set (negatives).

Variance is I would say is an orthogonal concept, except that the only primitive contravariant type former in lambda calculus is function which is negative.

maxiepoo··on The Pandemic-Era Appeal of Labyrinths
These pictures, especially the second one, really remind me of Jonathan Blow's puzzle game "The Witness" which I highly recommend. Very appropriate since part of the game is predicated on how playing all of these abstract puzzles warps your perception of the world around you.
maxiepoo··on Ask HN: Which book helped you understand the world?
The Power Broker: Robert Moses and the Fall of New York by Robert Caro. Enormous and incredibly informative about politics, city planning and public relations.
maxiepoo··on Roger Penrose – Is Mathematics Invented or Discovered? [video]
I think you and OP are talking about different things because the term "intuitionist" has been used for both the philosophy that EJ Brouwer espoused (which matches what OP said) and the large field of constructive mathematics that has been greatly influenced by Brouwer's philosophy but has embraced approaches like formal logic which Brouwer himself disliked.
maxiepoo··on Science Vigilante Calls Out Bogus Results in Prestigious Journals
It seems the consequences of 'Sokal Squared' are because the papers contained falsified data, which is very different from what Dr. Bik is doing here.
maxiepoo··on Why Continuations Are Coming to Java
By one-shot you mean dynamically enforced, right? I.e. if you invoke it a second time it will raise an exception?
maxiepoo··on Foundations of Mathematics (2015) [pdf]
Constructive mathematics is alive and well for 2 reasons.

1. The type theorists/homotopy theorists that are exploring homotopy/cubical type theory as a foundational approach.

2. The objective fact that in general the internal language of a topos (in general) does not validate the law of excluded middle or the axiom of choice. This means that if you prove a result while using constructive logic you can apply it to a broader class of models than classical logic. This viewpoint of logic makes the whole "argument" between constructive and classical logic seem very silly: it's like arguing whether or not it is "true" that groups are abelian. Some are and some aren't!

Intuisionism as in Brouwerian intuitionism with choice sequences etc that disprove LEM is still a niche subject, especially foundationally but is still being explored, with the help of understanding of sheaf models that allow it to be studied from a classical perspective.

maxiepoo··on Go is Google's language, not ours
The "motto" (if it can be called that) is not "avoid success", it's "avoid 'success at all costs'" which makes the sentiment clearer: increasing adoption should never be a priority over principled design.
maxiepoo··on Racket 7.3
Just to make it clear, the authors of that paper (including myself) are all to some extent Racket developers. Some big improvements have been made but there are still pathological cases. For the latest published on this see this paper: http://users.cs.northwestern.edu/~robby/pubs/papers/oopsla20...

But also it's important to note that it's not Typed Racket or Racket in isolation that are slow, but the inter-mingling of the two due to contract overhead.

maxiepoo··on A proof that Unix utility sed is Turing complete
I highly doubt that you can get a paper at any respectable conference or journal showing something is Turing Complete.
maxiepoo··on Some Fundamental Theorems in Mathematics
The Topos theory example is completely wrong though? > For example, if E is the topos of sets, then the slice category is the category of pointed sets: the objects are then sets together with a function selecting a point as a “base point”.

There's no object X where E/X is pointed sets. If you take the co-slice of a one point set 1\E that would be the category of pointed sets.

The right way to think about E/X is that its objects are "families of sets indexed by X", because a function f : Y -> X defines for each x in X a set f^{-1}(x). If you know about dependent types, this is basically a type dependent on X.

maxiepoo··on Racket v7.2
Really? Then as written it's very misleading "led to some bug fixes in Racket’s implementation of letrec and set!."
maxiepoo··on Brouwer–Hilbert controversy
Removing an unnecessary dependency is a good analogy. From a Curry-Howard perspective, intuitionistic proofs correspond to programs without side-effects, and classical proofs correspond to programs that can use continuation effects (for the unfamiliar think of a more principled version of GOTO), so in a real sense intuitionistic proofs are more direct. The double-negation translation then corresponds to implementing continuations in a pure language using continuation-passing style.

This also says why classical logic can still be useful: if I'm going to use continuations all the time, it's nicer to program with a language that supports them than to explicitly program in CPS. Pick the right language/logic for the task at hand!

maxiepoo··on ReasonML – React as first intended
Does ReasonML have ML's nice module/functor system? That would be a huge advantage over elm.
maxiepoo··on Gradual Typing [for category theorists]
Ah whoops, I meant to say that the definitions of most of the casts are uniquely determined by soundness (i.e. beta, eta) and graduality (i.e. being an equipment).
maxiepoo··on Gradual Typing [for category theorists]
Author of the blog post here. This is a great overview of internal categories and profunctors.

A couple comments 1. I would say the primary application is to proving that certain casts (function cast, etc.) are the primary result of the paper. We basically showed that graduality + extensionality determines almost all of the behavior of casts. 2. Exception handling for type errors is actually in direct conflict with graduality. The reason is that the type error is the least element and every term has to be monotone with respect to the type error, so if you catch a type error, to be monotone you have to show that the result you produce is less dynamic than the result you would have produced if there was no exception. This means that if you want to catch type errors you need to have a fancy catch form, or you need to do it at an "extra-linguistic" level, or you can use modal types (think monads) to say that catching a type error is a "reflective" operation and so any code that does it is uses the reflection modality.

Also as a side-note, in my opinion profunctors are an essential component of category theory, and it's really a shame that in intro courses we explain everything in terms of adjunctions, limits, presheaves, etc when profunctors are ultimately simpler. They are unavoidable when you do enriched/internal category theory and they are more directly useful in designing type theories than adjunctions.

maxiepoo··on Pyrofex
Maybe but this is a mathematician's blog, so perhaps you are not the intended audience.
maxiepoo··on Writing Complex Macros in Rust: Reverse Polish Notation
Yes: http://calculist.org/blog/2012/04/17/homoiconicity-isnt-the-...
maxiepoo··on Ask HN: What's the most underrated programming language?
Where are you from that this is true? England? I think very few universities in the USA use Haskell in intro classes.
maxiepoo··on Magic: The Gathering Is Turing Complete (2012)
As someone that does not understand the rules of Magic, how do they get around the fact that a Turing machine requires infinite memory? Presumably a particular game of Magic has a finite set of cards and probably states too?
maxiepoo··on How a destructive idea paved the way for modern math
Yeah this kind of nullifies the pull quote

> If Newton had known about such functions, he would have never created calculus.

since Newton did use infinitesimals in his reasoning.

← PreviousPage 2 of 4Next →