Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
Compare cell phone plans using Wirefly's innovative plan comparison tool ×

Comment Re:JavaScript rules! (Score 1) 241

- "Because it is not slow?"
If a JS web site like the Kibana dashboard maxes out my CPU core (I have an Intel 5), how is it not slow?
Compared to a native application that would use up max. 3% to 10% of my CPU.

- "You seem not to get it: some people like the language that is why they use it. And: if you want to have the same technology on frontend and backend it makes sense to use node.js on the backend."
Use whatever you like. I'm discussing facts.

- "From a language designer standpoint it is a fine language, a few quirks, yes."
No. From a language designer standpoint it's like the worst language out there, maybe worse than even PHP. Even Brainfuck is better.
The need for === alone makes it the worst language.

Comment Re:JavaScript rules! (Score 1) 241

- "Your arguments make no real sense in our times. JavaScript is now in its 6th reincarnation, it is extremely fast and much safer has less bugs etc."
Citation needed. It still have the same bugs, and it's still very slow. Even the WebGL demos max out my CPU core. A native app would be around 1% of my CPU. The slowness is inherent to JS, I don't think the devs are incompetent.

- "Ofc there could be other scripting languages for browsers ... but they never got traction and the ones we use in our days as alternatives are compiled to JavaScriot anyway."
They never got traction because the W3C and the browsers devs are drinking the JS cool-aid. And because JS would die very fast if the browser devs would allow for any other language. For their benefit, they have their reasons of course. To have just one language for the Web is of course a benefit.

Again, the simpler solution would be to have a byte code standard, like the JVM have. Since the JS engines are all VMs anyway, it wouldn't be a problem. Another solution would be to fix JS, but that would brake a lot of web sites so that will never happen.

Yes, current alternative languages must compile to JS, so there is little or no benefit for using them. So it's no wonder they don't get any traction.

Comment Re:JavaScript rules! (Score 1) 241

Btw, I really don't get how devs are all in denial about the fact that JS is still slow as shit.
Go to http://demo.elastic.co/
If I do anything on the graphs (like moving the mouse cursor over a graph), it's a noticeable lag in the UI, and my CPU goes up to 20% for Firefox.
A native app (in any language) would be at 0-1% CPU and there would be no lag at all.

Comment Re:JavaScript rules! (Score 1) 241

- "I doubt you know from your head a language that has prototype inheritance ..."
Again, it's not a good thing in and out itself. Other languages have other good features, it all depends how can I have my work done.
I bet JavaScript can't access OpenGL, it needs to go through WebGL and other slow and cumbersome APIs.
JavaScript put the web at least 10 years behind what it could have been. UI in JS are slow and unresponsive, that's in part the fault of JS itself.
What do prototype inheritance me any good, if the JS code puts my CPU at 30% and makes my whole browser unresponsive.
The browsers devs reacted by putting each tab into a new process. But again, that's just an attempt to fix the symptoms and not the decease.
The W3C should have just released a byte code standard, and we could be free of JS (you could still use JS), and the browser devs could just concentrate on optimizing the byte code, instead of writing one slow JS parser after another.

- "The fact that you don't like the language does not make the language inferior."
No, the bugs do. And that after 20 years of JS we still have slow and unresponsive UIs.

- "No idea what you mean with "automatic semicolon", in JavaScript semicolons are optional."
You have really no clue about JS. The parser puts semicolons automatically into your code, that's the reasons why they are optional for you.

Comment Re:JavaScript rules! (Score 1) 241

- "Of course it has ... it just escapes you as you never tried it."
That's a reply like from a religious person. "the love of God escapes you as you never tried it"
- "You failed to name one ... "
Like every other language that is not JS.
All languages have the same power, so obviously I was talking about them.
- "The bugs of what?"
===, the automatic semicolon, "0" = true, and other bugs like the IEEE 754 standard.
- "Nope ... plenty of tools are written in JavaScript ..."
From 0.15% to 0.20% in a year.
https://w3techs.com/technologi...
Java (Tomcat), from 0.52% to 0.57%
https://w3techs.com/technologi...
So, there are way more Java tools written in a year than for Node.js.

Comment Re:JavaScript rules! (Score 1) 241

- "JavaScript is the only class less, prototype based programming language in wide use."
That's not really have any value in and out itself.
- "So it is an extremely powerful language with arguable a bit painful syntax (to exploit those features)."
There are many powerful languages with good syntax.
- "90% of JavaScript just looks like C, so no idea why people hate it."
Because of the many many bugs.
- "OH!! You mean the integration in the browser? Yeah ... never did any browser side JS, and likely never will."
Browser integration is the only reason JS is popular.

Comment Re:Arguing over the subjective (Score 1) 523

Yes, and that's the problem. Then flush() will throw an exception because (for example) the disk was full, your program will just exit and the user's data are gone. In reality, you should write something like

                ofstream myfile( "example.txt" );
                myfile -- "Writing this to a file.\n";
                ofstream flush(); // catch exception, warn the user, maybe try a redo
                ofstream close(); // catch exception, warn the user
                return 0;

Comment Re:Arguing over the subjective (Score 1) 523

For almost all kinds of problems, the fact that C++ destruction can automatically release resources, so you can safely return from anywhere in a function instead of having goto fail all over the place is a significant win for C++.

Too bad that that's not true. Dtors cannot throw exceptions, that means that dtors are only useful for releasing memory resources.
Dtors are useless for releasing anything else, because all other resources can throw an exception upon release.
For example, for the classical file stream example Dtors are useless.


    ofstream myfile;
    myfile.open ("example.txt");
    myfile

You see that the ofstream have a method close() and is not using the Dtors of C++. That's because see my point above.

Comment Re:Microsoft Java (Score 2) 115

I don't get your post. JNI was in Java since day one (or very early on), and via JNI you can access everything that is platform specific. MS or anyone else can just use JNI to bundle a Jar file for Java to allow access to DirectX and platform specific APIs. Java is not some magic, but it's basically a level above C/C++. The architecture is basically, Java>C>OS>Driver>Hardware. So, MS could have just bundled it's own Java+Windows specific modules.

And to put an browser in Java is also easy. https://www.teamdev.com/jxbrow...
What difference does it make if it's the Chrome engine or some engine written in Java?

Comment Re:License (Score 1) 255

You have cherry picked one comment from Richard Stallman, which was just his personal ideology. David Edelsohn replied this:
https://gcc.gnu.org/ml/gcc/201...

GCC is working toward re-factoring its code base toward a more
compositional approach for "toolification". One can look at
presentations from the recent GNU Cauldron 2013 for discussion of the
topic. David Malcolm also has created patches for the GCC backend to be used as a JIT.
The assertions that FSF policy prevents technical development and
innovation simply is not true.

Maybe GCC was "deliberately obtuse", but as I see it, steps are taken to change that and enhance GCC for tool chains and to be used a library just as LVMM is.

Slashdot Top Deals

How many surrealists does it take to screw in a lightbulb? One to hold the giraffe and one to fill the bathtub with brightly colored power tools.

Working...