Did you know that there is an internationalization library for OCaml that works both on the server and in the browser? discuss.ocaml.org/t/ann-i18n…
mandalarian retweeted
My dear front-end developers (and anyone who’s interested in the future of interfaces):
I have crawled through depths of hell to bring you, for the foreseeable years, one of the more important foundational pieces of UI engineering (if not in implementation then certainly at least in concept):
Fast, accurate and comprehensive userland text measurement algorithm in pure TypeScript, usable for laying out entire web pages without CSS, bypassing DOM measurements and reflow
mandalarian retweeted
80% done.
Started from the parallelism basics, built up to non-blocking data structures.
Then a detour to effect handlers, building a Go-like concurrency with user-level threads, channels, select nested parallelism and async IO.
All in OCaml.
github.com/kayceesrk/cs6868_…
mandalarian retweeted
Finally I had time to finish!!!
react rules of hooks for reason-react components
- feature complete
- deployed in our monorepo
- linting the effects, the memos, the everything
github.com/ml-in-barcelona/r…
mandalarian retweeted
Surya Bonaly originated the backflip in the Winter Olympics and was penalized for it. She should have won the gold medal. Now the Olympics is celebrating another skater for doing her move. The Olympic Committee owes her an apology and a gold medal.
mandalarian retweeted
So apparently white Americans in Minneapolis are putting Mexican flags on their cars so ICE agents waste time pulling them over. They call it ICE fishing. 🤣😂
mandalarian retweeted
I made html_of_jsx a bit faster and published a blog post about it: how it's done and some won'ts!
sancho.dev/blog/making-html-…
mandalarian retweeted
I made a bunch of improvements to a cool project (an OCaml implementation of jq)
- Fully supports jq language (except tests, modules and csv)
- used OCaml 5 effects to implement control flow and try/catch
- It has a pretty playground
Happy to share a project I did to learn how to create a lexer, parser and compiler. Re-implemented jq, I call it "q" and it's between 2x and 5x faster than jq and tries to have better error messages!
Try it out, github.com/davesnx/query-jso…, I even have a "logo".
mandalarian retweeted
congratulations to David Allsopp on having the first of his mega relocatable OCaml compiler patches merged! github.com/ocaml/ocaml/pull/…. This is part of a series that'll make binary distributions of O(x)Caml compiler variants so much easier discuss.ocaml.org/t/relocata…
mandalarian retweeted
Hey everyone, we're down to 7 PRs.
In particular, that means all of the cookbook PRs waiting for review were addressed and we're now ready to take more cookbook contributions! 🧡🐫 ⤵️
mandalarian retweeted
> be me
> try ReasonML
> OCaml but sexy
> write React with strong types, feels good
> documentation sucks
> team builds reasonml.org, then
> BuckleScript rebrand to ReScript
> ReasonML exiled
> the ecosystem forks itself
> stuck between OCaml and JS
> still better than TypeScript
> still better than TypeScript¿?
mandalarian retweeted
WAIT A MINUTEEEE
mandalarian retweeted
just days after Trump declared himself the "fertilization president" the entire team focused on Assisted Reproductive Technology (which includes treatments like IVF) was laid off at the CDC
mandalarian retweeted
happy to see that wasm_of_ocaml is useful for @rescriptlang!
Experimented with wasm_of_ocaml build for @rescriptlang compiler
It gave almost 3x faster performance than the original js_of_ocaml build! 🔥
mandalarian retweeted
Manus AI is much crazier than Deepseek moment
I just got invitation code, this thing is the craziest AI agent I've seen.
10 examples:
1. Clone Apple website
It created a copy of Apple website that looks almost the same, with animations and all. (preview link in comment)
mandalarian retweeted
We recently released Melange 5 with a bunch of goodies!
dynamic import, discriminated unions support, improvements to @\mel.send and more
announcement 👇
melange.re/blog/posts/announ…
mandalarian retweeted
After Elon Musk has been insinuating to turn off Starlink in Ukraine, Poland‘s Foreign Minister Radoslaw Sikorski is reminding Musk that Poland is paying for it and, furthermore, is making clear that if Musk follows through that Poland will abandon Starlink altogether for being an unreliable service.
mandalarian retweeted
Thank you, sponsors for your continued support.
This months update on what I did/tried for Reason/OCaml OSS
1. esy's source cache is now versioned. (unreleased)
This would let esy developers to bust the sources cache should anything change regarding tarballs are installed.
A good example of this was how the `extra-sources` field is handled - it changed the contents of sources that get installed. When I implemented support for `extra-sources` and released it, users would see the fix work since esy would consider the older cached version valid. This was considered okay because fetching and installing sources rarely change.
By prefixing the sources path with a version, we can now invalidate the old cache and ask esy, internally, to fetch the sources as per the latest implementation.
2. De-duplicate opam-repository and esy-opam-override repository sync in the new multiplat solver (WIP)
As a first step towards portable dependency solutions, I had parameterised the exisiting solver function over os and arch and decided to loop over the list of supported (os, arch) tuples.
This got me to a working solution quickly, but also meant it was unnecessarily running some operations. One of which was the opam-repository and esy-opam-override repository syncs.
3. esy-opam override for ocamlfind 1.9.8
The new ocamlfind 1.9.8 package needed an updated patch for Windows. This is unrelated to the earlier issue where ocamlfind incorrectly assumes it does work on Windows - to fix this users could opt into creating opam overlays and use the `opamRepositories` field in package.json.
4. Fix prefix rewriting in postinstall generated by esy/github-action
`postinstall` command in the esy/github-action
The github action, which generates a postinstall script so that CLI apps created with esy can running multiple platforms packaged in the same NPM tarball, needed a fix to correctly figure the ocaml version to make sure prefix rewriting works correctly.
5. Understanding why rtop was broken on OCaml 5 and writing a vanilla rtop (without depending on utop)
rtop was initially broken, but cleverly fixed by anmonteiro (thanks!). However, I couldn't figure out the fix, or why it worked. Turns out, OCaml 5.2 introduced evaluation of multiple phrases in the same line, which wouldn't work with rtop's internal lexbuf state - reason parser, for some reason, resets it. I still couldn't figure this one out. You can find my exploratory patch in the next post.
Big thanks for my sponsors who continue to motivate me to work on Reason/OCaml. Here's the work done last month
esy: Support for platform specific packages
Packages like `libwasmtime` are platform specific and it's evident from their names
libwasmtime.0.21.0+linux-x86_64
libwasmtime.0.21.0+macos-x86_64
libwasmtime.0.22.0+linux-x86_64
libwasmtime.0.22.0+macos-x86_64
Another good example is `eio_main` - this package contains dependencies field that looks like this,
"eio_linux" {= version & os = "linux" & (os-distribution != "centos" | os-version > "7")}
"eio_posix" {= version & os != "win32"}
"eio_windows" {= version & os = "win32"}
Such expressions are evaluated during package installations on the client.
These individual packages, use the `available` field to hide/show themselves to the solver. For example, `eio_linux` contains the following,
available: [os = "linux"]
Thus,
1. On non-Linux machines, solver is supposed to ignore `eio_linux`
2. On Linux machines, `eio_main`'s dependencies field is supposed to look like this
"eio_posix" {= "1.2"}
"eio_windows" {= "1.2"}
But on Linux,
"eio_linux" {= "1.2"}
"eio_posix" {= "1.2"}
"eio_windows" {= "1.2"}
One can see how it can pose problems for projects that are supposed to build on multiple platforms.
To make things worse, some packages make only a certain version unavailable. `ocamlfind` `1.9.6` for example isn't available on Windows, but `1.9.5` is!
To address these things, the package manager fetching OPAM packages must compute different solutions for each platform. However, this can
slow things down significantly for the user - solutions have to be computed for all the expected (expectations set by the project owner) os-arch combinations.
To avoid unnecessary computations, esy does the following: compute the solution like it used to. Scan the dependency graph for packages that wont build everywhere - compute this set of platforms
where all the graph nodes aren't available, and only for those platforms re-compute the solution. A good example is esy itself - in it's dependency graph, only `ocamlfind` isn't the dependency that
doesn't build uniformly (1.9.6 doesn't build on Windows, 1.9.5 does).
This way, the re-computation of the solution is only triggered if necessary.
Note that this work is still being tested and awaiting feedback. Feel free to try out the nightly once it's built on CI and ping me on Reason Discord
esy: windows ci: fix broken inline test runner
Inline test runner, that builds some c++ code failed to build because it wasn't configured to statically link with libstdc++.dll
esy: minor internal documentation and maintenance chores.
You can find all the relevant links in the next post.

































