Why is this popular?
>>57015836
For the same reasons one would want to violate the laws of physics.
>>57015836
>Easy to write applications with
>Can run almost anywhere (portable)
>It is the future of every application and Operating system that currently exists
>>57015836
memes
>>57015836
Because it has Java in its name.
>>57016134
Who would expect anything other from the script language?
>>57016134
>It is the future of every application and Operating system that currently exists
dude, what the fuck are you talking about?
it's the trend
>>57016134
>It is the future of every application and Operating system that currently exists
>>57016134
Can't tell if this is bait or not
>>57016173
>>57016177
>>57016209
https://github.com/os-js/OS.js
>>57016235
>needs an OS to run an OS
redundant, just like js
>>57016134
>>Can run almost anywhere (portable)
LOLOLOLOLOLOLOLOLOL
It gets shoehorned into places where it doesn't belong
>>57016235
>https://github.com/os-js/OS.js
This seems like a bad idea
Like, something that is easily broken by user error, malicious and otherwise
>>57015836
the DE FACTO language of the INTERNET!!111
>>57016291
So in other words, it runs anywhere?
>>57016291
Are you talking about Java, for which you have to install a VM just to be able to run a program?
>>57016333
In the same sense cockroaches are in every house, I suppose
>>57015836
It's pretty good and surprising powerful.
JS is a functional language, the only scope in JS is functional scope. Functions are first class and can be passed and imported. There is no module system in JS because it doesnt need one, function scope is so much better than namespaces or class types. JS is a typeless language, you can connect anything with anything without declaring or casting types. Functions in JS play the role of objects more than objects. Prototype OO works hand in hand with the first class function nature of JS. Its an outstanding language that fortunately became the default language for all browsers.
>>57016344
and for javascript, for which your operating system has to come with a bloated js interpreter...
>>57016356
Ok, good to know. It is in fact portable by your own admission.
>>57016431
If JS is a functional language by that criteria than so are C# Python, Ruby, and C++.
>Netscape gives Eich 10 days to slap some shit together and beats MS in delivering first browser scripting language
>literally nobody likes it, nobody respects it, and nobody wants to use it
>the most sophisticated thing it's used for are snowflake animations on hobbyists' homepages
>suddenly Web 2.0 meme happens
>programmers start to get paid for using JS. they fight their disgust and try to make the best out of it. they hate every second of it.
>in the meantime, a generation of kids that grew up with and in the web picks up JS as their first programming language
>they become "web developers"
>nobody respects them so they come up with compensatory memes like "JS is actually like Scheme, you see"
>as their numbers grow, they push JS to server-side so that they can stay in their comfort zone AND claim that "JS is a general-purpose language, you see"
>it still sucks as hard as it did in 1995 but the meme is too strong now
>>57016481
Functions are not as first class in C#, Python, Ruby and C++ because they are connected to classes as methods and so are not as passable as an individual object, lambdas and blocks in those languages dont have anything near the power of JS functions
>>57016535
Nice inaccurate portrayal of history.
> Eich creates javascript
> Browser implementations are so slow that it's hardly useable
> Time passes and javascript begins being used for form validation to avoid a round trip to the server
>jquery is invented to smooth over browser incompatibilities and people start using it for simple animations and other basic things
> google popularizes ajax, people start using it to avoid server requests in places.
> SPAs become a thing like gmail, some people attempt to make these with just jquery. Its a huge pain in the ass
>Node is made Im not sure why
> Node creates a module system for javascript and developer tooling starts being made like Grunt/Gulp since they can now be run via node
> This surge in developer tooling improves the landscape for frontend frameworks like angular and whatever
> Big name companies start adopting node like walmart and netflix and yadda yadda
> Here we are
>>57016235
You can write an OS in Brainfuck or even in a BAT script. Does it make them universal languages for every problem?
By the way, we already had a language intended to unite everything and to be a universal language. Does PL/1 name say anything to you?
>>57016622
>>Node is made Im not sure why
you answered your own question in the bullet point above:
>> SPAs become a thing like gmail, some people attempt to make these with just jquery. Its a huge pain in the ass
node made SPAs no longer be a pain in the ass
>>57016546
Returning a function object doesn't stop c++ lambdas from doing anything you can do with them in any other language. You can close over values and pass them around freely (bearing in mind object lifetimes when capturing by reference).
I'm eager to hear more about the special "power" of js lambdas, though.
>>57016727
>Returning a function object doesn't stop c++ lambdas from doing anything you can do with them in any other language. You can close over values and pass them around freely (bearing in mind object lifetimes when capturing by reference).
Im sure you can concoct a Rube Goldberg simulation of function objects in C++, good luck finding anyone willing to deal with that kind of bullshit
>I'm eager to hear more about the special "power" of js lambdas, though.
the "power" of js lambdas is that it doesnt need lambdas because functions are already individual objects, there is no need for a nameless version of function because they are all nameless and accessed by reference by default
>>57016789
>Im sure you can concoct a Rube Goldberg simulation of function objects in C++,
I don't even understand what you're trying to communicate here. Function objects are already part of the C++ standard and are integrated into the language and are easy to work with. I use them all the time.
>the "power" of js lambdas is that it doesnt need lambdas because functions are already individual objects, there is no need for a nameless version of function because they are all nameless and accessed by reference by default
What is the practical upshot of this for the programmer apart from more runtime overhead? Javascript function objects don't do anything more than higher order functions in C++, Haskell, Go, etc.
>>57016722
Not sure if that was the reason why Ryan Dahl made node.
>>57017066
>Function objects are already part of the C++ standard and are integrated into the language and are easy to work with. I use them all the time.
Im sure you do, try finding someone else stupid enough to think that C++ is used for this purpose, Im not even going to waste time responding to this delusion
>What is the practical upshot of this for the programmer apart from more runtime overhead? Javascript function objects don't do anything more than higher order functions in C++, Haskell, Go, etc.
>C++
lol
>Haskell
<roll eyes>
>Go
go comes close but still theyre still tied to structs and dont do a lot on their own
>etc.
there is no etc
>>57017264
You were asked a question; why bother typing so much if you aren't able to answer?
What can I do with javascript function objects that I can't with any other language's?
>>57017312
literally nothing
>>57017312
He's talking out his ass.
Javascript is hardly a functional language. Its not based on lambda calculus, it doesn't have Tail Call Optimization, every type can be null, no immutable data types, statements instead of expressions, etc.
Javascript is as functional as Ruby/C#/C++/etc.
>>57016235
by what fucking definition is that an OS ?
>>57016322
like how budweiser is the de facto king of beers
>>57015836
> npm install electron
> write shitty index.html
> put cool effect in html5 canvas
> drag files to this folder
> holy shit a real executable desktop application and i have no idea what the fuck i'm doing
that's why. pretty cool desu