News for hackers. Stuff that matters.
Re:Scala.js no longer experimental by jbooth on Thursday February 05, 2015 @09:40AM (#9003404)
So here's my question, how come no browser has a way for a java applet to manipulate the DOM? We've got GWT compiling java to JS, we've got this compiling scala to JS.. and the JVM was originally built to run inside of a browser. Why can't we just close the circle? I guess people don't want their website visitors to see a "you must upgrade java" popup first thing?
Re:Scala.js no longer experimental by switchbak on Thursday February 05, 2015 @09:46AM (#9003432)
There was - it was called LiveConnect - but like most things to do with Java and the browser(s), it languished in a half-supported state, and really isn't worth thinking about any more.

As are applets - a great idea, implemented poorly, and now essentially lost to the annals of history.

Re:Scala.js no longer experimental by stingraycharles on Thursday February 05, 2015 @09:57AM (#9003492)
Don't forget about websites from academia that implement certain proof-of-concepts; for some reason that commumity still keeps using applets.
Re:Scala.js no longer experimental by wbillingsley on Thursday February 05, 2015 @05:22PM (#9006548)
We used to do it because dealing with cross-browser compatibility was a pain. For instance, I used to use a 1-pixel applet instead of XMLHttpRequest for AJAX (slightly before they coined the term "AJAX") and applets for rendering live-updated XML-based diagrams (instead of SVG) in both cases because it simply made things less buggy and less of a pain to support at the time. But that was in 2004 to 2007.

But once we've written something, and it works, we're often a little slow updating it to newer tech, because we can't write a paper out of "the same thing I published earlier, but now using SVG and XHR instead of applets".

If it still just-about works, there's less impetus to rewrite it.

Re:Scala.js no longer experimental by exprE on Thursday February 05, 2015 @10:29AM (#9003677)
There are quite a few applets demonstrating chemical reactions/bonds or physical equations etc., and as such applets are relatively common in teaching materials for high school (/secondary education) physics and chemistry, at least with teachers (I had or) I have substituted.

They are obviously years old and rarely signed, which is a shame because quite often there are plenty of demos, none of which I can run with modern default settings of a PC (and sometimes I wouldn't have enough credentials to do anything about it, anyway).

Re:Scala.js no longer experimental by zanny on Thursday February 05, 2015 @11:35AM (#9004112)
Why can't Python? Why can't Ruby? Why can't Perl?

Fundamentally, the languages able to run in the browser are only limited by what the browsers want to implement. It would be great if browsers could render QML, or could use <script type="text/python"> or <script type="text/scala"> or whatever but that requires browsers to either depend on an external JVM or include on in the browser. Or you need to put the QML runtime in the browser or as a dependency. Or you have to put a Python interpreter in the browser or as a dependency.

Re:Scala.js no longer experimental by electrum on Thursday February 05, 2015 @04:04PM (#9006086)
None of those languages have a secure sandbox and writing one is incredibly difficult, even for a language designed to run in such an environment (Java). Native Client might be interesting here to build sandboxes for other languages.
Re:Scala.js no longer experimental by Gurkenmaster on Friday February 06, 2015 @02:15AM (#9008021)
Lua was made with embedding in mind. You can start a VM with an empty global environment (no standard libraries etc..) but there is not a big benefit in jumping from js to lua because they are so similar.
Re:Scala.js no longer experimental by jsight on Thursday February 05, 2015 @09:53AM (#9003476)
The old Netscape Java Applet APIs supported dom manipulation:

http://www.java2s.com/Code/JavaScript/Development/UsingJavaS...

I believe that other browsers that supported applets supported these APIs as well.

I don't think that anyone really wants to bring back Java Applets, though.

Re:Scala.js no longer experimental by mjt0229 on Thursday February 05, 2015 @11:20AM (#9004007)
Wasn't the JVM originally built to run inside of a toaster?
Re:Scala.js no longer experimental by giancarlostoro on Thursday February 05, 2015 @01:31PM (#9004918)
"Java was originally designed for interactive television, but it was too advanced for the digital cable television industry at the time."

Likely it was designed, and then used for their first product. Then when that failed, they kept the language for other possible targets.

http://www.oracle.com/technetwork/java/javase/overview/javah...

Re:Scala.js no longer experimental by lmm on Thursday February 05, 2015 @11:06AM (#9003911)
My guess is that Mozilla would never support it.
Re:Scala.js no longer experimental by icebraining on Thursday February 05, 2015 @12:33PM (#9004547)