melange
Nim
melange | Nim | |
---|---|---|
15 | 354 | |
855 | 16,657 | |
2.1% | 0.6% | |
9.3 | 9.9 | |
7 days ago | 5 days ago | |
OCaml | Nim | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
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
- OCaml Syntax Sucks
-
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.
Nim
-
Rust traits are a local maxima
With function overloading and templates
You just use a `hash` function in your library code and user has to implement a version of it that accepts the Foo type.
To resolve the scope problem, Nim uses templates[1] with `dirty` pragma (makes template unhygienic), but there is also a `mixin`[2] statement for later static binding.
0 - https://github.com/nim-lang/Nim/lib/pure/collections/tables....
1 - https://github.com/nim-lang/Nim/blob/78983f1876726a49c69d656...
2 - https://nim-lang.org/docs/manual.html#generics-mixin-stateme...
- Nim for Python Programmers
-
My first experience with Gleam Language
Check out Nim[0] - it's strongly typed, with good type inference, clean elegant syntax, memory management is automatic (optional gc, default is ARC + small footprint cycle collector), compiles to small single binaries (Hello World is less than 100 kb), has powerful metaprogramming and lsp support.
Nim compiles to C/C++ and then to native code, so performance is on the same level as Rust/C/C++. You can also compile Nim to js/wasm and run the same code in the web.
[0] - https://nim-lang.org
-
tohray - microblogging application in nim
Programming Language: Nim
-
Recent Performance Improvements in Function Calls in CPython
Take a look at Nim.
You get C performance, with the readability of Python.
https://nim-lang.org/
-
Nim 2.2 release candidate is available for testing
It’s not exhaustive/definitive yet (should be for the actual release), but this might be helpful:
https://github.com/nim-lang/Nim/blob/devel/changelog.md
- The search for easier safe systems programming
- 3 years of fulltime Rust game development, and why we're leaving Rust behind
-
Top Paying Programming Technologies 2024
22. Nim - $80,000
-
"14 Years of Go" by Rob Pike
I think the right answer to your question would be NimLang[0]. In reality, if you're seeking to use this in any enterprise context, you'd most likely want to select the subset of C++ that makes sense for you or just use C#.
[0]https://nim-lang.org/
What are some alternatives?
js_of_ocaml - Compiler from OCaml to Javascript.
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
rescript - ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript.
go - The Go programming language
reason - Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
Odin - Odin Programming Language
ocaml - The core OCaml system: compilers, runtime system, base libraries
rust - Empowering everyone to build reliable and efficient software.
haxe - Haxe - The Cross-Platform Toolkit
crystal - The Crystal Programming Language
vscode-ocaml-platform - Visual Studio Code extension for OCaml
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io