Live data from Hacker News

Scala.js has a new website

scala-js.org

1–10 of 31 posts

Re: Scala.js has a new website

#2
While I love scala, I have 2 concerns that have stopped me from using scala.js: 1) can I use typescript definitions to avoid writing everything myself? 2) how much bloat does this add to my app? (from overhead of standard libs and core)

Re: Scala.js has a new website

#3

While I love scala, I have 2 concerns that have stopped me from using scala.js: 1) can I use typescript definitions to avoid writing everything myself? 2) how much bloat does this add to my app? (from overhead of standard libs and core)

There is a way to transform a typescript definition to Scala.js facade (https://github.com/sjrd/scala-js-ts-importer).

As for the bloat, it isn't much. Compiled Javascript for our full-fledged app is about 180KB (gzipped) + external libraries such as React.

Re: Scala.js has a new website

#4

While I love scala, I have 2 concerns that have stopped me from using scala.js: 1) can I use typescript definitions to avoid writing everything myself? 2) how much bloat does this add to my app? (from overhead of standard libs and core)

There is a way to transform a typescript definition to Scala.js facade ( https://github.com/sjrd/scala-js-ts-importer ). As for the bloat, it isn't much. Compiled Javascript for our full-fledged app is about 180KB (gzipped) + external libraries such as React.

Don't take this the wrong way, but I've been in the industry for a long time... and it amazes me that 180KB is considered not much...

If I told you I had a way to remove 180KB from every page load, you'd be all over it. :)

Re: Scala.js has a new website

#5
post #4

Earlier quoted context omitted.

There is a way to transform a typescript definition to Scala.js facade ( https://github.com/sjrd/scala-js-ts-importer ). As for the bloat, it isn't much. Compiled Javascript for our full-fledged app is about 180KB (gzipped) + external libraries such as React.

Don't take this the wrong way, but I've been in the industry for a long time... and it amazes me that 180KB is considered not much... If I told you I had a way to remove 180KB from every page load, you'd be all over it. :)

but the 180KB is not downloaded on every page load.

Re: Scala.js has a new website

#6
post #5
post #4

Earlier quoted context omitted.

Don't take this the wrong way, but I've been in the industry for a long time... and it amazes me that 180KB is considered not much... If I told you I had a way to remove 180KB from every page load, you'd be all over it. :)

but the 180KB is not downloaded on every page load.

That's good! :)

Re: Scala.js has a new website

#7
post #4

Earlier quoted context omitted.

There is a way to transform a typescript definition to Scala.js facade ( https://github.com/sjrd/scala-js-ts-importer ). As for the bloat, it isn't much. Compiled Javascript for our full-fledged app is about 180KB (gzipped) + external libraries such as React.

Don't take this the wrong way, but I've been in the industry for a long time... and it amazes me that 180KB is considered not much... If I told you I had a way to remove 180KB from every page load, you'd be all over it. :)

180KB is comparable to a medium-size image.

Re: Scala.js has a new website

#8
post #7
post #4

Earlier quoted context omitted.

Don't take this the wrong way, but I've been in the industry for a long time... and it amazes me that 180KB is considered not much... If I told you I had a way to remove 180KB from every page load, you'd be all over it. :)

180KB is comparable to a medium-size image.

Yes you are right.

Scripting time however can be massive, take for instance this hs.fi (Finnish daily), they have 354kB of JavaScript, but scripting time with Skylake 6700K is 1.13 seconds of the page load. With Q6600 it was 3.5 seconds.

With latest chrome it's easy to measure scripting time as pie chart. Go to "Timeline" tab of developer tools and hit F5. (just few releases back one had to do it manually by starting timeline and stopping it.)

Re: Scala.js has a new website

#9
For those from Java world wanting to write client-side, there is obviously also GWT[1] and another interesting option is TeaVM[2]. Interesting part of TeaVM is that it translates bytecode, so I guess it could do Scala as well. But I've never used it, so cannot recommend really.

1. http://www.gwtproject.org/

2. https://github.com/konsoletyper/teavm

Re: Scala.js has a new website

#10
Speaking of bringing nice languages to the browser. Kotlin is a simpler language than Scala and also compiles to JS. Unlike Scala.JS which seems to be a completely third party project, Kotlin's compilation to JS is considered one of the primary features of the language.

Kotlin is barely at 1.0 at the moment though.

Post reply on HN