Viewing profile — hutao
hutao
HN member- Joined
- Sat, Nov 22, 2025, 4:39 PM UTC
- HN karma
- 84
- Public activity
- 29 items
- HN profile
- View on Hacker News ↗
About hutao
No profile information was provided.
Recent public activity
-
comment
Comment #48943515
First of all, nice post! I can tell that you put deliberate effort into using a concrete example, introducing a problem and then building up to how to solve it. However, the contin…
-
comment
Comment #48813335
I've always felt that ML hit the sweet spot between functional and imperative programming. It affords conveniences such as algebraic data types and first-class functions, but unlik…
-
comment
Comment #48341617
This is the gist of Andrej Bauer's paper: - An algebraic theory consists of a "signature" (specifying a set of operation symbols with their arities) and a set of equations about th…
-
comment
Comment #48337572
Here is an article by Andrej Bauer answering the exact question, "What is algebraic about algebraic effects and handlers?": https://arxiv.org/abs/1807.05923v2 Contrary to the claim…
-
comment
Comment #48287405
I'm curious about the other Stack Exchange sites. Have they seen the same decline as Stack Overflow? Stack Overflow was the "flagship" product of the Stack Exchange company, and if…
-
comment
Comment #48287195
I was not looking to disagree with your point, I only wanted to make additional commentary. Sorry if my comment came across the wrong way. I do think "There are no function colors …
-
comment
Comment #48287010
Go (and other language with threads) implicitly run inside the "async IO monad." In the function color analogy, what this means is that all functions are red, and the "ordinary" fu…
-
comment
Comment #48286611
> Propagating errors up the stack is not the same, because the top-level function is not developing an error return because of the 10-level-nested function. It is developing one be…
-
comment
Comment #47930592
To clarify: ML started out as a scripting language for Robin Milner's proof assistant, LCF. The formal system, or "logic," is implemented in a minimal, trusted kernel, and the proo…
-
comment
Comment #47478529
One language that uses the tuple argument convention described in the article is Standard ML. In Standard ML, like OCaml and Haskell, all functions take exactly one argument. Howev…
-
comment
Comment #47434483
This seems to be a plagiarized paraphrase of @le-mark's comment, which was posted one hour earlier: https://news.ycombinator.com/item?id=47424625 @dang I think the account that I'm…
-
comment
Comment #47357788
One of the unwritten takeaways of this post is that async/await is a leaky abstraction. It's supposed to allow you to write non-blocking I/O as if it were blocking I/O, and make as…
-
comment
Comment #47113854
Note that addition also won't overflow if one addend is greater than half the range, but the other addend is still small enough (e.g. for the range -128 to 127, adding 65 + 12 will…
-
comment
Comment #47105668
The phrasing that I hear more often is "make illegal states unrepresentable"; both the submitted article and Alexis King's original article use this phrase. At least according to h…
-
comment
Comment #47105006
Note that the division-by-zero example used in this article is not the best example to demonstrate "Parse, Don't Validate," because it relies on encapsulation. The principle of "Pa…
-
comment
Comment #47067570
> With Prop, I think what you need to dig into is ‘non-computational’ not ‘non-computable’. Here's another way to explain this: As you state, Prop has to do with proof-irrelevance.…
-
comment
Comment #46969249
This is my point of view as someone who learned WebGPU as a precursor to learning Vulkan, and who is definitely not a graphics programming expert: My personal experience with WebGP…
-
comment
Comment #46967873
Typed functional programming has the perspective that types are like propositions and their values are proofs of that proposition. For example, the product type A * B encodes logic…
-
comment
Comment #46916954
A great way to understand monads is as a "design pattern," because they pop up extremely often in practical programming. Consider functions with a type signature that looks like `A…
-
comment
Comment #46916528
It's serendipitous that I'm seeing this blog post on the front page today, because I'm currently writing an article discussing the free monad. In addition to the free monad present…
-
comment
Comment #46864704
Over the past few years, OCaml has seen an abundance of new language features and standard library additions. OCaml 4.08 added let-binding operators (syntactic sugar for continuati…
-
comment
Comment #46744309
This is the difference between functions and effect handlers, to my understanding: Functions map inputs to outputs, with a type signature that looks like A -> B. Functions may be c…
-
comment
Comment #46741348
You are right, in Haskell type constructors may be partially applied. In my opinion, this feature has less to do with any fundamental difference between `Either` in Haskell and `Re…
-
comment
Comment #46740971
I'd never heard of "resumable exceptions" before, so I searched them up [1][2]. Is this another name for the language feature called "effect handlers" in OCaml 5? [1] https://osa1.…
-
comment
Comment #46739769
The `Either a b` type in Haskell is equivalent to the `Result ` type in other languages. The only difference is in the naming: "Result" semantically implies error handling, while "…