Live data from Hacker News

OCaml as my primary language

xvw.lol

231–240 of 296 posts

Re: OCaml as my primary language

#231
post #219

Earlier quoted context omitted.

> Not at all, I stand by Oracle on their lawsuit. I think it will be very hard for us to find anything in common to agree on then. Anyway, it’s pretty clear Google is pushing Kotlin because they don’t want to have anything to do with Oracle which has not been cleared by the verdict of their last trial. The situation has nothing to do with anything technical. Blaming them for pushing Kotlin when the alternative you of…

We don't have to agree in anything, I wasn't asking for any agreement to start with. I call them dishonest by comparing outdated Java 7 subset with Kotlin, when back in 2017 the latest version was Java 9, and in 2025 it is Java 24, and yet the documentation keeps using Java 8 for most examples on Java versus Kotlin. How come Google doesn't want to have anything with Oracle, when it is impossible to build an Android d…

> How come Google doesn't want to have anything with Oracle

They clearly don’t want to add anything which couldn’t be reasonably covered by the result of the previous trial.

The list you give was all already there then. Moving to a more recent version of Java wouldn’t be.

> OpenJDK is mostly a product from Oracle employees (about 80%)

Sun employees, not Oracle employees. Using Sun technology was fine, using Oracle technology is something else entirely.

Re: OCaml as my primary language

#232
post #181

Earlier quoted context omitted.

As someone who loves SML/OCaml and has written primarily Rust over the past ~10 years, I totally agree - I use it as a modern and ergonomic ML with best-in-class tooling, libraries, and performance. Lifetimes are cool, and I use them when needed, but they aren't the reason I use Rust at all. I would use Rust with a GC instead of lifetimes too.

How do you use Rust without lifetimes?

Either a lot of clones or a lot of reference counted pointers. Especially if your point of comparison is a GC language, this is much less of a crime than some people think

Re: OCaml as my primary language

#233

Earlier quoted context omitted.

What’s clunky about the Ocaml debugger? Ocaml has been shipping with an actual fully functional reverse debugger for ages. Is the issue mostly integration with the debugging ui of VS Code?

it was clunky AF last time I tried to use it https://discuss.ocaml.org/t/debug-ocaml-code/10867/18 and yeah integrating to VS Code debugging UI would be ideal I really like OCaml, so I hope the community can continue to improve the UX of these features

> it was clunky AF last time I tried to use it https://discuss.ocaml.org/t/debug-ocaml-code/10867/18

Yes, I see what you mean now. You encountered a bug around system thread and dune didn’t properly pass your artifacts. That’s indeed annoying.

I deeply dislike dune myself and never use it. I just use the Ocaml toolchain like I would a good old C one which might explain our different experiences.

Re: OCaml as my primary language

#234
post #15
post #6

I haven't worked in OCaml but I have worked a bit in F# and found it to be a pleasant experience. One thing I am wondering about in the age of LLMs is if we should all take a harder look at functional languages again. My thought is that if FP languages like OCaml / Haskell / etc. let us compress a lot of information into a small amount of text, then that's better for the context window. Possibly we might be able to p…

My completely non-objective experiment of writing a simple CLI game in C++ and Haskell shows that the lines of code were indeed less in case of Haskell.. but the number of words were roughly the same, meaning the Haskell code just "wider" instead of "higher". And then I didn't even make this "experiment" with Java or another managed, more imperative language which could have shed some weight due to not caring about m…

My experience is that width is faster than height to type- mostly from lack of time spent indenting. This is _completely_ fixed by using a decent auto-formatter, but at least for me the bias towards width lingers on, because it took me years to notice that I needed an auto-formatter

Re: OCaml as my primary language

#235
post #219

Earlier quoted context omitted.

We don't have to agree in anything, I wasn't asking for any agreement to start with. I call them dishonest by comparing outdated Java 7 subset with Kotlin, when back in 2017 the latest version was Java 9, and in 2025 it is Java 24, and yet the documentation keeps using Java 8 for most examples on Java versus Kotlin. How come Google doesn't want to have anything with Oracle, when it is impossible to build an Android d…

> How come Google doesn't want to have anything with Oracle They clearly don’t want to add anything which couldn’t be reasonably covered by the result of the previous trial. The list you give was all already there then. Moving to a more recent version of Java wouldn’t be. > OpenJDK is mostly a product from Oracle employees (about 80%) Sun employees, not Oracle employees. Using Sun technology was fine, using Oracle te…

I advise you to educate yourself who works and owns OpenJDK copyrights.

Can start here, https://dev.java/contribute/openjdk/

"Once you have contributed several changes (usually two) you can become an Author. An author has the right to create patches but cannot push them. To push a patch, you need a Sponsor. Gaining a sponsorship is usually achieved through the discussions you had on the mailing lists.

In order to become an Author, you also need to sign the Oracle Contribution Agreement (OCA)."

The go into https://openjdk.org/bylaws

"The OpenJDK Lead is an OpenJDK Member, appointed by Oracle, who directs the major efforts of the Community, which are new implementations of the Java SE Platform known as JDK Release Projects."

And this nice contribution overview from Java 22,

https://blogs.oracle.com/java/post/the-arrival-of-java-22

"Of the 26,447 JIRA issues marked as fixed in Java 11 through Java 22 at the time of their GA, 18,842 were completed by Oracle employees while 7,605 were contributed by individual developers and developers working for other organizations. Going through the issues and collating the organization data from assignees results in the following chart of organizations sponsoring the development of contributions in Java:"

To spare you the math, 77% were done by Oracle employees.

Now please show us how Kotlin compiles for Android without using Java.

Doesn't look like Google got rid of Oracle to me, more like they didn't even considered Dart, nor Go could stand a chance against the Java ecosystem among Android developers.

Re: OCaml as my primary language

#236
post #158

Earlier quoted context omitted.

In 2010, Ada 2005 was the most bare-metal-worthy expressive language. Now that would be Ada 2022.

While at it: what was / is holding Ada back? I haven't seen a single open-source project built in Ada, nor did I hear about any closed-source corporate project that uses Ada's superpowers. (Most likely these exist! But I did not see any available, or at least well-publicized.) People agree to go to great lengths to use a tool that has some kind of superpower, despite syntactic weirdness or tooling deficiencies. Peopl…

> While at it: what was / is holding Ada back?

I have a pet theory that it shares the same thing as any heavily typed language; it's difficult. And people aren't willing to accept that when you get it to compile at all, it'll probably work fine.

So many developers (and many more middle management) are not willing to trade the longer term stability/lack of runtime errors for the quick-to-production ability of other languages.

Re: OCaml as my primary language

#237
post #55

Earlier quoted context omitted.

I'd say that Google strives to have a reasonably short list of languages approved for production-touching code. Rust can replace / complement C++, while OCaml cannot (it could replace Go instead... fat chance!). So I suspect that the team picked Rust because it was the only blessed language with ADTs, not because they won't like something with faster compile times. No way OCaml could have stolen the Rust's thunder: w…

Wouldn’t Kotlin be a more reasonable choice in that case? It has ADTs and a lot of the same niceties of Rust.

Kotlin never had the "shiny new" aspect to it that Rust did; everyone gave it a bit of side-eye for coming from a company that wrote the IDE to support it well.

Re: OCaml as my primary language

#238
post #225

I’d have liked to see the use of dependency injection via the effects system expanded upon. The idea that the example program could use pattern matching to bind to either test values or production ones is interesting, but I can’t conceptualize what that would look like with the verbal description alone. Also, I had no idea that the module system had its own type system, that’s wild.

Haskeller here! > The idea that the example program could use pattern matching to bind to either test values or production ones is interesting, but I can’t conceptualize what that would look like with the verbal description alone. The article appears to have described the free monad + interpreter pattern, that is, each business-logic statement doesn't execute the action (as a verb), but instead constructs it as a nou…

Thanks for the detailed reply, that’s very cool! This looks great, very usable way to do DI.

Do you use Haskell professionally? If so, is this sort of DI style common?

Re: OCaml as my primary language

#239
post #235

Earlier quoted context omitted.

> How come Google doesn't want to have anything with Oracle They clearly don’t want to add anything which couldn’t be reasonably covered by the result of the previous trial. The list you give was all already there then. Moving to a more recent version of Java wouldn’t be. > OpenJDK is mostly a product from Oracle employees (about 80%) Sun employees, not Oracle employees. Using Sun technology was fine, using Oracle te…

I advise you to educate yourself who works and owns OpenJDK copyrights. Can start here, https://dev.java/contribute/openjdk/ "Once you have contributed several changes (usually two) you can become an Author. An author has the right to create patches but cannot push them. To push a patch, you need a Sponsor. Gaining a sponsorship is usually achieved through the discussions you had on the mailing lists. In order to bec…

You wrote than 80% of OpenJDK was written by Oracle employees. That’s patently untrue. Most of OpenJDK was written by Sun employees before Oracle bought Sun.

Your link doesn’t change any of that nor your clearly condescending comment before. You are perfectly aware of the fact by the way and you know exactly what I meant so I don’t really understand the game you are playing.

Oracle can claim Sun contribution as their own as much as they want. It doesn’t change the fact that you would have to be insane to touch anything they do now that it’s Oracle property.

Re: OCaml as my primary language

#240
post #53

Earlier quoted context omitted.

No, the problem is that dune=3.7.0 got removed from the registry entirely.

It is still there according to "opam show dune --all-versions", so no, it has not been removed. Anyways, what you could do is: opam pin add dune 3.7.0 opam install dune Alternatively, you can use the tarball directly: opam pin add dune https://github.com/ocaml/dune/releases/download/3.7.0/dune-3.7.0.tbz

I tried going back to change my Dockerfile to see if that would work, and it did not:

  RUN eval $(opam env) && opam pin add dune 3.7.0 && opam install --yes dune
Similar error to before:

  [ERROR] Package dune has no known version 3.7.0 in the repositories
You're right that I could change it to grab directly from GitHub, but at that point I can also just change it to a different version of Dune, as I said above. None of this negates my original point.
Post reply on HN