Why is this awful thing everywhere?

Why is this awful thing everywhere?

Other urls found in this thread:

exploringjs.com/es6/ch_classes.html
npmjs.com/package/user-home
nodejs.org/api/os.html#os_os_homedir
youtube.com/watch?v=FopyRHHlt3M
twitter.com/NSFWRedditGif

because it's really good at spying on users and making websites slow

Because it's not awful?

It's actually pretty awful.

Is it possible to use JS as python/ruby? I mean general scripting.

With node.js, yes.
Even C# and Java can do it.

cause actionscript in swf container wasn't cool anymore.
>have css
>have html5
>have javascript
>have canvas

Reality is, for example. Nearly every musician's flash website in the mid 2000's was better than today's best html/javascript site.

Why does RMS hate JavaScript

>muh it was there already so we built a great implementation
at least there's typescript
>tfw no Lua in the brownser

pajeets are cheap and it's all they know

is node.js fast?

because it runs on all web browsers and makes it easy to modify the dom

yes

>that memory usage
Hello poojeet.

ez botnet

Pypy is faster than node

RMS hates non-free JavaScript.

because shitty developers proliferate under shitty management, which is all management these days

Because it's not the last decade anymore and JS has gotten good

could be so but theres the right tool for every job and js is not the right tool for document content

any use of js besides ajax calls where necessary or simple ui enhancement is ridiculous. If a page is practically blank when js is disabled, 99% sure its a shit page and otherwise a very niche application

no. enjoy your callback hell and lack of a proper standand library.

also using node modules will drive you crazy. ruby gems were bad, but at least they didn't include hundreds of other one-liner modules.

The most insane thing about it is even you only include one or two deps in your package.json, it will turn up to 300+ after hitting npm install.

>js is not the right tool for document content

Ever heard of these things called "web apps"

The web is more than just a document viewing platform these days, and JS is a solid tool for working with it

this "simple ui enhacement" gets very messy as the project gets complex. this is why people use things like react. and you can still make it so the page works even with js disabled. but that's rarely ever worth the time investment because nobody sane would disable javascript in 2017

manipulating, yes. populating, no.

if you make a newspaper site that loads article text by ajax instead of serverside generation straight into html, im gonna cone over and slap you silly

its not tho.
name something bad about nodejs.
>muh bloated meme
then why in the fuck does nearly every modern language have package managers ?

i mentioned it as a quality indicatir, not a requirement. if a page is blank without js, it means all the content is fetched by js instead of generated into the html serverside and thats just lazy and sluggish (more loadtimes to wait for)

without modern js and html5 70% of all websites currently running would be severe cancer

>what is not using chrome
pls kys nigger

>what is backend rendering

>callback hell
ever heard of promises and await / async ?
>one liner modules
what is --depth=0
>300+
please show me an example nigger

>implying you cant botnet through c# / ruby / php / .NET

build a web app without js / ruby / .NET / php. i fucking dare you

with nodejs? thats fine. this thread is mainly about clientside browser js tho

We're using javascript to serve content to our millions of concurrent users. There's a reason we're sticking with it. Especially async programming is just too easy with JS. Front-end has also gotten a lot better with ES6, and React.

>ever heard of promises and await / async ?
in my fucking script?

>please show me an example nigger
brunch + sass.

>what is --depth=0
>some random list option which has nothing related to complain about retarded nodejs module writers who import ton of other modules which only have one line or ten.

sorry but I think you are fucking retarded.

>in my script
where else ?
>sass.
use cdn's you pleb
>importing one liners
if you use a module that does that, you're the stupid one.

that depends. if the server loads the data to render everything into html then it obviously takes longer than without needing to load it. if the fat client is done correctly then the user waits about the same amount of time, but what he sees while waiting is an unpopulated page with a nice loading indicator instead of a blank screen.
but yeah, I get what you mean. ironically, the solution is to do server-side "pre-render", which involves running the client-side code on the server, which typically means more javascript, and not less.

>in my fucking script?
what?

>web app
no
>native application that runs on pc/mobile
QT, python + kivy, scheme + lambdanative, java + javafxports, SDL + any langauge that compiles to native library

>ever heard of promises and await / async ?
chaining callbacks to avoid callback hells is not that brilliant though

This. Taking your job yet can't do it as well.

propose something better then.

its a lot better tho

a way to make functions execute line by line instead of executing everything at the same frigging time

>what?

the context is if you should using js/node as general scripting like ruby/python.

And you tell me to write a ton of promise/await wrapper just for some throwaway scripts?

nodejs by default is fucking unsuitable for this kind of task.

>everything sync instead of concurrency.
are you retarded ?

>what is Promise.promisify

>web apps

i never said we should drop async completely. i'm just saying having a way to make some parts of code execute line by line wouldn't be too bad. something like;

sync {
doThis();
doThat();
}

>if you use a module that does that, you're the stupid one.
guess what? every popular node modules have it, be it babel, brunch/gulp/webpack, lodash, uglify... Even if it isn't on the package.json file, a random dependencies will do. Remember that leftpad disaster?

but we can tho

other languages do it just fine. erlang does it brilliantly.

>No class support
>Scopes are retardedly broken
>No strong typing
>Overall retarded broken shit such as arrays indexes
>Needing to use anonymous functions because the language scopes are fucked up

Do I need to keep going?

>no class support
exploringjs.com/es6/ch_classes.html
>scopes are broken
'use strict'
>no strong typing
this is the only valid thing in your list, this is a js meme
>broken array indexes
what is nodejs
>async functions have nothing to do with function scoping

>>async functions have nothing to do with function scoping
isn't anyway related to
>Needing to use anonymous functions because the language scopes are fucked up
you fucking idiot.

>whats is google
>what is facebook
>what is quora
>what is yelp
>what is air bnb
nigger please

CPU load vs MEM load.
which is worse and why.

>npmjs.com/package/user-home
>11.5M downloads last month
>content:
> 'use strict';
> module.exports = require('os-homedir')();

and guess what? `os-homdir` is another package which actually had 24 lines of code (which can reduced to 6 if he knows `switch case` and not wasting all of those whitespaces)

Brilliant!

Nothing wrong with js itself
The people who use it are just braindead themselves for not being able to write this themselves.

everything fixed by a drop-in replacement superset of javascript made by the great bill gates (may he rest in pece)

nodejs.org/api/os.html#os_os_homedir

the more popular the technology, the more there will be idiots using it. this is a universal law

>the reason this exists is because it would couse another leftpad clusterfuck if it got removed.
can this community die already ?

>typescript
>having an any type
its a great superset.
but by including the fucking any keyword, you're still allowing braindead js developers to get around the entire typing system.
we were so fucking close to having this fixed by typescript but then the fucking any keyword had to exist

Leave JavaScript to me.

Since TS is a superset, all of its type safety must be optional, because, well, JavaScript.

W A K E M E U P I N S I D E N I G G A

Look OP we made a lot mistakes in the 90s and you are just going to have to live with it.

javascript without v8 is shit
thank god for google

Because v8 is fast? Javascript should not be used for fast things IMO. There are 1000 different tools that are fast and don't suffer from JS' flaws

is it lisp?

you're not passing any variables to the promises to make them look cleaner faggot

promises are almost as messy as callbacks,

and async/await is no better

fuck leaving nodejs for elixir was the best thing I ever did, so fucking comfy now.

you want me to not use language features ?
these things exist to make the code more readable and you're complaining that it does ?
are you really retarded sunny jim ?
and if you think that looks messy, please show me some better code.

?

i thought all the pajeets know was java

pajeets know whatever language the person posting hates

>he doesnt know what auto currying is.
kys man

yes, because symbol galore is waaaaaaaaaaaaaaaaaaaaaaaay better than readable code. are you even real man ?

Because it runs the fucking Internet now and there is an entire industry of nu-male and Karlie Kloss Koder web "devs" that perpetuate this vicious cycle of bullshit frameworks that do little more than what straight JavaScript + JQuery can already do that companies have picked up because they want to sound relevant and hip too and now we're in this fucking position

looks like someone is either getting bullied, or cant find a job in functional-esotetric-language#6672664 and is now salty. how are you ? you need some help ? that kind of salt could start a business

webdev in general is the cancer

too bad 10 years from now the dom is gonna be what everyone uses for gui and several high level languages for back end coding

>it's expressive
>it's functional-ish
>it works well with all things async out of the box (and we're in the age of real-time, I/O, async shit)
>ES6 made it bearable, Typescript and Node made it good (raw ES5 Javascript is shit, I'll give you that)

I have. I used OCaml
I don't see why any of those would be necessary, although Ruby is rather nice

what do you want ? spend 3000 years building a simple backend in c++ or something ? companies need to deploy good shit quick. and web is a solid platform for doing so. at the company i work at, we released a offline installable version of our webapp and we literally had customers telling us that they did not want to install shit but rather use it right away. thats the strength of web. you dont need to install shit.

>OCaml
J U S T

An actual answer:

People needed a quick, convenient way to accomplish basic website functionality on the client's side. To paraphrase one of the people that designed it "We needed to make the monkey dance when you moused over it. This is what JavaScript was designed for"

It became the standard on basically every web browser. However, the internet then erupted into enormously bigger magnitudes accomplishing new and interesting things and before we knew it people were making a wide and diverse array of tools and creations that existed on the internet in JavaScript simply because it's all we had.

Fast forward 15 years. Databases are written in JavaScript, JavaScript plugins that compile JavaScript are written in JavaScript, package managers that manage JavaScript plugins are written in JavaScript. Desktop applications are now written in JavaScript via a JavaScript plugin simply because of the reason that there's a huge market for people that want to develop for the desktop but only know JavaScript. You know Slack? Yeah, that's written in JavaScript and it occupies 14% of your CPU when idle.

The most popular and fundamental framework basically just takes JavaScript's abhorrent verbosity and boils down the syntax to a single character and the functions down to a single word for the sake of making it less redundant, and then there are pre-processors that compile to this framework to make it even less redundant.

JavaScript basically stands as a monument to making something before you know what to do with it. I applaud people on their resourcefulness but their resourcefulness is still the equivalent of finding new and creative ways to build automobiles out of Lego.

what is this chart even supposed to show?

that your type system is lacking i a lot of areas

are you saying that js code is more readable then elixir?

i cry every night

yes.
thats one of the strengths of js.
its readable as fuck

I thank lord jesus for it everyday because making my gaymen ui without html, css and js would have taken at least 15 years

can someone post the microsoft guy's convo about windows ui programming ? i think its appropriate right now

I don't think you understand what a type system is

youtube.com/watch?v=FopyRHHlt3M

let fs = require('fs')
let file = fs.readFileSync('/path/to/file').toString().split('\n');
file = file.filter((l)=> {
return l.includes('Word')
});


File.read!("/path/to/file")
|> String.split("\n")
|> Enum.filter(&(String.contains?(&1, "Word")))


What's more readable?

Why is it awful?
Honest question, I'm a programming beginner and I'd like to be less stupid.

It isn't.
Please don't take the people who shit on it in this board seriously.
Its a good language for getting into programming and offers great routes to all kinda of jobs in development. the reason people shit on it, is because base JS (ES5) is rather lacking in areas such as async programming, typing and function scoping. but once you start using ES6, most of those issues go away.

you're not even trying at this point mate

>stupid sigils everywhere
Nice bait.

Its literal programming cancer. Real programmers use it as last resort for stupid browser tricks. If you want to start with a meme scripting language look at python or Ruby.

Name one advantage python and ruby have over javascript.

>import from ramda

I lol'd

need to use an external library to make your shit look good.

and why are you using promises? my example was async.

It can't be bad if everybody uses it.