Live data from Hacker News

Announcing Scala.js v0.1

scala-lang.org

41–50 of 90 posts

Re: Announcing Scala.js v0.1

#41
I'm finding a sort of corollary of JavaScript being a byte-code equivalent for the web, what with everything being translated to compilation in js syntax.

Maybe the browsers need to move beyond JavaScript interpretation, and think about things more like a VM to allow actual scala/java/c#/ruby/python/erlang/lua/something-completely-new/etc. to be executed in context.

Or, maybe a more forward-thinking approach would be to consider "docker in the browser" -- containers that run in execution. Probably a performance nightmare, but I'm thinking of an interesting compilation of bits -- CMS done well in Ruby, an e-commerce cart in Python, data charts in Erlang, and enterprise-based workflows in Java -- all working together, client-side.

Disclaimer: it's a holiday and I'm enjoying a nice cabernet sauvignon. Thought clarity and consistency may not necessarily be present at this point in time.

Re: Announcing Scala.js v0.1

#42
post #5
post #2

I wonder how complicated it is to parse JSON in Scala.js. It's pretty involved in regular Scala and incredibly easy in JavaScript, so what's it like in Scala.js?

Parsing JSON in Scala is very easy with lift-json: https://github.com/lift/lift/tree/master/framework/lift-base...

Lots of options, see the complete list here: http://stackoverflow.com/a/14442630

We use Argonaut at Snowplow.

Re: Announcing Scala.js v0.1

#43

Earlier quoted context omitted.

Scala's compile times (along with other aspects of its development experience) are among my biggest annoyances with the language. It just seems like it should be way better than it is for such an intellectually advanced language. I've been investing a lot of time in learning Scala because I think that it's at the head of the vanguard of a software engineering revolution, but with some of its ergonomic issues, I can't…

Take a look at Kotlin ( http://kotlin.jetbrains.org ), it was designed to address the issues you mention.

Fascinating, thanks! For anyone else interested, I found this to be useful: http://confluence.jetbrains.com/display/Kotlin/Comparison+to...

Re: Announcing Scala.js v0.1

#44

As someone who doesn't really know anything about scala, why is this a cool thing? While such an early release is definitely aimed at scala enthusiast, I'd still like a sales pitch for the rest of us.

Mmmmm basically I think it's because Scala itself is in a really captivating position, so seeing these utilities emerge makes it that much more promising.

I've switched from RoR to Scala on Play framework and at this point it's one of those things where you use & say "this is sick" but are still discouraged because the community is so small in comparison.

But with Akka, with the Typesafe Console & other niceties you realize "hm.. well... maybe the community isn't as large but they are prepping the toolset to be immensely powerful". And here is one more tool on that belt. I'm sure the reason is different for others, but just note that Scala is a JVM language competing in the same space as Ruby/Python, as well as with some of the functional languages. That alone is huge and making it a great general purpose language.

Re: Announcing Scala.js v0.1

#45

I'm finding a sort of corollary of JavaScript being a byte-code equivalent for the web, what with everything being translated to compilation in js syntax. Maybe the browsers need to move beyond JavaScript interpretation, and think about things more like a VM to allow actual scala/java/c#/ruby/python/erlang/lua/something-completely-new/etc. to be executed in context. Or, maybe a more forward-thinking approach would be…

[deleted]

Re: Announcing Scala.js v0.1

#47
post #44

As someone who doesn't really know anything about scala, why is this a cool thing? While such an early release is definitely aimed at scala enthusiast, I'd still like a sales pitch for the rest of us.

Mmmmm basically I think it's because Scala itself is in a really captivating position, so seeing these utilities emerge makes it that much more promising. I've switched from RoR to Scala on Play framework and at this point it's one of those things where you use & say "this is sick " but are still discouraged because the community is so small in comparison. But with Akka, with the Typesafe Console & other niceties you…

In my mind, Akka is the reason to use Scala right now. Actors are an incredibly powerful abstraction for building highly-concurrent, highly performant systems and the features Akka brings along—remoting, clustering and now event sourcing—make it a fantastic tool for these applications.

But then, I'm a backend developer and Akka is more useful in that realm.

Play still needs some work IMO. It's great if you need the real-time steaming or a very performant web app but otherwise the lack of scaffolding and other features will really slow you down. I love it but it's still early for most uses. If you come in expecting Rails, you'll be disappointed. For instance, you need to write your own authentication layer, Play doesn't provide one.

OTOH, I was able to write a real-time cluster monitor in Play for our Akka-based backend and the streaming component took less time to write than the setting up the app—it's that straightforward.

IMO, if you need them, Play's other features more than make up for its less polished aspects and I fully expect those to get fixed in time, especially now that Typesafe has brought Play under its wing.

Re: Announcing Scala.js v0.1

#48

Too bad that there is not more effort on Scala.NET instead of this. Lots of people are comfortable with writing Javascript in the browser so all of these compilers emitting Javascript end up being little more than a technology demo. But Scala on the .NET vm would really fill a gap.

I used to wish for this also. But then I found C# to be pretty good; maybe it doesn't have as many features as Scala, but it is definitely a step up from Java.

The demand for Scala on .NET just doesn't seem to be that large, couple with the fact that reified generics make encoding Scala directly kind of difficult (Nikolay Mihaylov spent a lot of time on that).

Re: Announcing Scala.js v0.1

#50

Too bad that there is not more effort on Scala.NET instead of this. Lots of people are comfortable with writing Javascript in the browser so all of these compilers emitting Javascript end up being little more than a technology demo. But Scala on the .NET vm would really fill a gap.

I used to wish for this also. But then I found C# to be pretty good; maybe it doesn't have as many features as Scala, but it is definitely a step up from Java. The demand for Scala on .NET just doesn't seem to be that large, couple with the fact that reified generics make encoding Scala directly kind of difficult (Nikolay Mihaylov spent a lot of time on that).

>> But then I found C# to be pretty good; maybe it doesn't have as many features as Scala, but it is definitely a step up from Java.

I left C# to do Java, Java is a step up from C#.

Post reply on HN