News for hackers. Stuff that matters.
Re:What's Next for Scala by pjmlp on Saturday April 11, 2020 @11:42AM (#22842227)
Since the post mentions Scala Native, all these guest language projects that eschew the platform that made them famous and try to pursue the dream of being their own platform, while building an ecosystem, GC and optimising compiler from scratch (even if they build on LLVM or compile via C/C++), would be much better taking advantage of AOT and JIT caches from several JVM implementations instead of pretending they don't exist.
Re:What's Next for Scala by spir on Saturday April 11, 2020 @01:08PM (#22842718)
In my mind, GraalVM native compilation has superseded scala-native.

GraalVM native compilation works really well. Many projects will compile to native out of the box. Many more with a bit of reflection config that's autogenerated. The native executables are slim, statically linked so they "just work", and startup instantly as one would expect.

Scala is now a great choice for CLI tools.

Re:What's Next for Scala by vips7L on Saturday April 11, 2020 @04:27PM (#22843965)
Native image works well without dependencies. I tried to get Weld and other JEE deps running in a smaller project and it was foot gun after footgun.

I'm hoping in the future the native-image friction can be lowered, but as of now it's not trivial like other languages.

Re:What's Next for Scala by tutanchamun on Saturday April 11, 2020 @05:30PM (#22844407)
> statically linked so they "just work"

If I remember correctly you have to redistribute some .dll (VC something) file alongside your .exe on Windows since fresh Windows installations don't have the .dll. Did that change?

Re:What's Next for Scala by spir on Sunday April 12, 2020 @11:12AM (#22848729)
I haven't tried GraalVM native-image on Windows :(
Re:What's Next for Scala by vbezhenar on Saturday April 11, 2020 @02:42PM (#22843289)
> The native executables are slim

What's the size of hello_world.exe?

Re:What's Next for Scala by LandR on Saturday April 11, 2020 @06:45PM (#22844779)
Dunno about Scala, but Clojure - another JVM language, has a GraalVM native executable for Hello WOrld about 8MB.

Not that slim.

Re:What's Next for Scala by vips7L on Saturday April 11, 2020 @08:06PM (#22845118)
How does that compare to similar languages? (Go, Nim, D, etc).
Re:What's Next for Scala by kbd on Saturday April 11, 2020 @11:03PM (#22845756)
For reference:

    $ \cat hellogo.go
    package main
    
    import "fmt"
    
    func main() {
      fmt.Println("hello")
    }
    $ go build hellogo.go
    $ \cat hellonim.nim
    echo "hello"
    $ nim c hellonim.nim
    ...
    $ ll
    total 2.2M
    -rwxr-xr-x 1 kbd staff 2.1M Apr 11 20:55 hellogo*
    -rw-r--r-- 1 kbd staff   66 Apr 11 20:42 hellogo.go
    -rwxr-xr-x 1 kbd staff  87K Apr 11 20:55 hellonim*
    -rw-r--r-- 1 kbd staff   13 Apr 11 20:29 hellonim.nim
Keep in mind these are the default compilation settings.
Re:What's Next for Scala by zmmmmm on Saturday April 11, 2020 @08:09PM (#22845136)
Not too bad if it's truly statically linked though ...
Re:What's Next for Scala by abhijat on Saturday April 11, 2020 @02:58PM (#22843385)
Are they statically linked by default now?

Last I looked (a couple of months ago) the executable produced linked dynamically but there was a flag to link statically.

Re:What's Next for Scala by kasperni on Saturday April 11, 2020 @12:46PM (#22842578)
Looking at the commit log, Scala Native looks pretty dead https://github.com/scala-native/scala-native/commits/master
Re:What's Next for Scala by maddening on Sunday April 12, 2020 @01:17PM (#22849580)
Previous maintainer left EPFL so nothing was happening there. But Scala Center took over the project so they will start maintaining it. AFAIR snnouncement was on Gitter by the same guy who maintains Scala.js. I guess it will take some time for them to catch up with the rest.