Live data from Hacker News

JavaScript Conquered the Web, Now It’s Taking Over the Desktop

wired.com

51–60 of 270 posts

Re: JavaScript Conquered the Web, Now It’s Taking Over the Desktop

#51

Linux is more successful on the desktop than it's ever been, and Gnome is largely powered by JavaScript. The Gnome extensions repository is a huge JavaScript success. Never before has WM customization been so accessible. The Universal Windows Platform also has a JavaScript API that is a breeze compared to the old Win32 development process. Electron is good but just the tip of the iceberg. I think it says more that ma…

Anecdote time: after I did a distupgrade of my kubuntu desktop to the next kubuntu release, kwin kept crashing for some reason, probably due to a botched package update. After attaching gdb to the dying process I found out that it was dying inside a javascript interpreter. Not wanting to know WTF a JS interpreter was doing inside the window manager, I wiped kubuntu, installed plain debian and now I'm happily running…

Your whole OS already lost the fight -- polkit config is raw javascript.

Re: JavaScript Conquered the Web, Now It’s Taking Over the Desktop

#52
post #40

The salient points of the article: - People are stuffing websites into Electron and packaging it as a native application - HTML/CSS/JS is considered 'hackable' because it's widely understood by today's semi-power-user audience Although the article doesn't say it, this seems to imply that: - Full-native development unique on each platform is considered too much effort, when you can get a cross-platform app with Electr…

I think it's the mixture of both. Editing something, pressing f5 and watching new changes getting into your webpage is really great, and a form of instant gratification. This workflow will always be better than for example restarting jetty web server to reload some servlet... Also when you have everything packaged inside you don't worry about runtime libraries. That's another headache in native app deployments. And the third is great ecosystem of libraries, editors, tutorials, snippets, etc. Low entry barrier makes it easy to quickly adopt.

Re: JavaScript Conquered the Web, Now It’s Taking Over the Desktop

#53
post #48
post #41

Earlier quoted context omitted.

Honest question – how do you build cross-platform application UI in python?

I'm not familiar with the Python ecosystem but I imagine there are bidings for GTK, QT, or other UI toolkits. The same applies to most (popular) languages. The claim that HTML/CSS/JS is the "only" truly cross platform stack is simply not true. The main hurdle that other languages faced was not having a native UI. For example, GTK on OSX or Windows did not feel native. Key bindings were often not native. Similar story…

> The main hurdle that other languages faced was not having a native UI.

Electron faces this same hurdle, but with a twist. It just doesn't care; it picks a rendering target (the web) and simply uses it everywhere. Perhaps that's the approach QT and others need to take as well: stop trying to match Apple's UI on Apple, and Windows' UI on Windows.

Re: JavaScript Conquered the Web, Now It’s Taking Over the Desktop

#54
post #40

The salient points of the article: - People are stuffing websites into Electron and packaging it as a native application - HTML/CSS/JS is considered 'hackable' because it's widely understood by today's semi-power-user audience Although the article doesn't say it, this seems to imply that: - Full-native development unique on each platform is considered too much effort, when you can get a cross-platform app with Electr…

> HTML/CSS/JS is considered 'hackable' because it's widely understood by today's semi-power-user audience

I think that's related to the high fault-tolerance in Javascript. A good developer is good in any language, so she can work with Javascript. A beginner or even a bad developer can make things happen in Javascript, when that is not always possible in other languages. So the entry point level is so low that a lot of people is using it.

> Other platforms are not very 'hackable'; why is this?

I prefer strong typed languages. I use TypeScript when I have to do some JS work as it is easier to maintain in the long term. But that means that you need to know what you are doing before starting to do anything. Compile, fix errors, repeat.

I can see that for starters JS is more fun and "hackable", as it was BASIC for me when I started.

Re: JavaScript Conquered the Web, Now It’s Taking Over the Desktop

#55
post #40

The salient points of the article: - People are stuffing websites into Electron and packaging it as a native application - HTML/CSS/JS is considered 'hackable' because it's widely understood by today's semi-power-user audience Although the article doesn't say it, this seems to imply that: - Full-native development unique on each platform is considered too much effort, when you can get a cross-platform app with Electr…

Yeah I find the "hackability" question really interesting. It is incredibly neat that I can hit a few keys in a browser and get an editable live source of what I'm looking at which is, to some extent, declarative and easily mappable from source to output. Yes, this is less true as more sites rely heavily on minified javascript for all of their implementation, or incomprehensible (to me) css that hides or moves things around in non-obvious ways, but it still mostly works. I definitely can't think of any commonly used native apps that are so easy to inspect and edit! Interestingly, though, I think you lose all that with something like Electron. At least, I don't know how to do that in eg. the native Slack client.

Re: JavaScript Conquered the Web, Now It’s Taking Over the Desktop

#56
post #46
post #13

JavaScript didn't "conquer" anything. It was just one of the first languages around when the web was still in its infancy, and simply never went away.

You're in denial. Javascript is everywhere nowadays. It has become the English of languages. It's not my favorite language but it has improved extensively. No one wants to maintain a web app, mobile app, and desktop app separately.

> It has become the English of languages.

I'm pretty sure English is still the English of languages.

JavaScript might be the English of programming languages, though.

Re: JavaScript Conquered the Web, Now It’s Taking Over the Desktop

#57
post #40

The salient points of the article: - People are stuffing websites into Electron and packaging it as a native application - HTML/CSS/JS is considered 'hackable' because it's widely understood by today's semi-power-user audience Although the article doesn't say it, this seems to imply that: - Full-native development unique on each platform is considered too much effort, when you can get a cross-platform app with Electr…

JS is safe C with types and pointers stripped from the syntax.

I don't get why people don't understand its popularity.

HTML lets you put boxes on the screen and CSS lets you paint-by-number(id/name/selector).

If you aren't doing any of those things, I am very curious to know what exactly you are doing.

Re: JavaScript Conquered the Web, Now It’s Taking Over the Desktop

#58
post #2

I'm not an expert, but the memory required to render the seemingly simplest of interfaces in html/js/css in a browser today seems excessive. Some web sites bring a reasonably powered desktop to its knees. I'm not sure I want this problem on my desktop too. Though I guess this is just one step closer to having METAL. https://www.destroyallsoftware.com/talks/the-birth-and-death...

Too much wishful thinking during the second half of the talk, though. Also, while fancy runtime systems can improve the performance of dynamic[0] languages, it doesn't come for free: the price to be paid is the loss of elegance. For instance, a JIT compiler could inline a virtual method that seems not to be overridden anywhere, but if later on it turns out that the virtual method was overridden somewhere, the “optimi…

   trust a language that ...
Where's the problem?

JIT compilers work. Most high-level languages require compiler tricks for achieving performance from Scala to Haskell to Prolog.

It's useful to distinguish between (1) having a clean, easy to understand semantics and (2) having a fast implementation. Use all the hackery in the world to get your language fast, as long as it's abstract semantics is easy and canonical.

Re: JavaScript Conquered the Web, Now It’s Taking Over the Desktop

#59
post #10
post #2

I'm not an expert, but the memory required to render the seemingly simplest of interfaces in html/js/css in a browser today seems excessive. Some web sites bring a reasonably powered desktop to its knees. I'm not sure I want this problem on my desktop too. Though I guess this is just one step closer to having METAL. https://www.destroyallsoftware.com/talks/the-birth-and-death...

I feel your pain. My first computer had 4K of RAM; my second had 48K; my third, 640K. I learned to work small. It pains me to see the equivalent of Hello World taking up untold MB. But when I think about software as a business rather than an art, I have to concede that it's a very rare circumstance where RAM efficiency matters as much as I'd like. Note the way the cost of memory has declined: http://www.jcmit.com/mem…

The weight still hurts the user experience. All that RAM still has to get written to disk for sleep/hibernate, and loading it back from disk is in the critical path of wake from that sleep. It still fills up CPU caches, which keeps them from running at maximal efficiency (both speed-wise and power-wise).

Extra weight will always matter for people who want to deliver first-rate user experiences.

Re: JavaScript Conquered the Web, Now It’s Taking Over the Desktop

#60
post #16
post #11

Earlier quoted context omitted.

Poorly written websites can bring a desktop PC to its knees, but so can a poorly written native application. That isn't an argument against leveraging web technology so much as an argument in favour of well written applications. And at least with a chromeless-browser-pretending-to-be-application you have the protection of the browser process sandbox so an app that goes awry isn't going to take your computer down that…

> That isn't an argument against leveraging web technology so much as an argument in favour of well written applications The difference is there is very little room for optimisation in most javascript runtimes. They don't support multi-threading and the memory is impossible to manage. "Lower" level languages always allow better performance tweaking when necessary. Javascript allows next to none. You can't tell javasc…

Most performance problems with websites/webapps out there are just due to sheer nastiness of the shovelware that they embed. No need to have fine-tuned debugging and profiling when the main fix is "don't accidentally run this jQuery selector 1000 times on every click". Very low hanging fruit.
Post reply on HN