Live data from Hacker News

Bonsai: Janestreet's UI Library

github.com

91–100 of 165 posts

Re: Bonsai: Janestreet's UI Library

#92

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)?

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.

Re: Bonsai: Janestreet's UI Library

#93
post #79

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.

KotlinJs and ClojureJs too. You always end up having to write wrappers or dealing with problems that would just work if you just used normal js/ts.

Clojurescript not ClojureJs, and Typescript doesn't run in the browser, it has the exact same issues/limitations: it must be compiled to JavaScript first.

Re: Bonsai: Janestreet's UI Library

#94
post #93
post #79

Earlier quoted context omitted.

KotlinJs and ClojureJs too. You always end up having to write wrappers or dealing with problems that would just work if you just used normal js/ts.

Clojurescript not ClojureJs, and Typescript doesn't run in the browser, it has the exact same issues/limitations: it must be compiled to JavaScript first.

Compiling TypeScript is just stripping out types

Re: Bonsai: Janestreet's UI Library

#95

Earlier quoted context omitted.

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.

Modern web development is more like computer alchemy

Re: Bonsai: Janestreet's UI Library

#96

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

A lot is said in this thread about user preferences for info density, but it is really a lot more than preference. there's also a big component of it that is user productivity focused. Info-dense UIs simply require a lot less scrolling around and pagination to look at relevant data. For example the ability to look at multiple charts side by side instead of having to scroll one chart after another into position enables users to spot differences that they wouldn't otherwise see.

Re: Bonsai: Janestreet's UI Library

#97

This would of been cool back in 2014.

>"This would of been cool back in 2014."

Pretty much. UI libraries are more or less meaningless now, and I say this as someone who spent the last decade building them. Given a proper data API to work against, you're a single prompt away from a fully tested bespoke lib that's more maintainable and has no dependencies. The weeks of work you saved by reaching for one before is gone, and the tradeoff you had to make of dealing with upstream changes and lack of customization just isn't there anymore.

Re: Bonsai: Janestreet's UI Library

#98

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

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

Re: Bonsai: Janestreet's UI Library

#99
post #94
post #93

Earlier quoted context omitted.

Clojurescript not ClojureJs, and Typescript doesn't run in the browser, it has the exact same issues/limitations: it must be compiled to JavaScript first.

Compiling TypeScript is just stripping out types

That is true only if you confine your TS code to be pure JS plus type annotations.

There are TS constructs that require compilation into equivalent JS, such as enums and namespaces.

Re: Bonsai: Janestreet's UI Library

#100
post #49

Earlier quoted context omitted.

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.

This makes me think about the bizarre UI regressions in macOS in the last few years. I’ve got this giant, beautiful display and somehow it becomes less rather than more useful over time due to the software it’s presenting.
Post reply on HN