Finally! I was waiting for this to become possible!
Bonsai: Janestreet's UI Library
11–20 of 165 posts
Re: Bonsai: Janestreet's UI Library
#12Earlier quoted context omitted.
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.
Yea, its cool to have strict type safety, but what's the point of it doesn't have all the benefits from other Frameworks that took years to polish
Re: Bonsai: Janestreet's UI Library
#13> 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!
The general challenge becomes integrating the fractional front-end code written in your backend-language that compiles to JS with the rest of the JS ecosystem.
JaneStreet have a love of writing their own stuff from scratch so it doesn't apply to them but it might to you.
Hence most people end up with frontend-as-backend rather than backend-as-frontend.
Re: Bonsai: Janestreet's UI Library
#14Re: Bonsai: Janestreet's UI Library
#15Earlier quoted context omitted.
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.
But what about compilation speed? Hot reload? Maintainability? What is the bus factor for these kind of technologies? Yea, its cool to have strict type safety, but what's the point of it doesn't have all the benefits from other Frameworks that took years to polish
Re: Bonsai: Janestreet's UI Library
#16Re: Bonsai: Janestreet's UI Library
#17The "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.
Agreed, looks like it's reinventing the wheels. Frameworks does not really matter today, AI agents write the code anyway.
Re: Bonsai: Janestreet's UI Library
#18Looks like it's Web-only, no mention of the native UI support (terminal UI excluded).
There's a full terminal implementation of Bonsai as well. I actually use it in my personal workflow these days to manage my contacts database! https://anil.recoil.org/notes/aoah-2025-9
Re: Bonsai: Janestreet's UI Library
#19> 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!
Similar attempts include Scalajs. The general challenge becomes integrating the fractional front-end code written in your backend-language that compiles to JS with the rest of the JS ecosystem. JaneStreet have a love of writing their own stuff from scratch so it doesn't apply to them but it might to you. Hence most people end up with frontend-as-backend rather than backend-as-frontend.
Disclaimer: I am very inexperienced at front-end development.
Re: Bonsai: Janestreet's UI Library
#20> 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!
Similar attempts include Scalajs. The general challenge becomes integrating the fractional front-end code written in your backend-language that compiles to JS with the rest of the JS ecosystem. JaneStreet have a love of writing their own stuff from scratch so it doesn't apply to them but it might to you. Hence most people end up with frontend-as-backend rather than backend-as-frontend.
https://ocsigen.org/ in Ocaml too
https://websharper.com/ for fsharp and csharp. Really good when I used in in fsharp
Maybe https://melange.re/v7.0.1/ too? (Not sure)