136 points · by yawaramin · 5y ago · 33 comments
Sihl: https://github.com/oxidizing/sihl
ReWeb: https://github.com/yawaramin/re-web/
Of course, if you're interested in OCaml/Reason and don't know about Revery you're missing out.
Same goes for SQL prepared statements. I'd like to decrease the amount of boilerplate somewhat, hopefully without resorting to preprocessing.
This is part of the reason I didn't add too many helpers for either JSON or SQL to Dream yet - there seems to be considerable room for improvement here.
https://discuss.ocaml.org/t/excited-about-dream-web-framewor...
or another in that thread, as the specific one linked doesn't compare Dream with Opium!
Opium itself is found here:
The confusing part is that some people decided to name a whole ecosystem project with a name that reads like it's a language (ReasonML) and some other had the wonderful idea to name a compiler that also reads like it's a language (Bucklescript) but to make it more simple they changed the name to... Rescript, but wait now it's also the name of the language. Oh and also Reason calls itself a programming language (when it's just an alternate syntax).
Brilliant.
In any case, Dream has examples showing full-stack (OCaml client+server) usage with both ReScript and Melange:
- ReScript: https://github.com/aantron/dream/tree/master/example/w-fulls...
- Melange: https://github.com/aantron/dream/tree/master/example/r-fulls...
For good measure, there is also an example with the other OCaml-to-JS compiler...
- Js_of_ocaml: https://github.com/aantron/dream/tree/master/example/w-fulls...
As an outsider with respect to the community, I can't think of a bigger impediment to adoption than a scenario like this. Apart from something catastrophic like a BDFL ghosting or going closed source.
I learned from all this, that at least for the near term, OCaml is by far the most stable part of the... OCaml ecosystem :) I'm fine with that, since I started out with OCaml and like it, but I do worry for everyone that prefers JS-like syntax and wants to do a lot of client-side programming.
Anyone using this in anger?
[1] https://github.com/aantron/dream/tree/master/example#readme
I have some code built against an earlier version of it, but there have been so many changes during development, that the web app that spawned Dream needs to be adapted :)
I wish this project takes off. I remember how beneficial Sinatra was among the heavy Ruby frameworks.
We need something else than the React / Vue / Svelte triumvirate. Something much simpler. Something which brings back the joy and playfulness in web development.
https://reasonml.github.io/reason-react/
Maybe we should re-explore this guys ideas because he obviously was on to something. The above examples look elegant but I still need to see those real world hairy components to truly judge it.
I have the nightly of onivim2 and st4. Sublime beats the crap out of it, and onivim2 is starting to show slowness in the UI. VSCode is faster than onivm2, yet it suppose to use reasonml.
My advice, never bet your future and company on this fragmented framework.
I wish F# would take a similar approach. Nothing seems to come close.
OCaml on Windows seem to only run under Msys or cygwin. Do most OCaml devs develop on Linux?
As for Cygwin, that was my choice for a long time when I started with OCaml.
For building fully-native Windows apps, I've used https://fdopen.github.io/opam-repository-mingw/installation/. However, it still requires a Cygwin environment to run in, because, as yawaramin mentioned, much of the OCaml ecosystem assumes Linux-like tools during build. So, effectively, the Windows setup looks a bit like cross-compilation, where your build environment is Cygwin, but the output is non-Cygwin full-native Windows binaries.
The compiler itself and core tools like Dune don't assume Linux tools and are portable. It's many of the packages among the rest of what is there that trigger the Linux tools dependency.
But the toolchain can produce applications that run on Windows without any special support, and people have been shipping OCaml apps on Windows for a long time. E.g. the Unison file sync utility, the MLDonkey file share program.