News for hackers. Stuff that matters.
Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by steveklabnik on Saturday May 27, 2023 @05:16PM (#36098401)
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.
Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by carlmr on Saturday May 27, 2023 @05:48PM (#36098682)
Rust is its own father? I think the borrow checker will make this difficult.
Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by steveklabnik on Saturday May 27, 2023 @06:17PM (#36098938)
Lol, oops: I meant OCaml, if that wasn’t obvious.
Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by cpeterso on Saturday May 27, 2023 @06:28PM (#36099032)
OCaml is quite literally a parent of Rust since the original Rust compiler was written in OCaml. (I know you know that; I'm just highlighting how apt the analogy was. :)

https://github.com/rust-lang/rust/tree/ef75860a0a72f79f97216...

Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by carlmr on Saturday May 27, 2023 @07:17PM (#36099382)
It was, but it was hard to resist commenting on the self-referential nature of it that Rust often has problems with.
Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by riwsky on Saturday May 27, 2023 @06:13PM (#36098914)
Just need support for recursive lifetimes
Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by still_grokking on Sunday May 28, 2023 @03:14AM (#36101855)
Serious question: How would that work?
Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by steveklabnik on Sunday May 28, 2023 @10:19AM (#36104211)
What do you mean by “that,” specifically? A bit hard to know what exactly you’re asking.
Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by still_grokking on Sunday May 28, 2023 @01:38PM (#36106087)
Recursive lifetimes. The idea of the gp.
Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by steveklabnik on Sunday May 28, 2023 @02:22PM (#36106447)
Oh gosh, so I had seen your comment on mobile, and couldn't tell who you were replying to. I thought you were asking about "OCaml and C had a baby."

I have no idea, maybe your original parent will elaborate :)

Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by riwsky on Wednesday May 31, 2023 @02:16AM (#36135102)
I don’t understand the confusion. It’s all right there, on page 404 of the rust spec:

> Parameters with a recursive lifetime can only be used in a tail-call position within a function. If a function with only recursive params compiles successfully, it is guaranteed not to grow the stack.

For the self-recursive case, people are likely better off just writing the imperative version. But using these with mutual recursive calls lets you build safely build state machines that compile down to the same performant code a classic goto-based implementation would in C.

Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by still_grokking on Wednesday May 31, 2023 @03:37AM (#36135574)
Sounds reasonable.
Re:Jane Street Tech Blog – Oxidizing OCaml: Locality by evntdrvn on Saturday May 27, 2023 @08:45PM (#36100001)
I joke with people that F# is “easy-button Rust”, so that also tracks lol