3 ms·
If you're going to build an open source product that you want people to host on their own servers then a few things are really important: - Ease of deploying.
by PascalW 8y ago
If you're going to build an open source product that you want people to host on their own servers then a few things are really important:
- Ease of deploying.
- Amount of resources required to run it.
I've been building an open source notes app recently and I picked Rust + ReasonML and React in the front end.
It's super easy to deploy; it all compiles down to a single native binary that contains both the server and frontend.
It's super easy to deploy this, with or without Docker. It consumes almost no resources at all. The binary is 12 MB and consumes around 5 MB of RAM.
On the frontend it's a PWA, so it's available offline too. This is the most important part. You could build the PWA in other frameworks as well.
- Klathmon 8y agoThis might be off topic, but how are you liking reasonML? I've been meaning to pick it up for a while now and keep reading over the docs but still haven't done much. Would you be willing to talk about some of the pitfalls and rough edges you've hit or things you would do differently?
- PascalW 8y agoI think it's very promising, but it definitely has some rough spots. Things I like: * It's a general purpose language, it's not only usable on the front-end (like Elm for example). * It's a really powerful language (or rather, OCaml is). * Interop with JS is good. It takes a bit to get used to the syntax for writing bindings, but once you get the hang of it it's pretty straightforward. Again, ReasonML IMO scores a lot better in this front than Elm. * ReasonReact is a very thin wrapper around React, so if it's really easy to work with if you already know React. * There are other options than ReasonReact, for example bucklescript-tea [1] which is very Elm like. * There seems to be a lot of focus on targeting native. See for example Esy [2]. There's some real potential in bs-react-native [3] and Revery [4]. * Overall the experience of working with Reason is really great. The compiler has your back, is great at type inference and the syntax is pretty elegant (though IMO a little less so than Elm). * The compiler is blazingfly fast. Blows Typescript and Babel out of the water. Things that are a bit rough: * Docs are spread across Reason docs, Bucklescript docs and OCaml docs. A lot features are not documented in Reason, because they're inherited from OCaml. If you would read just the Reason docs you might get the impression that's a pretty small and simple language, but it's actually very powerful. If you're thinking about picking up Reason I definitely recommend you read the RealWorldOCaml book [5]. * The Reason syntax is a bit weird in some spots. If you make a syntax error the compiler will in most cases just yell `Error: Syntax error` at you which is not really helpful. * The ReasonReact API feels a bit alien, probably because it's build on top of the React Class API. I think there a bit some big changes coming to ReasonReact though, so hopefully this will change. Things that concern me: * There's little formal communication about the direction and future of the project. It seems to be mostly Facebook who's behind it, it doesn't feel like a community project at all. Bucklescript seems to be largely a one man show. * There have been a handful of Bucklescript and Reason releases that plain broke stuff. Of course this can happen, but it does make me a feel a little uneasy. All in all I'm definitely positive. There's a lot of potential and hopefully when Reason picks up some more steam it can become more a community project. Be sure to check out the Reason Discord [6], very helpful people there! [1] https://github.com/OvermindDL1/bucklescript-tea https://github.com/OvermindDL1/bucklescript-tea [2] https://esy.sh/ https://esy.sh/ [3] https://github.com/reasonml-community/bs-react-native https://github.com/reasonml-community/bs-react-native [4] https://github.com/revery-ui/revery https://github.com/revery-ui/revery [5] https://dev.realworldocaml.org/ https://dev.realworldocaml.org/ [6] https://discord.gg/reasonml https://discord.gg/reasonml
- yarinr 8y ago> I've been building an open source notes app recently and I picked Rust + ReasonML and React in the front end. Could you share a link to the repo? I'd love to take a look :)
- PascalW 8y agoSure! It's https://github.com/pascalw/pragma/ https://github.com/pascalw/pragma/ and there's a demo running at https://pragma-demo.pascalw.me/ https://pragma-demo.pascalw.me/. I've actually just taken a short break from the project. It turns out building a good offline + sync note taking app is more complicated than I imagined it would be :-) Given that I'm just working on it in my spare time every now and then it frustrates me a little sometimes that I'm not making as much progress as I would like. But probably I'll pick it up again soon because I do believe this could turn out to be quite useful.
- Salesdude 8y agoFor those interested, password is: demo