Live data from Hacker News

Oxidizing OCaml: Locality

blog.janestreet.com

11–20 of 72 posts

Re: Oxidizing OCaml: Locality

#11
post #7

This is a great idea, but I have questions * Is there a process for upstreaming this into the mainline language, or is this essentially JaneStML now? * Why choose such an obscure word as `exclave` to indicate return-value optimization? How about `return local` or something similarly approachable?

They always had their own version of the compiler: https://github.com/ocaml-flambda/ocaml-jst/tree/main

Many of their changes have been ported to the 'official' OCaml compiler.

Re: Oxidizing OCaml: Locality

#12
post #3

I believe this is an explanation (part of) of this proposal: https://github.com/ocaml-flambda/ocaml-jst/blob/main/jane/do...

It's this proposal: https://github.com/ocaml-flambda/ocaml-jst/blob/main/jane/do... and these problems: https://github.com/ocaml-flambda/ocaml-jst/blob/main/jane/do...

Yes - upcoming posts will cover the uniqueness and data-race-freedom designs.

Re: Oxidizing OCaml: Locality

#13
post #7

This is a great idea, but I have questions * Is there a process for upstreaming this into the mainline language, or is this essentially JaneStML now? * Why choose such an obscure word as `exclave` to indicate return-value optimization? How about `return local` or something similarly approachable?

Using obscure works makes some people feel smart.

Re: Oxidizing OCaml: Locality

#14
post #7

This is a great idea, but I have questions * Is there a process for upstreaming this into the mainline language, or is this essentially JaneStML now? * Why choose such an obscure word as `exclave` to indicate return-value optimization? How about `return local` or something similarly approachable?

Exclave is also a (PPX - that's a kind of preprocessor for generating the actual code) keyword: `[%exclave]`. Using this avoids name clashes.

See: https://ocaml.org/docs/metaprogramming

Re: Oxidizing OCaml: Locality

#15
post #7

This is a great idea, but I have questions * Is there a process for upstreaming this into the mainline language, or is this essentially JaneStML now? * Why choose such an obscure word as `exclave` to indicate return-value optimization? How about `return local` or something similarly approachable?

Using obscure works makes some people feel smart.

Explain std::launder then - https://en.cppreference.com/w/cpp/utility/launder - it's simple word, mostly used when talking about dirty money ;) - but hey - I've still no idea how/when/why to use it...

;)

Re: Oxidizing OCaml: Locality

#16
I've been listening to Signals and Threads podcast, and I remember listening to this episode - https://signalsandthreads.com/memory-management/

(I don't know neither Ocaml, nor Haskell, or any ML language), but the podcast is always fun to listen to (not only programming also)

Now would relisten this, and may actually understand it!

Re: Oxidizing OCaml: Locality

#18
post #16

I've been listening to Signals and Threads podcast, and I remember listening to this episode - https://signalsandthreads.com/memory-management/ (I don't know neither Ocaml, nor Haskell, or any ML language), but the podcast is always fun to listen to (not only programming also) Now would relisten this, and may actually understand it!

[deleted]

Re: Oxidizing OCaml: Locality

#19
post #7

This is a great idea, but I have questions * Is there a process for upstreaming this into the mainline language, or is this essentially JaneStML now? * Why choose such an obscure word as `exclave` to indicate return-value optimization? How about `return local` or something similarly approachable?

Our long term aim is to upstream all of our work from our branch of the OCaml compiler. Of course, that is contingent on the ideas we’re developing there being accepted by the community. There are two main reasons we work on our own branch:

1. Language design is hard. At Jane Street we have a great opportunity to design new features, test them extensively in a realistic environment, and then change them. Because we have access to the entire code base where the features are deployed, we can even change concrete syntax relatively easily. So by developing internally, releasing internally, and then upstreaming with experience, we can be more confident that the feature design is correct.

2. We get a faster turnaround between idea conception and internal deployment. Working solely with upstream, we would develop an idea, go through a long design discussion with upstream, implement, merge, wait for release, wait for the rest of Jane Street to be ready to upgrade, and upgrade. Now, we can implement an idea in parallel with its design, rolling it out internally in stages (as appropriate), and then upstream later. This is a big win for us, and well worth the extra time spent moving changes back and forth.

> Why choose such an obscure word as `exclave`

We discussed a lot of possible choices and eventually decided this was the best one. I personally think names should either be self-explanatory or memorable -- so that once they have been explained they aren't forgotten -- here we went with memorable. As a word, exclave also captures what is going on in terms of part of the parent region being contained within the child region. `return local` was a strong contender, but it implies that `exclave` is always about functions -- whereas the actual feature is a bit more general than that. It is also a bit easier, when adding new keywords, if you pick a word that isn't used much, and `return` is used a lot.

Re: Oxidizing OCaml: Locality

#20
Is Ocaml actually good or is it a meme that people use it and become obsessed with it. How is the transition if you mostly code imperatively? Are there things that are not ergonomic for it to do like GUIs or games?
Post reply on HN