Live data from Hacker News

Scala on LLVM

greedy.github.io

21–30 of 41 posts

Re: Scala on LLVM

#21
post #15

This is a cool direction. Other than previous Scala knowledge, what are some advantages of using some sort of scala-native over Rust? I've used Scala and I always imagined that I'd use Rust if I wanted something similar without the ecosystem of JVM libraries.

> Other than previous Scala knowledge, what are some advantages of using some sort of scala-native over Rust?

For one, it isn't as low-level as Rust. That can be good or bad for your use-case.

Also, Scala has a bit more expressive type system than Rust so you get that. Scala has scalaz/cats and shapeless which aren't really possible in Rust.

Re: Scala on LLVM

#22
post #13

This may sound ridiculous, but I am literally sick of Java/JVM land. I would beg for native Scala backend (and it would be my first choice for doing pretty much every thing).I don't know people does share this opinion or not ,but I literally hate JVM.Slow Start up.Tremendously slow/unresponsive java app(I am talking about big apps, like android studio). Ridiculously bad font handling in Swing(there is no way to disab…

Not ridiculous; I'm with you.* I think that Scala is a solid, relatively modern language and that the Java ecosystem is bonkers. Something like Scala-the-language + Go-like tooling and deployment would make my day. (Maybe what I'm describing is Rust, which I admit I haven't taken more than a cursory look at even though I think it's interesting.)

*Assuming my agreement lowers the probability of being ridiculous, which is an open question… ;)

Re: Scala on LLVM

#25
post #15

This is a cool direction. Other than previous Scala knowledge, what are some advantages of using some sort of scala-native over Rust? I've used Scala and I always imagined that I'd use Rust if I wanted something similar without the ecosystem of JVM libraries.

Garbage collection (presumably - not sure what implementation they'll use, this is something that really matters for performance and where the JVM gives a big advantage). Higher-kinded types (supposedly coming in Rust eventually, but Scala has them today) and for/yield syntax. Easier closures that support some functional idioms better (made possible by having garbage collection). And even without Java libraries the library ecosystem for Scala is likely bigger than that for Rust.

Re: Scala on LLVM

#26
post #19
post #13

This may sound ridiculous, but I am literally sick of Java/JVM land. I would beg for native Scala backend (and it would be my first choice for doing pretty much every thing).I don't know people does share this opinion or not ,but I literally hate JVM.Slow Start up.Tremendously slow/unresponsive java app(I am talking about big apps, like android studio). Ridiculously bad font handling in Swing(there is no way to disab…

My opinion is exactly the opposite. The best thing about Scala is that it brings some niceties from FP-land while not looking entirely alien to Java developers, and you get to keep the JVM/Java ecosystem. Were it not for the Java-land compatibility & ecosystem requirement (and all the baggage associated with it, such as not alienating Java OOP programmers), I wouldn't use Scala. I'd probably ditch the OOP part of the…

What's the GUI story like for those other languages? I don't think I've ever seen a GUI program in Haskell. I've seen a few OCaml programs that use GTK and they don't look great (admittedly better than Swing, but worse than JavaFX IMO).

Re: Scala on LLVM

#27
post #3

This project has been discontinued. But fear not, a new scala-native is on the way, Denys Shabalin a phd student at EPFL is working on completely new implementation of scala-native. His previous work, scala offheap, a way to use off-heap memory on the JVM with type- and memory-safety is very impressive.

Really looking forward to hearing this talk! I wonder if there will be any potential for C++ interop. I would __LOVE__ to be able to code Scala that can be called from and in turn call C++ interfaces.

I mean, there's nothing stopping you from writing JNI wrappers; they work with anything that uses the JVM.

http://hohonuuli.blogspot.com/2013/08/a-simple-java-native-i...

Re: Scala on LLVM

#28
post #26
post #19

Earlier quoted context omitted.

My opinion is exactly the opposite. The best thing about Scala is that it brings some niceties from FP-land while not looking entirely alien to Java developers, and you get to keep the JVM/Java ecosystem. Were it not for the Java-land compatibility & ecosystem requirement (and all the baggage associated with it, such as not alienating Java OOP programmers), I wouldn't use Scala. I'd probably ditch the OOP part of the…

What's the GUI story like for those other languages? I don't think I've ever seen a GUI program in Haskell. I've seen a few OCaml programs that use GTK and they don't look great (admittedly better than Swing, but worse than JavaFX IMO).

To be honest, I don't know. I've done very little frontend programming in the last decade. I've no idea about Scala for the GUI either.

I'd be willing to learn how to write GUIs in any language.

PS: I see that Leksah (http://leksah.org/), a Haskell IDE, is written in Haskell using GTK. The screenshots look decent enough. Not sure if it's unpleasant to write a GUI app like that in Haskell.

Re: Scala on LLVM

#29
I've clearly been paying too much attention to politics. My first scan of headlines here left me asking, in which case before the Supreme Court was LLVM an issue?

Although I must admit I would love to read the late Scalia's opinion of LLVM.

Re: Scala on LLVM

#30
Apart from startup times, would this really be faster than the JVM? I don't know how the LLVM runtime stacks up - I'm guessing that there are a few targets eg traits that might be more efficient to implement in native code as Scala would be trying to work around what exists in the JVM and Java Bytecode but I have a feeling that it would be very specific use cases like embedded systems that would be considering LLVM as a target where as the JVM would still be preferred in most circumstances? I'm asking from a fairly naive place - I'm genuinely interested and curious to hear some use cases where LLVM would be almost strictly better.
Post reply on HN