Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
octachron
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
octachron
4y ago
This is fixed now, thanks!
32.
▲
by
octachron
4y ago
Not for 5.0, the aim of 5.0 was to focus on getting multicore support out of the door. Thus only mingw64 is supported for Windows. Support for MSVC will come with later versions. At the same time, improving opam ecosystem support for Window
33.
▲
by
octachron
4y ago
The road to multicore OCaml was indeed longer and harder than expected. At the end of the day, the constraint of trying to preserve the behavior of almost all existing programs ended up driving a majority of design choices. Typically, this
34.
▲
by
octachron
4y ago
The link to the Effect section of the manual at https://v2.ocaml.org/releases/5.0/manual/effects.html works for me and should contain an higher level description of what are effect handlers. Which link was br
35.
▲
by
octachron
4y ago
The Christmas presents will be all the issues and bugs that will be discovered between now and Christmas eve in the shiny new multicore runtime.
36.
▲
by
octachron
4y ago
With a constructive logic like the one with Coq, you can use functions as proofs of theorems. Briefly, a function is a constructive proof that you can construct an object of the output type from objects of the input type. This means that yo
37.
▲
by
octachron
4y ago
The type system for algebraic effects is still in the research and design phase at this point. Right now, I am not even taking a guess of what will be the defining new major features of OCaml 6 (effect system + modular implicits maybe? Mayb
38.
▲
by
octachron
4y ago
This is a common property for proof-oriented languages. Coq shares this property for instance, and you can write an optimizing C compiler in Coq: https://github.com/AbsInt/CompCert .
39.
▲
by
octachron
4y ago
I have heard good things on "OCaml from the very beginning" (available at https://johnwhitington.net/ocamlfromtheverybeginning )
40.
▲
by
octachron
4y ago
The graphics library still exists, it is only distributed as a separate library rather than bundled with the compiler distribution, which seems like a better fit for a pedagogical library like `graphics`. Also `graphics` works fine on Windo
41.
▲
by
octachron
4y ago
Yes, it does. And the new major upcoming version, OCaml 5, even supports parallelism and algebraic effects.
42.
▲
by
octachron
4y ago
OCaml has nested comments (and comments are also aware of string literals). Thus any fragments of valid OCaml code can be commented without changes. In other words, the whole line below is commented-out. (* let x = "*)" (*
43.
▲
by
octachron
4y ago
Ok, you are using "parametric polymorphism" to mean bounded polymorphism. This explain my confusion! Indeed, I can understand your point of view then: bounded polymorphism is indeed better done with functors in OCaml. And since fu
44.
▲
by
octachron
4y ago
Emphasizing the arrow (or in fact the most narrow error) is definitively a good idea in that case. Counting the number of arguments is in general a bit problematic: it is possible to end with an accidental functional value due to an extra a
45.
▲
by
octachron
4y ago
I think that it is better to not forget that expressiveness comes at the cost of a richer world of misbehaving code. If you are used to a world where functions have more than one argument and must be applied to exactly the right number of
46.
▲
by
octachron
4y ago
> Sorry, but total bullshit. Ok, locally abstract types are bit weird and historical quirk due to the pre-existing use of type variables as unification type variables. But first, they only matter with GADTs and local modules (a notion th
47.
▲
by
octachron
4y ago
You can add a dune-project file at the root of your project with just `(lang dune 3.2)` (or your dune version rather than 3.2). The file can also be generated by "dune init project project_name" for fresh projects.
48.
▲
by
octachron
4y ago
Do you have any examples? Unfortunately from my perspective, I cannot make sense of your statements. OCaml typing is principal in all situation where type inference is decidable. The syntax for annotation for polymorphic functions is isomor
49.
▲
by
octachron
4y ago
I am not sure which pillar of functional programming is lost with labelled arguments? Partial applications still work, higher-order function too. One might need to use anonymous functions when labels does not match but I don't see any
50.
▲
by
octachron
4y ago
OCaml does not require more annotations than Haskell for polymorphic functions? Both language only require annotations in the case where inference would be undecidable (polymorphic recursions, higher-rank polymorphism, and GADTs). I know fe
51.
▲
by
octachron
4y ago
Concerning the issue with function arguments, this is one of the reason why OCaml has labelled arguments. And for instance, Janestreet's idiom udes labelled arguments as often as possible. Similarly, I am not sure what is the issue wit
52.
▲
by
octachron
4y ago
Parametric polymorphic is the same in OCaml and Haskell. Did you meant to say that the value restriction does not play nicely with point-free programming?
53.
▲
by
octachron
4y ago
With OCaml type system permanently burned in my mind, I parse that error message as "there is an ` _ -> Result_set.t ` arrow type which is not compatible with type `Result_set.t`". Do you think that the issue is that the arrow
54.
▲
by
octachron
4y ago
Do you have a more precise example in mind? The example that you are describing should emit an error message of the form This expression has type type_of_arg_3 -> return_type but an expression of type return_type was expected
55.
▲
by
octachron
4y ago
The medium-term plan is indeed to have such a typed effect system. This one of the reason why the effect system is still considered to be experimental: we expect to see some breaking changes once effects become typed.
56.
▲
by
octachron
4y ago
Essentially, OCaml 5.0 is OCaml 4.14 with a fully rewritten runtime which introduces support for parallelism (no more global runtime lock) and an experimental version of algebraic effects.
57.
▲
by
octachron
4y ago
The effect system is here, and it can already be used. However, the integration within the (surface) language and its type system is still a work in progress. Thus to explore the use of effects, you need to use the experimental Effect ( h
58.
▲
by
octachron
4y ago
The thing is that you don't want to use directly the Y-combinator, ever. It is a tool to show that untyped lambda calculus with just anonymous functions and applications is already Turing-complete, because you can write the `Y-combinat
59.
▲
by
octachron
4y ago
The Y-combinator require (equi)recursive types for the intermediary step `x x` where `x` has type `('a -> 'b as 'a) -> 'b` using OCaml notation.
60.
▲
by
octachron
4y ago
There is only one OCaml build system (dune) which is used by people that don't write their own build system. But yes, you have the freedom of using alternative to the OCaml standard library if you wish so.
More ›