Earlier quoted context omitted.
If you follow the installation instructions on oxcaml.org, you’ll get a patched Merlin with LSP support etc. It’s not perfect, but does mostly work out of the box with VSCode and the OCaml Platform extension.
Error squiggles and ocamlformat stopped working for me after the first time I restarted VS Code, compared to regular OCaml. They do work fine through the Dune CLI though.
OxCaml - a set of extensions to the OCaml programming language.
111–120 of 128 posts
Re: OxCaml - a set of extensions to the OCaml programming language.
#112Earlier quoted context omitted.
> > Not seeing much of a point in this > ...I don't understand what you mean here. Yeah it seems there was a mistake there, it looks like my comment got cut off while you were reading it. Try reloading the page maybe?
Your comment remains completely stupid regardless of how much of it is in the quote. OxCaml's goal is to be upstreamed. "I don't see the point in this unless people have programs using OCaml" and it's like, yeah, that's the point of adding features to a computer program. Any computer program. Because people already use the computer program and it will be useful to them.
Re: OxCaml - a set of extensions to the OCaml programming language.
#113The first feature that originated in this fork to be upstreamed is labeled tuples, which will be in OCaml 5.4: https://github.com/ocaml/ocaml/pull/13498 https://discuss.ocaml.org/t/first-alpha-release-of-ocaml-5-4...
> Because sum:int * product:int is a different type from product:int * sum:int, the use of a labeled tuple in this example prevents us from accidentally returning the pair in the wrong order, or mixing up the order of the initial values. Hmm, I think I like F#'s anonymous records better than this. For example, {| product = 6; sum = 5 |}. The order of the fields doesn't matter, since the value is not a tuple.
Re: OxCaml - a set of extensions to the OCaml programming language.
#114Earlier quoted context omitted.
The implication here, I think, is that "Jane Street has foolishly invested heavily into Ocaml and, rather than sensibly change course and migrate away, they continue to invest heavily into it in the hopes that one day the investment will pay off." Which is a ridiculous take: Jane Street has done extraordinarily well for themselves, possibly at least in part because of their investment in Ocaml, and any sort of migrat…
I do think Jane Street fell into a sunk cost fallacy when they first stuck to OCaml. But after having invested further into an OCaml/OxCaml codebase, teams and tooling, switching tech stacks has lost most of its value. Also, their efforts benefit me greatly as an OCaml (now maybe OxCaml) user, so I'm glad they took that path.
Re: OxCaml - a set of extensions to the OCaml programming language.
#115Earlier quoted context omitted.
Why? They have one of the largest Ocaml codebases in the world. It has clearly work out VERY well for them, in terms of productivity and pure ROI in features and revenue. Ocaml has so much good going on, even being a less known language. I assume you are a rust fanboy, and i want to see just how long your smirk holds when you compile a 20M LOC project that takes 45 minutes.
I've never written a line of Rust in my life, but I unfortunately had the great displeasure to write OCaml. OCaml is a terrible choice for (anyone) a company like this. They NEED to be able to hire the very best of the best, but choosing an exotic language that is less palatable than a plate of shit and more cryptic than alien hieroglyphs restricts your talent pool A LOT. I'm not saying people cannot learn it, I'm sa…
This is literally why they've chosen Ocaml. Yaron Minsky has often stated that interest in a language like this is effectively a filter and magnet for extremely smart and curious people, he credits Ocaml with being an advantage in that regard.
They don't care about transferable skills either. People at Jane Street earn hundreds of thousands per year starting out, virtually nobody ever leaves, you're set for life after a decade there.
Aso Ocaml is a pretty standard ML. If you think it's unreadable alien hieroglyphs its fair to say you're not the demographic they're trying to attract, so the system is working.
Re: OxCaml - a set of extensions to the OCaml programming language.
#116The Janet Street folks, who created this, also did an interesting episode[0] of their podcast where they discuss performance considerations when working with OCaml. What I was curious about was applying a GC language to a use case that must have extremely low latency. It seems like an important consideration, as a GC pause in the middle of high-frequency trading could be problematic. [0] https://signalsandthreads.com…
Me: [W]hy not just use Rust for latency sensitive apps/where it may make sense? Is JS using any Rust?
Minsky: Rust is great, but we get a lot of value out of having the bulk of our code in a single language. We can share types, tools, libraries, idioms, and it makes it easier for folk to move from project to project.
And we're well on our way to getting the most important advantages that Rust brings to the table in OCaml in a cleanly integrated, pay as you go way, which seems to us like a better outcome.
There are also some things that we specifically don't love about Rust: the compile times are long, folk who know more about it than I do are pretty sad about how async/await works, the type discipline is quite complicated, etc.
But mostly, it's about wanting to have one wider-spectrum language at our disposal.
[0]: https://x.com/arr_ohh_bee/status/1672224986638032897Re: OxCaml - a set of extensions to the OCaml programming language.
#117Earlier quoted context omitted.
The syntax is a little funny for mostly historical reasons. The curly braces are only part of the record type syntax. There's no ambiguity there because curly braces aren't used for anything else in type annotations (well, except for named parameters inside a function type's parameter list, but that's a different part of the grammar).
so my examples would be (1, (sum:2)) and (1, sum:2)?
Re: OxCaml - a set of extensions to the OCaml programming language.
#118I wasn't aware that this fork supported SIMD! Between this, unboxed types and the local mode with explicit stack allocation, OxCaml almost entirely replaces my past interest in F#; this could actually become usable for gamedev and similar consumer scenarios if it also supported Windows.
Yeah, this would be great! Currently only 128-bit SSE/NEON is working but AVX is coming very soon. There's also nothing blocking Windows, but it will require some work. (I added the SIMD support in OxCaml)
Re: OxCaml - a set of extensions to the OCaml programming language.
#119Earlier quoted context omitted.
I've never written a line of Rust in my life, but I unfortunately had the great displeasure to write OCaml. OCaml is a terrible choice for (anyone) a company like this. They NEED to be able to hire the very best of the best, but choosing an exotic language that is less palatable than a plate of shit and more cryptic than alien hieroglyphs restricts your talent pool A LOT. I'm not saying people cannot learn it, I'm sa…
>They NEED to be able to hire the very best of the best, This is literally why they've chosen Ocaml. Yaron Minsky has often stated that interest in a language like this is effectively a filter and magnet for extremely smart and curious people, he credits Ocaml with being an advantage in that regard. They don't care about transferable skills either. People at Jane Street earn hundreds of thousands per year starting ou…
Re: OxCaml - a set of extensions to the OCaml programming language.
#120Earlier quoted context omitted.
This will decrease performance because of reduced locality. Maybe increased jitter because of TLB misses.
Compared to what, running a garbage collector?