Live data from Hacker News

Reason: A new interface to OCaml

facebook.github.io

131–140 of 294 posts

Re: Reason: A new interface to OCaml

#132
I've worked on the Atom plugin for this, itself written in Reason and compiled to JS using js_of_ocaml: https://github.com/facebook/reason/tree/7f3b09a75cacf828dd6b....

Having worked with Reason, JavaScript, and the bridge between the two, most of my errors seem to fall on the JavaScript side. So I guess the type system's indeed working =).

Re: Reason: A new interface to OCaml

#133

Wonder if this project has anything to do with Eric Lippert's move to Facebook ( https://ericlippert.com/2016/02/08/facebook/ - Eric has also been producing a series of blog posts implementing a Z-Machine interpreter in OCaml to run mini-Zork on, starting here: https://ericlippert.com/2016/02/01/west-of-house/ ). Eric was on the C# compiler team at Microsoft and previously worked on JScript.

His moving to facebook explains why he didn't do the zork interpreter in F#.

Not sure why the Reason syntax isn't more like F# though.

Re: Reason: A new interface to OCaml

#134
post #91

Would be nice to see modular implicits like those that are being proposed for OCaml. It's a shame to not have any form of ad-hoc polymorphism.

What cheng said, but we could also make sure that the syntax for modular implicits plays very nicely with the rest of the grammar. With Reason we can rethink the grammar holistically instead of having to find room in it for new features. The hard part is in the actualy implementation of Modular Implicits, but that's currently being handled by skilled professionals and Reason will be able to use them.

Re: Reason: A new interface to OCaml

#136
post #78

The slowness in Firefox appears to be solely due to this: @media (min-width: 1180px) { body:not(.no-literate) .content-root { background-color: #fdfcfc; -webkit-box-shadow: inset 780px 0 #fff, inset 781px 0 #e7e7e7, inset 790px 0 3px -10px rgba(0,0,0,0.05); box-shadow: inset 780px 0 #fff, inset 781px 0 #e7e7e7, inset 790px 0 3px -10px rgba(0,0,0,0.05); } } Removing it in the Firefox style editor restores normal perfo…

I've been dealing with this lag in firefox for the past 6 or 7 years. It's hilarious to me that they still haven't fixed it. Just one of the reasons I've been extremely negative on firefox.

Not a great solution but I got a bookmarklet that removed any fancy css rule (shadow, alpha, ...).

Re: Reason: A new interface to OCaml

#137

I started off a bit skeptical with the What's OCaml's status with multithreading? Are there any proposals for more flexible operators, so there doesn't need to be different operators for different numerics? (F# solves this by allowing inlined functions.)

Multicore support is progressing nicely. Only earlier today I made a PR for adding nativecode compilation for multicore: https://github.com/ocamllabs/ocaml-multicore/pull/47. A lot more information about the multicore OCaml project can be found here: https://ocaml.io/w/Multicore

Re: Reason: A new interface to OCaml

#138
post #119

What problems would be well solved by Reason/OCaml?

For now:

- Teaching new programmers how to use ML, and OCaml in particular.

- Keeping consistent formatting rules among a large team or project and automating that within your editor.

- Benefiting from the comprehensive pattern matching checks provided by the OCaml compiler.

- Benefiting from faster compile times of `ocamlc`, or faster native execution time of `ocamlopt`.

- Benefiting from Merlin, and the new version of Merlin with support for Reason - I cannot overstate how important Merlin is to my daily development.

Soon:

- Having conventions for forming namespaces within packages.

- Making it easier to share and connect many small packages into a a larger application, and develop those packages locally.

- Having "just works" support for the REPL, so that it's one fast command to start the REPL with all your dependencies loaded and autocomplete would just work.

- Having a "just works" debugger loader that maps all of your source files and compiled artifacts so you can instantly start debugging your app.

Re: Reason: A new interface to OCaml

#139
post #125

Earlier quoted context omitted.

Indeed, but leaving out the parens makes more work for humans. What does `a b c` mean? `a(b)(c)`? `a(b(c))`? If the only thing that is gained by leaving out the parens is brevity, I don't think its worth it.

But it’s not `a b c`. Rather it’s something like `verb noun noun`. Which is much less ambiguous. In a language with currying semantics [(((a(b))(c))(d)] the only logical explicit syntax sugar would be LISP-like, so (v n n), (v (v2 n)). That’s imo way worse — you end up with lots of useless junk)))))))) in anything non-trivial.

What about `verb noun verb noun`? Is the second verb a parameter or is it being invoked on the noun?

Re: Reason: A new interface to OCaml

#140

Do want to learn this - does anybody know any interesting projects that can take advantage of the OCaml ecosystem and functional aspects?

How about building functional operating systems and unikernels: https://mirage.io/. Since Reason is fully compatible with OCaml, you can build your own Reason unikernels on top of MirageOS libraries. Here is a list of mirage OS pioneer projects: https://github.com/mirage/mirage-www/wiki/Pioneer-Projects
Post reply on HN