Live data from Hacker News

Bonsai: Janestreet's UI Library

github.com

141–150 of 165 posts

Re: Bonsai: Janestreet's UI Library

#141

All your money and retirement funds are safe; I’m too dumb to work at JaneStreet; every time I see OCAML I feel less than and confused.

Aww thanks folks. All the downvotes to this means folks don’t think I’m dumb and also don’t like the self deprecating humor.

Re: Bonsai: Janestreet's UI Library

#142

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

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.

Re: Bonsai: Janestreet's UI Library

#144

[flagged]

Why did you feel the need to post this same comment multiple times? Seems a bit suspect itself!

Looks like OPs post was flagged. I have also seen this on multiple ocations. To me this is REALLY fishy. Since the janestreet fraud there has been a massive campaign online to downplay all negative comments, disable comments on JS videos, and overall radio silence.

I know some long term ocaml users and i can tell you that there is stuff boiling under the hood. Many are very much NOT HAPPY with JS and what they did.

Re: Bonsai: Janestreet's UI Library

#145

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

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.

Yeah… I’ve been a professional Elixir developer for 5+ years and additional 4 as a hobby. The quality of the ecosystem and the practices are nowhere near those in OCaml. Sad to say it. People just want to write imperative procedural code and monkey patch in tests so they can test anything at all.

Re: Bonsai: Janestreet's UI Library

#146
post #134
post #110

Earlier quoted context omitted.

Isn't that like saying the Internet is only written in English if you strip out all the non-English. All C-style languages are fully cross compatible if you only use semicolons. I can't write Typescript into a browser without cross-compilation and "stripping out types" involves parsing and manipulating code. That's a different language.

No. 98% of typescript specific syntax can be replaced with U+0020 SPACE to yield runnable JavaScript. The runtime semantics of the two languages are congruent. the same cannot be said for any other language im aware of.

I'm sorry but if you need a transpiler to get it to run in a browser, character replacability and runtime semantics don't matter. Typescript doesn't run in the browser, it's obviously a different language.

Re: Bonsai: Janestreet's UI Library

#147

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

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.

Goes way back to 2006 with GWT.

https://en.wikipedia.org/wiki/Google_Web_Toolkit

Re: Bonsai: Janestreet's UI Library

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

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.

"due to it being dynamically typed"

hmm ok nope

Re: Bonsai: Janestreet's UI Library

#150

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

Before JS became a common backend language, you could do this with at least one stack: Clojure & ClojureScript.
Post reply on HN