Bonsai: Janestreet's UI Library
Posted by KolmogorovComp 4 hours ago
Comments
Comment by flufluflufluffy 3 hours ago
Finally! I was waiting for this to become possible!
Comment by deciduously 4 minutes ago
Comment by philipwhiuk 2 hours ago
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.
Comment by raphinou 1 hour ago
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)
Comment by vintermann 10 minutes ago
Comment by lbourdages 1 hour ago
Disclaimer: I am very inexperienced at front-end development.
Comment by danielheath 1 hour ago
You need a JS trampoline to call your WASM and make browser primitives available to it, and IIRC calls into browser code incur some extra overhead, but those are pretty manageable.
Additionally: for high level languages, source code is _much_ smaller than compiled binaries. If your initial needs are simple, your users are likely downloading more than 10x as much code.
Comment by nobleach 36 minutes ago
Comment by rw2 1 hour ago
Comment by pgwhalen 43 minutes ago
Comment by LooseEquipment 32 minutes ago
Comment by chrischen 1 hour ago
Comment by Schlagbohrer 53 minutes ago
Comment by antonvs 16 minutes ago
Comment by tecoholic 49 minutes ago
Comment by adastra22 1 hour ago
This says it is based on Elm. So it has the same clean immutable state structure?
Comment by ubercore 1 hour ago
Comment by MrBuddyCasino 25 minutes ago
I'm pretty sure you can build tools with this that are fast and pleasant to use.
Comment by xvilka 4 hours ago
Comment by avsm 3 hours ago
Comment by aquariusDue 1 hour ago
Comment by bobjansen 3 hours ago
Comment by nbevans 1 hour ago
Comment by hahahaa 3 hours ago
> JSOO does not have tail call optimization
Comment by kubb 3 hours ago
Comment by gigatexal 2 hours ago
Comment by Traster 3 hours ago
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.
Comment by troupo 1 hour ago
See also LiveView and Hologram for Elixir.
Comment by bofeiw 3 hours ago
Comment by KolmogorovComp 3 hours ago
Comment by rmzs0711 3 hours ago
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
Comment by OtherShrezzing 2 hours ago
Comment by shAIster 1 hour ago
Comment by ForHackernews 3 hours ago