Live data from Hacker News

Viewing profile — octachron

octachron

HN member
Joined
Fri, Apr 29, 2016, 11:35 AM UTC
HN karma
314
Public activity
102 items

About octachron

No profile information was provided.

Recent public activity

  1. comment
    Comment #47486977

    Not really when reading `iter (printf %"d %d" m) ns`, I am likely to read it in three steps - `iter`: this is a side-effect on a collection - `(printf`: ok, this is just printing, …

  2. comment
    Comment #47230566

    The issue is that the C memory model allows more behaviours than the memory model of x86-64 processors. You can thus write code which is incorrect according to the C language speci…

  3. comment
    Comment #46960153

    Note that OCaml has monadic `do` too, in the form of `let*` operators (and applicative `and`) since OCaml 4.08.

  4. comment
    Comment #46849668

    OCaml has structural variants in the form of polymorphic variants. On the product side, OCaml has objects, first-class modules, labelled tuples (since OCaml 5.4) which are all a fo…

  5. comment
    Comment #46100146

    For a bounded size of types of sub-expressions, HM inference is quasi-linear in the size of the program, because the constraints appearing in the HM algorithm are only equality bet…

  6. comment
    Comment #45857534

    Nearly the same as with positional argument: Partially applying a function to a named argument creates a closure with this argument filled in, and you can apply the argument in whi…

  7. comment
    Comment #45135698

    A point that I find missing in the timeline for dynamic array is that there have been implementation for dynamic arrays available in libraries for more than twenty years. However, …

  8. comment
    Comment #44403850

    > This introduction doesn't really explain anything, as I guess it assumes you've learned OCaml elsewhere and are just here to practice. Indeed the link is a not an introduction to…

  9. comment
    Comment #44403426

    You are misreading the quantification, a value l of type List a means that for all type a, the element of the list has type a. In other words, this is an universal quantification w…

  10. comment
    Comment #44400563

    Return (or other effects) does make sense as an expression in a functional language. Typically, OCaml has `raise Exception` which is also an expression, with the same type as `retu…

  11. comment
    Comment #43157546

    A significant factor in my experience is that a lot of programs are quite similar from an compiler perspective: they use well-trodden set of features and combine then in a predicta…

  12. comment
    Comment #42853097

    Note that this is an error message from the ocamldoc tool, and not an error message from the OCaml compiler itself. Funnily enough, looking that the repository history, this French…

  13. comment
    Comment #42842594

    How long ago was this "relatively recently"? When I translated all the remaining French comments in the OCaml compiler nearly 10 years ago, there were already no warnings nor error…

  14. comment
    Comment #42650028

    Mathematicians are more interested in the gap in our proof framework. Like stated in the articles, many "interesting" constants appearing in mathematics feels like obviously irrati…

  15. comment
    Comment #42649805

    This is only true for distributions with finite variance (and the edge case of distribution with slowly growing infinite variance). And for a given variance, gaussian distributions…

  16. comment
    Comment #41100726

    The variable "x" would be a list in this case. This the GADT (Generalized Abstract Data Types) syntax, where the type of the whole union can depend on the discriminated union case.…

  17. comment
    Comment #41044982

    Ocaml object system can also achieve this in a quite lightweight way type foo = type bar = type k = type u = let f (x: ) (\* the type annotation is not needed \*) = x#m

  18. comment
    Comment #40379438

    The Everest project did publish a proved TLS implementation: https://mitls.org . And at least the EverCrypt* cryptographic primitives has been used outside of academia.

  19. comment
    Comment #40379371

    F* has an extraction backend which targets "human-readable C" code, contrarily to Coq which extracts proof to "machine-written OCaml" (typically the extracted code use a type-syste…

  20. comment
    Comment #40013277

    Adding type annotations in OCaml never reduce the typechecking time: it adds more information for the typechecker to process and it can only increase the size of type. Typechecking…

  21. comment
    Comment #39927938

    Note that OCaml has been using autoconf since OCaml 4.09.

  22. comment
    Comment #39915083

    Predictions of the solar system state are accurate only on "short" periods. The solar system is chaotic, and predicting its state after few million years is no more possible that p…

  23. comment
    Comment #38487701

    Ok, now I understand: this part is a description of how optimizing C bindings using the OCaml FFI often requires to play around the GC: With OCaml uniform representation of data, t…

  24. comment
    Comment #38486249

    Of course not. Honestly, I am not sure what was the initial sentence before being distorted by the editor. The next sentence makes me think that the interviewee might have been dis…

  25. comment
    Comment #37099065

    No, OCaml compiles polymorphic functions once by using an universal representation of values which tends to play better with a type system with recursively polymorphic functions, h…