Live data from Hacker News

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

wired.com

231–240 of 270 posts

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

#231
post #194

Earlier quoted context omitted.

I think they also told him to make it forgiving, like html, so that beginners could use it. Thus the implicit conversion rules, optional semicolons, being able to leave new off a function constructor, not having to use var, and so forth.

These laundry lists of js warts get dragged out continually, so I really have to ask: How are you people actually developing in javascript and haven't yet discovered linters? Linters have been around for over a decade and solve all of these issues (as they do in other languages as well). They're also easily integrated in every text editor and build system I've ever seen. And why shouldn't the interpreter support thes…

The same can be said for C's flaws. Just use a linter.

That didn't stop people from wanting to come up with or use different languages in place of C, where possible.

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

#232
post #215

Earlier quoted context omitted.

FWIW, I almost always use ==. Very rarely, if ever, had any problems- probably I'm used to javascript enough to think in advance of the edge cases and use === when I feel it's necessary.

> I'm used to javascript enough to think in advance I don't consider it a foresight issue. I'm a believer in putting the burden on the caller not the callee. If I expect 0 and you have "0", it's your job to call parseInt(), not my job to branch out some if statements for type checking and coercion. For a few reasons: 1) debugging someone else's code is a lot more time consuming than debugging your own 2) actually fix…

True, although your example is probably just an attempt to offer method overloading. But I agree that it is confusing. And you do see a lot of times functions trying to sanitise their inputs, which I agree is wrong.

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

#233
post #229

Earlier quoted context omitted.

Operator overloading in Python made the Pandas library possible where you can treat a DataFrame syntactically like you can in R, which is really nice for data science.

"Made it possible", or "made it look like R"? add() vs. + is just a mild inconvenience IMO compared to the inconvenience of overloading abuse that I normally see ( like sqlalchemy IMO ). I'd personally rather know what to expect from an operator.

It's not just arithmetic, it's also being able to use comparison operators to filter, which is really convenient. What languages like R do at the syntactic level is make the programming language closer to math, where you can do things like add vectors or multiply matrices using simple operators.

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

#234

More systems like React Native are how JavaScript should be done on the desktop rather than cordova-like things running in a node host. It has approachability but also performance and ubiquity of skill set, very little friction and is better suited for integrating native controls IMO.

I almost jump to react-native, then I discover that I need to do the npm install bloatware dance.

Is possible to have a more lean setup?

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

#235

Earlier quoted context omitted.

Considering the variety of fuel sources a diesel engine can use (oil, deisel, etc), I'd say it is pretty useful... ;-) Yeah, and good luck dealing with that remote API that now gives you an extra field in the JSON or XML, and your compiled client in a few thousand workstations needs to be updated and redeployed because of said fit.

> Yeah, and good luck dealing with that remote API that now gives you an extra field in the JSON or XML Java C# and every other decent typed language has good serialization and deserialization support. The extra field poses no problem.

I've had to consume Java generated wsdl in C#, having response types of "Object" from the Java side, meaning the .Net side has no properties on the responses from those methods, I'd have to disagree...

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

#236
post #229

Earlier quoted context omitted.

Operator overloading in Python made the Pandas library possible where you can treat a DataFrame syntactically like you can in R, which is really nice for data science.

"Made it possible", or "made it look like R"? add() vs. + is just a mild inconvenience IMO compared to the inconvenience of overloading abuse that I normally see ( like sqlalchemy IMO ). I'd personally rather know what to expect from an operator.

Also, it adds up (no pun intended). You're right that add() vs. + for a simple case when you only do it a few times is no big deal. But it is a bigger deal when you do it a lot, and the arithmetic can be a little more complicated.

We could by analogy apply this argument to adding integers and floats together. It's more convenient to use the + operator for that, but someone could argue that an add() function is just a minor inconvenience, so why bother overloading the + operator?

That is until you have to use it hundreds of times.

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

#237
post #185

> It turns out it’s useful to have a lingua franca for the web. No, I don't think so. Most people do not use JavaScript since it is useful. They use it since it is the only option available on the browser. There is a BIG difference. > Creating desktop apps in JavaScript lets developers choose from a vast range of freely available code libraries and frameworks, which takes much of the grunt work out of coding Lots of…

I've spend a decade in c and c++, another in Java. I've now moved to Javascript and I love everything about it. Well not everything, I don't really like the whole NPM and millions of dependencies. I also don't like react and angular. But JS is so big, there's enough other stuff I do like. You see, you don't have to like everything about it to enjoy working with it. I pick the stuff I care about and put my positive en…

People just hate all old and we'll used languages. You hear javascript, java, and c++ getting hated on all the time. I feel like as languages age people just find all the stuff they hate about it. That being said javascript was a uniquely poorly designed language that only gained popularity by people being forced to use it. At least the modern versions of it seem to be have fixed many problems.

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

#238

Earlier quoted context omitted.

> Of course, but how does it know which functions to inline? Small functions and higher-order functions are the most natural candidates. (The two categories greatly overlap in most cases.) > That's not true--a JIT could optimistically replace with a concrete realization. You'd have to roll back an unsound optimization in the middle of a hot loop. I'm pretty sure that's not what you want. > it is possible to speed up…

> Small functions and higher-order functions are the most natural candidates. (The two categories greatly overlap in most cases.) But then you're just guessing. Isn't that also inelegant? Let's play devil's advocate: how do you decide the cutoff on function size for inlining? Well, you would profile a bunch of programs with various cutoffs... now all you have is a heuristic, and MLton will inline some functions that…

>Let's play devil's advocate: how do you decide the cutoff on function size for inlining

AOT compiler writers have been tuning inline heuristics for more than 40 years. Sure sometimes you have to help the compiler with annotations or PGO, but in the large majority of cases things just work.

In fact AOT can deal much better with the massive code explosion due to aggressive inlining than JIT compilers which have a very tight time budget for optimisations.

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

#239
post #51

Earlier quoted context omitted.

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.

There is no escape! And turing complete config languages are another evil of their own.
Post reply on HN