![]() |
|
|
#1 |
|
Aug 2002
Buenos Aires, Argentina
55616 Posts |
Given that the Java ship is sinking, I've started to convert the applets in my Web site to C and then I'm using Emscripten to generate the optimized Javascript.
My first applet converted to Javascript is the Ulam spiral, which can be seen at: http://www.alpertron.com.ar/ULAM.HTM Apart from working in mobile devices, the good news is that the speed of the generated Javascript code is similar (if not better) than Java. And of course that are no annoying pop-ups and no certificates are required. There are about 15 applets to be converted, so this task will need a few months. |
|
|
|
|
|
#2 |
|
Aug 2002
Buenos Aires, Argentina
2·683 Posts |
Using my Web server statistics, I found that only a few people is able to see Java applets. When the plugin is enabled, it downloads the JAR file which includes the Java program to be executed.
So I computed how the Java usage decreased in the last four years according to the hits of my factorization calculator. Code:
ECM.HTM jar file Java usage Sep 2011 4183 2261 54% Jan 2012 5156 2100 41% May 2012 4623 1472 32% Sep 2012 3488 1179 34% Jan 2013 3814 1107 29% May 2013 4456 1417 32% Sep 2013 3008 1164 39% Jan 2014 4114 1440 35% Feb 2014 3569 1116 31% Mar 2014 3632 1000 28% Apr 2014 3623 986 27% May 2014 3843 760 20% Jun 2014 3107 555 18% Jul 2014 3283 507 15% Aug 2014 3216 610 19% Sep 2014 3593 513 14% Oct 2014 4263 724 17% Nov 2014 4078 689 17% Dec 2014 4110 685 17% Jan 2015 4386 732 17% Feb 2015 3842 663 17% Mar 2015 3723 596 16% Apr 2015 4277 639 15% May 2015 3400 665 20% Jun 2015 1030 186 18% Last fiddled with by alpertron on 2015-06-11 at 13:37 Reason: Found data of Sep 2011 |
|
|
|
|
|
#3 |
|
"Daniel Jackson"
May 2011
14285714285714285714
23·83 Posts |
I think it's because people are using YAFU to factor their numbers. It's a lot faster.
|
|
|
|
|
|
#4 |
|
Aug 2002
Buenos Aires, Argentina
2·683 Posts |
That's not the problem. Notice that the HTML page is loaded but the JAR file is not in the vast majority of instances. That means that the Java plugin is not installed or the browser is blocking it (Chrome blocks the Java plugin, and most of the traffic to my Web site comes from this browser).
|
|
|
|
|
|
#5 |
|
"/X\(‘-‘)/X\"
Jan 2013
2·5·293 Posts |
Lots of users block flash by default, too, like me.
The problem is that advertisers are moving to HTML5, so the web will become annoying again. |
|
|
|
|
|
#6 |
|
"Daniel Jackson"
May 2011
14285714285714285714
10100110002 Posts |
The Java site has instructions on how to unblock Java:
https://java.com/en/download/faq/chrome.xml#npapichrome It worked for me.
Last fiddled with by Stargate38 on 2015-06-11 at 21:31 Reason: fix smilie |
|
|
|
|
|
#7 | |
|
Aug 2002
Buenos Aires, Argentina
2·683 Posts |
Quote:
|
|
|
|
|
|
|
#8 | |
|
Romulan Interpreter
Jun 2011
Thailand
26×151 Posts |
Quote:
![]() Firefox also blocks it here (in fact it detects it as insecure and asks you to block it if you want; of course all possible insecure stuff is blocked here, by hand). |
|
|
|
|
|
|
#9 |
|
Aug 2002
Buenos Aires, Argentina
2·683 Posts |
I finally had several days free to convert my sum of four squares applet from Java to C so Emscripten could convert it to optimized Javascript (asm.js). I had to develop the big number support from scratch. I still have not converted the expression analyzer. You can see it at http://www.alpertron.com.ar/newfsquares.htm (this a temporary URL that will be deleted when the expression analyzer is finished, so the current applet continues to be accessible in the meantime if you use Firefox or IE in desktops).
The most interesting bit of information here is the benchmark between Java implementation and asm.js implementation. I found that for decomposing the 617-digit number RSA2048 in a sum of three squares, the Java applet needs 3 seconds and the Javascript application needs 11 seconds. I think the main problem is that the multiplications in Java are done in 64 bits while in Javascript are done in 32 bits, so the latter needs 4 times more multiplications than the Java implementation. |
|
|
|
|
|
#10 |
|
Aug 2002
Buenos Aires, Argentina
2·683 Posts |
Another hit for Java applets: 64-bit Firefox will not have support for them and 32-bit Firefox will drop support at the end of 2016. See https://blog.mozilla.org/futurerelea...ns-in-firefox/.
|
|
|
|
|
|
#11 | |
|
"Mark"
Apr 2003
Between here and the
22·7·227 Posts |
Quote:
My company rolled out a neat features in IE a couple of weeks ago. You can go to the internal company home page with IE and click on a link to immediately see your total compensation. Isn't that cool? If I leave my computer to use the bathroom and don't lock it, then someone can walk up, click on the link and see how much I earn. Awesome! They are extending this functionality so that one can look at all benefits and personal information such as SSN, date of birth, address, etc without requiring a password. This is great because that is one less password that I have to remember. Enough of the sarcasm. Guess who's idea this was. HR! Guess who okayed this change. The head of IT! Instead of taking the five minutes to remove the link from the home page, it has been available for almost two weeks. |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GHz days converting? | Unregistered | Information & Answers | 10 | 2010-03-16 21:56 |
| Converting from v4 to v5 | devjonfos | Linux | 4 | 2009-01-29 10:15 |
| Sun Tries to Get Hip to JavaScript | ewmayer | Programming | 1 | 2006-10-07 21:23 |
| JavaScript for 2-player interactive game-playing? | ewmayer | Programming | 2 | 2006-02-04 19:22 |
| Converting Logs | Numbers | Math | 5 | 2005-08-14 06:29 |