Hacker News new | past | comments | ask | show | jobs | submit login

I think this is shortsighted. In 5-10 years browsers will be more Virtual Machine than Web Browser. You can almost argue that they already are.

As browsers and phones get more and more performant, the idea of emulating native apps in the browser won't have the performance stigma attached to it.

This same thing played out with Java et. al. It was dismissed for being non-performant when compared to C/C++(aka native code) because it ran inside a heavy VM but nowadays the performance is just fine for an enormous amount of applications because the virtual machines and hardware got faster.




The JVM itself got faster -- and in many places, relies on native code for particularly expensive functionality -- but it's still unusable for end-user applications because:

1) The long load time / hotspot JIT overhead when starting applications.

2) The large memory overhead of the Sun/Oracle GC's reserved heap.

To some degree, Dalvik solved some of these issues, but has also retained the (very necessary) escape-hatch-to-native JNI.

JavaScript is SO MUCH HARDER to optimize than JVM bytecode. Whereas you can even feasible AOT-compile JVM code, JavaScript's dynamism makes this all but impossible.

On top of that, JS is welded to the DOM and CSS, the combination of which incurs huge rendering pipeline CPU and memory overhead for anyone doing anything as complicated as a "native" UI view hierarchy.

Rather than enumerate all the failures, I'll note that it's not all doom and gloom. We've got a web bytecode in the works that's much saner than JS. Canvas and WebGL exist.

Progress on those fronts may create a situation like you're describing, but -- and this is no great loss in my book -- it won't be the web.


Minecraft alone shows your first two points are not valid. Write a hello world app in Java, the startup time is miliseconds, the memory is not humongous.


(non-casual) Games aren't generally known for fast load time, sharing resources on a multitasking system, or short playing sessions -- all of which plays to the JVM's strengths (or avoids its weaknesses).

As far as fast load time; just launching my (JVM-based) build tool (sbt) takes 7 seconds on my laptop.

Running 'Hello World' from an uncompressed class file takes 0.12s, and most software is quite a bit larger than a couple lines of bytecode in an single uncompressed class file.

The C version, by comparison, completes in 0.005s.


Yes, recently, Java actually became usable for a lot of seemingly native apps.

And it does this a lot better than the browser.


> [The JVM is] still unusable for end-user applications because [it makes application startup slow and uses too much RAM.]

I can't agree.

The poster child for "bloated, overweight, slow-as-shit Java application" is Eclipse. Circa 2013, I found it to be not substantially slower or any less usable than Visual Studio on the exact same hardware.


That's implying that Visual Studio isn't also bloated, overweight, and slow-as-shit - three traits which VS serves as the textbook definition of. It makes Emacs look like ed in comparison, yet without offering any actual improvement in functionality.

In other words, "but it's on par with Visual Studio" does absolutely nothing to counter the argument that the JVM is unusable for end-user applications; if anything, it proves it.


After several years of working with both VS and Eclipse, I can say that IDEs are slow because they're doing a lot of work. (Eclipse suffers a bit because the Eclipse Steering Committee[0] won't let go of the dream that is the Eclipse Platform, but that dream primarily damages the ease of writing software for Eclipse, rather than Eclipse's execution speed.[1])

Consider two applications that each solve tasks of comparable complexity:

One of these applications is written in C++. The other is written in Java. Both are written by programmers skilled in their respective languages.

If both of these programs have roughly equivalent performance, what does that say about each underlying language?

[0] Or whatever their official name is.

[1] Source: In a former life, I was tasked to write and maintain bespoke software written on top of the Eclipse Platform. I cannot recommend the Platform for any new development that isn't writing software for Eclipse, itself.


>It makes Emacs look like ed in comparison, yet without offering any actual improvement in functionality.

Well, it does offer the functionality of being usable integrated environment, which I know a lot of the emacs/vi people dismiss, but it's a very real thing despite those dismissals.

On the other hand, I don't really care much, since I've never had the emacs/vi user disease of insisting that everyone else acknowledge that my opinions are superior.


> Well, it does offer the functionality of being usable integrated environment, which I know a lot of the emacs/vi people dismiss

Maybe the vi people do, but I'm not sure about the Emacs people, seeing as SLIME is the modern day free integrated environment for Common Lisp programming.

Regardless, my point was less about the superiority of Emacs and more that Emacs is the oft-cited textbook example of a "bloated" program (as per the "Emacs is an excellent operating system; too bad it's missing a good editor" joke), yet is dwarfed in size by the likes of VS and Eclipse while having parity or near-parity functionality-wise.


The "Emacs is bloated" meme stopped being relevant at least fifteen years ago. ;)

But seriously; some serious questions, seeing as how I've never really used Emacs:

How does Emacs compare to versions of Eclipse CDT or Visual Studio released in the past four years for C++ development? How well does Emacs's autocomplete [0] work for templated types of varying complexity? How about its ability to navigate to method definitions and implementations of non-obvious types? Does its autocomplete database update quickly and automatically, or must one trigger the update oneself?

[0] I figure that C++ development support isn't in mainline Emacs and is provided by extensions. For brevity's sake, I'll continue to improperly attribute this functionality.


In fairness Visual Studio (and most IDEs) are pretty bloated and slow.

As to the grandparent, that is what asm.js was for, was a subset of JS that could be heavily optimized and JITed... I also really prefer .Net method of native invocation over JNI stubs.


After several years of working with VS, Eclipse, and a couple of other developers' IDEs, I can say -with a straight face- that developers' IDEs are slow primarily because they do a lot of work.


Absolutely.. and if you're using one on a system without an SSD, it's outright painful. There's a lot that goes on with IDEs, effectively on-demand compilation, file watching, and there's a lot to that.

Of course, sometimes I find I'm actually more effected when I can just work on a small module in a plain text editor, and keep things organized so its' relatively easy to follow.


Oh, so a dumb terminal. Ok. It's 1980 again.


1. Dumb terminals never really left us. They are in active use all over. 2. The current web trend is using more of the browser CPU, as opposed to the server CPU. Heck, I have entire apps that don't call the server after load at all. I don't remember being able to execute code in a dumb terminal (possibly you could...I just don't remember it).

Dang it, now I'm nostalgic for playing MUDs on a VT1000 in the 90s.


If it can do everything the user wants then what is the issue?

Just because it's been done before it's the wrong answer?


My reply was a bit ambiguous and snarky.

I don't believe it's the wrong answer if it works. But people are commenting about moving the web forward to run apps in browsers and all and so there are parallels with what we did in the 80's. That's really what I was getting at. Nothing in computing is ever really new.


We're replacing a very nice custom SCO Unix backend developed at my work from 1980s onward (drops users into custom shell, multiple programs execute in the user context, leverages all the nice features of *nix) with a purchased desktop Windows ERP application and it makes me so sad.

Literally we will move from having 1 to 2 admin who can manage 300 users, decades of automation, and totally instantaneous program execution (in C) with heavy user load on a single server to distributed, client based programs running on separate machines that all have to be patched, updated, troubleshot, etc.--(and the 5 person support team that has to go with it), communicating with a central program server and separate DB servers, etc.,etc., all because the console application is "too old looking".


A web based application could have a very similar backend, and you could run pretty much any modern OS client on the front end...

Though I think the development and training for your new front end will be a bit cumbersome no matter what you use.


You might be interested in the in the works WebAssembly, if you haven't heard of it already.

https://blog.mozilla.org/luke/2015/06/17/webassembly/


But the only languages available are HTML, CSS and JavaScript which are just more than bad for application development because of so many reasons.

I would rather see something like Ubuntu Touch tries where they write the frontend with QML and you can have backends in C++ for speed.


> But the only languages available are HTML, CSS and JavaScript...

Eh, there is the canvas, and WebAsm. They make for a full blown VM if you don't mind shipping a several MB large interpreter with your page.

Next step should be installing the interpreter on the browser, for everybody to use... Then we can create Flash all over again.

(Now, if somebody gets a way to do that full VM thing in a way that is compatible with the DOM, then we'll have some improvement.)


>"Web ASM [...] installing the interpreter on the browser, for everybody to use... Then we can create Flash all over again."

That's ridiculous. Is Javascript "like flash" because most browsers ship a several MB interpreter for it?


Javascript creating random elements on the canvas? Yep, just like flash.


> But the only languages available are HTML, CSS and JavaScript which are just more than bad for application development because of so many reasons.

I would have completely agreed with that a few months ago. HTML/CSS/JS is fine for most websites which are primarily text, images, and a couple buttons. But it breaks down quickly when trying to build an application. Then React was invented. I don't know if React will be the thing people use to build web applications in the future, but I think the concepts it introduced will be. The reason is because React provides a foundation that makes it feel more like building a desktop UI or video game than building a traditional website.

Performance will improve over time with faster hardware, faster networks, and software optimizations. Javascript V8 is already one of the fastest scripting languages especially for string handling.


But that is just fiddeling with the symptoms, not doing anything with the root of the problem. It is the same with webcomponents, they're building on such a shaky ground.

I like the ideas around https://www.youtube.com/watch?v=6UTWAEJlhww instead.


Based on the video, is security the root problem? Sorry, but that is a problem in every programming environment. Security is hard regardless of using C++, JS, Linux, Windows, etc. Therefore it is not terribly relevant to the question: is JS capable of emulating native functionality and should it?

For that question, the root problem was definitely JS itself historically but the language deficiencies have largely been resolved by ES6. In my opinion, the only major language deficiency is handling int64 and larger numbers which will hopefully be resolved by "value types" in ES7. Then use a React-like framework on top and building applications feels "right", at least to me.


I'm not quite sure if you watched the whole video, he says let's get rid of everything (HTTP, HTML, CSS) but JavaScript.


Probably will be more like a URL link aware VNC viewer. That has some interesting implications for the back end WRT emulation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: