Recent submissions

Comment · 1 month ago
It is certainly not almost always an error.

It is a very normal thing to do when doing embedded programming. It normally means "I do not know how to handle this error. Let the watchdog reset me."

Comment · 1 month ago
It is obviously a subseet. But an important one.
Comment · 1 month ago
Optimizations are nice and all. But they should not ever be allowed to change the behaviour of the program, from what is expected by reading the code.

There are good uses for infinite loops.

Comment · 3 months ago
Which are some interesting programs written in the Markdown programming language?
Comment · 9 years ago
Actually everyone use hard links. They just don't use multiple hard links to the same file.
Comment · 11 years ago
Those "few minutes" have lasted for at least an hour now.
Comment · 12 years ago
> This feature is documented under the -f option of the export built-in command. The implementation detail of using an environment variable whose value starts with "() {" and which may contain further commands after the function definition is not documented, but could still be considered a feature.

This undocumented implementation detail is also a limitation on the use of regular environment variables, and should be documented. When reading documentation about a mechanism, I expect that special magical strings which change behaviour of the mechanism are clearly documented. If such documentation had existed, someone might have noticed it and guarded against it.

> Assumedly programs like apache filter out environment variables properly. But unfortunately, in the validation of input data, they fails to validate correctly input data because they don't expect that data starting with "() {" will be interpreted by their bash child processes. If there's a bug, it's not in bash, but in apache and the other internet facing programs that call bash without properly validating and controlling the data they pass to bash.

It isn't easy to validate and control data against an unknown magical feature in one of many possible shells.

> But on the other hand, it is free software and not difficult to check the source to see as the nose in the middle of the face, what is done. When reusing a component with missing specifications and lacking documentation, checking the source of the implementation should be standard procedure, but it has clearly not been done by Apache or DHCP developers.

I think the shell is specified in POSIX/SUS. Checking the source of all possible open-source shells would be a huge job. I don't know how they should check source code of the closed-source shells. I don't blame them for using the environment variables according to available documentation.

Edit: typo

Comment · 12 years ago
I doubt DEC had anything to do with GEM. It was a product of Digital Research (same company that gave us CP/M, MP/M and DR-DOS)
Comment · 12 years ago
I wish for a standard #once directive. It should be very simple to implement, increase preprocessing speed and reduce the size of visually disturbing boilerplate in header files.
Comment · 12 years ago
A combined REPL and editor for C# looks useful. I will try it next time I have some spare time.

The name is confusing. A C shell already exists (http://en.wikipedia.org/wiki/C_shell). An alternative name could be CSharpShell. Btw, while googling that name, I found CsharpRepl, which seems to be a somewhat similar tool.

Comment · 12 years ago
> Most C++ code uses switch frequently, usually without taking advantage of fallthrough.

I am not so sure about this. Thinking back on my uses of switch in C and C++, I am not able to remember using switch without taking advantage of fallthrough. Maybe I am just not a typical C++ programmer...

Comment · 12 years ago
So his political view made him unsuitable for a job. I am really surprised about this from a company and a foundation I associated with openness and concern about freedom.
Comment · 12 years ago
You could add the option to filter by programming language, to avoid seeing repositories using languages the potential contributor doesn't know or has no interest in.
Comment · 12 years ago
> Wow. That's full of falsehoods like these:

> "What happens is that variable i is converted to unsigned integer." No: 'long i' is converted to 'unsigned long'.

Actually, unsigned long is an unsigned integer. He didn't write unsigned int.

> "Usually size_t corresponds with long of given architecture." No: For example, on Win64 size_t is 64 bits whereas long is 32 bits.

"Usually" is the keyword here. He could have said "Usually size_t has at least the same amount of bits as long" and it would be better related to the referred rule.

Comment · 12 years ago
So what if the syntax is (part of) what makes your language novel, interesting and special?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton