fucking gross. absolute shitters
EDIT: it's at the right end of the URL bar
lmao JUST MAKE DESKTOP SOFTWARE WTF. How long before medical equipment runs on javascript?!!?!??! I thought "Progressive Web Apps" were dead in the water?
I'm not really against stuff like that but "the web" is probably not the best "technology" to base cross-platform programs on.
Half of the problem isn't even the JS itself. It's what it is used for.
Read theory, but know this is not a comprehensive work: https://idlewords.com/talks/website_obesity.htm
Most of the web today is not designed to deliver information that you request. It is designed to deliver ads, by enticing you with the promise of information. The ads are what are slowing you down.
Install a good adblocker. uBlock Origin is the generally recommended one. (I was also going to recommend uBO Extra but that seems to be unnecessary now. Rot in hell, Instart Logic!) Though I recommend more drastic measures as well.
Pi Hole allows you to set up network-wide ad blocking through a DNS blackhole system. Basically, DNS is your computer's phonebook. For the zoomers out there, we used to get a really thick book in the mail occasionally, it had people's landline phone numbers (a primitive wired form of telephone communication) in it for everyone in the local area. If you wanted to call your friend at school, you'd ask your parents to help find their parents' names (the head of household, most often the adult male parent, would be the name listed -- often your parents would know them if they've both lived there the whole time), and you'd call them and ask to speak to them (their parents would likely pick up, landline phones had one phone for the whole house). The point is, it translates the names to a number useful to the system. Pi Hole is sort of like ripping out or blacking out numbers you don't want your computer to call. You need a Raspberry Pi for this which can run you $50-80 bucks factoring in accessories you need, but it's worth it. If you're smarter than me you can probably get it to work over VPN for your phone on the go, but I have a bachelors degree in IT and couldn't figure it out (I didn't try very hard to be honest since I don't have many ads getting through regular iOS ad blocking). https://pi-hole.net/
Ad Nauseam is a nuclear option and is mutually exclusive with the above (though you can use it for desktop and PiHole for mobile devices). Ad Nauseam sacrifices performance, but will simulate clicking random ads in the background. This ruins advertisers' data, and may generate billable events (meaning the site will get paid for ad clicks, which you may or may not want, but still, it's at the expense of the advertiser). I suspect this may be the more popular option for some, but I ultimately quit using it in favor of Pi Hole. Get it here: https://adnauseam.io/
I may make an effortpost on this subject if I remember.
Please do make the effort post if you have the time, this is interesting and useful.
JavaScript can perform fairly well on the modern engine with JIT. The DOM though it is horrible for this purpose, and so are other browser component, and people rarely will include one without the other.
What does it matter if it performs well or not, when it doesn't even have separate types for an integer and a float.
I do not like it as a design choice, but there are many languages with a dynamic number type like this, and it does not matter for most use of the language.
That's true, but it does matter for medical equipment, which the op mentioned.
Ironically, it is heavily optimized in spite of this. For example, JS arrays are sparse, but runtimes like V8 optimize them to be packed, if possible (if the array contains only integer indices and no holes). Integers also stay integers, if the runtime is fairly confident that they won't suddenly become floats. Moreover, if the runtime finds out that some JS objects don't change their shape (i.e. have the same properties and their inferred types), their relative addresses are cached, so the runtime doesn't need to look them up every single time.
Yeah it's moreso the size of the web "standards" (makes it hard for anyone to create a new implementation), the interest groups that control it, the amount of baggage it has acquired over time (and started with), and the inefficiency and other problems that come with using text-based formats that require parsers and stuff. WebAssembly could be a good replacement if there is ever a standardized "desktop" API that doesn't require javascript, but for now WASM is just another barrier to creating an implementation of the web standards.
There is! It's called WASI and it's being standardized.
Otherwise, there's nothing stopping you from making Electron apps with wasm right now, of course.
Doesn't seem like its going anywhere fast and the main thing it needs is a graphics API and interface to act as a desktop like program. I just don't know if there's enough motivation from big companies to do that. I doubt Google wants creating a web browser to become simpler. There really just needs to be a specific project to replace HTTP+HTML+CSS+JS+WASM with HTTP+WASM or QUIC+WASM or something.
Take a look at WebGPU, which can be used from wasm. It's an upcoming standard, but we also have had WebGL since forever.
Well I mean it's better than creating a non-web program or something, which also takes extra effort of course.