Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
octachron
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
octachron
4y ago
Ah yes, it might be possible that during the time of Caml light, the bytecode compiler was for a time considered to be fast enough. I am not sure that a ephemeral stance from 25 years ago on an ancestor language still really matters nowaday
62.
▲
by
octachron
4y ago
Work and time contributed by open source collaborators on their free or academic time cannot be magically converted from one subsystem to another. It is honestly very easy to have progress on the aspects that spark interest while some subsy
63.
▲
by
octachron
4y ago
That was mostly a man-power issue. The good news is that nowadays such nonsensical error messages are near the top of my personal development priority for OCaml.
64.
▲
by
octachron
4y ago
And the REPL should warn you that if you have a value of type "t/n" it is probably a left-over from a previous definition of type t in the session.
65.
▲
by
octachron
4y ago
Why do you think that the native compiler was treated as a second class citizen? This is quite strange take from my point of view. For instance OCaml native compiler was available on the M1 Macs two months after the M1 release. Similarly, a
66.
▲
by
octachron
4y ago
One of the intermediary representation used by the OCaml compiler is a lambda calculus ( https://github.com/ocaml/ocaml/blob/trunk/lambda/lambda.mli#... ). But yes, this is only the OCaml compiler.
67.
▲
by
octachron
4y ago
One issue with computable numbers is that computable analysis is a far more complex subject than real or complex analysis since limits or upper bounds do not preserve computability. Similarly, the continuity of computable functions means th
68.
▲
by
octachron
5y ago
No type information is ever passed to a compilation phase lower than the typechecker in the OCaml compiler pipeline. In the GADTs case, the type system is only used to remove the failure branch. For instance, type 'a t = A: int t
69.
▲
by
octachron
5y ago
There is no type information at runtime at all in OCaml. Once the program has been typed, the program is translated into an untyped lambda-calculus and all type information is throw away. In particular, pattern matching is compiled into thi
70.
▲
by
octachron
5y ago
Non-exhaustive matches are always detected statically in OCaml. However, such matches are considered valid code: "non-exhaustive match" is a warning by default, even if most people advise to turn that warning into an error. In oth
71.
▲
by
octachron
5y ago
Few of those projects are still at the research stage (typed effects, modular implicits, unboxed types), with a handful of people working on them at most. It is hard or even counter-productive to try to fit them on a roadmap. The multicore
72.
▲
by
octachron
5y ago
No, typed effects are still in the "research project with open design questions" category. It doesn't really make sense to have roadmaps for such open-ended feature. In other words, I am keen to not reproduce the announcement
73.
▲
by
octachron
5y ago
I would expect such a difference between OCaml and MLton (in either direction in fact) to be mostly the result of an apple-to-orange comparison. In this case, the OCaml code looks neither idiomatic nor optimized.
74.
▲
by
octachron
5y ago
Until recently Multicore OCaml was focused on deep handlers. The people working on the formalization of effects (either for program proofs or typed effects) were quite keen to have shallow handler integrated however. Thus, the effect module
75.
▲
by
octachron
5y ago
This is the difference between deep and shallow handlers for effects. Since shallow handlers can easily implement deep handlers (by re-installing the handler itself) but deep handlers are simpler to use when they fit your use case, the plan
76.
▲
by
octachron
5y ago
Deciding that symbolic expressions are equal is in fact undecidable for even relatively simple sets of symbolic expressions: this is Richardson's theorem. So this is an example of carefully constrained conditions where equality between
77.
▲
by
octachron
5y ago
You cannot resume a computation with exceptions. At most, exceptions are a subset of effects. Similarly, a lot of the issues with checked exceptions in Java come from the lack of exception polymorphism in the checked exception type system.
78.
▲
by
octachron
5y ago
The OCaml module system and its separation between interface and implementation is inspired from Modula-3 indeed. And the OCaml compiler is built to be able to compile compilation units while only knowing the types of its direct dependencie
79.
▲
by
octachron
5y ago
The current plan is to have runtime support for effects in 5.0, but without a syntax nor an effect type system. Those two will come later in the 5.x branch. The aim is to decouple the switch to the multicore runtime from the design of the t
80.
▲
by
octachron
5y ago
The HM type system is designed to be as fast and efficient as possible. And the OCaml typechecker is quite optimized (sometimes to the detriment of readability). Outside of GADTs heavy code, it feels unlikely to me that the exhaustiveness c
81.
▲
by
octachron
5y ago
None of this seems related to OCaml performance? Darklang is being rewritten to .Net because they were unsatisfied with the OCaml ecosystem. Horrible performance is generally more a question of algorithms and software architecture than a pr
82.
▲
by
octachron
5y ago
Generics is not really the right cutting point: parametric polymorphism is perfectly decidable. However, few languages stop at just parametric polymorphism. For instance, the OCaml issue in the linked blog post happens at the module level,
83.
▲
by
octachron
5y ago
Dune itself is only few years old. And there has been quite a lot of work on consolidating ocaml.org as a clear entry point for newcomers. But that is still an on-going work.
84.
▲
by
octachron
5y ago
OCaml's decision is more to leave unicode support to libraries rather than let compiler writers handle unicode support as a side dish.
85.
▲
by
octachron
6y ago
The easiest way is probably to define a private subtype of string (type small_string = private string) with smart constructors that enforces the restriction at runtime. This often means that creating such values may fail, but if you have a
86.
▲
by
octachron
6y ago
Isn't GHC the only full implementation of Haskell 2010? I am not sure how much the multiple implementations matter when there is only one full implementation of the last specification, which itself lags 10 year behind the only implemen
87.
▲
by
octachron
6y ago
Do you have a recent example of an error of the form "Expected a value of type 'a, but you gave a value of type 'a"? I have hoped to have eliminated all of them in 4.08.
88.
▲
by
octachron
6y ago
Slap ( https://github.com/akabe/slap ) is a more serious attempt. Tensority is still a prototype library that ventures very far into statistical safety, probably at a quite steep cost in usability.
89.
▲
by
octachron
6y ago
I would encourage people to learn both Haskell and OCaml. Between functors, GADTs, recursive types one can already have a lot of fun with the advanced corners of OCaml type system. One point where OCaml and Haskell differs a lot is on the q
90.
▲
by
octachron
6y ago
Modular implicits are being worked on actively, it is just a hard feature to get right in a scalable and future-compatible way.
More ›