Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- How on earth is this a web UI Library and yet there is no link to any sort of example page (like a github.io page or something) showing this off?by pcan77
- Looks like it's Web-only, no mention of the native UI support (terminal UI excluded).by xvilka
- 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-9by avsm
- A more practical question: has anyone used this in production in internal apps at work? UIs like this look nice and have a flare that I like, but I guess it feels weird if I want to introduce this with my team over something like tailwindcss and rolling our own componentsby rew0rk
- Yes Jane Streetby keepupnow
- Yeah, Jane Streetby VanTheBrand
- i think “i added ocaml” is much bigger innovation token spend then the styling questionby jitl
- Interesting! What are Bonsai's dependencies? I use OCaml but - so far - none of Janestreets libraries etc.by user2342
- Basically most of Jane Street's published code[0] via its dependency on Core.
[0]: https://github.com/janestreet/bonsai/blob/f31661450eb133fe89...
by LeonidasXIV - The docs directory happen to be missing, therefore the links to the quick guide and to "thinking in bonsai" pages from the readme are broken.
Also, I'm wondering how does bonsai-web update the DOM, is it via direct modification of the changed elements, or via some DOM differ? I'd say from direct update from a quick look at the source, but I'm unsure.
by rixed - Oh it needs a userland trampoline!
> JSOO does not have tail call optimization
by hahahaa - Jsoo supports self-recursive and mutually recursive tail calls, but for general tail calls it would need to trampoline every single call, since the only major browser with proper tail calls is Safari.by debugnik
- This is great. It focuses on utility and information density over design. It looks like someone took a terminal UI and transplanted it to the web, Bloomberg terminal style.
I'm pretty sure you can build tools with this that are fast and pleasant to use.
- What does JaneStreet do besides sponsoring nerdy Youtube channels and writing UI libraries?by cachius
- Print money?by morkalork
- manipulate foreign equity marketsby smfjaw
- They’re a market makerby affyboi
- They're a trading firm that hires really clever people to use math to trade. Their strategies are, presumably, very complicated and ever changing, and secrecy about them is the point - you get bigger margins for longer if people don't learn about your 'one weird trick' (that and also that there is presumably another side to your trades losing out on upside, and they might not be best pleased to learn about it.by RugnirViking
- Jane Street made it's way into today's Wall St Journal for its quantitative prowess and hiring of Math PhD's. What was stunning to hear was that their 2nd quarter profits were a record $10.3 billion, nearly double that of Goldman Sachs and Morgan Stanley (much larger firms).by markoman
- Curious how this compares to Melange which is used by Ocaml shops as well to double up on Ocaml for both front and backend (ahrefs being the major user and sponsor). Does this mean giving up a lot of the JS ecosystem (React, graphql, etc)?by chrischen
- My understanding is that js_of_ocaml has been around longer and likely has a stronger ecosystem, but Melange was designed more specifically to play nice with the JS ecosystem.by sroerick
- A good GraphQL server and client should be relatively straightforward to make in OCaml. Especially if you start from the premise that fragment spreads compose, rather than inherit.
Relay’s (second) compiler was prototyped in OCaml, but we ended up switching to Rust for the main rewrite in the belief that we’d be able to use the same runtime code across iOS, Android and JS environments.
Please somebody make a good OCaml GraphQL compiler, server, and client.
by mjmahone17 - I am sure it's very performant, but to me it's extremely ugly; Surely someone can fix margins and still have it be performant.by rw2
- I’m no UI expert - what’s wrong with the margins?by pgwhalen
- > 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!
- > Finally! I was waiting for this to become possible!
Sarcasm?
Do you want to have a talk as to why JaneStreet wasn't built on JavaScript?
- I don't think someone mentioned yet, but the (now defunct?) company Outrun Labs built a product Revery which seems almost exactly like what Jane Street has done (to my amateur eyes). OniVim was their only end user product afaik, built on this tech.by Conscat
- 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.
by philipwhiuk - A really great place to reach for this is Elixir/Phoenix now that the set theoretic type system is in place with LiveView. I have been doing some pretty large/complex codebases gradually working towards fully integrating working this way for the past 5 years and it has been great.by rhgraysonii
- Why wait? It’s been possible since forever. I wrote UI in OCaml eight years ago. https://github.com/kccqzy/drawing-guessing/blob/master/clien...by kccqzy