Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tel
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
91 ms
·
871.
▲
by
tel
11y ago
C'mon. > Right away, you'll notice a subtle difference – a more terse syntax is available to you when defining classes: // The ES5 way var Photo = React.createClass({ handleDoubleTap(e) { … }, re
872.
▲
by
tel
11y ago
Not quite. Bottom as a member of every type means that you cannot trust my proof (x : A) without examining it and that your examination may be non-terminating. That said, it you examine a realizer and terminate then you have a genuine proof
873.
▲
by
tel
11y ago
I went ahead and skimmed the first chapter of [2] (again; I own it) and don't see it justifying that this stuff began in 1935. Indeed, it suggests, e.g., that a major difficulty of the program to formalize all of math in set theory, Ru
874.
▲
by
tel
11y ago
> More flexible languages are better for writing DSLs, etc; Citation needed, or, I'm not quite sure I agree with you there. In fact, I think I believe the exact opposite (to a degree).
875.
▲
by
tel
11y ago
I imagine some government facilities could hit that mark—based loosely on descriptions of friends who have worked in such environments.
876.
▲
by
tel
11y ago
If one had an infinite monetary and user acceptability/retraining budget... what would a modern, secure 500+ seat IT infrastructure look like? Even in the broadest of terms.
877.
▲
by
tel
11y ago
My solution is to make a new typeclass which implies the order you demand. It'll all be social contract driven, but until we have dependent types one cannot ask for more.
878.
▲
by
tel
11y ago
I find it pleasant every time I get something working in it... but significantly far away from anything I'd like to support in production. At least for now.
879.
▲
by
tel
11y ago
They're a bit more than just reducers. Given that you always package them with initial state they're a little more like "left folds" [0] or "Moore machines" [1] (they're isomorphic). What's neat about
880.
▲
by
tel
11y ago
Consider mtl then. It provides commutative capability set building semantics from the user's POV and then only asks the consumer to make final stack-ordering/effect specification decisions.
881.
▲
by
tel
11y ago
There are a number of Haskell-to-JS compilers and Haskell-alike languages which more directly target JS. This is growing quickly but major issues remain and the toolkits are quite immature. On the other hand, much of React is a natural play
882.
▲
by
tel
11y ago
Even very advanced mathematics has this feel. You can get a ways with formulae and the like—and it may even be that there is no other language by which you express yourself—but ultimately you build intuition and, as they say, the best proof
883.
▲
by
tel
11y ago
Monads aren't nouns. When you build a state transformer you can choose whether or not to recognize that it is a monad (or maybe strong profunctor, depends upon your design) but it always just IS one.
884.
▲
by
tel
11y ago
It comes down to equality. Values have "extensional equality" which means that values A and B are equal exactly and only when they look the same and can be used in the same way. On the other hand, most people are used to "ref
885.
▲
by
tel
11y ago
Yeah, shouldn't apply the punishment to the user. It should do a best effort render and then DDOS the site. /s
886.
▲
by
tel
11y ago
That's fine if you make the assertion, explicitly not made here, that you have some control over who sends you things.
887.
▲
by
tel
11y ago
That's true!
888.
▲
by
tel
11y ago
Well, there's the one in context that does! Except this function can never be called in an empty context so you ultimately are stuck.
889.
▲
by
tel
11y ago
Not to detract from your point, but you don't need the expansion for that. Directly substituting 𝟏 in the definitional equation works just fine: L a = 𝟏 + a × (L a) L 𝟏 = 𝟏 + 𝟏 × (L 𝟏) L 𝟏 = 𝟏 + (L 𝟏) L 𝟏 = �…
890.
▲
by
tel
11y ago
A nice algebraic law that holds in data types is a -> (b, c) = (a -> b, a -> c) (b * c)^a = b^a * c^a This is useful as common argument factoring and can optimize repeated function calls. Another is the famous (
891.
▲
by
tel
11y ago
"Decent" programming is a wiggle word. I'm of course obliged to agree with you when you define it. In a similar way, decent programming can be done with Turing Machines, punch cards, raw circuitry, brainfuck, what-have-you. E
892.
▲
by
tel
11y ago
I can't say it's only you, but I certainly don't agree.
893.
▲
by
tel
11y ago
It's not a direct dependency in the sense that algebra is a direct dependency of, say, algebraic topology. Instead it's more like a guiding friend. A lot of PL theorists are well-versed in algebra and use it at least stylisticall
894.
▲
by
tel
11y ago
If LLVM is good enough for you... http://www.stephendiehl.com/llvm/ and http://dev.stephendiehl.com/fun/ (in progress)
895.
▲
by
tel
11y ago
There's a rather extensive series of blog posts by Edward Yang, a GHC contributor, that cutely and obliquely describe the STG machine that gives semantics to STG code. Highly recommended for anyone who found this interesting! * h
896.
▲
by
tel
11y ago
Yeah, when wrapping `(Int -> Int) -> Any` you would need to package it up with a proof of its type if you want to unwrap it and check. A weaker promise might be merely to unpack `Any` into `Dyn -> Dyn` which states only that we hav
897.
▲
by
tel
11y ago
My understanding is that gradual typing, indeed all of the interesting cases considered here, can be well understood through the introduction of an `Any` type to the normal typed language. A contract is then a coercion `Any -> Maybe t` f
898.
▲
by
tel
11y ago
> A variable in algebra is exactly what you consider a constant in a programming language. I disagree. A constant is not expected to change, a variable is absolutely expected to change. The difference is that a mathematical variable chan
899.
▲
by
tel
11y ago
"Variable" in math doesn't mean change, it means that the relation a variable is involved in holds over any variation of valid denotations of that variable. So the notion of variance is external to the proposition, whereas
900.
▲
by
tel
11y ago
Sure, but that operation, "assign", takes as its left value a different kind of thing than "relate" or "equate" does.
More ›