Live data from Hacker News

Bonsai: Janestreet's UI Library

github.com

41–50 of 165 posts

Re: Bonsai: Janestreet's UI Library

#41

> 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!

There's also Fable for F# but I believe this commenter is being sarcastic. Javascript is a common backend language.

[deleted]

Re: Bonsai: Janestreet's UI Library

#42

Earlier quoted context omitted.

Such attempts are quite common. Some I remember: 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)

I took this as a joke in reference to the popularity of JavaScript on the backend for the last two decades.

that's because most people's intro to CS was how to build a webpage.

Re: Bonsai: Janestreet's UI Library

#43

Can someone who understands web UI programming tell me if this would be good for my local agent to use to produce HTML based reports and outputs for me? Or for TUI outputs?

There was this submission two months ago: https://news.ycombinator.com/item?id=48365904 . Basically they have a TUI frontend for the same thing. And the blog post says: "Bonsai_term would feel familiar to anyone who’d ever done web development here, and it had the huge advantage of being especially amenable to AI assistance. It was actually somewhat of a mystery to us how good the models were at writing Bonsai_term code, given how relatively obscure it is [...]"

Re: Bonsai: Janestreet's UI Library

#45

Earlier quoted context omitted.

I’m no UI expert - what’s wrong with the margins?

inconsistent and maybe too tight, but I would think those are issues with the sample UIs and not this library

FWIW if you listen to Signals and Threads (the Jane Street podcast) they talk about this.

They have dedicated UX designers who do relatively little code but focus entirely on making the UX as optimal for the traders as possible and one of them was on an episode.

They talked about how most of the normal UX rules for SW go out the window because quants and traders have such different needs than "normal software".

Re: Bonsai: Janestreet's UI Library

#47
It might be a very performant UI framework in OCaml, but all the UI elements look extremely unpolished to me, like what a really smart high-school kid would build the GUI for his side project on Windows in 90s.

Thanks, I can use JS as a functional programming language.

Re: Bonsai: Janestreet's UI Library

#48

Earlier quoted context omitted.

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.

Couldn't WASM solve that problem once and for all? Is there some limitation that WASM has that JS doesn't? Disclaimer: I am very inexperienced at front-end development.

WASM does not (yet) have access to the DOM or web APIs, meaning every direct interaction with the browser must first go through JS interop anyways, with a resulting performance penalty. There are proposals, and maybe we'll see it happen by 2035, but as of now WASM is best suited for heavier workloads where the edge in application performance outweighs the cost of JS interop with the browser rather than being a universal solution.

Re: Bonsai: Janestreet's UI Library

#49

Earlier quoted context omitted.

I’m no UI expert - what’s wrong with the margins?

inconsistent and maybe too tight, but I would think those are issues with the sample UIs and not this library

I'd kill for tight UIs now. Everything insists on having 15000-mile wide margins, and at most two items visible on an 8K screen.

We are at a point when TUIs from 1990s running in 12" screens with at best a 480x240 resolution display more info than almost anything we have now.

Re: Bonsai: Janestreet's UI Library

#50

Earlier quoted context omitted.

inconsistent and maybe too tight, but I would think those are issues with the sample UIs and not this library

FWIW if you listen to Signals and Threads (the Jane Street podcast) they talk about this. They have dedicated UX designers who do relatively little code but focus entirely on making the UX as optimal for the traders as possible and one of them was on an episode. They talked about how most of the normal UX rules for SW go out the window because quants and traders have such different needs than "normal software".

Is there any professional software that wouldn't benefit from high information density? Most software design is optimized for the non-users who have to approve it.
Post reply on HN