News for hackers. Stuff that matters.
Re:Scala Native by badlogic on Wednesday May 11, 2016 @03:23PM (#11678421)
How's the managed runtime implemented (GC, memory model, etc.)? How did you get rid of JVM and JRE class library dependencies of Scala? What's the debugging story? I'd be great if this kind of info found its way onto th website. Is this in any way related to vmkit?

Excited about this, keep up the great work!

Re:Scala Native by densh on Wednesday May 11, 2016 @06:44PM (#11679982)
> How's the managed runtime implemented (GC, memory model, etc.)?

In a first release we're going to use Boehm GC. That's just a stepping stone, not a long-term strategy. Stay tuned for news on this front.

> How did you get rid of JVM and JRE class library dependencies of Scala?

We're reimplementing / porting from Apache Harmony all the things we need.

> What's the debugging story?

We're going to integrate with lldb.

> Is this in any way related to vmkit?

Not related in any way, apart from being based on LLVM.

Re:Scala Native by airless_bar on Wednesday May 11, 2016 @06:56PM (#11680048)
> We're reimplementing / porting from Apache Harmony all the things we need.

Doesn't that create licensing issues? You already seem to have code from Harmony in the project, but the project's license is neither Apache nor does it mention it.

Additionally, won't that cause trouble with Oracle, considering the lawsuit against Google?

Re:Scala Native by densh on Wednesday May 11, 2016 @07:17PM (#11680178)
We're are going to have an official guide on licensing in next few days.
Re:Scala Native by petecox on Wednesday May 11, 2016 @07:59PM (#11680381)
> We're reimplementing / porting from Apache Harmony all the things we need.

Would GCJ be any use? They had native compilation over a decade ago.

(Although developers moved on to IcedTea, iirc)

Re:Scala Native by emeryberger on Thursday May 12, 2016 @08:32AM (#11682849)
Hans Boehm's GC is actually really, really good. Before you embark on a massive engineering effort that will likely lead to little gain and a lot of pain, I would measure the overheads very carefully. I am not at all convinced precise GCs buy you that much over the Boehm GC for most apps, and they fundamentally kill interop with C code.

(I can't recall for sure but I believe I had this conversation with Martin in a taxi ride not too long ago :)

Re:Scala Native by needusername on Thursday May 12, 2016 @10:35AM (#11683680)
Mono was a long time on Hans Boehm's GC and despite feeding it a lot of metadata never got satisfying results with it. Eventually they replaced it with a custom GC (SGen).
Re:Scala Native by more_original on Wednesday May 11, 2016 @04:34PM (#11679012)
Looks like it's currently using the Boehm–Demers–Weiser conservative garbage collector. In scala-native/rtlib/src/main/resources/rt.cpp it includes gc.h and allocates memory using GC_malloc, i.e. not in precise mode.
Re:Scala Native by airless_bar on Wednesday May 11, 2016 @04:54PM (#11679183)
Ouch.
Re:Scala Native by amelius on Wednesday May 11, 2016 @05:09PM (#11679303)
The garbage collector is typically the most difficult part of a language implementation, so I'm not surprised. On the other hand, a simple GC can be sufficient for many projects.
Re:Scala Native by broodbucket on Wednesday May 11, 2016 @09:13PM (#11680667)
They can still replace it later once they're further along with the rest of the implementation. I doubt they'll keep it.