Safety1stClyde

Joined 11 years ago

Karma
175
Submissions
284
Member since
Sep 2
View on Hacker News

Recent submissions

Comment · 5 years ago
Here are some recent interesting videos by "Mentour Pilot" about the DC10 plane accidents caused by a cargo door coming off and depressurising the cargo hold:

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.

Comment · 5 years ago
Unicode was originally meant to fit everything into 16 bits. UTF-8 is just a way to encode, it doesn't decide what goes into Unicode.
Comment · 5 years ago
What did you want them to say?
Comment · 5 years ago
> And although officially JSON requires quoted strings, almost none of the parsers actually enforce that

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.

Comment · 5 years ago
Facebook hates him! Here's how a hacker news commenter used one weird old trick to produce new phrases to put in headlines!
Comment · 9 years ago
We're discussing programming language benchmarks. If one was forced to write all of a C or C++ or even Go program using only doubles, and not integers, and only hash tables, not arrays, undoubtedly it would become slower. The impressive thing about Node.js is that it is as fast as it is despite JavaScript not having integers or arrays.
Comment · 9 years ago
> There's plenty to not like about JS, but being interpreted and not having integers or arrays is not high on its negatives list.

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.

Comment · 9 years ago
A program written in C will execute faster if you run it multiple times, and slower if it has not been run recently. Presumably all of the benchmarks consist of many thousands of repetitions of the same process.
Comment · 9 years ago
I program in Go and JavaScript, but don't enjoy it.

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.

Comment · 9 years ago
> The Go vs JavaScript lineup is quite stunning. Go destroys Node.js in memory usage and performance on every test except regex-redux (edge case?).

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.

Comment · 9 years ago
I bought this book based on the endless internet recommendations. After reading it, I was mystified, completely mystified, why people recommended it so strongly.
Comment · 9 years ago
> I've already provided instructions on how you can trivially setup a phpBB forum using cPanel.

This statement is incorrect. You haven't provided instructions on how one can trivially set up a phpBB forum using cPanel.

Comment · 9 years ago
Despite what the article says about Trump supporters being worried about climate change, this was a campaign pledge of Trump. So this, like the wall, is what people who voted for Trump actually voted for. Rather than blaming Trump, perhaps the voters should be blamed.
Comment · 9 years ago
Sales and engineering are the two pillars of the Conjoined Triangles of Success.
Comment · 9 years ago
> You use this to get suggested corrections when things don't compile.

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.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton