Live data from Hacker News

Viewing profile — hutao

hutao

HN member
Joined
Sat, Nov 22, 2025, 4:39 PM UTC
HN karma
84
Public activity
29 items

About hutao

No profile information was provided.

Recent public activity

  1. 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…

  2. 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…

  3. 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…

  4. 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…

  5. 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…

  6. 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 …

  7. 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…

  8. 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…

  9. 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…

  10. 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…

  11. 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…

  12. 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…

  13. 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…

  14. 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…

  15. 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…

  16. 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.…

  17. 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…

  18. 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…

  19. 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…

  20. 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…

  21. 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…

  22. 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…

  23. 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…

  24. 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.…

  25. 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 "…