News for hackers. Stuff that matters.
Re:Multicore OCaml: April 2021 by systems on Thursday May 13, 2021 @09:35AM (#27141889)
OCaml is everything D wanted to be, but failed

OCaml is high performance, Garbage Collected, hybrid system and application programming language

You can use OCaml to write high performance Apps and System tools without worrying too much about performance, or doing crazy manual memory management

I would also say, if you like Go, but think you hit a wall with it, then try OCaml

system programming language: C, C++, Rust

Hybrid system and application languages: OCaml, Go , D

If you need a language in this class (Hybrid system and app)I think currently Go and OCaml are your only options, Go being closer to C, Java familly of languages and OCaml is an ML language, so choose as per your preference

Re:Multicore OCaml: April 2021 by Serow225 on Thursday May 13, 2021 @11:56AM (#27143602)
F# would probably sit in there somewhere too a little more on the app than system side, although you don't see many uses of the more low-level stuff that's been made available in the later releases of .NET, it's there for use in F#
Re:Multicore OCaml: April 2021 by abhijat on Thursday May 13, 2021 @10:20AM (#27142372)
Is Haskell a good fit for your hybrid category, similar to go and ocaml, considering it also compiles to native?

I haven't heard of Haskell being used for the kind of "high level" systems programming that go is used for.

Re:Multicore OCaml: April 2021 by willtim on Thursday May 13, 2021 @12:26PM (#27144038)
In my opinion, as a professional haskell developer, it is too hard to reason about the runtime space usage of Haskell programs to ever recommend Haskell as a "systems programming language". Haskell would be great for writing a DSL for generating such code though.
Re:Multicore OCaml: April 2021 by vips7L on Thursday May 13, 2021 @11:08AM (#27142942)
Why do you think D isn't an option?
Re:Multicore OCaml: April 2021 by systems on Thursday May 13, 2021 @11:24AM (#27143164)
Well, D have a GC, and by design cannot have a GC with good performance, because of its complex mutable object system

OCaml, can achieve good GC performance because its immutable by default

D by design, will never outperform OCaml, at least this is my understanding

That, and I think D's community is too small to fix the language, while it does have several brilliant members and developer, its just too small and underfunded

So, you have two reason why D should not be an option the first technical ( D will never have a good GC ) the second is more of a logistics issue, the community is just not there to support a language as complex and as ambitious as D and deliver on all its claims

Re:Multicore OCaml: April 2021 by vips7L on Thursday May 13, 2021 @11:48AM (#27143447)
> Well, D have a GC, and by design cannot have a GC with good performance, because of its complex mutable object system. OCaml, can achieve good GC performance because its immutable by default

I'm not so sure considering Java probably has better GC performance than D/OCaml/Go and is completely mutable.

Re:Multicore OCaml: April 2021 by rixed on Thursday May 13, 2021 @10:45PM (#27150109)
Java GC is only efficient if you allow it to be wasteful. I'm regularly running hundreds of different ocaml programs on a single machine and I trust ocaml GC to actually collect the garbage. I would not trust tens of java processes in default GC mode, which seems to be tuned for cases where a single process own the whole machine.

Hopefully, the multicore GC will be as good, or one will be able to disable multicore abilities when not in use (which is going to be most of the time, I believe)

Re:Multicore OCaml: April 2021 by systems on Thursday May 13, 2021 @01:03PM (#27144514)
what i know is that it is inherently harder to have good GC performance with mutable language

and as i said D has a very small community Java is on the opposite side of this spectrum its immensely popular, and as I understand it took Java several iteration, and tons of resources before gaining good performance, and still today, Java optimization is a specialized experts job

Re:Multicore OCaml: April 2021 by vips7L on Thursday May 13, 2021 @01:39PM (#27144918)
> Java optimization is a specialized experts job

No its not. Modern Java GC's require 0 tuning. ZGC with default settings can achieve submillisecond pauses.

> and as i said D has a very small community Java is on the opposite side of this spectrum its immensely popular, and as I understand it took Java several iteration, and tons of resources before gaining good performance

This wasn't your argument. You stated that mutability was the reason that D couldn't have a good GC, not the size of its community or resources. According to tiobe D is more popular than OCaml as well.

Re:Multicore OCaml: April 2021 by pjmlp on Thursday May 13, 2021 @01:38PM (#27144908)
D also suffers from the community always racing after the next big thing without fixing the current set of issues.
Re:Multicore OCaml: April 2021 by pjmlp on Thursday May 13, 2021 @01:36PM (#27144893)
That language is C# not OCaml, specially with the improvements done after version 7.