Safety1stClyde
Joined 11 years ago
Joined 11 years ago
What programming language? I'm not familiar with those parsers, the ones I know of very much do enforce quoted strings.
> you will find a huge amount of JSON out there that is not actually compliant with the official spec
The parsers I use all follow the current JSON RFC specification, and I've never encountered any JSON from APIs which they reject.
> Just like browsers have huge hacks in them to handle misformed HTML.
Web browsers do deal with a variety of things, not so much JSON parsers in my experience.
We are having a discussion is about programming language benchmarks.
A benchmark in this case is a measure of how fast a computer program can run. A computer program is a series of instructions for a computer. These instructions are written in something called a programming language. A programming language which is interpreted is inherently slower than a programming language which is compiled to assembly language. A programming language which does not have integers but must represent all numbers as floating point numbers is inherently slower than a programming language which has integers. A programming language which does not have arrays, but must represent arrays using hash tables, is inherently slower than a language which does have arrays. Thus, Node.js, which is interpreted and does not have arrays or integers, would be expected to be have much lower benchmarks than Go's, and yet node.js has exceptionally high performance.
I assure you that JavaScript is an interpreted language, and it does not have arrays or integers. This is not a harsh statement but a factual one.
Why would it be stunning that a programming language compiled to assembler can beat a broken-by-design interpreted language which doesn't even have integers or arrays? The stunning part is that the people behind node.js have managed to get that much performance.
This statement is incorrect. You haven't provided instructions on how one can trivially set up a phpBB forum using cPanel.
It repeatedly says that the aim is to fix errors. Assuming, however, that it is intended to give better error messages, here is the output of Clang on the input C program given as an example:
$ cc gupta.c
gupta.c:3:5: warning: incompatible redeclaration of library function 'pow'
[-Wincompatible-library-redeclaration]
int pow(int a, int b);
^
gupta.c:3:5: note: 'pow' is a builtin with type 'double (double, double)'
gupta.c:14:23: error: function definition is not allowed here
int pow(int a, int b){
^
gupta.c:18:14: error: expected ';' at end of declaration
return res;}
^
;
gupta.c:18:14: error: expected '}'
gupta.c:4:11: note: to match this '{'
int main(){
^
1 warning and 3 errors generated.
It identifies the problematic line of the program code better than gcc. The function declaration within main is not legal. I tried this with the gcc compiler and did not get the error above. Running "indent" on the code would have revealed the problems:$ indent < gupta.c
/INDENT Error@18: Stuff missing from end of file */
A simple count of braces, { and }, would also have revealed the problem.
https://www.youtube.com/watch?v=Gv5EQlzM1B8
https://www.youtube.com/watch?v=_7rF0wCSpE0
What happened, if you don't want to watch all the video, is that the aeroplane actually collapsed internally. In the second case, some of the passengers were sucked out of the plane.