melange
reason
Our great sponsors
melange | reason | |
---|---|---|
14 | 44 | |
752 | 10,054 | |
3.5% | 0.3% | |
9.7 | 5.8 | |
5 days ago | about 2 months ago | |
OCaml | OCaml | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
melange
-
Melange for React devs book, alpha release
Hey HN, at Ahrefs we have been working on an online book that hopefully helps React developers get up and running with Melange, an OCaml to JavaScript compiler. You can read more about Melange here: https://melange.re/.
There are still a few chapters that we'd like to add before considering it "complete", but it might be already helpful for some folks out there, that's why we decided to publish it early.
The book uses Reason syntax to implement React components using ReasonReact components. You can read more about both in:
https://reasonml.github.io/
-
Reason and React Meta-Frameworks
In my previous post on trying to use the NextJS App Router and Reason I described some of the problems and limitations of their compatibility with one another. With the release of Melange 2 I decided to see if the new features of Melange 2 could help to increase the compatibility of Reason and the NextJS App Router. I have also documented some of the things learnt after trying Melange (v1) with Astro and Remix.
- GitHub - melange-re/melange: A mixture of tooling combined to produce JavaScript from OCaml & Reason
-
OCaml 5.0 Alpha Release
So it's Reason, not ReasonML which the umbrella project's name, and Rescript is a imcompatible syntax split from the Bucklescript team (that previously transpiled Reason to JS). Bucklescript's new name is... Rescript.
But not everyone agrees with the split and work is being done on Melange to replace Bucklescript : https://github.com/melange-re/melange
Ultimately JsOfOcaml can directly transpile Ocaml to JS.
-
Question about the Reason project in general
In reality, most folks that developed BuckleScript frontends with ReasonML switched to ReScript syntax and are happy with it. Some felt more friction because of their reliance on PPXes or FP-heavy libraries (like Relude) and those people tend to use the Melange fork of BuckleScript or they switched to js_of_ocaml.
-
From TypeScript to ReScript
There is a fork of ReScript that supports ReasonML syntax and with the goal of maintaining Ocaml compatibility: https://github.com/melange-re/melange.
-
From object-oriented JS to functional ReScript
There's also a fork of BuckleScript/ReScript called Melange that guts its build system so that instead of using ninja, it works with more standard tools for the ecosystem, specifically dune and esy. In doing so they managed to also finally get the compiler off of OCaml 4.06: now it can use a newer OCaml compiler and take advantage of four years worth of language and compiler improvements.
- Are Dynamic Languages Going to Replace Static Languages? (2003)
-
Writing custom VSCode extensions in ReasonML
For OCaml and ReasonML your options are js_of_ocaml (mentioned here in ReasonML docs) or a fairly new fork of BuckleScript called melange. They differ in implementation and output, with JSOO taking intermediate bytecode generated by ocamlc and turning it into unreadable JS, vs Melange being a patched compiler that builds more human-readable JS.
- Using `let.opt` in Rescript with latest Reason/OCaml
reason
- Learning Elm by porting a medium-sized web front end from React (2019)
-
Melange for React devs book, alpha release
Hey HN, at Ahrefs we have been working on an online book that hopefully helps React developers get up and running with Melange, an OCaml to JavaScript compiler. You can read more about Melange here: https://melange.re/.
There are still a few chapters that we'd like to add before considering it "complete", but it might be already helpful for some folks out there, that's why we decided to publish it early.
The book uses Reason syntax to implement React components using ReasonReact components. You can read more about both in:
https://reasonml.github.io/
-
ReScript: Rust like features for JavaScript
ReScript is "Fast, Simple, Fully Typed JavaScript from the Future". What that means is that ReScript has a lightning fast compiler, an easy to learn JS like syntax, strong static types, with amazing features like pattern matching and variant types. Until 2020 it was called "BuckleScript" and is closely related to ReasonML.
- Ask HN: Interest in a Rust-Inspired Language Compiling to JavaScript?
-
Earning the privilege to work on unoriginal problems
This tracks with how I've seen "normal" languages converge on similar, flawed imitations of better type systems through tools and repurposed syntax. Thank you for confirming.
Do you have any recommendations or warnings regarding general languages which reach in the opposite direction? Reason[1] and F#[2] are both examples: they attach pre-existing ecosystems and compile-for-$PLATFORM tools to OCaml-like typing.
OCaml itself is also intriguing for personal projects. However, I'm worried the "GPL" in its standard library's LGPL license might scare people despite both the linking exception and Jane Street's MIT alternative.
1. https://reasonml.github.io/
-
Melange 1.0: Compile OCaml / ReasonML to JavaScript
ReasonML purely as a syntax layer on top of OCaml is still being updated and released[1]. Incidentally, I'm one of the maintainers of that project too :-)
With this Melange release, we're hoping to somewhat revive ReasonML and channel some folks back to the community from the perspective of a vertically integrated platform that has seen major investment in the past few years.
[1]: https://github.com/reasonml/reason
-
VN Compiler. Why using Fable is too difficult. (Pt. 1)
Why not use https://reasonml.github.io/ instead? Or just use Typescript?
-
My Thoughts on OCaml
Quieted down, but I depend on projects with worst graphs:
https://github.com/reasonml/reason/graphs/contributors
-
why
There is also reasonml for Web development.
- Por que Elm é uma linguagem tão deliciosa?
What are some alternatives?
js_of_ocaml - Compiler from OCaml to Javascript.
purescript - A strongly-typed language that compiles to JavaScript
rescript-compiler - The compiler for ReScript.
ocaml - The core OCaml system: compilers, runtime system, base libraries
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
ocamlformat - Auto-formatter for OCaml code
haxe - Haxe - The Cross-Platform Toolkit
refterm - Reference monospace terminal renderer
vscode-ocaml-platform - Visual Studio Code extension for OCaml
sqlite3-ocaml - OCaml bindings to the SQLite3 database