Hacker News new | past | comments | ask | show | jobs | submit

Bonsai: Janestreet's UI Library

https://github.com/janestreet/bonsai
> And because Bonsai is written in OCaml, it becomes possible to use the same language and types on both the backend and frontend.

Finally! I was waiting for this to become possible!

loading story #49160372
There's also Fable for F# but I believe this commenter is being sarcastic. Javascript is a common backend language.
loading story #49155351
loading story #49156963
loading story #49154060
loading story #49155842
loading story #49157870
loading story #49154414
loading story #49154525
loading story #49156281
loading story #49155443
loading story #49154743
Looks like it's Web-only, no mention of the native UI support (terminal UI excluded).
loading story #49153546
loading story #49154207
Oh it needs a userland trampoline!

> JSOO does not have tail call optimization

loading story #49154491
loading story #49155625
I wish there were more OCaml shops out there
loading story #49155045
This would of been cool back in 2014.
The "Why Bonsai?" I found really funny.

Let me re-write that section for you:

Why Bonsai?

At Jane Street we're super excited by Functional programming and by CAML in particular, so when we need low latency software, we use OCAML, when we need hardware, we write out own langauge - HardCAML, and when we need a Web UI, we build a Web UI framework in CAML. Because we fucking love CAML.

loading story #49154605
Agreed, looks like it's reinventing the wheels. Frameworks does not really matter today, AI agents write the code anyway.
But AI do benefit a lot from a strict compiler, and having a simple language improve a lot on type-safety, so I don't think it is to throw, even today.
loading story #49153668
loading story #49154208
loading story #49153579
loading story #49154490
loading story #49157968
loading story #49156285
loading story #49154065
loading story #49154785
loading story #49155639