People commonly criticize that "web development is shit and JavaScript is terrible", but as it is...

people commonly criticize that "web development is shit and JavaScript is terrible", but as it is, with how heavily optimized web browsers are now, people can compile applications into Javascript that actually have very comparable performance to a native binary of the same application. Cfags on suicide watch

Other urls found in this thread:

phoronix.com/scan.php?page=news_item&px=CIB-Clang-In-Browser
hacks.mozilla.org/2013/12/gap-between-asm-js-and-native-performance-gets-even-narrower-with-float32-optimizations/
research.cs.wisc.edu/areas/os/Seminar/schedules/papers/Deconstructing_Process_Isolation_final.pdf
daniel.haxx.se/blog/2017/03/27/curl-is-c/
twitter.com/NSFWRedditVideo

Forgot the link

phoronix.com/scan.php?page=news_item&px=CIB-Clang-In-Browser

Array.prototype.forEach = function() {console.log('haha, I just shit the bed. Love, JavaScript xoxoxo');}

If so then why did they have to create typescript to get it working almost on par with modern oop and static typed languages. Javascript is also very unsecure. If it wasn't you wouldn't be able to inject scripts on modern day horribly optimized browsers

If Javascript wasn't terrible you wouldn't have to rely on frameworks to get anything done front or back

That's just the power and flexibility of the language. You can do whatever you want

the reason web development is shit isn't that you can't do all sorts of things in JS. You can, as you note. You just shouldn't, is the thing. 99% of the JS on the web is either pointless visual tinsel or otherwise fucking with the UI (whoever dreamed up infinite scrolling should be shot) or its advertising, tracking, """analytics""", coin-mining, and other botnet.

>it's not a bug,it's a feature!
but seriously,the typing system of javascript fucking sucks

now that multiple c to j.asm compilers exist, and of course any language really can do this. why not just move a javascript interpreter into the kernel and forget native code entirely

it's the most popular language with the most powerful modern oop opensource codebase.

portability would be solved forever and we can really do what we've been flirting with for years now, this is obviously what we need

browsers are the portal to 90% of average users programs, this can finally end this and make the computing world make sense.

Q1. Won't this be way slower than C or something?
WRONG! asm.js is approaching C speeds even with little investment being done so far, infact C compiled into asm.js is actually faster than Clang compiled code for box2d game engine.
Source: hacks.mozilla.org/2013/12/gap-between-asm-js-and-native-performance-gets-even-narrower-with-float32-optimizations/

Q2. what about vm overhead! it can never truly be as fast!
WRONG!. Infact according to a study by Microsoft a shift to virtual memory protection instead of hardware based irq we can increase speed by 25 - 40%
using a conservative 80-90% vm overhead we can actually gain a modest speed increase with our new kernal j.asm interpreter
source: research.cs.wisc.edu/areas/os/Seminar/schedules/papers/Deconstructing_Process_Isolation_final.pdf

Q3. Won't this be insecure!
WRONG! how often does javascript break out of sandbox today? Anyway. libcurl is written in one of the most insecure and outadted languates ever C, with no garbage collection and shitty manual memory management its practically a joke in the security world; yet libcurl is constantly and exhaustively searched for issues and therefore remains relevant even now
source: daniel.haxx.se/blog/2017/03/27/curl-is-c/

so Sup Forums, is it time to dump native code and move everything to the worlds most popular language?
I say yes

It's amazing the lengths webbabbies will go to to avoid learning a 2nd language

im an embedded C developer, however I am informed and intelligenet enough to know that C is utterly obsolete
grow up

>im an embedded C developer, however I am informed and intelligenet enough to know that C is utterly obsolete

nice argument lol

>It's ok if it's retarded because we've optimized for that retardation!
You're celebrating the ability of cars and tires to work around your square wheels.

You actually don't need anything but plain vanilla JS to get everything done.
JS Frameworks are a meme that has gone too far.

>people can compile applications into Javascript that actually have very comparable performance to a native binary of the same application.
First, that is not actually true at all. Second, it has absolutely no bearing whatsoever on the statement that web development is shit and javascript is terrible.

javascript is the universal curly brace language

>First, that is not actually true at all. Second, it has absolutely no bearing whatsoever on the statement that web development is shit and javascript is terrible.

how many times do people need to direct you to the sources which prove otherwise, entire game engines are compiled to run faster in js than C
see:
hacks.mozilla.org/2013/12/gap-between-asm-js-and-native-performance-gets-even-narrower-with-float32-optimizations/

>i i-its just terrible because im scared of change

Don't bother trying to educate these morons. Sup Forums is full of people too stupid to step up and use React to build their apps (or "Programs" as code monkey's refer to them.)

also you make baseless assumptions about performance, vs careful analysis and measurement about how things like memory protection, dynamic optimization ect can improve performance and are not possible in obsolete languages like C

lmao

sick argument

I don't actually believe you. If it was true you'd know there are entire microcontroller families where C is literally the only option, making it not obsolete and, actually, much more suitable than a language with a GC and no manual memory management. Not that you seem to know what the word obsolete means, as you've used it having acknowledged that kernels and your supposed industry use it to create new features and maintain legacy ones.

Wait, you actually think JS is a well designed language?

It's always funny how you just need to repost this thread every month or so to bait some newfags to get mad about this topic.

Read the posts littered with sources you utter cretin

The latest micros we use can run entire real time operating systems, multi core ect

It's the industry standard, just like despite it's problems c used to be. Besides I don't try to project the entire industry into the limitations of micros like you are trying to. I develop desktop scale applications in c and cpp too

im writing a general ledger program right now with only vanilla JS to mimic excel-like functionality and also for some ajax requests and its kinda refreshing. sucks without jquery selectors but im managing. a lot of async stuff though so im having to generate a lot of html from JS and i'm trying to keep it clean and separate as much as possible but this might not be the best project to do without a framework

>The latest micros we use can run entire real time operating systems, multi core ect
Yet they still sell 8 bit chips. Many embedded applications don't need any more than that. And, even for those that do, guess what language RTOSes are written in?

Why are you feeding the troll?

I don't know why that has to be in JS, but I guess is that your employer wants you to do that.
It's not like it's much different for me, but it's ok.
Just keep the API and the JS parts minimal and JS isn't too horrible.

>' Besides I don't try to project the entire industry into the limitations of micros like you are trying to. I develop desktop scale applications in c and cpp too'

JIT can be faster for most tasks
embedded shit will just hookup to the main processor

>C is utterly obsolete

yes

I'd like to see you make something better, kid

Lmao yep