Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tel
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
37 ms
·
361.
▲
by
tel
8y ago
This is pretty common in Haskell using the "recursion schemes" technique. The idea is to note that any recursive data type can be constructed by laying many "layers" down. For instance data Json = Str String
362.
▲
by
tel
8y ago
Here's a link to a bit of a plot gallery: https://cibotech.github.io/evilplot/plot-catalog.html
363.
▲
by
tel
8y ago
I'm not arguing that unions aren't a good choice for Typescript with its given aim to stay close to normal JS semantics. These choices make it difficult to abstract in raw JS as well (see all the Promises-aren't-monads noise)
364.
▲
by
tel
8y ago
You can encode sums using unions as you note, but you need to do this in order to have good abstraction. For instance, an option type `type Option<T> = null | T` has the weird property of being idempotent `Option<Option<T>>
365.
▲
by
tel
8y ago
Nitpicky but critical detail: union types are not the same as "sum" types such as what you get in Reason, Purescript, and Elm. Union types are convenient for adding atop a dynamic language or modeling records (although, Purescript
366.
▲
by
tel
8y ago
I'd suggest that you're giving Lens a pretty short shrift. It's not "just" getters and setters as it works on immutable data. It also has a composition story that's better than normal getters and setters and _m
367.
▲
by
tel
9y ago
Because ZMQ is vastly better managed from a human POV. The energy required to make a project like this succeed surpasses the individual.
368.
▲
by
tel
9y ago
That's exactly the unsoundness proof I was talking about and it is indeed caused by a bad interaction between generics, existentials, and null.
369.
▲
by
tel
9y ago
While this is true, it's critical to note that "valid" here doesn't mean "valid as in it follows the intention of the programmer who wrote it" but instead "valid as in it either terminates in a well-define
370.
▲
by
tel
9y ago
Java isn't sound and the poor semantics of null are critical to proving it. Not that this takes away from your larger point exactly, but Java+null is no longer a good example.
371.
▲
by
tel
9y ago
Probably not a perfect book for someone at the HS level, but just a bit past that I would HIGHLY recommend MacLane’s Mathematics Form and Function. It’s a revisionist history of mathematics aimed to demonstrate how ideas flow from one to an
372.
▲
by
tel
9y ago
Haskell generally doesn’t consider computation a side effect which is a bit tragic.
373.
▲
by
tel
9y ago
Just responding as op, but pka nailed it. If you're writing every line of code directly then these all feel like conveniences. If you write code that's more generic then they become exponentially compounding edge cases.
374.
▲
by
tel
9y ago
The Union of Int and Int is exactly Int; the Sum is not. The union of two types contains all values that are in either component type. The sum of them contains all of the values of the first type, each one associated with a tag like “I came
375.
▲
by
tel
9y ago
The issue with `of` is that it special cases when `a` is already a Promise. Promises try hard to not be nested (a promise of a promise) but that nesting is critical for algebraic properties. The then issue is multifarious. On one side, spli
376.
▲
by
tel
9y ago
Fwiw, we can go even further and define these combinators in terms only of typeclass constraints needed on the return monad, the "finally tagless" or "mtl" style. https://hackage.haskell.org/package/
377.
▲
by
tel
9y ago
You assume a Queen object and also some compiler details. These might be in practice relevant some of the time but (a) how often, really? And (b) are those forced decisions or decisions of convenience and momentum? Fwiw, as soon as you say
378.
▲
by
tel
9y ago
The point of abstraction is to not be tied to Bitboard--or any concrete representation whatsoever. Chess 2.0 changing its rules is exactly what can be protected against.
379.
▲
by
tel
9y ago
The Bitboard is very abstract. The interface it instantiates will likely not let leak it’s concise internal representation and will discuss the operations on the game state at a domain level. This is abstraction. So this is a failure of OO
380.
▲
by
tel
9y ago
Right, and the Likelihoodist/Bayesian would put those details into the model. Real world concerns get handled by each side in acceptable ways, but very special details about how sampling and posterior distributions differ are what make
381.
▲
by
tel
9y ago
Frequentist analyses will depend upon assumptions of the sampling process which often include specific stopping conditions. This means that the _reason_ an experiment ends is an important part of data. That exactly defies the likelihood pri
382.
▲
by
tel
9y ago
That's a Bayesian perspective, but the heart of the Likelihood Principle is that non-Bayesians/non-Likelihoodists can find reason to believe that the Likelihood doesn't really contain all of the relevant information for makin
383.
▲
by
tel
9y ago
Your user name is absolutely lovely given this topic :)
384.
▲
by
tel
9y ago
It is often considered surprising and controversial. In particular, if the experiment performed included "controversial" stopping criteria then you could imagine the same data arising but not trusting each result identically. Argu
385.
▲
by
tel
9y ago
While on one hand your "degrees of uncertainty" approach here is a pretty nice and valid one most of the time, I'd like to present another idea of mathematical proof. Something cannot be proven to a collection of people, but
386.
▲
by
tel
9y ago
This is essentially exactly what model checkers do. The big difference is that they exploit the structure of the problem description in order to reach exhaustiveness in “reasonable” time. This can be a big time saver over trying to do it ma
387.
▲
by
tel
9y ago
Most practically: your personal knowledge of the system will grow tremendously through the process of trying to formalize it and debug the errors you encounter. It's likely that basic assumptions you have about the protocol are false a
388.
▲
by
tel
9y ago
Lee and Li are probably the same word, transliterated to English characters differently.
389.
▲
by
tel
9y ago
When a suitably rich set of jets is available, we expect the bulk of the computation specified by a Simplicity program to be made up of these jets, with only a few combinators used to combine the various jets. This should
390.
▲
by
tel
9y ago
> Their cost hugely exceeds their usefulness, which to my mind is minor at best, and non-existant at worst. This value difference is indeed core. I value them exactly as "information that can be discerned from reading a program with
More ›