4071814b |
1 | # JavaScript and its consequences have been a disaster for the human race |
ccb424f8 |
2 | |
9f72dd11 |
3 | OR: Manmade virus infecting the world. |
4 | |
ccb424f8 |
5 | JavaScript is a programming language often used on websites. To create |
6 | dynamic content on client end. Some dudes thought that extracting the |
7 | V8 (chromium javascript interpreter) and making it a executable file |
8 | to run javascript outside the browser was a good idea and now we're |
9 | doomed. |
10 | |
11 | JavaScript is not only stupid (javascript returns true when) ```true + |
12 | true === 2``` Which means that true is literally ```#define true 1``` |
13 | |
14 | At the end that doesn't matters. Because it's a useless fact to be |
abf2637e |
15 | honest. It only shows how bad designed the shit is. But the pain starts |
16 | when you actually use that programming language. |
ccb424f8 |
17 | |
4071814b |
18 | ## Developers idiocy |
ccb424f8 |
19 | |
20 | First of all the language is slow as fuck. And websites are BLOATED of |
21 | JavaScript nowadays. Adding ***USELESS*** function i'd never like to |
22 | use, or functions I already disabled on my browser. Such as smooth |
23 | scrolling. I hate smooth scrolling. But some websites force me to use |
24 | it because JavaScript. |
25 | |
9f72dd11 |
26 | Not to mention the fucking thing runs like shit because developers |
27 | don't really know how to write this abyss programming language. For |
28 | example, In a good browser (pale moon), Javascript runs like shit |
29 | (IT'S A FEATURE). No I mean, literally, Tweetdeck runs 100 times |
30 | better than fucking regular twitter.com. |
31 | |
32 | And remember, if you use a good browser (pale moon), which has slow |
33 | javascript interpretation, haha! good luck browsing the web with |
34 | javascript enabled! it will be fucking impossible |
35 | |
ccb424f8 |
36 | ## Idiocy examples |
37 | |
38 | ~~~ |
39 | |
40 | <true + true === 2 |
41 | >true |
42 | <true == "1" |
43 | >true |
44 | <false == 0 |
45 | >true |
46 | <false == "0" |
47 | >true |
48 | |
54330482 |
49 | <'0' == 0 |
50 | >true |
51 | |
52 | <'\t' == 0 |
53 | >true |
54 | <[] == 0 |
55 | >true |
56 | <'\t' == [] |
57 | >false |
58 | |
ccb424f8 |
59 | <false == undefined |
60 | >false |
61 | >false == null |
62 | <false |
63 | |
64 | <null == undefined |
65 | >true |
7a1ab46f |
66 | |
16c7d46b |
67 | // I specially like this one |
68 | |
69 | <[]+{} |
70 | >"[object Object]" |
71 | <{}+[] |
72 | >0 |
73 | |
ccb424f8 |
74 | ~~~ |
75 | |
9f72dd11 |
76 | # Disabling JavaScript |
ccb424f8 |
77 | |
78 | Unless you only use 1.0 websites. Disabling javascript will broke your |
79 | internet experience, but will make it way faster. just install |
80 | noscript and have fun with your sane browser. |
81 | |
9c93887f |
82 | # NodeJS |
ccb424f8 |
83 | |
84 | Node is what happens when you extract the JavaScript interpreter from |
85 | chromium and put it on the desktop. This allows the user to execute |
86 | .js files on the desktop without a browser. Which is stupid. A web |
87 | programming language shouldn't be on desktop. Just on the web. But |
88 | thanks to this great idea we've now worse things |
89 | |
90 | (Node isn't even a JavaScript implementation. It is just the V8 engine |
91 | outside the Chromium browser. Meaning that node is just a part of |
92 | chromium with marketing) |
93 | |
4071814b |
94 | # Syntax |
95 | The syntax was written by a gorilla, it uses camelCase, (I don't |
96 | like it, but well, i can live with it). |
97 | |
54df6072 |
98 | for example, in JS you do `document.getElementById("foobar");` I guess |
4071814b |
99 | this is ok, but like I said, this was written by a monkey, becuase |
100 | then we have functions: `XMLHttpRequest` <-- What the hell? Why is |
101 | XML capitalized, but Http isn't? A good language, let's say, C, would |
102 | have done it like this: `xml_http_request`; (which is saner) |
103 | or `XML_http_request()` if you use the weird OpenSSL functions names lol |
104 | |
105 | |
9c93887f |
106 | # Electron |
ccb424f8 |
107 | |
108 | Electron is what happens when you hire web developers but you gotta |
109 | make the program aviable for the desktop. The problem is that |
110 | JavaScript can't do graphics (as far as I know, there's no X11 library |
111 | for JavaScript, thankfully) So what do they do to use GUIs on |
112 | JavaScript? Make every program a mini-chromium browser! So every |
113 | program that's running electron is just chromium browser. Which is |
4071814b |
114 | truly stupid. And a lazy way to do programming. |
ccb424f8 |
115 | |
116 | Here's what is needed to run a program (Written in a compiled language) in GNU/Linux: |
117 | |
9f72dd11 |
118 | <img src="C.png" width=300> |
ccb424f8 |
119 | |
120 | And this is what is needed to run a program written in electron: |
121 | |
9f72dd11 |
122 | <img src="Electron.png" width=300> |
ccb424f8 |
123 | |
124 | # Links |
125 | |
126 | [JAVASCRIPT WAS A MISTAKE](http://www.bordi.ga/blog_shit/js.html) |
69b11735 |
127 | |
128 |  |