Live data from Hacker News

Bonsai: Janestreet's UI Library

github.com

121–130 of 165 posts

Re: Bonsai: Janestreet's UI Library

#121
post #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...

You are the pioneer and must be worshipped.

Re: Bonsai: Janestreet's UI Library

#122
post #117

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 components

Yes Jane Street

Re: Bonsai: Janestreet's UI Library

#123
post #86

Earlier quoted context omitted.

this - most of the internal software at my job that's actually important is very dense, with keyboard navigation and shortcuts. The ones that somebody makes to sell themselves to upper management while angling for a promotion look very pretty, and never get used. And yet, we make such beautiful and vacant software ourselves for our clients, because again, its b2b, so you aren't selling to the people who actually have…

Fair point I guess JS doesn't have to care about this at all because they're not selling their UI to others, just making it in house for in house use

JavaScript?

Re: Bonsai: Janestreet's UI Library

#124
post #55

What does JaneStreet do besides sponsoring nerdy Youtube channels and writing UI libraries?

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.

One trick is buy low sell high, apparently only a few know about this.

Re: Bonsai: Janestreet's UI Library

#125
post #71

Earlier quoted context omitted.

Unrelated but what do you use to manage your personal website? I love how everything is interconnected.

Custom infrastructure; I use my site as a playground for various things over the years. It ran as the first MirageOS unikernel for many years, and recently it's been running on a zero-allocation OxCaml webserver https://anil.recoil.org/notes/oxcaml-httpz to help me get to grips with the new extensions.

You are crazy intelligent. You are cool.

Re: Bonsai: Janestreet's UI Library

#127

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.

Windows and especially Macintosh UIs from the late 90s/early 00s were by far the most functional UIs we've ever had since the dawn of the desktop era - user research was a serious discipline, accessibility was baked in to the frameworks, and the HID guidelines that devs adhered to gave us uniform conventions that we users could rely on. If the biggest criticism of Bonsai is "it ain't pretty but it works", then long l…

I agree, we have lost the beauty of early user interfaces. You summarised it well, thank you.

Re: Bonsai: Janestreet's UI Library

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

I feel like everything has become a wasteland of whitespace. JIRA is a prime offender here.

Re: Bonsai: Janestreet's UI Library

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

Doesn't apply as much to Clojurescript due to it being dynamically typed and its flexibility. Sure, you often write a wrapper, but it's more of an abstraction and a good practice, not a necessity in cljs.

Re: Bonsai: Janestreet's UI Library

#130

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

Sarcasm, definitely
Post reply on HN