Live data from Hacker News

Oxidizing OCaml: Locality

blog.janestreet.com

41–50 of 72 posts

Re: Oxidizing OCaml: Locality

#41
post #22

Earlier quoted context omitted.

Nowadays my primary concern is readability and understandability. Thrown into a codebase, can I understand what's going on? OCaml (which at FB was used to write the Flow typechecker and Hack compiler afair) favored higher order functions. I enjoyed playing with these in my Haskel-based introduction course at university, and I even wrote a similar language that favored them. But I now heavily dislike if `a b c` means…

Yeah I think it’s kind of like how pg wrote about how using lisp gave him a disproportionate advantage. Sure, when people used fewer dependencies and the alternatives were C++, Python v1, and Perl, but these days a lot of languages have Lisp features and the cost of using a niche language is worse dependencies and tooling.

PG’s disproportionate advantage was productivity - despite LISPs disadvantages - which he writes about in depth here: http://www.paulgraham.com/avg.html I suspect that productivity gap would still exist because the primary productivity feature is macros, which are still either uncommon or limited in other languages:

  The source code of the Viaweb editor was probably about 20-25% macros. Macros are harder to write than ordinary Lisp functions, and it's considered to be bad style to use them when they're not necessary. So every macro in that code is there because it has to be. What that means is that at least 20-25% of the code in this program is doing things that you can't easily do in any other language.
So why doesn’t LISP rule the software universe? I presume it is because it takes exceptional skill and taste to use macros productively. I also suspect it requires a small team because everyone needs to deeply understand many macros which are unique to the system developed - deep customisation has its costs. Certainly I have worked with plenty of programmers where I was pleased they didn’t have access to macros!

PG has created two other languages (ARC and Bel) which shows a high level of skill, and perhaps also shows that LISP is not his ideal language? He wrote this about designing a programming language: http://www.paulgraham.com/popular.html and he writes about the history of LISP here: http://www.paulgraham.com/icad.html which also talks about productivity:

  if you were to compete with ITA and chose to write your software in C, they would be able to develop software twenty times faster than you [by using LISP].
  ITA's hackers seem to be unusually smart

Re: Oxidizing OCaml: Locality

#42
post #33

Earlier quoted context omitted.

Rust is its own father? I think the borrow checker will make this difficult.

Lol, oops: I meant OCaml, if that wasn’t obvious.

It was, but it was hard to resist commenting on the self-referential nature of it that Rust often has problems with.

Re: Oxidizing OCaml: Locality

#43
post #24
post #15

Earlier quoted context omitted.

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

Using simple words in confusing contexts also makes people feel smart. Essentially any way of being technically correct in confusing ways has this effect; "I'm so much smarter that you can't even understand _why_ I'm right" is too juicy a flex for some people to avoid.

https://twitter.com/ciura_victor/status/1662536472342192128

"Rinse and repeat That’s my std::launder joke "

best answer I've got so far :)

Re: Oxidizing OCaml: Locality

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

I'm curious, which episodes are describable as "not only programming"? I ask since I can't think of one.

Re: Oxidizing OCaml: Locality

#45
post #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 h…

This process seems to intentionally cut off upstream from having input into the design of the features during development when there's still a chance to change it. What happens when you implement something that you like, release it internally, but then it turns out upstream doesn't like it or wants it a different way? Will you maintain your feature on your fork forever (thus JaneStML), or will you abandon your feature? Is the thought that, honestly, this will never happen given Jane Street's track record in the community and the level of battle testing that this process brings to the design process?

Re: Oxidizing OCaml: Locality

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

I'm curious, which episodes are describable as "not only programming"? I ask since I can't think of one.

You are probably right, wrong recollection then, or it might've been an episode where some time was spent on talking about other important points - culture, life, etc.

Podcasts (not only this one) have evolved a lot! (another fav of mine is "Go Time" and many others).

Re: Oxidizing OCaml: Locality

#47
post #19

Earlier quoted context omitted.

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 h…

This process seems to intentionally cut off upstream from having input into the design of the features during development when there's still a chance to change it. What happens when you implement something that you like, release it internally, but then it turns out upstream doesn't like it or wants it a different way? Will you maintain your feature on your fork forever (thus JaneStML), or will you abandon your featur…

[deleted]

Re: Oxidizing OCaml: Locality

#48

Earlier quoted context omitted.

I think it was Steve Klabnik who said that it's basically the version of Rust with a garbage collector that people ask for. Might have been this episode of Oxide and Friends: https://oxide.computer/podcasts/oxide-and-friends/1208089

Rust was originally described to me as “Rust and C have a baby,” so yeah I’ve been a fan of this kind of thinking for a long time.

I joke with people that F# is “easy-button Rust”, so that also tracks lol

Re: Oxidizing OCaml: Locality

#49
Can someone explain to me why Jane Street - a trading firm - is so all in on OCaml?

There's lots of other choices that would be easier to recruit for, with wider community and industry support.

Where does the Jane Street commitment to Ocaml come from?

Re: Oxidizing OCaml: Locality

#50

Can someone explain to me why Jane Street - a trading firm - is so all in on OCaml? There's lots of other choices that would be easier to recruit for, with wider community and industry support. Where does the Jane Street commitment to Ocaml come from?

My recollection is that their systems used to be based on Excel (in the very beginning). A new hire (Yaron Minsky) started using Ocaml for some research project and it stuck.
Post reply on HN